[Beginner's Corner] - Migration from AS5 to AS7.1
by Aston Chan
Aston Chan [https://community.jboss.org/people/astonchan] created the discussion
"Migration from AS5 to AS7.1"
To view the discussion, visit: https://community.jboss.org/message/716922#716922
--------------------------------------------------------------
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
[https://community.jboss.org/message/716922#716922]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JNDI and Naming] - Lookups from jboss 7 to jboss 4
by Carlos Rodríguez
Carlos Rodríguez [https://community.jboss.org/people/caalroja] created the discussion
"Lookups from jboss 7 to jboss 4"
To view the discussion, visit: https://community.jboss.org/message/721367#721367
--------------------------------------------------------------
Hello, a couple years ago I created and deployed 2 applications that work together on jboss 4. Now, I want to migrate one of them (because the other one is too coupled to jboss 4) to jboss 7 but I have a problem when I make the lookups calls. When I make a lookup on my current server (jboss 7) everything works good, but when I try to make the jboss 4 lookups this message is shown
17:35:06,898 ERROR [stderr] (http--127.0.0.1-8080-4) javax.naming.NameNotFoundException: map-server/ClientBean/remote -- service jboss.naming.context.java.map-server.ClientBean.remote
17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)
17:35:06,902 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)
17:35:06,903 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)
17:35:06,903 ERROR [stderr] (http--127.0.0.1-8080-4) at javax.naming.InitialContext.lookup(InitialContext.java:392)
- My original Initial Context code (when the the app was on jboss 4) was this:
Properties env = new Properties();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url", url);
InitialContext ctx = new InitialContext(env);
and I used to make the lookups this way:
client = (Client) ctx.lookup("Appear/ClientBean/remote");
- My new Initial Context code (Jboss 7) is this:
Properties env = new Properties();
env.put("java.naming.factory.initial", "org.jboss.as.naming.InitialContextFactory"); //this change
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url", Params.getValue("com.ogangi.mimampp3.NAMING_PROVIDER_URL"));
InitialContext ctx = new InitialContext(env);
and a I still make same the lookups:
client = (Client) ctx.lookup("Appear/ClientBean/remote");
Any Idea?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/721367#721367]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months