JBoss Community

Migration from AS5 to AS7.1

created by Aston Chan in Beginner's Corner - View the full discussion

Hi,

 

I am getting this when deploying an existing war file to AS7.1:

 

 

14:24:54,061 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/FindTemperature]] (MSC service thread 1-5) Error configuring application listener of class gmsjsp.rtvdisplay: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

        at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.web.deployment.component.WebComponentInstantiator$1.<init>(WebComponentInstantiator.java:57) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.web.deployment.component.WebComponentInstantiator.getReference(WebComponentInstantiator.java:55) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.web.deployment.WebInjectionContainer.instantiate(WebInjectionContainer.java:99) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:78) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3342) [jbossweb-7.0.7.Final.jar:]

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.7.Final.jar:]

        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:77) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

Caused by: java.lang.IllegalStateException: Failed to invoke constructor

        at org.jboss.msc.value.ConstructedValue.getValue(ConstructedValue.java:65)

        at org.jboss.as.naming.ValueManagedReferenceFactory$1.getInstance(ValueManagedReferenceFactory.java:63)

        at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:91) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

        at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]

        ... 14 more

Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_27]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_27]

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_27]

        at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_27]

        at org.jboss.msc.value.ConstructedValue.getValue(ConstructedValue.java:61)

        ... 23 more

Caused by: java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/JPEGImageEncoder

        at gmsjsp.rtvdisplay.<init>(SourceFile:40) [classes:]

        ... 28 more

Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder from [Module "deployment.FindTemperature.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        ... 29 more

 

 

14:24:54,066 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/FindTemperature]] (MSC service thread 1-5) Skipped installing application listeners due to previous error(s)

14:24:54,066 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart

14:24:54,067 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/FindTemperature] startup failed due to previous errors

14:24:54,068 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.web.deployment.default-host./FindTemperature: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host

./FindTemperature: failed to start context

        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:82)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

 

 

14:24:54,269 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015856: Undeploy of deployment "FindTemperature.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./Fi

ndTemperature" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FindTemperature: failed to start context"}}

14:24:54,337 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-10) Stopped deployment FindTemperature.war in 68ms

14:24:54,338 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./FindTemperature: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FindTemperature: failed to start context

 

 

14:24:54,339 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jbos

s.web.deployment.default-host./FindTemperature" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./FindTemperature: failed to start context"}}}}

 

 

If I edit the modules\sun\jdk\main\module.xml by adding :

 

<path name="com/sun/image/codec/jpeg"/>

 

, then my war file will be deployed properly.  I didn't want to modify the installed AS7.1 module.xm and hence tried to create my own jboss-deployment-structure.xml under the META-INF\ folder.  The jboss-deployment-structure.xml looks like:

 

<jboss-deployment-structure>

<deployment>

    <dependencies>

                    <module name="sun.jdk">

                              <imports>

                                        <include-set>

                                                  <path name="com/sun/image/codec/jpeg"/>

                                        </include-set>

                              </imports>

                    </module>

    </dependencies>

</deployment>

</jboss-deployment-structure>

 

That didn't help.

 

Can you help me with this?  The same war file deployed properly on AS5.x.

 

Thanks.

 

-Aston

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community