(pool-2-thread-5) Got error closing channel JBREM00206 - eclipse

My eclipse (Kepler) got stuck while starting the deployment by clicking RUN ON SER server (JBOSS 7.0.1 final).
I can successfully deploy the application through manual process (making war and copy the war to deployment directory and start the standalone.sh).
In short,I cannot able to run my application through eclipse but I can do it manually.
Please help.
The error:
19:27:30,111 INFO [org.jboss.as.remoting] (MSC service thread 1-2)
Listening on /127.0.0.1:9999 19:27:30,127 INFO
[org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5)
Starting Coyote HTTP/1.1 on http--127.0.0.1-8080 19:27:30,158 INFO
org.jboss.as.connector] (MSC service thread 1-4) Starting JCA
Subsystem (JBoss IronJacamar 1.0.3.Final) 19:27:30,205 INFO
[org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-2) Bound data source [java:jboss/datasources/ExampleDS] 19:27:30,377
INFO [org.jboss.as.deployment] (MSC service thread 1-5) Started
FileSystemDeploymentService for directory
E:\jboss-as-7.0.1.Final\standalone\deployments 19:27:30,393 INFO
[org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap"
started in 1647ms - Started 93 of 148 services (55 services are
passive or on-demand) 19:27:30,393 INFO [org.jboss.as.deployment]
(DeploymentScanner-threads - 1) Found TF_Webservices.war in deployment
directory. To trigger deployment create a file called
TF_Webservices.war.dodeploy 19:27:46,447 WARN [org.jboss.as.protocol]
(pool-2-thread-5) Got error closing channel JBREM00206: Channel is not
open

I solved the problem by defining maven war plugin in my pom .
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>resource2</directory>
</resource>
</webResources>
</configuration>

Related

Wildfly : application deployed but not running

I'm trying to deploy an .ear application to Wildfly 10.1 final. The .ear has 2 nested .war files. There's no "jboss-web.xml" file in the .war files.
Here's the application.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>myApp-ear</display-name>
<description>myApp</description>
<module>
<web>
<web-uri>myApp-rest</web-uri>
<context-root>/myApp-rest</context-root>
</web>
</module>
<module>
<web>
<web-uri>myApp-webapp</web-uri>
<context-root>/myApp-webapp</context-root>
</web>
</module>
</application>
After deploying, I have the following log :
INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found myApp.ear in deployment directory. To trigger deployment create a file called myApp.ear.dodeploy
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "myApp.ear" (runtime-name: "myApp.ear")
WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry lib/snakeyaml-1.13.jar in /C:/Dev/Wildfly/wildfly-10.1.0.Final/standalone/deployments/myApp.ear/liquibase-core-3.3.0.jar does not point to a valid jar for a Class-Path reference.
(...)
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
And that's all, no "register" in the logs or something like that.
So, whenever I try to access "localhost:8080/myApp-webapp" I have a 404 error.
The application was previously deployed on Weblogic 11 (with the same configuration) and it worked fine.
Any clue ?
Based on the following log messages it looks like the contents of your EAR are missing the appropriate file extensions
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
Specifically note the myApp-rest and myApp-webapp. Those should both have a .war extension even if this is an exploded deployment. (Note the myApp-rest may have a .jar extension if it's just an EJB module.)

JavaEE and Eclipse: Setting up JPA with EAR (EJB JBA WAR)

I am trying to create an Java Enterprise Application using Eclipse IDE with JBoss 7.0 Server. I already had experience developing such applications but using NetBeans IDE. The main problem for me are the differences between these two IDEs. Currently, Eclipse's giving me headaches about adding JPA to EAR.
I already configured Enterprise Application (EAR) that has two containers:
-- EJB
-- WAR
Those two are configured to work together (Java Build Paths, Manifest and Deployment assembly are set for those two) so when I run EAR on the server it all works properly.
Problem:
The next thing I would like to configure is JPA. I want to add JPA container to my EAR and so I did. I've created JPA 2.1 (with EclipseLink 2.5.x and MySQL), added to EAR, I've add the changes to EJB project (right click on project->properties->deployment assembly->add jpa project).
After this point when I try to run EAR again I got HTTP Status 404 - The requested resource (/eLearningJJ-war/) is not available and my stacktrace looks like as down bellow.
Punch line
I wonder do I have to configure something extra in order to avoid this error after adding JPA to my EAR project.
If you need more details about the project please let me know,
Thank you.
Console
18:51:41,833 INFO [org.jboss.modules] JBoss Modules version 1.0.1.GA
18:51:42,224 INFO [org.jboss.msc] JBoss MSC version 1.0.0.GA
18:51:42,280 INFO [org.jboss.as] JBoss AS 7.0.1.Final "Zap" starting
18:51:43,186 WARN [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.
18:51:43,202 INFO [org.jboss.as] creating http management service using network interface (management) port (9990)
18:51:43,202 WARN [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.
18:51:43,217 INFO [org.jboss.as.logging] Removing bootstrap log handlers
18:51:43,233 INFO [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
18:51:43,280 INFO [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.
18:51:43,452 INFO [org.jboss.as.naming] (Controller Boot Thread) Activating Naming Subsystem
18:51:43,468 INFO [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi Subsystem
18:51:43,468 INFO [org.jboss.as.naming] (MSC service thread 1-6) Starting Naming Service
18:51:43,530 INFO [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem
18:51:43,546 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.0.Beta2
18:51:43,561 INFO [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.0.Beta3
18:51:43,593 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.0.Beta3
18:51:43,999 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-2) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;native;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\bin;C:\msys\1.0\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;.
18:51:43,999 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
18:51:44,452 INFO [org.jboss.as.remoting] (MSC service thread 1-4) Listening on /127.0.0.1:9999
18:51:44,585 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-6) Starting remote JMX connector
18:51:44,675 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
18:51:44,847 INFO [org.jboss.as.connector] (MSC service thread 1-6) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)
18:51:44,907 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) Bound data source [java:jboss/datasources/ExampleDS]
18:51:44,927 INFO [org.jboss.as.deployment] (MSC service thread 1-1) Started FileSystemDeploymentService for directory C:\Users\Milan\jboss-as-7.0.1.Final\standalone\deployments
18:51:44,975 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap" started in 3626ms - Started 93 of 148 services (55 services are passive or on-demand)
18:51:45,022 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found eLearningJJ-ear.ear in deployment directory. To trigger deployment create a file called eLearningJJ-ear.ear.dodeploy
18:51:45,100 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "eLearningJJ-ear.ear"
18:51:45,334 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "eLearningJJ-war.war"
18:51:45,334 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "eLearningJJ-ejb.jar"
18:51:45,897 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry in "/C:/Users/Milan/jboss-as-7.0.1.Final/standalone/deployments/eLearningJJ-ear.ear/lib/testjpa.jar" does not point to a valid jar for a Class-Path reference.
18:51:46,101 INFO [org.jboss.jpa] (MSC service thread 1-3) read persistence.xml for testjpa
18:51:46,458 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-4) Encountered invalid class name "com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor" for service type "com.sun.faces.spi.injectionprovider"
18:51:46,459 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-4) Encountered invalid class name "com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection" for service type "com.sun.faces.spi.injectionprovider"
18:51:46,526 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to eLearningJJ-ear.ear
18:51:46,528 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)
18:51:46,528 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added org.hibernate dependency to application deployment
18:51:46,533 INFO [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to eLearningJJ-ejb.jar
18:51:46,533 INFO [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to eLearningJJ-war.war
18:51:46,704 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named UserTest in deployment unit subdeployment "eLearningJJ-ejb.jar" of deployment "eLearningJJ-ear.ear" are as follows:
java:global/eLearningJJ-ear/eLearningJJ-ejb/UserTest!com.test.UserTest
java:app/eLearningJJ-ejb/UserTest!com.test.UserTest
java:module/UserTest!com.test.UserTest
java:global/eLearningJJ-ear/eLearningJJ-ejb/UserTest!com.test.UserTestLocal
java:app/eLearningJJ-ejb/UserTest!com.test.UserTestLocal
java:module/UserTest!com.test.UserTestLocal
18:51:46,704 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named UserStateless in deployment unit subdeployment "eLearningJJ-ejb.jar" of deployment "eLearningJJ-ear.ear" are as follows:
java:global/eLearningJJ-ear/eLearningJJ-ejb/UserStateless!com.elearningjj.beans.UserStatelessLocal
java:app/eLearningJJ-ejb/UserStateless!com.elearningjj.beans.UserStatelessLocal
java:module/UserStateless!com.elearningjj.beans.UserStatelessLocal
java:global/eLearningJJ-ear/eLearningJJ-ejb/UserStateless!com.elearningjj.beans.UserStateless
java:app/eLearningJJ-ejb/UserStateless!com.elearningjj.beans.UserStateless
java:module/UserStateless!com.elearningjj.beans.UserStateless
18:51:48,392 INFO [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
18:51:48,399 INFO [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
18:51:48,712 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Initializing Mojarra 2.0.4 (FCS b09-jbossorg-4) for context '/eLearningJJ-war'
18:51:53,821 INFO [org.jboss.web] (MSC service thread 1-2) registering web context: /eLearningJJ-war
18:51:54,055 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "eLearningJJ-ear.ear" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"eLearningJJ-ear.ear#testjpa\" missing [ jboss.data-source.java:/ ]"]}
18:51:54,180 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment eLearningJJ-ejb.jar in 131ms
18:51:54,195 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment eLearningJJ-war.war in 140ms
18:51:54,195 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment eLearningJJ-ear.ear in 144ms
18:51:54,195 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"eLearningJJ-ear.ear#testjpa\" missing [ jboss.data-source.java:/ ]"]}}}
Solution
The main problem was improperly configured JPA's persistance.xml file. In my case, concrete problem was related to the jta-data-source which wasn't properly configured.
The solution for this is checking the JBoss Administration Console for more details about Datasource Configurations, Registered Datasources, etc. Regarding to this source of information, my persistance.xml file looks like down bellow:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="eLearningJJ-jpa">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
</persistence>

