I am using the latest version of Apache POI at this moment which is 4.1.1. Every thing is working fine for xls file. Even for xlsx file in development environment Windows. But I am getting exception in live environment Red Hat Linux.
I have already searched for solutions mostly said to use proper xmlbeans dependency. I am using xml-beans-3.1.0.jar.
I am exporting the war file from eclipse and publishing in oracle web-logic 12c.
Here's the stack trace:
org.apache.poi.ooxml.POIXMLException: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:66)
at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:657)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:180)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:282)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:88)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:341)
at org.apache.poi.ss.usermodel.WorkbookFactory.createXSSFWorkbook(WorkbookFactory.java:316)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:234)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:200)
...............................................................................
...............................................................................
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56)
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:63)
... 181 more
Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.ooxml.POIXMLTypeLoader.<clinit>(POIXMLTypeLoader.java:43)
at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:86)
... 187 more
Here is the full library list I have used:
activation-1.1.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
axis.jar
commons-beanutils-1.9.2.jar
commons-codec-1.13.jar
commons-collections-3.2.2.jar
commons-collections4-4.4.jar
commons-compress-1.19.jar
commons-dbcp-1.3.jar
commons-digester-2.1.jar
commons-discovery.jar
commons-fileupload-1.3.1.jar
commons-io-2.4.jar
commons-lang-2.4.jar
commons-lang3-3.9.jar
commons-logging-1.1.3.jar
commons-math3-3.6.1.jar
commons-pool-1.5.6.jar
commons-validator-1.4.0.jar
core-3.1.0.jar
curvesapi-1.06.jar
datatables-core-0.9.3.jar
datatables-jsp-0.9.3.jar
datatables-servlet2-0.9.3.jar
displaytag-1.2.jar
dom4j-1.6.1.jar
dynaHandlers.jar
freemarker-2.3.23.jar
gson-2.6.2.jar
hamcrest-core-1.1.jar
hibernate-commons-annotations-4.0.5.Final.jar
hibernate-core-4.3.11.Final.jar
hibernate-entitymanager-4.3.11.Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
httpclient-4.5.2.jar
httpcore-4.4.4.jar
iText-5.0.4.jar
jackson-core-asl-1.8.3.jar
jackson-jaxrs-1.8.3.jar
jackson-mapper-asl-1.8.3.jar
jackson-xc-1.8.3.jar
jandex-1.1.0.Final.jar
java-json.jar
javase-3.1.0.jar
javassist-3.20.0-GA.jar
javax.servlet-api-3.1.0.jar
javax.servlet.jsp-api-2.3.1.jar
javax.wsdl.jar
jaxrpc-api.jar
jboss-logging-3.1.3.GA.jar
jcl-over-slf4j-1.7.6.jar
jersey-client-1.9.jar
jersey-core-1.9.jar
jersey-json-1.9.jar
jersey-multipart-1.9.jar
jersey-server-1.9.jar
jsch-0.1.53.jar
json-lib-2.3-jdk15.jar
json-simple-1.1.1.jar
jstl-1.0.6.jar
jta-1.1.jar
juli-6.0.18.jar
junit-4.10.jar
log4j-api-2.3.jar
log4j-core-2.3.jar
log4j-web-2.3.jar
mail.jar
ognl-3.1.4.jar
ojdbc6.jar
opencsv-2.3.jar
org.apache.felix.framework-4.0.3.jar
org.apache.felix.main-4.0.3.jar
org.apache.felix.shell-1.4.3.jar
org.apache.felix.shell.tui-1.4.1.jar
org.osgi.compendium-4.0.0.jar
org.osgi.core-4.1.0.jar
oval-1.31.jar
plexus-container-default-1.0-alpha-10.jar
plexus-utils-1.2.jar
poi-4.1.1.jar
poi-excelant-4.1.1.jar
poi-ooxml-4.1.1.jar
poi-ooxml-schemas-4.1.1.jar
poi-scratchpad-4.1.1.jar
servlet-api-2.5.jar
sitemesh-2.4.2.jar
slf4j-api-1.7.12.jar
SMSClient.jar
spring-aop-4.1.6.RELEASE.jar
spring-beans-4.1.6.RELEASE.jar
spring-context-4.1.6.RELEASE.jar
spring-core-4.1.6.RELEASE.jar
spring-expression-4.1.6.RELEASE.jar
spring-jdbc-4.1.6.RELEASE.jar
spring-orm-4.1.6.RELEASE.jar
spring-test-4.1.6.RELEASE.jar
spring-tx-4.1.6.RELEASE.jar
spring-web-4.1.6.RELEASE.jar
standard-1.0.6.jar
standard.jar
struts-menu-2.4.3.jar
struts2-core-2.5.jar
struts2-jquery-plugin-3.7.1.jar
struts2-jquery-tree-plugin-3.7.1.jar
struts2-json-plugin-2.5.jar
struts2-sitemesh-plugin-2.5.jar
tiles-api-3.0.5.jar
tiles-core-3.0.5.jar
tiles-jsp-3.0.5.jar
validation-api-1.1.0.Final.jar
velocity-1.4.jar
velocity-tools-view-1.0.jar
xml-apis-1.0.b2.jar
xmlbeans-3.1.0.jar
xmlpserver.jar
xmlpull-1.1.3.1.jar
xpp3_min-1.1.4c.jar
xstream-1.4.8.jar
I got around this error by setting this in weblogic.xml:
<container-descriptor>
<prefer-application-packages>
<package-name>org.apache.*</package-name>
</prefer-application-packages>
</container-descriptor>
Weblogic 12c has an old version(2.0) of XMLBeans!
According to
Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
I suspect your class org.apache.xmlbeans.XmlOptions came not really from xmlbeans-3.1.0.jar but from any other library which possibly includes an old version of org.apache.xmlbeans.*.
You could detect where the class came from using folowing code:
ClassLoader classloader =
org.apache.xmlbeans.XmlOptions.class.getClassLoader();
java.net.URL res = classloader.getResource(
"org/apache/xmlbeans/XmlOptions.class");
String path = res.getPath();
System.out.println("XmlOptions came from " + path);
Related
I tried to a deployment with Jenkins. But I got an error in web logic server 12.1.3. I configured "plugin-configuration.xsd" file in Jenkins web logic plugin. Also I configured Web logic Deployment Plugin parameters in Jenkins web interface.
additional classpath: C:\Oracle\Middleware\Oracle_Home\wlserver\server\lib\wlthint3client.jar
Configuration file: myPath\.jenkins\plugins\weblogic-deployer-plugin\config\plugin-configuration.xsd
How can I solve this?
In addition, my config.xsd file is that;
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.jenkinsci.plugins/WeblogicDeploymentPlugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://org.jenkinsci.plugins/WeblogicDeploymentPlugin plugin-configuration.xsd">
<weblogic-targets>
<weblogic-target>
<name>weblogic_local_server</name>
<host>127.0.0.1</host>
<port>7001</port>
<login>admin</login>
<password>admin</password>
<authMode>BY_LOGIN</authMode>
</weblogic-target>
</weblogic-targets>
</config>
The error is here:
<BEA-149205> <Failed to initialize the application "jenkins [,LibImplVersion=2.60.3]" due to error weblogic.application.library.LibraryDeploymentException: [J2EE:160144]Failed to register library Extension-Name: jenkins, Implementation-Version: 2.60.3: Library cannot have Implementation-Version set, without also specifying its Specification-Version
weblogic.application.library.LibraryDeploymentException: [J2EE:160144]Failed to register library Extension-Name: jenkins, Implementation-Version: 2.60.3: Library cannot have Implementation-Version set, without also specifying its Specification-Version
at weblogic.application.internal.library.LibraryDeployment.prepare(LibraryDeployment.java:66)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:155)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:210)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:118)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1017)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:388)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:430)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:753)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>
Problem is that; Wblogic Deployment Plugin additional classpath parameter was wrong. It must be "C:\Oracle\Middleware\Oracle_Home\wlserver\server\lib\weblogic.jar".
java -cp C:/Oracle/Middleware/Oracle_Home/wlserver/server/lib/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -username admin -password q1w2e3r4 -deploy -name sample -targets AdminServer -source C:\sample.war
I am running into some issue, I have developed a utility web service client jar file which is build on springs. Reason behind build this jar its common jar for more than one project.
inside jar we have lib folder its has all its dependent jars. Its working able to load application context and able to do its job independently. Build it as Jar file using ant scripts and its MANIFEST.mf file look like this
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.3
Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
Rsrc-Main-Class: ${main-class}
Rsrc-Class-Path: ./lib/com.ibm.jaxws.thinclient_8.0.0.jar lib/com.ibm.
ws.webservices.thinclient_8.0.0.jar lib/commons-logging-1.1.jar lib/j
axws-api.jar lib/junit-4.10.jar lib/log4j-1.2.9.jar lib/resolver.jar
lib/serializer.jar lib/spring-asm-3.1.0.RELEASE.jar lib/spring-beans-
3.1.0.RELEASE.jar lib/spring-context-3.1.0.RELEASE.jar lib/spring-cor
e-3.1.0.RELEASE.jar lib/spring-expression-3.1.0.RELEASE.jar lib/sprin
g-test-3.1.0.RELEASE.jar lib/xercesImpl.jar lib/xercesSamples.jar lib
/xml-apis.jar
Class-Path: ./ lib/com.ibm.jaxws.thinclient_8.0.0.jar lib/com.ibm.ws.w
ebservices.thinclient_8.0.0.jar lib/commons-logging-1.1.jar lib/jaxws
-api.jar lib/junit-4.10.jar lib/log4j-1.2.9.jar lib/resolver.jar lib/
serializer.jar lib/spring-asm-3.1.0.RELEASE.jar lib/spring-beans-3.1.
0.RELEASE.jar lib/spring-context-3.1.0.RELEASE.jar lib/spring-core-3.
1.0.RELEASE.jar lib/spring-expression-3.1.0.RELEASE.jar lib/spring-te
st-3.1.0.RELEASE.jar lib/xercesImpl.jar lib/xercesSamples.jar lib/xml
-apis.jar
Now Added that jar file in war file and deployed on web sphere server. Now I am getting
[10/12/16 14:48:01:422 EDT] 00001845 SystemOut XXXX - Add Document has been called
[10/12/16 14:48:01:425 EDT] 00001845 AxisEngine E org.apache.axis2.engine.AxisEngine receive null
org.apache.axis2.AxisFault
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.createFaultResponse(JavaBeanDispatcher.java:407)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:138)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1632)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1114)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:940)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1820)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:118)
... 29 more
Caused by: java.lang.NoClassDefFoundError: org.springframework.context.ApplicationContext
at com.nationwide.awd.documents.business.AddDocumentHelper.addDocument(Unknown Source)
at com.dstawd.custom.ws.CLT.addDocumentToFileNet(Unknown Source)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
Basically its from application to utility jar call. Utility jar not able to find its dependents jar file in its lib
WAR file has utility Jar file in Web-int/lib/
utility jar has its dependents jar in utility/lib/
Please help me to fix this issue.
Thanks.
I am trying to migrate an application from WebLogic Server 10.3 to 12.1.1. When starting the application I get the following Error.
javax.xml.bind.JAXBException: 24
with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: 24]
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:832)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:143)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:142)
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:180)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:211)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:184)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:109)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:321)
at com.sun.xml.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:99)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:74)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:58)
at com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:130)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:411)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:232)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:546)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:525)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:601)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:139)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:68)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:299)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:60)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:34)
at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:624)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:565)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1874)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1848)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1738)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:582)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:148)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:114)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:149)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:335)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 24
at org.eclipse.persistence.internal.libraries.asm.Type.getType(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.Type.getArgumentTypes(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClass(MappingsGenerator.java:1546)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClassAndDescriptor(MappingsGenerator.java:1484)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapMapping(MappingsGenerator.java:1459)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:477)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2033)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:1994)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:195)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:174)
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:837)<24.06.2014 16:42 Uhr MESZ> <Error> <HTTP> <BEA-101216> <Servlet: "xy" failed to preload on startup in Web application: "report.server".
com.sun.xml.ws.spi.db.DatabindingException: 24
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:185)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:211)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:185)
at java.security.AccessController.doPrivileged(Native Method)
Truncated. see log file for complete stacktrace
Caused By: javax.xml.bind.JAXBException: 24
- with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: 24]
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:832)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:143)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:142)
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:180)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ArrayIndexOutOfBoundsException: 24
at org.eclipse.persistence.internal.libraries.asm.Type.getType(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.Type.getArgumentTypes(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClass(MappingsGenerator.java:1546)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClassAndDescriptor(MappingsGenerator.java:1484)
Truncated. see log file for complete stacktrace
>
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:830)
... 75 more
Additional Information:
The unmodified code works just fine in WebLogic Server 12.1.2.
Unfortunately I have to use WLS 12.1.1.
We are using JAX-WS
We are using JDK 7
If any additional information is required let me know.
Thank you for your help!
I am facing the same problem and the bug was supposed to be fixed in the Eclipselink ASM module in version 2.6.0 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992).
I upgrade the eclipselink JARs in weblogic, I packaged the JARs but the bug doesn't seem to be fixed. The only way I got my webservices back working after upgrading to Weblogic 12 is by not using MOXy at all.
You can do this by either loading databinding.override_1.2.0.0.jar in the weblogic classpath (system wide fix) or to define the services in your own EAR and tell weblogic to use the resources in the EAR.
In short, add a file named "com.sun.xml.ws.spi.db.BindingContextFactory" to src/main/resources/META-INF/services in your ear project and add the following line in it
com.sun.xml.ws.db.glassfish.JAXBRIContextFactory
and a file named javax.xml.bind.JAXBContext with the following content
com.sun.xml.bind.v2.ContextFactory
Add the following lines to your weblogic-application.xml:
<prefer-application-resources>
<resource-name>META-INF/services/com.sun.xml.ws.spi.db.BindingContextFactory</resource-name>
<resource-name>META-INF/services/javax.xml.bind.JAXBContext</resource-name>
</prefer-application-resources>
And package jaxb in your application:
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
If maven doesn't add your xml files to the EAR, make sure to add this to the configuration of the maven-ear-plugin:
<earSourceDirectory>${basedir}/src/main/resources</earSourceDirectory>
I had a similar trouble with WLS 12c and i followed the instruction to add the changes in my ear package. The details is in this link.
Is similar to the solution gave by #P_W999 and there is a solution for the server scope or the application scope.
I am working on a web application and I have been facing this issue for a while after looking at multiple post I still was unable to solve this issue. I'm using tomcat 7.0.23 which provides el-api which i believe is the jar thought to be missing. I have not included any jar files in the WEB-INF/lib folder at all I am adding all of my dependencies through pom.xml because of maven. I have attempted all of the possible quick fixes i could think of including maven clean/install server clean(multiple times), project clean, adding tomcat to the targeted runtimes. in my build path is tomcat, jdk1.6, and maven)
The pom.xml and web.xml files that I am using are identical my other team members and they are currently working so i don't believe the issue is there.
Here is the error I am getting when starting the server
SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: javax/el/ELException
at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:403)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:376)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:105)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: javax.el.ELException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 13 more
these are the dependices after a maven clean/ install
activation-1.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.1.jar
captcha-0.0.1-SNAPSHOT.jar
cmu_time_awb-0.0.1-SNAPSHOT.jar
cmu_us_kal-0.0.1-SNAPSHOT.jar
cmudict04-0.0.1-SNAPSHOT.jar
cmulex-0.0.1-SNAPSHOT.jar
cmutimelex-0.0.1-SNAPSHOT.jar
commons-beanutils-1.8.3.jar
commons-cli-1.2.jar
commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-digester-1.8.1.jar
commons-el-1.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.1.jar
commons-lang-2.6.jar
commons-logging-1.1.1.jar
commons-pool-1.5.4.jar
commons-validator-1.3.1.jar
cxf-api-2.7.0.jar
cxf-rt-bindings-soap-2.7.0.jar
cxf-rt-bindings-xml-2.7.0.jar
cxf-rt-core-2.7.0.jar
cxf-rt-databinding-jaxb-2.7.0.jar
cxf-rt-frontend-jaxrs-2.7.0.jar
cxf-rt-frontend-jaxws-2.7.0.jar
cxf-rt-frontend-simple-2.7.0.jar
cxf-rt-transports-http-2.7.0.jar
cxf-rt-ws-addr-2.7.0.jar
cxf-rt-ws-policy-2.7.0.jar
dom4j-1.6.1.jar
ejb3-persistence-1.0.2.GA.jar
en_us-0.0.1-SNAPSHOT.jar
freemarker-2.3.9.jar
freetts-0.0.1-SNAPSHOT.jar
freetts-jsapi10-0.0.1-SNAPSHOT.jar
geronimo-javamail_1.4_spec-1.7.1.jar
hibernate-annotations-3.4.0.GA.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-core-3.3.1.GA.jar
javassist-3.4.GA.jar
javax.ws.rs-api-2.0-m10.jar
jaxb-impl-2.1.13.jar
jcaptcha-1.0-mod-0.0.1-SNAPSHOT.jar
jdom-1.1.jar
jettison-1.0.jar
jsf-facelets-1.1.6.jar
jta-1.1.jar
jtds-1.2.4.jar
junit-4.7.jar
jxl-2.6.12.jar
log4j-1.2.17.jar
mail-1.4.5.jar
myfaces-api-2.1.0.jar
myfaces-impl-2.1.0.jar
neethi-3.0.2.jar
oro-2.0.8.jar
primefaces-3.3.jar
slf4j-api-1.6.6.jar
slf4j-log4j12-1.6.6.jar
spring-aop-3.0.6.RELEASE.jar
spring-asm-3.0.6.RELEASE.jar
spring-batch-core-2.0.3.RELEASE.jar
spring-batch-infrastructure-2.0.3.RELEASE.jar
spring-beans-3.0.6.RELEASE.jar
spring-context-3.0.6.RELEASE.jar
spring-context-support-3.0.6.RELEASE.jar
spring-core-3.0.6.RELEASE.jar
spring-expression-3.0.6.RELEASE.jar
spring-jdbc-3.0.6.RELEASE.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-ldap-core-tiger-1.3.1.RELEASE.jar
spring-ldap-ldif-batch-1.3.1.RELEASE.jar
spring-ldap-ldif-core-1.3.1.RELEASE.jar
spring-ldap-odm-1.3.1.RELEASE.jar
spring-orm-3.0.6.RELEASE.jar
spring-test-3.0.6.RELEASE.jar
spring-tx-3.0.6.RELEASE.jar
spring-web-3.0.6.RELEASE.jar
stax2-api-3.1.1.jar
tomahawk-1.1.6.jar
velocity-1.6.2.jar
woodstox-core-asl-4.1.4.jar
wsdl4j-1.6.2.jar
xml-apis-1.0.b2.jar
xml-resolver-1.2.jar
xmlschema-core-2.0.3.jar
xpp3_min-1.1.4c.jar
xstream-1.3.jar
The “javax.el.ExpressionFactory” class belongs to the “el-api.jar” library, you can download it from Maven central repository.
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
and place it in tomcat/lib directory.
Alternative Solution
I'm using websocket function of tomcat 7.0.39, so I have to include catalina.jar into my classpath. But when I deploy my project, if I deploy the jar files into WEB-INF/lib, I get the following exception:
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
and when catalina.jar is not deployed, I get ClassNotFoundException:
java.lang.ClassNotFoundException: org.apache.catalina.websocket.MessageInbound
Someone please help me.
StackTrace:
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:802)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1694)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
The web socket support in 7.0.x is experiemental (and will soon be deprecated and replaced with a port of the JSR 356 implementation from Tomcat 8).
A side-effect of this is that the API can and does change between point releases. Therefore, you must compile your code againt the Tomcat JARs from the Tomcat version you intend to deploy on. There errors you are seeing are an indication of a version mis-match.
There is no need to package any Tomcat JARs in your web application.
Do you really need to put the catalina.jar in your classpath. Catalina.jar should already be present in tomcat/lib directory. Tomcat class loader will load the jar from its own lib directory and hence it is the parent class loader so your classpath or application catalina.jar will not picked. Hope you will be able to resolve your problem with this information.
You are getting NoSuchMethodDefinition error, which means the jar which you are using for compiling has that method but the jar, which is loaded for execution does not have that method definition. Check with replacing the catalina.jar in tomcat/lib with the jar that you are using for compiling your code.