0
votes

I've developed a JAX-WS (2.2) Web Service using OEPE (Oracle Enterprise Pack for Eclipse) with local Weblogic Server 12.1.1 instance. I'm using Java 6 on windows environment. I've added message level security to it using following policy files that come with weblogic: Wssp1.2-2007-Wss1.1-X509-Basic256.xml, Wssp1.2-2007-SignBody.xml, Wssp1.2-2007-EncryptBody.xml. I also developed client using OEPE and configured it to send required security headers. I followed this documentation to develop web service, client and to configure security in both: http://docs.oracle.com/cd/E24329_01/web.1211/e24488/message.htm

If I deploy the client on weblogic server then it works fine, but I cannot run it as a standalone client. It also fails if I deploy it on Apache Tomcat 7. Looking at exception it looks that it requires few weblogic libraries. I've copied weblogic.jar and wseeclient.jar from $WL_HOME/server/lib directory, but still can't get it to work. This is the exception I get on tomcat:

SEVERE: Servlet.service() for servlet [jsp] in context with path [/WebserviceClient] threw exception [java.lang.NoClassDefFoundError: weblogic/utils/NestedException] with root cause
java.lang.ClassNotFoundException: weblogic.utils.NestedException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96)
at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:95)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:243)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:302)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I've been trying to solve this issue from last two days without any luck and this is driving me crazy. I'm fairly new to weblogic as well as web services so not exactly sure how to do this. Can anyone tell me exactly which jars are needed to run it on tomcat or as a standalone application?

Thanks, AndyT

1

1 Answers

0
votes

I finally copied all the jars from weblogic installation directory to my standalone client's lib and then copied some jars which didn't seem relevant. I know this is not a very good solution (as it increased the size by about 100 MB) and there are still few unnecessary jars, but it resolved my issue for now.