I'm developing the RESTful web app using jersey, EJB. Using JBoss version 6.4.0
My rest controllers work fine without EJB dependency injection, but when I try to use EJB dependency injection it throws NullPointerException in REST controller.
My controller Controller
#Path("message")
public class DocumentController {
#EJB
private TestService testService;
#GET
public String greeting()
{
return testService.greeting(); // testService is null in there !!!
}
}
My Service
#Stateless
public class TestServiceImpl implements TestService {
#EJB
private SingletonBean singletonBean;
#Override
public String greeting()
{
return singletonBean.getName();
}
}
public interface TestService {
String greeting();
}
The Singleton
#Singleton
public class SingletonBeanImpl implements SingletonBean {
#Override
public String getName()
{
return "Vazgen";
}
}
public interface SingletonBean {
String getName();
}
Maven dependencies
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<version>1.0.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.25.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
Im disabled resteasy
web.xml file
<?xml version="1.0" encoding="ISO-8859-1" ?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<display-name>Application display name</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.myorg.application.controller</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.providers</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.resources</param-name>
<param-value>false</param-value>
</context-param>
</web-app>
JBoss logs
/usr/lib/jvm/java-8-oracle/bin/java -Dfile.encoding=UTF-8 -classpath /home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/idea_rt.jar com.intellij.rt.execution.CommandLineWrapper /tmp/idea_classpath com.intellij.javaee.oss.process.JavaeeProcess 35135 com.intellij.javaee.oss.jboss.agent.JBoss71Agent
/home/user/jsboss-install-dir/EAP-6.4.0/bin/standalone.sh
[2018-03-23 12:18:15,364] Artifact my-app:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 9999
Detected server http port: 8080
JAVA_OPTS already set in environment; overriding default settings with values: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:40537,suspend=y,server=n -javaagent:/home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/rt/debugger-agent.jar=/tmp/capture.props
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/user/jsboss-install-dir/EAP-6.4.0
JAVA: /usr/lib/jvm/java-8-oracle/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -verbose:gc -Xloggc:"/home/user/jsboss-install-dir/EAP-6.4.0/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:40537,suspend=y,server=n -javaagent:/home/user/jsboss-install-dir/idea-IU-173.4548.28/lib/rt/debugger-agent.jar=/tmp/capture.props
=========================================================================
Connected to the target VM, address: '127.0.0.1:40537', transport: 'socket'
12:18:15,746 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
12:18:15,951 INFO [org.jboss.msc] (main) JBoss MSC version 1.1.5.Final-redhat-1
12:18:16,110 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015899: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) starting
12:18:17,193 INFO [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.13.GA-redhat-1
12:18:17,197 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.13.GA-redhat-1
12:18:17,204 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
12:18:17,215 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.3.4.Final-redhat-1
12:18:17,276 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
12:18:17,282 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
12:18:17,317 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013371: Activating Security Subsystem
12:18:17,323 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 39) JBAS011800: Activating Naming Subsystem
12:18:17,326 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
12:18:17,332 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
12:18:17,335 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013370: Current PicketBox version=4.1.1.Final-redhat-1
12:18:17,351 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 37) JBAS012615: Activated the following JSF Implementations: [main, 1.2]
12:18:17,359 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)
12:18:17,420 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
12:18:17,421 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]
12:18:17,422 INFO [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.31.Final-redhat-1)
12:18:17,760 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
12:18:17,769 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
12:18:17,846 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
12:18:17,846 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/employee_storage]
12:18:17,872 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on 127.0.0.1:9999
12:18:17,873 INFO [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on 127.0.0.1:4447
12:18:17,888 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory /home/user/jsboss-install-dir/EAP-6.4.0/standalone/deployments
12:18:17,906 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.4.Final-redhat-1
Mar 23, 2018 12:18:17 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.13.GA-redhat-1
Mar 23, 2018 12:18:18 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.13.GA-redhat-1
Mar 23, 2018 12:18:18 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.3.4.Final-redhat-1
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
12:18:18,128 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 2657ms - Started 159 of 197 services (57 services are lazy, passive or on-demand)
Connected to server
[2018-03-23 12:18:18,519] Artifact my-app:war exploded: Artifact is being deployed, please wait...
12:18:18,668 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "my-app" (runtime-name: "my-app.war")
12:18:19,387 INFO [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011401: Read persistence.xml for employeeUnit
12:18:19,553 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named SingletonBeanImpl in deployment unit deployment "my-app.war" are as follows:
java:global/my-app/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:app/my-app/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:module/SingletonBeanImpl!com.egs.preparation.rest.service.SingletonBean
java:global/my-app/SingletonBeanImpl
java:app/my-app/SingletonBeanImpl
java:module/SingletonBeanImpl
12:18:19,553 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named TestServiceImpl in deployment unit deployment "my-app.war" are as follows:
java:global/my-app/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:app/my-app/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:module/TestServiceImpl!com.egs.preparation.rest.service.TestService
java:global/my-app/TestServiceImpl
java:app/my-app/TestServiceImpl
java:module/TestServiceImpl
12:18:19,706 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
12:18:19,707 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
12:18:19,729 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 25) JBAS011402: Starting Persistence Unit Service 'my-app#employeeUnit'
12:18:19,837 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 25) HCANN000001: Hibernate Commons Annotations {4.0.2.Final-redhat-1}
12:18:20,762 INFO [org.jboss.web] (ServerService Thread Pool -- 24) JBAS018210: Register web context: /my-app
12:18:20,907 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015859: Deployed "my-app" (runtime-name : "my-app.war")
[2018-03-23 12:18:20,935] Artifact my-app:war exploded: Artifact is deployed successfully
[2018-03-23 12:18:20,935] Artifact my-app:war exploded: Deploy took 2,416 milliseconds
12:18:26,750 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app].[Jersey REST Service]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet Jersey REST Service threw exception: java.lang.NullPointerException
at com.egs.preparation.rest.controller.DocumentResourceBean.greeting(DocumentResourceBean.java:43) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.25.1.jar:]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.25.1.jar:]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [jersey-container-servlet-core-2.25.1.jar:]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [jersey-container-servlet-core-2.25.1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_161]
Could you help me understand what is a problem?
Related
First thing, I already saw posts on it on Stackoverflow
(like this : Wildfly 9.x startet with errors: Address already in use) but no solution is working (changing the port , check if another server is running , etc) and got Jboss in a zip from http://tools.jboss.org/downloads/jbosstools/neon/4.4.0.Final.html#zips (because my eclipse marketplace didn't find it)
Bad luck this time when I start my WildFly Server on Eclipse :
23:47:12,788 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
23:47:15,449 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
23:47:15,530 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
23:47:25,711 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
23:47:26,198 INFO [org.xnio] (MSC service thread 1-6) XNIO version 3.3.4.Final
23:47:26,376 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.3.4.Final
23:47:26,637 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
23:47:26,654 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
23:47:26,658 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
23:47:26,945 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
23:47:26,978 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
23:47:27,100 INFO [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=4.9.4.Final
23:47:27,134 INFO [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.2.Final)
23:47:27,433 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
23:47:27,692 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
23:47:27,704 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.3.15.Final starting
23:47:27,705 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.3.15.Final starting
23:47:29,761 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:47:29,764 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
23:47:30,400 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path 'C:\Progs\wildfly-10.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
23:47:31,056 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
23:47:31,057 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
23:47:32,848 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
23:47:32,848 INFO [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
23:47:32,978 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0012: Started server default-server.
23:47:32,980 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
23:47:33,057 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 4.0.18.Final
23:47:33,824 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
23:47:34,863 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
23:47:35,357 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Progs\wildfly-10.0.0.Final\standalone\deployments
23:47:35,421 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "postgresql-9.3-1103.jdbc4.jar" (runtime-name: "postgresql-9.3-1103.jdbc4.jar")
23:47:37,241 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:271)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:157)
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:237)
... 5 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:192)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:144)
... 6 more
23:47:37,300 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:37,300 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-7) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:37,301 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-8) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:42,235 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4)
23:47:44,552 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.3)
23:47:44,707 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = postgresql-9.3-1103.jdbc4.jar
23:47:45,394 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.serverManagement.controller.management.http" => "org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
Caused by: java.net.BindException: Address already in use: bind"}}
23:47:45,588 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "postgresql-9.3-1103.jdbc4.jar" (runtime-name : "postgresql-9.3-1103.jdbc4.jar")
23:47:45,589 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
23:47:45,967 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0063: Http management interface is not enabled
23:47:45,967 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
23:47:45,968 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 34185ms - Started 307 of 603 services (2 services failed or missing dependencies, 379 services are lazy, passive or on-demand)
What I understood with these lines is that this address is already in use.
I start this cmd command before and after the start of the server :
netstat -aon | findstr :8080
Before :
After :
I can access on the default page (localhost:8080) :
When I click on "Administration Console" , I got this :
Any solution ?
Finally , I found the answer here (Thanks Ualter Jr.) :
Check if you have service called NVIDIA Network Service running at your computer. Coincidentally this NVIDIA Service is running at the port 9990, used for the Admin console of Wildfly. In my case, it was only stop this Service and restart the Wildfly server.
I am new to J2EE. I am trying to connect to datasource created in jboss AS 7 using JNDI.
I am using Jboss AS 7 Standalone server to deploy my project NewDB.war.
I have created fallowing data source java:jboss/datasources/oracleDS (which is my JNDI name) in Jboss AS 7 and successfully connected to Oracle database.
I am using oracle database to store my sql tables.
I am getting fallowing error message in eclipse. but i got success message in command propmpt.
I created Dynamic web project in eclipse for performing all these tasks.I am not sure which type of project to create for my task. Correct me if i am wrong.
It will be great help if anyone helps getting out of this error.
09:53:18,418 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
09:53:19,421 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
09:53:19,495 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
09:53:22,118 INFO [org.xnio] XNIO Version 3.0.3.GA
09:53:22,118 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
09:53:22,122 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
09:53:22,137 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
09:53:22,184 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
09:53:22,200 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
09:53:22,215 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
09:53:22,200 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
09:53:22,200 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
09:53:22,200 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
09:53:22,200 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
09:53:22,340 INFO [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service
09:53:22,356 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
09:53:22,403 INFO [org.jboss.as.connector] (MSC service thread 1-7) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
09:53:22,465 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
09:53:22,559 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
09:53:23,394 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
09:53:23,564 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
09:53:23,642 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - Stack CXF Server 4.0.2.GA
09:53:24,126 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\patillat\jboss-as-7.1.1.Final\standalone\deployments
09:53:24,142 WARN [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015002: Deployment of 'NewDBEAR.ear' requested, but the deployment is not present
09:53:24,158 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found NewDB.war in deployment directory. To trigger deployment create a file called NewDB.war.dodeploy
09:53:24,173 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on localhost/127.0.0.1:4447
09:53:24,173 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on localhost/127.0.0.1:9999
09:53:24,361 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "NewDB.war"
09:53:25,159 INFO [org.jboss.web] (MSC service thread 1-7) JBAS018210: Registering web context: /NewDB
09:53:25,177 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990
09:53:25,179 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 8275ms - Started 174 of 251 services (76 services are passive or on-demand)
09:53:25,305 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "NewDB.war"
09:53:26,815 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) Error getting DS : javax.naming.NameNotFoundException: datasources/oracleDS -- service jboss.naming.context.java.jboss.datasources.oracleDS
09:53:26,817 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) javax.naming.NameNotFoundException: datasources/oracleDS -- service jboss.naming.context.java.jboss.datasources.oracleDS
09:53:26,817 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
09:53:26,817 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
09:53:26,817 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
09:53:26,817 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at p1.TestServlet.init(TestServlet.java:37)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at javax.servlet.GenericServlet.init(GenericServlet.java:242)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
09:53:26,833 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
09:53:26,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
09:53:26,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:53:26,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:53:26,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
09:53:26,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
09:53:26,864 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
09:53:26,864 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
09:53:26,864 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at java.lang.Thread.run(Unknown Source)
javax.naming.NameNotFoundException
but i am getting success report in command prompt as fallows
16:53:33,981 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
16:53:34,215 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:53:34,262 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
16:53:35,452 INFO [org.xnio] XNIO Version 3.0.3.GA
16:53:35,455 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
16:53:35,486 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
16:53:35,540 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
16:53:35,541 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
16:53:35,582 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
16:53:35,576 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
16:53:35,748 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
16:53:35,739 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
16:53:35,722 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
16:53:35,707 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
16:53:35,690 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
16:53:35,924 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013100: Current PicketBox version=4.0.7.Final
16:53:35,906 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:53:35,885 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
16:53:35,817 INFO [org.jboss.as.connector] (MSC service thread 1-8) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
16:53:36,479 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-4) JBoss Web Services - Stack CXF Server 4.0.2.GA
16:53:36,679 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss\standalone\deployments
16:53:37,242 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:53:38,059 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
16:53:38,059 INFO [org.apache.coyote.ajp.AjpProtocol] (MSC service thread 1-4) Starting Coyote AJP/1.3 on ajp--127.0.0.1-8009
16:53:38,106 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on /127.0.0.1:4447
16:53:38,106 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
16:53:38,371 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.ojdbc6_jar (missing) dependents: [service jboss.data-source.java:jboss/datasources/oracleDS]
16:53:38,434 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "NewDB.war"
16:53:38,434 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "ojdbc6.jar"
16:53:39,075 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
16:53:39,075 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/oracleDS]
16:53:39,184 INFO [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /NewDB
16:53:39,200 INFO [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin console listening on http://127.0.0.1:9990
16:53:39,215 INFO [org.jboss.as] (MSC service thread 1-4) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 5516ms - Started 201 of 281 services (78 services are passive or on-demand)
16:53:39,262 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ojdbc6.jar"
16:53:39,262 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "NewDB.war"
16:53:39,262 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.jdbc-driver.ojdbc6_jar (no longer required)
16:53:55,446 INFO [stdout] (http--127.0.0.1-8080-2) **Success getting DS** : class org.jboss.jca.adapters.jdbc.WrapperDataSource
16:57:40,076 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment NewDB.war in 81ms
I wrote fallowing code in Servlet... in eclipse luna.
package p1;
import java.io.IOException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
/**
* Servlet implementation class TestServlet
*/
#WebServlet("/TestServlet")
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* #see HttpServlet#HttpServlet()
*/
public TestServlet() {
super();
// TODO Auto-generated constructor stub
}
public void init() throws ServletException {
super.init();
DataSource ds = null;
Context ctx = null;
try {
String strDSName = "java:jboss/datasources/oracleDS";
ctx = new InitialContext();
Context cx = (Context)ctx.lookup("java:jboss");
ds = (javax.sql.DataSource)cx.lookup("datasources/oracleDS");
System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
System.out.println("Success getting DS : " + ds.getClass());
} catch (Exception e) {
System.err.println("Error getting DS : " + e);
e.printStackTrace();
}
}
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
/**
* #see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
Fallowing are the context.xml and web.xml placed in WebContent/META-INF and WebContent/WEB-INF/lib respectively
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/JNDI">
<Resource name="jdbc/oracleDS" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="system" password="Evergren$12" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:#localhost:1521:ORCL" />
</Context>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<resource-ref>
<description>oracle Datasource example</description>
<res-ref-name>jdbc/oracleDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
Your context.xml file will be ignored as that is a Tomcat configuration file and you're running JBoss AS;
Your web.xml is badly formed and I'm surprised it does not result in a deployment error - at the very least it is likely ignored;
I believe that your code works from the command line because the deployment order changes subtly. When you run from Eclipse your webapp is being initialised before your datasource, probably because of explicit deployment instructions from Eclipse.
Normally, JBoss AS can work out the correct deployment order by analysing annotations or deployment descriptors. However you don't have either in a useable form.
As this is a JavaEE 6 compliant server, you should not need explicit JNDI lookups. Try the following instead:
package p1;
import java.io.IOException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
/**
* Servlet implementation class TestServlet
*/
#WebServlet("/TestServlet")
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
#Resource(lookup="java:jboss/datasources/oracleDS")
private DataSource ds;
/**
* #see HttpServlet#HttpServlet()
*/
public TestServlet() {
super();
// TODO Auto-generated constructor stub
}
public void init() throws ServletException {
super.init();
System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
System.out.println("Success getting DS : " + ds.getClass());
}
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
/**
* #see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
I am getting following error while deploying our EAR to JBoss AS 7.1 as a standalone deployment. Please see the server error log and help me out in what I need to do for it to start functioning correctly. Thank You
12:21:47,165 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
12:21:47,167 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
12:21:47,211 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
12:21:47,211 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
12:21:47,212 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
12:21:47,215 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
12:21:47,219 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013100: Current PicketBox version=4.0.7.Final
12:21:47,232 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
12:21:47,250 INFO [org.jboss.as.connector] (MSC service thread 1-8) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
12:21:47,262 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
12:21:47,328 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
12:21:47,467 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
12:21:47,624 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8085
12:21:47,658 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory D:\jboss-as-7.1.1.Final\standalone\deployments
12:21:47,659 INFO [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on /127.0.0.1:4447
12:21:47,660 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on /127.0.0.1:9999
12:21:47,808 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
12:21:48,018 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.ojdbc14-10_2_0_5_jar (missing) dependents: [service jboss.data-source.java:/jdbc/DefaultDS]
12:21:48,036 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "Shrisurance.ear"
12:21:54,210 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."Shrisurance.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Shrisurance.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "Shrisurance.ear"
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$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to get manifest for deployment "/D:/jboss-as-7.1.1.Final/bin/content/Shrisurance.ear/Shrisurance.war"
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:73) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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
Caused by: java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:393) [rt.jar:1.6.0_25]
at java.util.jar.Manifest.read(Manifest.java:182) [rt.jar:1.6.0_25]
at java.util.jar.Manifest.<init>(Manifest.java:52) [rt.jar:1.6.0_25]
at org.jboss.vfs.VFSUtils.readManifest(VFSUtils.java:216) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
at org.jboss.vfs.VFSUtils.getManifest(VFSUtils.java:199) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:69) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 6 more
12:21:54,257 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015951: Admin console listening on http://127.0.0.1:9990
12:21:54,257 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "Shrisurance.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"Shrisurance.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Shrisurance.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"Shrisurance.ear\""}}
12:21:54,258 ERROR [org.jboss.as] (MSC service thread 1-5) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 7927ms - Started 136 of 215 services (3 services failed or missing dependencies, 74 services are passive or on-demand)
12:21:54,266 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment Shrisurance.ear in 7ms
12:21:54,267 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."Shrisurance.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Shrisurance.ear".STRUCTURE: Failed to process phase STRUCTURE of deployment "Shrisurance.ear"
12:21:54,277 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.\"Shrisurance.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Shrisurance.ear\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"Shrisurance.ear\""}}}}
12:22:02,431 INFO [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011942: Stopping OSGi Framework
Case 1 : Looking from log
New missing/unsatisfied dependencies:
service jboss.jdbc-driver.ojdbc14-10_2_0_5_jar
It is found that you are using ojdbc14 version of jar. It is for JDK 1.4. If you are using JDK 1.4+ version then use ojdbc14+ driver. Latest Oracle Driver Download Link
Modify module.xml ( # jboss-as-web-7.0.2.Final\modules\com\oracle\ojdbcXXX\main )
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbcXXX">
<resources>
<resource-root path="ojdbcXXX.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
Add ojdbcXXX.jar ( # jboss-as-web-7.0.2.Final\modules\com\oracle\ojdbcXXX\main )
Define Data-source in standalone.xml
<datasource jndi-name="java:/OracleDS" pool-name="OracleDS">
<connection-url>jdbc:oracle:thin:#host:port:SID</connection-url>
<driver>ojdbcXXX</driver>
</datasource>
<drivers>
<driver name="ojdbcXXX" module="com.oracle.ojdbcXXX">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
Case 2 : Include other deployments in EAR
JBoss find that dependency spurious. If your EAR contains other deployments like .jar or.war then you can try below :-
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
</jboss-deployment-structure>
I am trying to setup a simple project, where I have a REST service query a database using JPA/Hibernate. My platform is Windows, MySQL 5.6, and JBoss (Wildfly) 8 with hibernate 4.3. My project setup:
PersonApp (Eclipse Java Enterprise Project) >PersonApp.ear
-PersonData (Eclipse JPA Project) >PersonData.jar
-PersonRest (Eclipse Dynamic Web Project) >PersonRest.war
PersonData project contains 1 entity class (Person.java), a manager class for peforming the em.find and em.persist through EntityManager (PersonManager.java), and persistance.xml
PersonRest project contains one REST service, with one GET method, which calls the PersonManager class to query all Persons.
PersonApp is just a container project which includes PersonData and PersonRest as modules.
Now for the issue: I deploy PersonApp.ear to Wildfly 8 (JBoss), and navigate to the service URL in a web browser. PersonRest service calls PersonManager class, which calls Persistence.createEntityManagerFactor("PersonData"); This line returns 'null' and I have no idea why.
persistence.xml:
<?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="PersonData" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/MySqlDS</jta-data-source>
<class>com.csc.data.Person</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
</persistence>
Wildfly startup output (shows app deployment, data source loaded, persistence unit):
14:31:14,607 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
14:31:14,841 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.0.Final
14:31:14,919 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.0.0.Final "WildFly" starting
14:31:15,871 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found PersonApp.ear in deployment directory. To trigger deployment create a file called PersonApp.ear.dodeploy
14:31:15,887 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
14:31:15,903 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.2.0.Final
14:31:15,919 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.2.0.Final
14:31:15,934 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 33) JBAS010280: Activating Infinispan subsystem.
14:31:15,950 INFO [org.jboss.as.security] (ServerService Thread Pool -- 46) JBAS013171: Activating Security Subsystem
14:31:15,966 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 50) JBAS015537: Activating WebServices Extension
14:31:15,997 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017502: Undertow 1.0.0.Final starting
14:31:15,997 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 49) JBAS017502: Undertow 1.0.0.Final starting
14:31:15,997 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.20.Final
14:31:15,997 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 41) JBAS011800: Activating Naming Subsystem
14:31:15,997 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012615: Activated the following JSF Implementations: [main]
14:31:16,028 INFO [org.jboss.as.connector.logging] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.3.Final)
14:31:16,075 INFO [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service
14:31:16,075 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
14:31:16,090 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS015400: Bound mail session [java:jboss/mail/Default]
14:31:16,106 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
14:31:16,106 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010417: Started Driver service with driver-name = h2
14:31:16,106 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010417: Started Driver service with driver-name = com.mysql
14:31:16,184 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 49) JBAS017527: Creating file handler for path C:\wildfly-8.0.0.Final/welcome-content
14:31:16,200 INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.0.Final
14:31:16,434 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017525: Started server default-server.
14:31:16,543 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017531: Host default-host starting
14:31:16,605 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017519: Undertow HTTP listener default listening on localhost/127.0.0.1:8080
14:31:16,652 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/MySqlDS]
14:31:16,730 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "PersonApp.ear" (runtime-name: "PersonApp.ear")
14:31:16,746 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory C:\wildfly-8.0.0.Final\standalone\deployments
14:31:16,761 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
14:31:16,824 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "null" (runtime-name: "PersonRest.war")
14:31:16,855 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final
14:31:16,870 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for PersonData
14:31:16,933 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 52) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'PersonApp.ear#PersonData'
14:31:16,948 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 52) HHH000204: Processing PersistenceUnitInfo [
name: PersonData
...]
14:31:16,996 INFO [org.hibernate.Version] (ServerService Thread Pool -- 52) HHH000412: Hibernate Core {4.3.1.Final}
14:31:17,012 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 52) HHH000206: hibernate.properties not found
14:31:17,012 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 52) HHH000021: Bytecode provider name : javassist
14:31:17,152 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 52) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'PersonApp.ear#PersonData'
14:31:17,277 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 52) HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
14:31:17,511 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 52) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
14:31:17,589 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 52) HHH000397: Using ASTQueryTranslatorFactory
14:31:17,620 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 52) HV000001: Hibernate Validator 5.0.3.Final
14:31:17,885 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 52) HHH000227: Running hbm2ddl schema export
14:31:17,932 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 52) HHH000230: Schema export complete
14:31:18,197 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (MSC service thread 1-2) Deploying javax.ws.rs.core.Application: class com.csc.rest.service.PersonRest
14:31:18,197 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (MSC service thread 1-2) Adding singleton resource com.csc.rest.service.PersonService from Application class com.csc.rest.service.PersonRest
14:31:18,323 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017534: Registered web context: /PersonRest
14:31:18,370 INFO [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "PersonApp.ear" (runtime-name : "PersonApp.ear")
14:31:18,417 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
14:31:18,417 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
14:31:18,417 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Final "WildFly" started in 4059ms - Started 291 of 351 services (98 services are lazy, passive or on-demand)
Wildfly output on REST service call:
14:32:06,221 INFO [org.hibernate.jpa.internal.util.LogHelper] (default task-2) HHH000204: Processing PersistenceUnitInfo [
name: PersonData
...]
14:32:06,236 INFO [org.hibernate.dialect.Dialect] (default task-2) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
14:32:06,236 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (default task-2) HHH000397: Using ASTQueryTranslatorFactory
14:32:06,252 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (default task-2) HHH000227: Running hbm2ddl schema export
14:32:06,268 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (default task-2) HHH000230: Schema export complete
14:32:06,300 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /PersonRest/PersonService: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.6.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.0.Final.jar:1.0.0.Final]
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.NullPointerException
at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:76) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:118) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1602) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:210) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.jpa.internal.EntityManagerImpl.<init>(EntityManagerImpl.java:91) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.jpa.internal.EntityManagerFactoryImpl.internalCreateEntityManager(EntityManagerFactoryImpl.java:345) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
at org.hibernate.jpa.internal.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:313) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
at com.csc.data.PersonManager.openConnection(PersonManager.java:51) [PersonData.jar:]
at com.csc.rest.service.PersonService.getAllPersons(PersonService.java:21) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_51]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221) [resteasy-jaxrs-3.0.6.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.6.Final.jar:]
... 29 more
It looks like Wildfly is able to find persistance.xml, and it is able to connect to the MySQL database (it even drops the table data as expected). It shows in the output that it found the persistence unit PersonData. I even tried changing the provider to something off the wall just to see if it would error. It did error saying it couldn't find the provider class. I changed it back and the error went away, so I assume it is able to find the provider. What am I missing?
I found the solution. In my REST service, I was instantiating the PersonManager class myself. Instead, I needed to inject it with #Inject. After this, it worked, almost. I then had a problem getting CDI to work inside a RESTeasy REST service, but that was a separate issue. More details can be found here in my JBoss community thread: https://community.jboss.org/message/863014#863014
I developed a simple web application using the following technologies JSF 2.0 , EJB 3, JPA and also JAAS for user login validation.
I structured my app in three projects: one is EJB project which contains the business and model, the second one is the view part of the project which is a Dynamic Web Project that includes ManagedBeans and JSF pages. And the last one is an EAR project which unite both projects.
Ear project was successfully deployed in JBoss 7 but when I try to access a page I get the following error:
21:04:29,671 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--127.0.0.1-8080-1) An exception or error occurred in the container during the request processing: java.lang.IllegalStateException
at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
at org.jboss.as.connector.deployers.processors.CachedConnectionManagerSetupProcessor$CachedConnectionManagerSetupAction.setup(CachedConnectionManagerSetupProcessor.java:74)
at org.jboss.as.web.ThreadSetupBindingListener.bind(ThreadSetupBindingListener.java:50) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:125) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>ITSupportView</display-name>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<welcome-file-list>
<welcome-file>/pages/protected/user/welcome.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
<url-pattern>*.jsf</url-pattern>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<!-- Protected area definition -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted Area - ADMIN Only</web-resource-name>
<url-pattern>/pages/protected/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>ADMIN</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted Area - USER and ADMIN</web-resource-name>
<url-pattern>/pages/protected/user/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>BASIC</role-name>
<role-name>ADMIN</role-name>
</auth-constraint>
</security-constraint>
<!-- Login page -->
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/pages/public/login.xhtml</form-login-page>
<form-error-page>/pages/public/loginError.xhtml</form-error-page>
</form-login-config>
</login-config>
<!-- System roles -->
<security-role>
<role-name>ADMIN</role-name>
</security-role>
<security-role>
<role-name>BASIC</role-name>
</security-role>
<security-role>
<role-name>CONS</role-name>
</security-role>
<filter>
<filter-name>LoginFilter</filter-name>
<filter-class>com.itsupport.filters.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/pages/protected/*</url-pattern>
</filter-mapping>
</web-app>
Faces-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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-facesconfig_2_0.xsd"
version="2.0">
<navigation-rule>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/pages/protected/user/welcome.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<application>
<resource-bundle>
<base-name>messages</base-name>
<var>msgs</var>
</resource-bundle>
</application>
</faces-config>
Am I missing something? Any ideas?
I'm pretty newbie with these technologies so any advice would be welcome.
Thanks in advance!
Here is the full log. I noticed another error just before replacing the existing ear deployed file.
Failure during stop of service
jboss.web.deployment.default-host./ITSupportView:
java.lang.NoSuchMethodError:
org.ocpsoft.rewrite.servlet.ServletRewriteProvider.shutdown(Ljava/lang/Object;)V
15:04:43,872 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015009: Scan found incompletely copied file content for deployment d:\Programs\JBoss Server\jboss-as-7.1.1.Final\standalone\deployments\ITSupportEAR.ear. Deployment changes will not be processed until all content is complete.
15:04:44,311 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011403: Stopping Persistence Unit Service 'ITSupportEAR.ear/ITSupportModel.jar#ITSupportEJB'
15:04:44,324 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-3) RewriteFilter shutting down...
15:04:44,326 WARN [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00004: Failure during stop of service jboss.web.deployment.default-host./ITSupportView: java.lang.NoSuchMethodError: org.ocpsoft.rewrite.servlet.ServletRewriteProvider.shutdown(Ljava/lang/Object;)V
at org.ocpsoft.rewrite.servlet.RewriteFilter.destroy(RewriteFilter.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:504)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3301)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3989)
at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:108)
at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
15:04:44,337 INFO [org.apache.catalina.core.ContainerBase] (MSC service thread 1-3) Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ITSupportView].[jsp] has not been started
15:04:44,339 INFO [org.apache.catalina.core.ContainerBase] (MSC service thread 1-3) Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ITSupportView].[default] has not been started
15:04:44,340 INFO [org.apache.catalina.core.ContainerBase] (MSC service thread 1-3) Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ITSupportView].[Faces Servlet] has not been started
15:04:44,341 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-3) RewriteFilter shutting down...
15:04:44,342 WARN [org.jboss.msc] (MSC service thread 1-3) MSC00006: Uninjection "org.jboss.msc.service.ValueInjection#74c8cef2" of service jboss.web.deployment.default-host./ITSupportView failed unexpectedly: java.lang.NoSuchMethodError: org.ocpsoft.rewrite.servlet.ServletRewriteProvider.shutdown(Ljava/lang/Object;)V
at org.ocpsoft.rewrite.servlet.RewriteFilter.destroy(RewriteFilter.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:504)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3301)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3989)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:926)
at org.jboss.as.web.deployment.WebContextInjector.uninject(WebContextInjector.java:69)
at org.jboss.msc.inject.CastingInjector.uninject(CastingInjector.java:60) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.uninject(ServiceControllerImpl.java:1919) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1893) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
15:04:44,352 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011403: Stopping Persistence Unit Service 'ITSupportEAR.ear/ITSupportView.war#ITSupportEJB'
15:04:44,361 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment ITSupportModel.jar in 61ms
15:04:44,361 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment ITSupportService.jar in 61ms
15:04:44,594 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment ITSupportView.war in 295ms
15:04:44,600 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment ITSupportEAR.ear in 300ms
15:04:44,601 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ITSupportEAR.ear"
15:04:44,644 WARN [org.jboss.metadata.parser.jboss.JBossAppMetaDataParser] (MSC service thread 1-1) loader-repository element in jboss-app.xml is deprecated and has been ignored
15:04:45,431 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ITSupportView.war"
15:04:45,432 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ITSupportService.jar"
15:04:45,432 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "ITSupportModel.jar"
15:04:47,002 INFO [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for ITSupportEJB
15:04:47,042 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
15:04:47,044 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'
15:04:47,050 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for ITSupportEJB
15:04:47,106 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named UserDAO in deployment unit subdeployment "ITSupportService.jar" of deployment "ITSupportEAR.ear" are as follows:
java:global/ITSupportEAR/ITSupportService/UserDAO!com.itsupport.dao.UserDAO
java:app/ITSupportService/UserDAO!com.itsupport.dao.UserDAO
java:module/UserDAO!com.itsupport.dao.UserDAO
java:global/ITSupportEAR/ITSupportService/UserDAO
java:app/ITSupportService/UserDAO
java:module/UserDAO
15:04:47,127 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named UserFacadeImpl in deployment unit subdeployment "ITSupportService.jar" of deployment "ITSupportEAR.ear" are as follows:
java:global/ITSupportEAR/ITSupportService/UserFacadeImpl!com.itsupport.facade.UserFacade
java:app/ITSupportService/UserFacadeImpl!com.itsupport.facade.UserFacade
java:module/UserFacadeImpl!com.itsupport.facade.UserFacade
java:global/ITSupportEAR/ITSupportService/UserFacadeImpl
java:app/ITSupportService/UserFacadeImpl
java:module/UserFacadeImpl
15:04:47,153 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named UserFacadeImpl in deployment unit subdeployment "ITSupportView.war" of deployment "ITSupportEAR.ear" are as follows:
java:global/ITSupportEAR/ITSupportView/UserFacadeImpl!com.itsupport.facade.UserFacade
java:app/ITSupportView/UserFacadeImpl!com.itsupport.facade.UserFacade
java:module/UserFacadeImpl!com.itsupport.facade.UserFacade
java:global/ITSupportEAR/ITSupportView/UserFacadeImpl
java:app/ITSupportView/UserFacadeImpl
java:module/UserFacadeImpl
15:04:47,157 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named UserDAO in deployment unit subdeployment "ITSupportView.war" of deployment "ITSupportEAR.ear" are as follows:
java:global/ITSupportEAR/ITSupportView/UserDAO!com.itsupport.dao.UserDAO
java:app/ITSupportView/UserDAO!com.itsupport.dao.UserDAO
java:module/UserDAO!com.itsupport.dao.UserDAO
java:global/ITSupportEAR/ITSupportView/UserDAO
java:app/ITSupportView/UserDAO
java:module/UserDAO
15:04:47,170 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'ITSupportEAR.ear/ITSupportModel.jar#ITSupportEJB'
15:04:47,237 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-1) HHH000204: Processing PersistenceUnitInfo [
name: ITSupportEJB
...]
15:04:47,310 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
15:04:47,319 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-1) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
15:04:47,332 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-1) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
15:04:47,334 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-1) HHH000397: Using ASTQueryTranslatorFactory
15:04:47,474 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
15:04:47,479 INFO [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'ITSupportEAR.ear/ITSupportView.war#ITSupportEJB'
15:04:47,480 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [
name: ITSupportEJB
...]
15:04:47,510 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
15:04:47,514 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-4) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
15:04:47,516 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-4) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
15:04:47,518 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-4) HHH000397: Using ASTQueryTranslatorFactory
15:04:47,534 INFO [org.hibernate.search.Version] (MSC service thread 1-4) HSEARCH000034: Hibernate Search 4.1.0.Alpha1
15:04:47,557 WARN [org.hibernate.search.impl.ConfigContext] (MSC service thread 1-4) HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.
15:04:47,663 INFO [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
15:04:47,677 INFO [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
15:04:47,738 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/ITSupportView'
15:04:47,993 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (Mojarra-WebResourceMonitor-7-thread-1) Unable to access url jndi:/default-host/ITSupportView/WEB-INF/faces-config.xml. Monitoring for this resource will no longer occur.
15:04:48,056 INFO [org.ocpsoft.rewrite.faces.RewritePhaseListener] (MSC service thread 1-1) RewritePhaseListener starting up.
15:04:48,919 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC service thread 1-1) Running on PrimeFaces 4.0
15:04:48,920 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Monitoring jndi:/default-host/ITSupportView/WEB-INF/faces-config.xml for modifications
15:04:48,922 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) RewriteFilter starting up...
15:04:48,938 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [4] org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener [org.ocpsoft.rewrite.prettyfaces.PrettyFacesRewriteLifecycleListener<-100>, org.ocpsoft.rewrite.faces.FacesRewriteLifecycleListener<0>, org.ocpsoft.rewrite.servlet.impl.DefaultRewriteLifecycleListener<2147483647>, org.ocpsoft.rewrite.servlet.config.lifecycle.JoinRewriteLifecycleListener<2147483647>]
15:04:48,941 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.servlet.spi.RequestCycleWrapper [org.ocpsoft.rewrite.servlet.impl.HttpRewriteRequestCycleWrapper<0>]
15:04:48,942 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.spi.RewriteProvider [org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider<0>]
15:04:48,943 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.spi.RewriteResultHandler [org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler<0>]
15:04:48,944 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.servlet.spi.InboundRewriteProducer [org.ocpsoft.rewrite.servlet.impl.HttpInboundRewriteProducer<0>]
15:04:48,946 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.servlet.spi.OutboundRewriteProducer [org.ocpsoft.rewrite.servlet.impl.HttpOutboundRewriteProducer<0>]
15:04:48,948 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.servlet.spi.ContextListener [org.ocpsoft.rewrite.prettyfaces.PrettyConfigContextListener<0>]
15:04:48,950 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [0] org.ocpsoft.rewrite.servlet.spi.RequestListener []
15:04:48,951 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.servlet.spi.RequestParameterProvider [org.ocpsoft.rewrite.prettyfaces.PrettyFacesRequestParameterProvider<0>]
15:04:48,954 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider [org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider<30>]
15:04:48,956 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.spi.InvocationResultHandler [org.ocpsoft.rewrite.faces.NavigatingInvocationResultHandler<100>]
15:04:48,958 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [0] org.ocpsoft.common.spi.ServiceEnricher []
15:04:48,960 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [1] org.ocpsoft.rewrite.spi.ConfigurationCacheProvider [org.ocpsoft.rewrite.servlet.impl.ServletContextConfigurationCacheProvider<0>]
15:04:48,963 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Loaded [2] org.ocpsoft.rewrite.config.ConfigurationProvider [org.ocpsoft.rewrite.annotation.config.AnnotationConfigProvider<100>, org.ocpsoft.rewrite.prettyfaces.PrettyFacesRewriteConfigurationProvider<1>]
15:04:48,969 INFO [org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider] (MSC service thread 1-1) Loaded [0] org.ocpsoft.rewrite.spi.RuleCacheProvider []
15:04:48,989 INFO [org.ocpsoft.rewrite.servlet.RewriteFilter] (MSC service thread 1-1) Rewrite 2.0.0.Alpha5 initialized.
15:04:48,991 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /ITSupportView
15:04:49,122 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "ITSupportEAR.ear" with deployment "ITSupportEAR.ear"
15:06:22,966 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--127.0.0.1-8080-4) An exception or error occurred in the container during the request processing: java.lang.IllegalStateException
at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
at org.jboss.as.connector.deployers.processors.CachedConnectionManagerSetupProcessor$CachedConnectionManagerSetupAction.setup(CachedConnectionManagerSetupProcessor.java:74)
at org.jboss.as.web.ThreadSetupBindingListener.bind(ThreadSetupBindingListener.java:50) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:125) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]