Getting server log error - earlier
13:31:25,905 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for testJpaUnit
13:31:27,731 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"test.war#testJpaUnit\".__FIRST_PHASE__ is missing [jboss.naming.context.java.testDataSource]"]}
update after changes
You will come across deployment.internal.ear, which is another package needed for this app to work and is getting deployed properly.
11:30:08,028 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/testDataSource]
11:30:31,216 INFO [org.jboss.as.jpa] (MSC service thread 1-6) JBAS011401: Read persistence.xml for testJpaUnit
11:30:33,921 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'test.war#testJpaUnit'
11:30:33,966 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 50) HHH000204: Processing PersistenceUnitInfo [
name: testJpaUnit
...]
11:30:34,313 INFO [org.hibernate.Version] (ServerService Thread Pool -- 50) HHH000412: Hibernate Core {4.3.7.Final}
11:30:34,314 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000206: hibernate.properties not found
11:30:34,318 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000021: Bytecode provider name : javassist
11:30:54,858 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."test.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "test.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_144]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_144]
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.service.ServiceBeanImpl with ClassLoader ModuleClassLoader for Module "deployment.internal.ear:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/StatelessSession
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.8.0_144]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [rt.jar:1.8.0_144]
at java.lang.Class.getDeclaredMethods(Unknown Source) [rt.jar:1.8.0_144]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.StatelessSession from [Module "deployment.internal.ear:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
... 15 more
11:30:54,904 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"test.war\"
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.service.ServiceBeanImpl with ClassLoader ModuleClassLoader for Module \"deployment.internal.ear:main\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/hibernate/StatelessSession
Caused by: java.lang.ClassNotFoundException: org.hibernate.StatelessSession from [Module \"deployment.internal.ear:main\" from Service Module Loader]"}}
11:30:55,022 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "test.war" (runtime-name : "test.war")
11:30:55,022 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "internal.ear" (runtime-name : "internal.ear")
11:30:55,027 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."test.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "test.war"
11:30:55,239 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
11:30:55,239 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
11:30:55,239 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 609354ms - Started 237 of 294 services (1 services failed or missing dependencies, 92 services are lazy, passive or on-demand)
11:30:56,582 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 2) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'test.war#testJpaUnit'
11:31:03,510 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment test.war (runtime-name: test.war) in 6930ms
11:31:03,715 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "test.war" (runtime-name: "test.war")
11:31:03,716 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."test.war".POST_MODULE
I have tried changing hibernate entitymanager jar from 4.2 -> 4.3 and searched stackoverflow similar answers and jboss documentations. But not helped.
persistence.xml - updated
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<!-- A JPA Persistence Unit -->
<persistence-unit name="testJpaUnit">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<non-jta-data-source>java:/testDataSource</non-jta-data-source>
<!-- JPA entities must be registered here -->
<class>com.test.DemoClass</class>
<class>com.test.DummyClass</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="none"/>
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
Please help so that I can deploy the web app to the wildfly server.
Update
changes to standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:2.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jta="false" jndi-name="java:/testDataSource" pool-name="testDataSource" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver>com.mysql.jdbc.Driver</driver>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
PS I haven't share logs which is irrelevant and and some name of Classes is changed due IP. like com.service.ServiceBeanImpl
According to the database configuration shared by you from standalone.xml, You don't have datasource named testDataSource created on your wildfly server. Create non-jta datasource on your wildfly server with name as testDataSource. Once you create datasource you will be able to deploy your application.
I used Ant+ivy build method to solve the issue. There was directory structure issue in the war created by Wildlfly. Do follow comments above to understand this issue more and solution stages.
Also, Do follow above given link if you want to setup automatic build in eclipse for ant.
Thank you Abhijeet.
Related
I used to run my application on a JBoss WildFly (12.0.0.) on an EC2 instance. Also i had my databse running on a RDS instance. Everything connected very nice and it worked. But two days ago, i had to switch from my MariaDB RDS to an EC2 MariaDB (by Bitnami). I configured the connection like before, but now I get an Error during deployment like it says in title. Here's the first lines of my error stack, there are like 600 more...:
2018-06-24 09:16:40,296 INFO [org.jboss.as.repository] (management-handler-thread - 3) WFLYDR0001: Content added at location /opt/bitnami/wildfly/standalone/data/content/4b/37444aeb2e1f4f9e73b5ecfb3ee291bd830377/content
2018-06-24 09:16:40,487 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "TandemPartnerWebArchiv.war" (runtime-name: "TandemPartnerWebArchiv.war")
2018-06-24 09:16:41,804 INFO [org.jboss.as.jpa] (MSC service thread 1-2) WFLYJPA0002: Read persistence.xml for ExperimentalJPADatabase
2018-06-24 09:16:41,878 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'TandemPartnerWebArchiv.war#ExperimentalJPADatabase'
2018-06-24 09:16:41,878 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 67) HHH000204: Processing PersistenceUnitInfo [
name: ExperimentalJPADatabase
...]
2018-06-24 09:16:41,932 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment TandemPartnerWebArchiv.war
2018-06-24 09:16:41,952 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'DAO' in deployment unit 'deployment "TandemPartnerWebArchiv.war"' are as follows:
java:global/TandemPartnerWebArchiv/DAO!dao.DAO
java:app/TandemPartnerWebArchiv/DAO!dao.DAO
java:module/DAO!dao.DAO
java:global/TandemPartnerWebArchiv/DAO
java:app/TandemPartnerWebArchiv/DAO
java:module/DAO
2018-06-24 09:16:42,180 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 67) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'TandemPartnerWebArchiv.war#ExperimentalJPADatabase'
2018-06-24 09:16:42,183 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 67) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-06-24 09:16:42,186 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 67) Envers integration enabled? : true
2018-06-24 09:16:42,221 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 67) MSC000001: Failed to start service jboss.persistenceunit."TandemPartnerWebArchiv.war#ExperimentalJPADatabase": org.jboss.msc.service.StartException in service jboss.persistenceunit."TandemPartnerWebArchiv.war#ExperimentalJPADatabase": java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:650)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97)
at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:33)
at org.hibernate.internal.util.xml.XMLHelper$1.doWork(XMLHelper.java:27)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.workWithClassLoader(ClassLoaderServiceImpl.java:358)
at org.hibernate.internal.util.xml.XMLHelper.<init>(XMLHelper.java:26)
at org.hibernate.envers.boot.internal.EnversServiceImpl.initialize(EnversServiceImpl.java:115)
at org.hibernate.envers.boot.internal.AdditionalJaxbMappingProducerImpl.produceAdditionalMappings(AdditionalJaxbMappingProducerImpl.java:99)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:288)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:875)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)
... 9 more
2018-06-24 09:16:42,223 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "TandemPartnerWebArchiv.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"TandemPartnerWebArchiv.war#ExperimentalJPADatabase\"" => "java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory"},
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.InputHiddenTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SelectItemTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SelectItemsTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.DAO.START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"managed-bean.net.bootsfaces.component.radiobutton.RadioButtonInternalStateBean\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.RegexValidatorTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.HtmlBasicValidator\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.html_basic.OutputLinkTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.SubviewTag\".WeldInstantiator",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ValidateLengthTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"javax.faces.webapp.FacetTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ActionListenerTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"org.jboss.weld.module.web.servlet.WeldInitialListener\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ViewTag\".START",
"jboss.deployment.unit.\"TandemPartnerWebArchiv.war\".component.\"com.sun.faces.taglib.jsf_core.ValidateDoubleRangeTag\".START",
It looks like you're including a dom4j library in your deployment. You'll need to remove that dependency from your deployment.
I'm new to ejb and am trying to make a simple hello world application work, but I cannot connect to server and cannot figure what the problem is. I'm also getting class not found exception and don't know whether it's relate to the connection error. Any help would be appreciated.
03:35:52,321 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
03:35:52,490 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
03:35:52,526 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final "Thunder" starting
03:35:53,040 INFO [org.xnio] XNIO Version 3.0.3.GA
03:35:53,040 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
03:35:53,047 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
03:35:53,053 INFO [org.jboss.remoting] JBoss Remoting version 3.2.2.GA
03:35:53,071 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
03:35:53,074 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
03:35:53,074 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
03:35:53,086 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
03:35:53,090 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
03:35:53,090 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
03:35:53,093 INFO [org.jboss.as.connector] (MSC service thread 1-15) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.7.Final)
03:35:53,098 INFO [org.jboss.as.security] (MSC service thread 1-11) JBAS013100: Current PicketBox version=4.0.6.final
03:35:53,101 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
03:35:53,129 INFO [org.jboss.as.naming] (MSC service thread 1-15) JBAS011802: Starting Naming Service
03:35:53,137 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
03:35:53,178 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
03:35:53,224 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-16) JBoss Web Services - Stack CXF Server 4.0.1.GA
03:35:53,296 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
03:35:53,477 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-9) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\Marie\jboss-as-7.1.0.Final\standalone\deployments
03:35:53,478 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on localhost/127.0.0.1:4447
03:35:53,478 INFO [org.jboss.as.remoting] (MSC service thread 1-11) JBAS017100: Listening on localhost/127.0.0.1:9999
03:35:53,481 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment HelloEJB2.jar
03:35:53,486 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found HelloEJB2.jar in deployment directory. To trigger deployment create a file called HelloEJB2.jar.dodeploy
03:35:53,483 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-13) MSC00001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use: bind localhost/127.0.0.1:9990
at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:197) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.7.0_79]
at sun.nio.ch.Net.bind(Net.java:444) [rt.jar:1.7.0_79]
at sun.nio.ch.Net.bind(Net.java:436) [rt.jar:1.7.0_79]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) [rt.jar:1.7.0_79]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.7.0_79]
at org.jboss.sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:144)
at org.jboss.sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:54)
at org.jboss.sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:38)
at org.jboss.com.sun.net.httpserver.HttpServer.create(HttpServer.java:147)
at org.jboss.as.domain.http.server.ManagementHttpServer.create(ManagementHttpServer.java:143) [jboss-as-domain-http-interface-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.server.mgmt.HttpManagementService.start(HttpManagementService.java:164) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
03:35:53,558 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-12) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
03:35:53,766 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: Address already in use: bind localhost/127.0.0.1:9990
03:35:53,773 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 1651ms - Started 132 of 205 services (2 services failed or missing dependencies, 70 services are passive or on-demand)
03:35:53,782 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of "HelloEJB2.jar"
03:35:53,898 WARN [org.jboss.modules] (MSC service thread 1-1) Failed to define class com.businnesslogic.HelloWorldBean in Module "deployment.HelloEJB2.jar:main" from Service Module Loader: java.lang.UnsupportedClassVersionError: com/businnesslogic/HelloWorldBean : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_79]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
03:35:53,914 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "HelloEJB2.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class com.businnesslogic.HelloWorldBean
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: com.businnesslogic.HelloWorldBean from [Module "deployment.HelloEJB2.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
... 7 more
03:35:53,926 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "HelloEJB2.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"HelloEJB2.jar\""}}
03:35:53,931 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment HelloEJB2.jar in 4ms
03:35:53,932 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."HelloEJB2.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "HelloEJB2.jar"
03:35:53,935 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.\"HelloEJB2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HelloEJB2.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"HelloEJB2.jar\""}}}}
You have two issues as per the log :
1) Port 9990 is already in use:
Address already in use: bind localhost/127.0.0.1:9990 - stop all JBoss process and any other process that is using port 9990 restart and let us know how it went.
2) Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_79]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_79]
You are running your application on a JVM that does not support the JDK that was used to compile your application. Check what Java compiler version you are using (Depends on your IDE, build) in your development environment and make sure it is 1.7.0_79 or lower.
Or make JBoss run in the same jvm version as your development JDK.
You have two major errors in the log
1 - Address already
Address already in use: bind localhost/127.0.0.1:9990
This error tells you that the port 9990 is being used by another process. Typically another jboss instance. You must stop one of them.
2 - Unsupported major.minor version
java.lang.UnsupportedClassVersionError: com/businnesslogic/HelloWorldBean : Unsupported major.minor version 52.0
This tells you that you compile the source code with one version of java and then you try to run it with another version.
Because of this errors your application is not being deployed.
So I use Wildfly 8.2.0.Final
I created my MySQL datasource successfully. Proof: from the admin console , i do "Test connection" and it gives
Successfully connected to database MyAppDS.
the datasource definition in standalone-full.xml :
<datasources>
<datasource jta="true" jndi-name="java:/jdbc/MyAppDS" pool-name="MyAppDS" enabled="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/myapp</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<timeout>
<set-tx-query-timeout>false</set-tx-query-timeout>
<blocking-timeout-millis>0</blocking-timeout-millis>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>0</query-timeout>
<use-try-lock>0</use-try-lock>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>0</allocation-retry-wait-millis>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class>
</driver>
</drivers>
</datasources>
My 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="myapp_myapp_war_1.0PU" transaction-type="JTA">
<jta-data-source>java:/jdbc/MyAppDS</jta-data-source>
<class>org.myapp.entity.Place</class>
<class>org.myapp.entity.User</class>
<class>org.myapp.entity.MyCall</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
</persistence>
The server log before deploying the application shows
15:07:24,550 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:/jdbc/MyAppDS]
And when I debug my application shows the following, the following line appears
15:09:13,175 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "myapp-1.0.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"myapp-1.0\".\"myapp-1.0\".DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"]}
15:09:13,222 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "myapp-1.0.war" (runtime-name : "myapp-1.0.war")
15:09:13,237 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jboss.datasources.ExampleDS (missing) dependents: [service jboss.naming.context.java.module."myapp-1.0"."myapp-1.0".DefaultDataSource]
15:09:21,177 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("read-attribute") failed - address: ([
("deployment" => "myapp-1.0.war"),
("subsystem" => "ejb3"),
("stateless-session-bean" => "MyCallFacadeREST")
]) - failure description: "JBAS014508: EJB component for address [
(\"deployment\" => \"myapp-1.0.war\"),
(\"subsystem\" => \"ejb3\"),
(\"stateless-session-bean\" => \"MyCallFacadeREST\")
] is in
state DOWN, must be in state UP"
15:09:23,356 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010418: Stopped Driver service with driver-name = myapp-1.0.war_com.mysql.jdbc.Driver_5_1
15:09:23,356 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010418: Stopped Driver service with driver-name = myapp-1.0.war_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1
15:09:23,356 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 60) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'myapp-1.0.war#myapp_myapp_war_1.0PU'
15:09:23,356 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016009: Stopping weld service for deployment myapp-1.0.war
15:09:23,403 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 60) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'myapp-1.0.war#myapp_myapp_war_1.0PU'
15:09:23,434 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment myapp-1.0.war (runtime-name: myapp-1.0.war) in 81ms
Is this happening because the server doesn't find the datasource I am pointing at so it tries to find the default datasource ExampleDS (which I have removed from my standalone-full.xml)
When you removed the ExampleDS datasource, did you also change the reference to it in the default-bindings of the ee subsystem? By default, Wildfly has this entry:
<default-bindings ... datasource="java:jboss/datasources/ExampleDS" ... />
If you don't want to keep the ExampleDS, you can just make your datasource the default, or (if I remember correctly) the default-bindings are optional so they can be removed if necessary.
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'm a newbie in JPA and EJB. Tried JPA and EJB apps seperately and went fine. But got error while using them together.
This is the error (log) I got while using JPA with EJB 3 (JBoss 7 AS server) in eclipse IDE.
can anyone help me to fix it.
11:43:43,735 INFO [org.jboss.as.jpa] (MSC service thread 1-14) JBAS011402: Starting Persistence Unit Service 'SampleEAR.ear#Student'
11:43:43,781 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit."SampleEAR.ear"."SampleEJB.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."SampleEAR.ear"."SampleEJB.jar".INSTALL: Failed to process phase INSTALL of subdeployment "SampleEJB.jar" of deployment "SampleEAR.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.runWorker(Unknown Source) [rt.jar:1.7.0_09]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_09]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_09]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011047: Component class ejb.MyBean for component MyBean has errors:
JBAS011428: Cannot inject RESOURCE_LOCAL container managed EntityManagers using #PersistenceContext
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:169)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:162)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:155)
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
11:43:43,816 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-14) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
11:43:43,820 INFO [org.hibernate.Version] (MSC service thread 1-14) HHH000412: Hibernate Core {4.0.1.Final}
11:43:43,821 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-14) HHH000206: hibernate.properties not found
11:43:43,822 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-14) HHH000021: Bytecode provider name : javassist
11:43:43,835 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-14) HHH000204: Processing PersistenceUnitInfo [
name: Student
...]
11:43:43,837 INFO [org.jboss.web] (MSC service thread 1-13) JBAS018210: Registering web context: /SampleWAR
11:43:43,924 INFO [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (MSC service thread 1-14) HHH000402: Using Hibernate built-in connection pool (not for production use!)
11:43:43,925 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-14) MSC00001: Failed to start service jboss.persistenceunit."SampleEAR.ear#Student": org.jboss.msc.service.StartException in service jboss.persistenceunit."SampleEAR.ear#Student": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_09]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_09]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_09]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: Student] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
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]
... 3 more
Caused by: org.hibernate.HibernateException: Specified JDBC Driver com.microsoft.sqlserver.jdbc.SQLServerDriver class not found
at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:104)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:234)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:91)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from [Module "org.hibernate:main" from local module loader #16e3ecd (roots: C:\jboss-as-7.1.1.Final\modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_09]
at java.lang.Class.forName(Unknown Source) [rt.jar:1.7.0_09]
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:101)
... 23 more
11:43:44,141 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "SampleEAR.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"SampleEAR.ear\".\"SampleEJB.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"SampleEAR.ear\".\"SampleEJB.jar\".INSTALL: Failed to process phase INSTALL of subdeployment \"SampleEJB.jar\" of deployment \"SampleEAR.ear\"","jboss.persistenceunit.\"SampleEAR.ear#Student\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"SampleEAR.ear#Student\": Failed to start service"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.ValidatorFactoryjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBeanMissing[jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.ValidatorFactoryjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean]","jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.Validatorjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBeanMissing[jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.Validatorjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean]"]}
11:43:44,166 INFO [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (Finalizer) HHH000030: Cleaning up connection pool [null]
11:43:44,168 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment SampleEJB.jar in 27ms
11:43:44,168 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment SampleWAR.war in 27ms
11:43:44,171 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment SampleEAR.ear in 31ms
11:43:44,172 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean (missing) dependents: [service jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.ValidatorFactory, service jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.Validator]
JBAS014777: Services which failed to start: service jboss.deployment.subunit."SampleEAR.ear"."SampleEJB.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."SampleEAR.ear"."SampleEJB.jar".INSTALL: Failed to process phase INSTALL of subdeployment "SampleEJB.jar" of deployment "SampleEAR.ear"
service jboss.persistenceunit."SampleEAR.ear#Student": org.jboss.msc.service.StartException in service jboss.persistenceunit."SampleEAR.ear#Student": Failed to start service
11:43:44,175 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.subunit.\"SampleEAR.ear\".\"SampleEJB.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"SampleEAR.ear\".\"SampleEJB.jar\".INSTALL: Failed to process phase INSTALL of subdeployment \"SampleEJB.jar\" of deployment \"SampleEAR.ear\"","jboss.persistenceunit.\"SampleEAR.ear#Student\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"SampleEAR.ear#Student\": Failed to start service"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.ValidatorFactoryjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBeanMissing[jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.ValidatorFactoryjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean]","jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.Validatorjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBeanMissing[jboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean.Validatorjboss.naming.context.java.comp.SampleEAR.SampleEJB.MyBean]"]}}}
Judging by the stack trace you are using MS SQL server.
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from [Module "org.hibernate:main" from local module loader #16e3ecd (roots: C:\jboss-as-7.1.1.Final\modules)]
This line indicate that the JDBC driver for MS SQL server is not in your classpath. Or packaged with the SampleEAR.ear file.
I suggest you add it to the build path of your project via whatever the IDE you are using so it will be packaged in the .ear file.
EDIT:
In that case in your config xml change the driver class to com.microsoft.jdbc.sqlserver.SQLServerDriver The class you have added is for MS SQL Server 2005. But the driver may not be for that.