Repository navigation
Description
Vijendra Kulhade opened SPR-11341 and commented
Hi Team,
I was getting getEnv.* Exception from my was server.
Below this above exception I was is unable to initialize dispature servlet also. In the below stacktrace adminView is the DispatureServlet. Please suggest.
[Servlet.LOG]: Initializing Spring FrameworkServlet 'adminView'
[1/21/14 9:06:20:587 EST] 00000013 ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet adminView: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:653)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:378)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:293)
at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93)
at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:673)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:626)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1274)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1137)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:572)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:816)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:945)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2120)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:342)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$4.run(AbstractAutowireCapableBeanFactory.java:1025)
at java.security.AccessController.doPrivileged(AccessController.java:214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1023)
... 30 more
Caused by: java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:69)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:131)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.<init>(RequestMappingHandlerAdapter.java:183)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 34 more
Caused by: java.lang.ClassNotFoundException: javax.xml.stream.XMLStreamException
at java.net.URLClassLoader.findClass(URLClassLoader.java:497)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:132)
at java.lang.ClassLoader.loadClass(ClassLoader.java:640)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:606)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:54)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:606)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:606)
... 43 more
Affects: 3.2.5, 3.2.6, 3.2.7
Issue Links:
- Downgrade accidental use of Java 1.6 APIs [SPR-11321] #15945 Downgrade accidental use of Java 1.6 APIs
Activity
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
Vijendra, which version of WAS are you on? WebSphere 6.1 on JDK 5, by any chance?
In any case, this seems like an accidental backport from Spring 4.0 where we require JDK 6. We'll restore Java 5 compatibility in time for the 3.2.7 release there.
Juergen
spring-projects-issues commentedon Jan 21, 2014
Vijendra Kulhade commented
Hi Juergen
We are using WAS 6.1 on JDK 5. Please suggest how we can work on this with the existing version 3.2.7 of spring.
Thanks
Vijendra
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
I'll fix this right away. I'll let you know once a new snapshot build of 3.2.7 is available, containing the fix.
Juergen
spring-projects-issues commentedon Jan 21, 2014
Vijendra Kulhade commented
Thank a lot Juergen. Really appreciate your help.
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
Fixed now in the 3.2.x branch, through removing the accidental StAX code backport that sneaked into 3.2.5's SourceHttpMessageConverter.
The next 3.2.7 snapshot will contain the fix. I'll ping you once the snapshot got published.
Juergen
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
The corresponding 3.2.7 snapshot (#387) is available now. Please give it a try and let me know whether it restores WebSphere 6.1 compatibility for you... and if that part works out, let's see whether the getenv property works as intended.
Juergen
spring-projects-issues commentedon Jan 21, 2014
Vijendra Kulhade commented
Hi Juergen,
That error is resolved but now getting below exception.
this works fine in Tomcat Servers as this class comes in it from el-api.jar. But for WAS 6.1 it is giving error.
E [Servlet Error]-[javax.el.ValueExpression]: java.lang.NoClassDefFoundError: javax.el.ValueExpression
Please see if it can be added in the build.
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
So that javax.el.ValueExpression error is new in 3.2.7 as well? Or have you seen that before?
We don't have any direct references on javax.el.ValueExpression in the codebase, so this probably comes in indirectly. Do you have a stacktrace or a specific class that is being loaded there, which indirectly depends on javax.el.ValueExpression?
Juergen
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
You could also simply add the javax.el API jar to your application classpath; it won't do any harm.
Spring itself doesn't depend on javax.el, but some involved library (which you may have upgraded along with Spring) maybe does. In any case, adding the el jar to the classpath might be sufficient.
Juergen
spring-projects-issues commentedon Jan 21, 2014
Juergen Hoeller commented
Actually, there are just a few related libraries depending on javax.el: JSF, the JSTL tag library, and in an optional form also Tiles and FreeMarker. If you're using any of those, you may stay on the versions that you've been using before; upgrading to Spring 3.2.7 should work fine against those older versions as well.
Juergen
spring-projects-issues commentedon Jan 22, 2014
Juergen Hoeller commented
Any update on this, Vijendra? Can we help you in any further way?
Juergen
spring-projects-issues commentedon Jan 22, 2014
Vijendra Kulhade commented
Hi Juergen,
This is resolved in the next Build. Please close the defect.
Thanks again for quick turn around.
Thanks
Vijendra
spring-projects-issues commentedon Jan 22, 2014
Juergen Hoeller commented
That's great to hear!
Now that the framework starts up fine again, does the getenv system property (#15921) work for you as well?
Juergen