Unknown error thrown from JBOSS 7.1.1 version while deploying war file to it

Cannot get how this error come out. No reason no brain sence from te
17:52:58,395 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
17:52:58,604 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
17:52:58,665 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final
"Brontes" starting 17:52:59,554 INFO [org.xnio] XNIO Version 3.0.3.GA
17:52:59,554 INFO [org.jboss.as.server] JBAS015888: Creating http
management service using socket-binding (management-http) 17:52:59,563
INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
17:52:59,570 INFO [org.jboss.remoting] JBoss Remoting version
3.2.3.GA 17:52:59,590 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers 17:52:59,593 INFO
[org.jboss.as.configadmin] (ServerService Thread Pool -- 26)
JBAS016200: Activating ConfigAdmin Subsystem 17:52:59,617 INFO
[org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800:
Activating Naming Subsystem 17:52:59,624 INFO [org.jboss.as.osgi]
(ServerService Thread Pool -- 39) JBAS011940: Activating OSGi
Subsystem 17:52:59,633 INFO [org.jboss.as.clustering.infinispan]
(ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan
subsystem. 17:52:59,655 INFO [org.jboss.as.security] (ServerService
Thread Pool -- 44) JBAS013101: Activating Security Subsystem
17:52:59,667 INFO [org.jboss.as.security] (MSC service thread 1-6)
JBAS013100: Current PicketBox version=4.0.7.Final 17:52:59,719 INFO
[org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting
Naming Service 17:52:59,722 INFO [org.jboss.as.mail.extension] (MSC
service thread 1-5) JBAS015400: Bound mail session
[java:jboss/mail/Default] 17:52:59,725 INFO
[org.jboss.as.webservices] (ServerService Thread Pool -- 48)
JBAS015537: Activating WebServices Extension 17:52:59,782 INFO
[org.jboss.as.connector] (MSC service thread 1-8) JBAS010408: Starting
JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 17:52:59,812 INFO
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread
Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class
org.h2.Driver (version 1.3) 17:52:59,861 INFO
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread
Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class
com.mysql.jdbc.Driver (version 5.1) 17:52:59,927 INFO
[org.jboss.ws.common.management.AbstractServerConfig] (MSC service
thread 1-5) JBoss Web Services - Stack CXF Server 4.0.2.GA
17:53:00,363 INFO [org.jboss.as.server.deployment.scanner] (MSC
service thread 1-3) JBAS015012: Started FileSystemDeploymentService
for directory D:\jboss-as-7.1.1.Final\standalone\deployments
17:53:00,363 INFO [org.jboss.as.server.deployment.scanner] (MSC
service thread 1-5) JBAS015012: Started FileSystemDeploymentService
for directory
D:\workspace\eclipse.metadata.plugins\org.jboss.ide.eclipse.as.core\JBoss_7.1_Runtime_Server1402151223281\deploy
17:53:00,393 INFO [org.jboss.as.remoting] (MSC service thread 1-8)
JBAS017100: Listening on localhost/ 127.0.0 .1:4447 17:53:00,393 INFO
[org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening
on / 127 .0. 0.1:10101 17:53:00,413 INFO
[org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5)
Starting Coyote HTTP/1.1 on http-loca lhost-127. 0.0.1-7070
17:53:00,525 INFO [org.jboss.as.connector.subsystems.datasources]
(MSC service thread 1-4) JBAS010400: Bound data source [java:/MySqlDS]
17:53:00,525 INFO [org.jboss.as.connector.subsystems.datasources]
(MSC service thread 1-1) JBAS010400: Bound data source
[java:jboss/datasources/ExampleDS] 17:53:00,554 INFO [org.jboss.as]
(Controller Boot Thread) JBAS015951: Admin console listening on http:
// 127 .0.0.1: 10102 17:53:00,554 INFO [org.jboss.as] (Controller
Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in
2443ms - Started 139 of 215 services (74 services are passive or
on-demand) 17:53:15,376 INFO [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) JBAS015003: Found HelloRest.war in
deployment directory. To trigger deployment create a file called
HelloRest.war.dodeploy 17:53:15,412 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876:
Starting deployment of "HelloRest.war" 17:53:16,843 INFO
[org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002:
Processing weld deployment HelloRest.war 17:53:16,853 ERROR
[org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed
to start service jboss.deployment.unit."HelloRest.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."HelloRest.war".POST_MODULE: Failed to process
phase POST_MODULE of deployment "HelloRest.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[rt.jar:1.7.0_51] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[rt.jar:1.7.0_51] at java.lang.Thread.run(Unknown Source)
[rt.jar:1.7.0_51] Caused by:
java.lang.StringIndexOutOfBoundsException: String index out of range:
0 at java.lang.String.charAt(Unknown Source) [rt.jar:1.7.0_51] at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:460)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:288)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scanWebDeployment(JaxrsScanningProcessor.java:155)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more
17:53:16,868 INFO [org.jboss.as.server] (DeploymentScanner-threads -
2) JBAS015870: Deploy of deployment "HelloRest.war" was rolled back
with failure message {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"HelloRest.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"HelloRest.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"HelloRest.war\""}} 17:53:16,870 INFO
[org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report JBAS014777: Services which failed to start:
service jboss.deployment.unit."HelloRest.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."HelloRest.war".POST_MODULE: Failed to process
phase POST_MODULE of deployment "HelloRest.war"
17:53:16,879 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" => {"jboss.deployment.unit.\"HelloRest.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"HelloRest.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"HelloRest.war\""}}}} 17:53:16,914
INFO [org.jboss.as.server.deployment] (MSC service thread 1-7)
JBAS015877: Stopped deployment HelloRest.war in 40ms
PERSON JAVA CLASS:
package rest.hello;
public class Person implements Speakable {
#Override
public String getName() {
return "My Name";
}
}
SPEACKABLE Interface:
package rest.hello;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
#Path("/person")
#Produces(MediaType.TEXT_PLAIN)
#Consumes(MediaType.TEXT_PLAIN)
public interface Speakable {
#GET
#Path("/name")
public String getName();
}
POM File
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools</groupId>
<artifactId>hellorest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hellorest</name>
<description>hellorest</description>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven-central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net2</id>
<name>Java.net</name>
<url>https://oss.sonatype.org/content/repositories/java.net2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.1.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.1.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
</dependency>
</dependencies>
In your eclipse, click on the project > properties > project facets
uncheck the jax-rs option and try again

