-
1. Re: Cannot Deploy To JBoss As 7.1.1
jfuerth Jun 25, 2013 6:19 PM (in response to chaluwa)- 22:41:58,671 INFO [org.jboss.weld.ClassLoading] (MSC service thread 1-2) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.errai.marshalling.server.impl.ServerMarshallingFactoryImpl$25
- at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
- at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:]
- at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:]
- at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:]
- at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:]
- at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
- at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
- at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
- at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
- at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
- at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
- Caused by: java.lang.NoClassDefFoundError: [Lcom/bitrunk/apps/cbt/client/local/mvp/EnterHallEvent;
- at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_17]
- at java.lang.Class.privateGetDeclaredFields(Class.java:2317) [rt.jar:1.7.0_17]
- at java.lang.Class.getDeclaredFields(Class.java:1762) [rt.jar:1.7.0_17]
- at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
From the detailed log above, it looks like the type EnterHallEvent is @Portable, but defined in package com.bitrunk.apps.cbt.client.local.mvp, which will not be included in the war file. So the server marshaller for that type references a class which has been stripped from the war at packaging time.
If you ensure all @Portable types are in the shared package, your deployment should succeed.
Cheers,
Jonathan
-
2. Re: Cannot Deploy To JBoss As 7.1.1
chaluwa Jun 25, 2013 6:47 PM (in response to jfuerth)Yup, that did it, moving the @Portable bean to shared.mvp cleared the first error. Am left with the second one, recall that the project was packaged using "mvn clean package -Pjboss7 :
23:26:40,166 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-5) HHH000232: Schema update complete
23:26:40,172 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016008: Starting weld service for deployment cbt.war
23:26:40,182 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (MSC service thread 1-3) starting errai cdi ...
23:26:41,439 INFO [org.jboss.errai.reflections.Reflections] (Thread-95) Reflections took 862 ms to scan 9 urls, producing 389 keys and 1800 values [using 2 cores]
23:26:41,751 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (pool-22-thread-1) all services registered successfully
23:26:42,017 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "cbt.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.cbt.cbt.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiServiceMissing[jboss.naming.context.java.module.cbt.cbt.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiService]"]}
23:26:42,022 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016009: Stopping weld service for deployment cbt.war
23:26:42,026 INFO [org.jboss.as.jpa] (MSC service thread 1-5) JBAS011403: Stopping Persistence Unit Service 'cbt.war#iuocbt'
23:26:42,058 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment cbt.war in 40ms
23:26:42,059 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.naming.context.java.jboss.resources.ErraiService (new available)
23:26:42,061 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.cbt.cbt.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiServiceMissing[jboss.naming.context.java.module.cbt.cbt.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiService]"]}}}
-
3. Re: Cannot Deploy To JBoss As 7.1.1
jfuerth Jun 26, 2013 9:48 AM (in response to chaluwa)It still looks like the jetty or tomcat version of web.xml is getting packaged with your war file.
Can you unpack your deployed war file and look at its web.xml? It should look like this:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>ErraiServlet</servlet-name> <servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ErraiServlet</servlet-name> <url-pattern>*.erraiBus</url-pattern> </servlet-mapping> <context-param> <param-name>errai.properties</param-name> <param-value>/WEB-INF/errai.properties</param-value> </context-param> <context-param> <param-name>login.config</param-name> <param-value>/WEB-INF/login.config</param-value> </context-param> <context-param> <param-name>users.properties</param-name> <param-value>/WEB-INF/users.properties</param-value> </context-param> </web-app>
Note there is no resource-ref for ErraiService (actually, there's no resource-ref at all in this case). The error message you're getting makes me think you've somehow ended up with a resource-ref for ErraiService in your deployment.
-Jonathan
-
4. Re: Cannot Deploy To JBoss As 7.1.1
chaluwa Jun 26, 2013 12:00 PM (in response to jfuerth)Here's a paste of a copy of my web.xml from the extracted .war file under target folder of the project. It's quite indentical with what you / the system expects. I also added the pom.xml file, just in case it may hold clues : http://ur1.ca/eg5xs
-
5. Re: Cannot Deploy To JBoss As 7.1.1
jfuerth Jun 26, 2013 12:35 PM (in response to chaluwa)Thanks for the pom. I just replaced my pom.xml with the one in the pastebin you referenced, did a "mvn clean package -Pjboss7", and deployed to AS 7.1.1.Final. It worked fine:
12:30:11,518 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "cbt.war" 12:30:13,576 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.cbt.war" is using a private module ("org.jboss.as.naming:main") which may be changed or removed in future versions without notice. 12:30:13,577 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.cbt.war" is using a private module ("org.jboss.as.naming:main") which may be changed or removed in future versions without notice. 12:30:13,577 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.cbt.war" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice. 12:30:13,578 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.cbt.war" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice. 12:30:13,583 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016002: Processing weld deployment cbt.war 12:30:13,594 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment: cbt.war 12:30:13,598 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment cbt.war 12:30:13,604 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (MSC service thread 1-2) starting errai cdi ... 12:30:13,972 INFO [org.jboss.errai.reflections.Reflections] (Thread-70) Reflections took 255 ms to scan 7 urls, producing 307 keys and 1068 values [using 2 cores] 12:30:14,014 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (pool-16-thread-1) all services registered successfully 12:30:14,180 INFO [org.jboss.errai.bus.server.service.bootstrap.OrderedBootstrap] (MSC service thread 1-3) starting errai bus ... 12:30:14,181 INFO [org.jboss.errai.bus.server.service.bootstrap.DefaultComponents] (MSC service thread 1-3) using dispatcher implementation: org.jboss.errai.bus.server.SimpleDispatcher 12:30:14,185 INFO [org.jboss.errai.bus.server.service.bootstrap.DefaultComponents] (MSC service thread 1-3) using session provider implementation: org.jboss.errai.bus.server.HttpSessionProvider 12:30:14,193 INFO [org.jboss.errai.bus.server.service.bootstrap.LoadExtensions] (MSC service thread 1-3) searching for errai extensions ... 12:30:14,198 INFO [org.jboss.errai.bus.server.service.bootstrap.OrderedBootstrap] (MSC service thread 1-3) errai bus started. 12:30:14,200 INFO [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /cbt 12:30:14,301 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "cbt.war"
There must be something you've copied in from your old project which is no longer required. Have you searched your whole target directory for the string "ErraiService"? Here's what I get when I do that:
jfuerth@LapCow-Pro:~/tmp/cdi232$ grep -r ErraiService target/ target/cbt-0.1/WEB-INF/jetty-env.xml: <Arg>ErraiService</Arg> target/cbt-0.1/WEB-INF/jetty-env.xml: <Arg>org.jboss.errai.bus.server.service.ErraiService</Arg> target/cbt-0.1/WEB-INF/jetty-env.xml: <Arg>org.jboss.errai.container.ErraiServiceObjectFactory</Arg> Binary file target/cbt-0.1/WEB-INF/lib/errai-bus-2.3.2.Final.jar matches Binary file target/cbt-0.1/WEB-INF/lib/errai-weld-integration-2.3.2.Final.jar matches Binary file target/cbt.war matches
The jetty-env.xml is garbage, of course, and will not affect a jboss deployment.
-Jonathan
-
6. Re: Cannot Deploy To JBoss As 7.1.1
chaluwa Jun 27, 2013 1:43 PM (in response to jfuerth)Now I know somethng else is wrong. I have created two fresh projects, compiled and packaged with mvn clean package -Pjboss7 and then tried to deploy without success. They all show the same error, maybe there's something wrong somewhere else. Can it be my JBoss AS server, or my JBoss Tools ... BTW, I've been doing the deployment from the IDE, that is, I expand the servers view, start the server in debug mode then when its started I'd right click the server adapter (the server node) to expose the context menu, from where I'l click Add/Remove. This shows a list of my projects, from where I make a selection and click add.
18:41:40,460 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "hello.war"
18:41:41,715 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry activation.jar in "/home/dilim/jboss-as-7.1.1.Final/standalone/deployments/hello.war/WEB-INF/lib/mail-1.4.jar" does not point to a valid jar for a Class-Path reference.
18:41:41,946 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016002: Processing weld deployment hello.war
18:41:41,998 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: hello.war
18:41:42,010 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) JBAS016008: Starting weld service for deployment hello.war
18:41:42,024 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (MSC service thread 1-8) starting errai cdi ...
18:41:42,187 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] (pool-15-thread-1) all services registered successfully
18:41:42,473 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "hello.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.hello.hello.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiServiceMissing[jboss.naming.context.java.module.hello.hello.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiService]"]}
18:41:42,482 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016009: Stopping weld service for deployment hello.war
18:41:45,815 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment hello.war in 3342ms
18:41:45,817 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jboss.resources.ErraiService (missing) dependents: [service jboss.naming.context.java.module.hello.hello.env.ErraiService]
18:41:45,820 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.hello.hello.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiServiceMissing[jboss.naming.context.java.module.hello.hello.env.ErraiServicejboss.naming.context.java.jboss.resources.ErraiService]"]}}}
-
7. Re: Cannot Deploy To JBoss As 7.1.1
jfuerth Jun 27, 2013 1:56 PM (in response to chaluwa)Perhaps the IDE's deployment logic is packaging a new war file rather than using the one that maven produced.
Can you try doing a mvn clean install -Pjboss7 and then copy the resulting .war into $JBOSS_HOME/standalone/deployments? This way we can check if there's something wrong with the app server configuration.
-Jonathan
-
8. Re: Cannot Deploy To JBoss As 7.1.1
chaluwa Jun 27, 2013 2:15 PM (in response to jfuerth)Yeah, it deployed. But that's just wierd! Hmmmmmm....
-
9. Re: Cannot Deploy To JBoss As 7.1.1
jfuerth Jun 27, 2013 3:24 PM (in response to chaluwa)Maybe if you activate the jboss7 profile in your IDE, it will produce the correct deployment. Or maybe the IDE simply doesn't understand how to deploy the correct stuff based on the maven-war-plugin configuration in the pom. In that case, if you plan to always develop against JBoss AS, simply copy the src/jboss stuff into src/main/webapp, set the jboss7 profile to active by default, delete all the non-jboss7 profiles in the pom, and delete the src/jetty, src/tomcat, and src/jboss directories.