I work on a java web application. I use Weblogic 12c in my machine. The database (Oracle) is installed in another host.
Recently the database version got upgraded to 11.2.0.4.0 and java got upgraded from 6 to 7 (both my weblogic and jdk installed are of 32-bit versions).
So, I'm attempting to upgrade the JDBC driver version from ojdbc14 to ojdbc6. I learnt that this has to be done by copying ojdbc6.jar to $JAVA_HOME/jdk/jre/lib/ext location.
After copying the jar, I tried to restart the services of weblogic managed nodes and got this exception with stacktrace-
####<Feb 9, 2017 6:58:29 AM CST> <Error> <Deployer> <MACHINE_001> <server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1486645109723> <BEA-149231> <Unable to set the activation state to true for the application "sample-ear [Version=1]".
weblogic.application.ModuleException: Exception activating module: EJBModule(sample-question-service-ejb-1.0.jar)
Unable to deploy EJB: TriggeredEventEB from sample-question-service-ejb-1.0.jar:
java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.JTSConnection
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:479)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
at weblogic.application.internal.flow.ScopedModuleDriver.activate(ScopedModuleDriver.java:206)
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:97)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)
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.BasicDeployment.activate(BasicDeployment.java:192)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:186)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:94)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.JTSConnection
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:219)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:190)
at weblogic.jdbc.wrapper.JDBCWrapperFactory$1.run(JDBCWrapperFactory.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:161)
at weblogic.jdbc.jts.Driver.newConnection(Driver.java:974)
at weblogic.jdbc.jts.Driver.createLocalConnection(Driver.java:340)
at weblogic.jdbc.jts.Driver.connect(Driver.java:175)
at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:553)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:518)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:511)
at weblogic.ejb.container.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:4050)
at weblogic.ejb.container.cmp.rdbms.RDBMSPersistenceManager.verifyDatabaseType(RDBMSPersistenceManager.java:4272)
at weblogic.ejb.container.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:245)
at weblogic.ejb.container.manager.BaseEntityManager.setupPM(BaseEntityManager.java:299)
at weblogic.ejb.container.manager.BaseEntityManager.setup(BaseEntityManager.java:252)
at weblogic.ejb.container.manager.DBManager.setup(DBManager.java:154)
at weblogic.ejb.container.deployer.ClientDrivenBeanInfoImpl.initCacheManager(ClientDrivenBeanInfoImpl.java:1018)
at weblogic.ejb.container.deployer.EntityBeanInfoImpl.initCacheManager(EntityBeanInfoImpl.java:788)
at weblogic.ejb.container.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:961)
at weblogic.ejb.container.deployer.EntityBeanInfoImpl.activate(EntityBeanInfoImpl.java:223)
at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:963)
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:470)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
at weblogic.application.internal.flow.ScopedModuleDriver.activate(ScopedModuleDriver.java:206)
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:97)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)
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.BasicDeployment.activate(BasicDeployment.java:192)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:186)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:94)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
Should I copy the ojdbc6.jar in the machine where my web application is installed (This is currently what I've done)? Or should I copy it in the machine where the Oracle database is installed?
I'm trying to find anything that I'm missing here to successfully deploy the ejb jar. Any leads on this would be of great help.
=========================================================================
UPDATE:
I have restarted all managed servers, including the admin server. But that didn't still work.
But I observed one thing. The sample-question-service-ejb-1.0.jar is an old one and was created using jdk1.4. I verified this by exploding the jar that was in the target folder, ran this command for one of the class files and got the result 48
javap -verbose MyClass | findstr "major"
Java 1.2 uses major version 46
Java 1.3 uses major version 47
Java 1.4 uses major version 48
Java 5 uses major version 49
Java 6 uses major version 50
Java 7 uses major version 51
Java 8 uses major version 52
Does that mean that I should compile and generate the jar file in such a way that I should get "major" version as 50 or 51 or something?
Related
I have a JSF+Richfaces based application that has Axis2 1.6.2 SOAP Webservice implemented on JDK6. The application works fine when I deploy it in Tomcat 6 or 7. But when we deploy it in WebSphere 8.5.5 Network Deployment it gives following error whenever we try to start the application:
[9/28/20 17:02:26:798 PKT] 00000040 WarBasedAxisC E org.apache.axis2.deployment.WarBasedAxisConfigurator <init> org.apache.commons.fileupload.FileUploadException
org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException
at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:774)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:234)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:859)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:156)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:569)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:457)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:338)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1363)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:606)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:576)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.NoClassDefFoundError: org.apache.commons.fileupload.FileUploadException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1564)
at org.apache.axis2.deployment.DescriptionBuilder.processMessageBuilders(DescriptionBuilder.java:230)
at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:771)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
... 37 more
[9/28/20 17:02:26:811 PKT] 00000040 AxisServlet I org.apache.axis2.util.OnDemandLogger info org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException
[9/28/20 17:02:26:896 PKT] 00000040 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on D:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_ad76d55e_20.09.28_17.02.26.838698289724018241690.txt com.ibm.ws.webcontainer.servlet.ServletInstance.init 172
[9/28/20 17:02:26:906 PKT] 00000040 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[9/28/20 17:02:26:908 PKT] 00000040 webapp E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: Error occured while initializing servlets: {0}
javax.servlet.ServletException: javax.servlet.ServletException: org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:490)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:338)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1363)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:606)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:576)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: javax.servlet.ServletException: org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:576)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:457)
... 25 more
Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.commons.fileupload.FileUploadException
at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:774)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:234)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:859)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:156)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:569)
... 26 more
Caused by: java.lang.NoClassDefFoundError: org.apache.commons.fileupload.FileUploadException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1564)
at org.apache.axis2.deployment.DescriptionBuilder.processMessageBuilders(DescriptionBuilder.java:230)
at org.apache.axis2.deployment.AxisConfigBuilder.processMessageBuilders(AxisConfigBuilder.java:771)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
... 37 more
I have done a very detailed research on the issue and found that Websphere has its own Axis library and to over ride this, Class loader should be configured to Parent last. I also tried to deploy the sample Axis2 1.6.2 application by following steps given in url just to make sure is Axis2 1.6.2 works or not:
http://manishcusat68.blogspot.com/2015/08/axis2-installation-in-websphere.html
The sample application is deployed and I am able to see the wsdl file.
I am using the same version of axis2 i.e 1.6.2 in my application but I always get the above exception and application never starts.
I have searched every forum, have tried each and every step I found on IBM Websphere website/stackoverflow but I am not able to find any solution of this.
I tried by putting commons-fileupload jar in lib/ext but it didn't work.
I tried to add the patch of commom-fileupload jar in system environment path but it didn't work either.
I have also tried to delete jars from IBM installation/plugin folder as per suggestions in many forums and put commons-fileupload jar in my application/lib but Websphere didn't start.
I desperately need the solution of that and request assistance from any expert please.
There's a JVM property to disable the JAXWS engine that's built into WAS. It's not perfect but it would be worth a try if you haven't already. https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.5/com.ibm.websphere.nd.multiplatform.doc/ae/twbs_thirdparty.html
I am getting the following error when I start my Spring Boot application.
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
at org.codehaus.groovy.runtime.dgmimpl.NumberNumberMetaMethod.<clinit>(NumberNumberMetaMethod.java:33) ~[groovy-2.5.8.jar:2.5.8]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.createMetaMethodFromClass(MetaClassRegistryImpl.java:258) ~[groovy-2.5.8.jar:2.5.8]
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:111) ~[groovy-2.5.8.jar:2.5.8]
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:86) ~[groovy-2.5.8.jar:2.5.8]
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36) ~[groovy-2.5.8.jar:2.5.8]
at org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.<init>(GroovyBeanDefinitionReader.java:150) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.boot.BeanDefinitionLoader.<init>(BeanDefinitionLoader.java:85) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.createBeanDefinitionLoader(SpringApplication.java:738) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.load(SpringApplication.java:681) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:392) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at pizzainthecloud.pizzaplace.Application.main(Application.java:23) ~[main/:na]
After much searching, I found several instances of this including java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7, but most are older posts on older versions of gradle and groovy or they are related to android.
Here is my version info:
$ gradle -version
------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------
Build time: 2020-08-25 16:29:12 UTC
Revision: f2d1fb54a951d8b11d25748e4711bec8d128d7e3
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 14.0.2 (Oracle Corporation 14.0.2+12-46)
OS: Linux 5.4.0-42-generic amd64
I am not doing any groovy apart from my unit tests that are entirely groovy/spock and I'm using gradle for my build engine.
Following directions I found, I went ahead and changed my gradle-wrapper.properties file to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
it was 6.5-bin.
This project was running fine on my old computer with Java 8. I moved it to my new workstation and am trying to move to open JDK 14, and that is when the new issue started.
Wondering where to go from here.
From https://github.com/gradle/gradle/issues/10248
Seems like GROOVY-9211 won't be backported to 2.5.x. So it seems that Gradle will need to upgrade to Groovy 3.x once it's out in order to support JDK 14.
You will need to use JDK 13 until Gradle uses Groovy 3.x.
I had the same issue using maven 3.2. and JDK 1.8. Upgrading to JDK 11 solved it.
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);
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.
After purging and reinstalling eclipse with dpkg (Ubuntu) there is an error throws there:
cat /home/sergiy/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1337883707989.log
!SESSION Thu May 24 21:21:48 EEST 2012 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-05-24 21:21:48.242
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Here is /usr/lib/eclipse/configuration/config.ini file:
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Wed Apr 04 13:29:31 UTC 2012
org.eclipse.update.reconcile=false
eclipse.p2.profile=PlatformProfile
osgi.instance.area.default=#user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.dist.jar
equinox.use.ds=true
eclipse.buildId=I20110613-1736
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.dist.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=#config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundlefile.limit=100
How to fix this issue? Thanks in advance!
The first recommendation is to NOT install Eclipse from any Linux package manager or software repository. Instead, just get it from http://www.eclipse.org/downloads/. The builds that linux distro's install are often modified (mangled, some would say).
see https://askubuntu.com/a/695401/407641 for full instructions, ...
Highlights:
Don't sudo apt-get eclipse, that version is old!
Do download and install from http://www.eclipse.org/downloads
Do create a ~/Desktop/eclipse.desktop file. Note, the full path to the Desktop folder will be dependent upon your version of ubuntu.