Openshift - ROOT.war deployed but no app

That's what I see in my logs:
[jbossas-DOMAIN.rhcloud.com SHA]\> tail_all
2014/05/26 09:08:35,527 INFO [org.jboss.as.messaging] (MSC service thread 1-4)
JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
2014/05/26 09:08:35,599 INFO [org.jboss.as.deployment.connector] (MSC service t
hread 1-2) JBAS010406: Registered connection factory java:/JmsXA
2014/05/26 09:08:35,620 INFO [org.hornetq.ra.HornetQResourceAdapter] (MSC servi
ce thread 1-2) HornetQ resource adaptor started
2014/05/26 09:08:35,621 INFO [org.jboss.as.connector.services.ResourceAdapterAc
tivatorService$ResourceAdapterActivator] (MSC service thread 1-2) IJ020002: Depl
oyed: file://RaActivatorhornetq-ra
2014/05/26 09:08:35,623 INFO [org.jboss.as.deployment.connector] (MSC service t
hread 1-4) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
2014/05/26 09:08:35,785 INFO [org.jboss.as.server.deployment] (MSC service thre
ad 1-4) JBAS015876: Starting deployment of "ROOT.war"
2014/05/26 09:08:38,512 INFO [org.jboss.web] (MSC service thread 1-4) JBAS01821
0: Registering web context:
2014/05/26 09:08:38,532 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951
: Admin console listening on http://127.2.148.129:9990
2014/05/26 09:08:38,532 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015874
: JBoss AS 7.1.1.Final "Brontes" started in 19348ms - Started 211 of 330 service
s (116 services are passive or on-demand)
2014/05/26 09:08:38,785 INFO [org.jboss.as.server] (DeploymentScanner-threads -
2) JBAS018559: Deployed "ROOT.war"
[jbossas-DOMAIN.rhcloud.com SHA]\> find . -name ROOT.war
find: `./.ssh': Permission denied
find: `./.sandbox': Permission denied
./app-root/runtime/dependencies/jbossas/deployments/ROOT.war
find: `./.tmp': Permission denied
./app-deployments/2014-05-26_08-49-32.024/dependencies/jbossas/deployments/ROOT.
war
[jbossas-DOMAIN.rhcloud.com SHA]\>
But when I go to the root url I see the default Welcome to your JBoss AS application on OpenShift page. I am not using maven. Tried to follow the instructions for Jboss (jboss-as-7.1.1.Final) from this page - did not delete the src folder though. What do I need to do ? Do I need to delete the src folder (?) and add a deployments folder ?
Build output (eclipse Java EE Luna M7)
Stopping jbossas cartridge
Sending SIGTERM to jboss:301473 ...
Building git ref 'master', commit e48bedf
Skipping Maven build due to absence of pom.xml
Preparing build for deployment
Deployment id is 72c749b6
Activating deployment
Deploying JBoss
Starting jbossas cartridge
Found 127.2.148.129:8080 listening port
Found 127.2.148.129:9999 listening port
/var/lib/openshift/538267574382ece7950004a4/jbossas/standalone/deployments /var/lib/openshift/SHA/jbossas
/var/lib/openshift/538267574382ece7950004a4/jbossas
Artifacts deployed: ./ROOT.war
-------------------------
Git Post-Receive Result: success
Activation status: success
Deployment completed with status: success
Repository already uptodate.
EDIT: hmm, the war is 24k which is little - the project is a regular java web application project - runs fine locally both on glassfish and jboss
I would accept an answer telling me how to do it from eclipse (edit: asked here) but till then producing manually the war (right click on the project then export as war) and then scp'ing straight from git Bash (msysgit, mingwin):
$ scp "~/ROOT.war" SHA#APP-DOMAIN.rhcloud.com:/var/lib/\
openshift/SHA/app-root/dependencies/jbossas/deployments
as detailed here (detailed is an euphemism) solved it.
For the gory details of finally setting this up see here
This question is pretty old so I am sure that the problem has been solved, however I was having the same problem and I am sure someone else will do as well. In my case the git wasn't tracking the src folder in my local repository.
You just need to open up a terminal in your git repo folder and type git status to show which folders are not being tracked, then git add [file/foldername] and finally republish it.

How to start JBoss AS 7?

I run the standalone.bat
I encounter a page 404 error when accessing
http://127.0.0.1:8080/
May i know what is wrong?
Below is the server startup logs
Config file not found C:\software\JBoss\bin\standalone.conf.bat
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\software\JBoss
JAVA: C:\Program Files\Java\jdk1.6.0_25\bin\java
JAVA_OPTS: -Dprogram.name=standalone.bat -server
===============================================================================
20:10:34,077 INFO [org.jboss.modules] JBoss Modules version 1.0.0.Beta17
20:10:34,406 INFO [org.jboss.msc] JBoss MSC version 1.0.0.Beta8
20:10:34,468 INFO [org.jboss.as] JBoss AS 7.0.0.Beta3 "Salyut" starting
20:10:35,296 INFO [org.jboss.as.server] Activating core services
20:10:35,468 INFO [org.jboss.as] creating native management service using netwo
rk interface (default) port (9999)
20:10:35,484 INFO [org.jboss.as] creating http management service using network
interface (default) port (9990)
20:10:35,499 INFO [org.jboss.as.arquillian] Activating Arquillian Subsystem
20:10:35,515 INFO [org.jboss.as.ee] Activating EE subsystem
20:10:35,577 INFO [org.jboss.as.naming] Activating Naming Subsystem
20:10:35,781 INFO [org.jboss.as.connector.subsystems.datasources] Deploying JDB
C-compliant driver class org.h2.Driver (version 1.2)
20:10:35,796 INFO [org.jboss.as.osgi] Activating OSGi Subsystem
20:10:36,202 INFO [org.jboss.as.webservices] Activating WebServices Extension
20:10:36,468 INFO [org.jboss.as.logging] Removing bootstrap log handlers
20:10:36,468 INFO [org.jboss.as.naming] Starting Naming Service
20:10:36,484 INFO [org.jboss.as.deployment] (MSC service thread 1-3) Started Fi
leSystemDeploymentService for directory C:\software\JBoss\standalone\deployments
20:10:36,499 INFO [org.jboss.wsf.common.management.AbstractServerConfig] (MSC s
ervice thread 1-4) JBoss Web Services - Stack CXF Server 4.0.0.Alpha4
20:10:36,531 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting
version 3.1.0.Beta2
20:10:36,593 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-
1) Starting remote JMX connector
20:10:36,593 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service
thread 1-3) The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program File
s\Java\jdk1.6.0_25\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Tortois
eSVN\bin
20:10:36,609 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC ser
vice thread 1-3) Unable to set the URLStreamHandlerFactory
20:10:36,609 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC ser
vice thread 1-3) Unable to set the ContentHandlerFactory
20:10:36,749 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service
thread 1-2) live server is starting..
20:10:36,765 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread
1-3) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
20:10:36,984 INFO [org.jboss.as.connector] (MSC service thread 1-3) Starting JC
A Subsystem (JBoss IronJacamar 1.0.0.Beta5)
20:10:37,015 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-3) Bound JDBC Data-source [java:/H2DS]
20:10:37,124 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC ser
vice thread 1-2) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5445
for CORE protocol
20:10:37,140 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC ser
vice thread 1-2) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5455
for CORE protocol
20:10:37,140 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service
thread 1-2) HornetQ Server version 2.1.2.Final (Colmeia, 120) started
20:10:37,218 INFO [org.jboss.as] (MSC service thread 1-4) JBoss AS 7.0.0.Beta3
"Salyut" started in 3391ms - Started 100 of 147 services (47 services are passiv
e or on-demand)
In the alphas and betas of JBoss 7 there were no welcome page deployed. There are and will be in the final release.
To get a page there simply deploy a war named ROOT.war or a war with / as its context root.
I suppose that there is no web application that can be executed.
You can connect to console using these address: http://localhost:9990/console/.
There's simply no default web page there. Try deploying your web app and accessing it.