I'll be back!

  Focus on BPM, celebrate PegaRULES Process Commander (PRPC)
posts - 76, comments - 161, trackbacks - 0, articles - 2
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

PRPC JSR94 Troubleshooting

Posted on 2009-05-31 18:00 zolly 阅读(1369) 评论(1)  编辑  收藏
Product Version: PRPC V5.3
Reference Document: jsr94service52.pdf

按照来自PDN文档jsr94service52中的JSR94 Sample一步一步重现时,无论采用Ant还是Eclipse编译运行,都可能会出现如下的问题:
2009-05-31 17:14:43,500 [     user-5a57c3e103] (    etier.engine.EngineStartup) ERROR   - PegaRULES initialization failed. Server: user-5a57c3e103
com.pega.pegarules.pub.context.InitializationFailedError: PRNodeImpl init failed
    at com.pega.pegarules.engine.context.PREnvironment.getThreadAndInitialize(PREnvironment.java:
338)
    at com.pega.pegarules.etier.engine.EngineStartup.initEngine(EngineStartup.java:
456)
    at com.pega.pegarules.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:
125)
    at com.pega.pegarules.etier.impl.EngineImpl.doStartup(EngineImpl.java:
98)
    at com.pega.pegarules.priv.services.jsr94.PRRuntime.startEngine(PRRuntime.java:
327)
    at com.pega.pegarules.priv.services.jsr94.PRRuntime.getEngine(PRRuntime.java:
87)
    at com.pega.pegarules.priv.services.jsr94.PRRuntime.<init>(PRRuntime.java:
78)
    at com.pega.pegarules.priv.services.jsr94.PRAdministrator.<init>(PRAdministrator.java:
81)
    at com.pega.pegarules.pub.services.jsr94.PRuleServiceProvider.<init>(PRuleServiceProvider.java:
64)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:
513)
    at java.lang.Class.newInstance0(Class.java:
355)
    at java.lang.Class.newInstance(Class.java:
308)
    at javax.rules.RuleServiceProviderManager.registerRuleServiceProvider(RuleServiceProviderManager.java:
84)
    at javax.rules.RuleServiceProviderManager.registerRuleServiceProvider(RuleServiceProviderManager.java:
67)
    at com.pega.pegarules.pub.services.jsr94.PRuleServiceProvider.<clinit>(PRuleServiceProvider.java:
52)
    at com.pega.pegarules.sample.service.jsr94.client.SubmitClaim.run(SubmitClaim.java:
97)
Caused by: com.pega.pegarules.pub.PRRuntimeException: Method Invocation exception
    at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:
731)
    at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:
568)
    at com.pega.pegarules.engine.context.PREnvironment.getThreadAndInitialize(PREnvironment.java:
328)
     
18 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
    at java.lang.reflect.Method.invoke(Method.java:
597)
    at com.pega.pegarules.engine.context.PREnvironment.doWithRequestorLocked(PREnvironment.java:
729)
     
20 more
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/JspFactory
    at com.pega.pegarules.engine.context.PRNodeImpl.updateSystemStart(PRNodeImpl.java:
1519)
    at com.pega.pegarules.engine.context.PRNodeImpl.startNode(PRNodeImpl.java:
1157)
    at com.pega.pegarules.engine.context.PREnvironment.finishInit(PREnvironment.java:
833)
     
25 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.JspFactory
    at java.net.URLClassLoader$
1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:
188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:
307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:
252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
320)
     
28 more

如果出现类似javax.serverlet.jsp.JspFactory相关的问题,可能有两个原因引起:
1. 在所有引用的Jar path中,没找到javax.serverlet.jsp.JspFactory类。
2. 在多个Jar path中,都找到javax.serverlet.jsp.JspFactory类,出现冲突。

在PRPC中使用JSR94,需要调用servlet-api.jar,该jar包来自Tomcat/common/lib,查询http://www.findjar.com/index.jsp?query=javax.servlet.jsp.JspFactory可知在servlet-api.jar中应该(不敢肯定)包括javax.serverlet.jsp.JspFactory类,但程序仍然报告错误信息。从查询结果中得知在同样的目录下,还有一个jar包jsp-api.jar也包含该类。于是,本人将两个jar包同时放到Eclipse的Path中去,结果编译运行成功。所以本人推测,在apache-tomcat-5.5.17版本中,servlet-api.jar中并不包含javax.serverlet.jsp.JspFactory类。

如有异议,还请高手指点,以上推断,纯属个人愚见。

评论

# re: PRPC JSR94 Troubleshooting  回复  更多评论   

2009-06-03 17:44 by Purnendu.Dash
If he doesn’t want the Obj- methods, he can always the public APIs to do so.
There are many methods in “com.pega.pegarules.pub.database” package (check out the Database interface).

只有注册用户登录后才能发表评论。


网站导航: