been struggling with this for a while, whenever I deploy my EAR project to wildfly by doing right click -> Run As -> Run on Server I get this error
20:22:35,100 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7)
WFLYSRV0028: Stopped deployment VetSpaEAR-0.0.1-SNAPSHOT.ear (runtime-name:
VetSpaEAR-0.0.1-SNAPSHOT.ear) in 0ms
20:22:35,102 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3)
WFLYSRV0027: Starting deployment of "VetSpaEAR-0.0.1-SNAPSHOT.ear" (runtime-
name: "VetSpaEAR-0.0.1-SNAPSHOT.ear")
20:22:35,108 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7)
MSC000001: Failed to start service jboss.deployment.unit."VetSpaEAR-0.0.1-
SNAPSHOT.ear".STRUCTURE: org.jboss.msc.service.StartException in service
jboss.deployment.unit."VetSpaEAR-0.0.1-SNAPSHOT.ear".STRUCTURE: WFLYSRV0153:
Failed to process phase STRUCTURE of deployment "VetSpaEAR-0.0.1-
SNAPSHOT.ear"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(
DeploymentUnitPh aseService.java:151)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(
ServiceControllerImpl.java:1714)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(
ServiceControllerImpl.java:1693)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(
ServiceControllerImpl.java:1540)
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)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
WFLYEE0031: Unable to process modules in application.xml for EAR
["/C:/wildfly-12.0.0.Final/standalone/deployments/VetSpaEAR-0.0.1-
SNAPSHOT.ear"], module file com.vetspa-VetSpaEJB-0.0.1-SNAPSHOT.jar not found
at
org.jboss.as.ee.structure.EarStructureProcessor.deploy(
EarStructureProcessor.java:187)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(
DeploymentUnitPhaseService.java:144)
... 8 more
20:22:35,109 ERROR [org.jboss.as.controller.management-operation]
(DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("full-replace-
deployment") failed - address: ([]) - failure description: {"WFLYCTL0080:
Failed services" => {"jboss.deployment.unit.\"VetSpaEAR-0.0.1-
SNAPSHOT.ear\".STRUCTURE" => "WFLYSRV0153: Failed to process phase STRUCTURE
of deployment \"VetSpaEAR-0.0.1-SNAPSHOT.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
WFLYEE0031: Unable to process modules in application.xml for EAR
[\"/C:/wildfly-12.0.0.Final/standalone/deployments/VetSpaEAR-0.0.1-
SNAPSHOT.ear\"], module file com.vetspa-VetSpaEJB-0.0.1-SNAPSHOT.jar not
found"}}
20:22:35,140 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2)
WFLYSRV0016: Replaced deployment "VetSpaEAR-0.0.1-SNAPSHOT.ear" with
deployment "VetSpaEAR-0.0.1-SNAPSHOT.ear"
20:22:35,140 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2)
WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service
jboss.deployment.unit."VetSpaEAR-0.0.1-SNAPSHOT.ear".STRUCTURE: WFLYSRV0153:
Failed to process phase STRUCTURE of deployment "VetSpaEAR-0.0.1-
SNAPSHOT.ear"
I know the stacktrace doesn't help too much, this is my application.xml (auto generated by maven)
<?xml version="1.0" encoding="UTF-8"?>
<application 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/application_7.xsd" version="7">
<display-name>VetSpaEAR</display-name>
<module>
<ejb>com.vetspa-VetSpaEJB-0.0.1-SNAPSHOT.jar</ejb>
</module>
<module>
<web>
<web-uri>com.vetspa-VetSpaWS-0.0.1-SNAPSHOT.war</web-uri>
<context-root>/VetSpaWS</context-root>
</web>
</module>
<module>
<web>
<web-uri>com.vetspa-VetSpaRS-0.0.1-SNAPSHOT.war</web-uri>
<context-root>/VetSpaRS</context-root>
</web>
</module>
<library-directory>lib</library-directory>
And this is my project structure
Im no expert but as far as I can tell there is nothing wrong, I read somewhere that eclipse publishes the ear as an exploded artifact rather than the compressed version, this makes sense because if I deploy it manually (via cli or gui) it works like a charm, but while developing this is just not viable. I hope you can help guys thanks for your help
Wildfly 12.0.0
Java 8
Eclipse Oxygen
give this a try: right-click on the project folder -> properties -> Deployment Assembly and inspect / add the ejb jar manually
Related
I'm new in the company and they were helping me while I setup the enviroment, I got this error when I started WildFly server (they gave me their wildfly 18):
`
09:47:20,106 INFO [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0493: EJB subsystem suspension complete
09:47:20,124 INFO [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-5) IJ020018: Enabling <validate-on-match> for java:/goljagen
09:47:20,124 INFO [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-8) IJ020018: Enabling <validate-on-match> for java:/goljagra
09:47:20,129 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:/agepos]
09:47:20,129 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:/goljagen]
09:47:20,130 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:/goljagra]
09:47:22,425 INFO [org.jboss.as.patching] (MSC service thread 1-1) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
09:47:22,439 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Program Files\wildfly-18.0.0.Final\standalone\deployments
09:47:22,458 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "archiconEar.ear" (runtime-name: "archiconEar.ear")
09:47:22,760 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
09:47:23,436 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBossWS 5.3.0.Final (Apache CXF 3.3.3)
09:47:25,221 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."archiconEar.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."archiconEar.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "archiconEar.ear"
at org.jboss.as.server#10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at org.jboss.msc#1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc#1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc#1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0166: Sub deployment archiconWeb.war in jboss-deployment-structure.xml was not found. Available sub deployments: archiconWeb
at org.jboss.as.server#10.0.0.Final//org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.subDeploymentNotFound(DeploymentStructureDescriptorParser.java:327)
at org.jboss.as.server#10.0.0.Final//org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:221)
at org.jboss.as.server#10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
09:47:25,728 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "archiconEar.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"archiconEar.ear\".STRUCTURE" => "WFLYSRV0153: Failed to process phase STRUCTURE of deployment \"archiconEar.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0166: Sub deployment archiconWeb.war in jboss-deployment-structure.xml was not found. Available sub deployments: archiconWeb"}}
09:47:25,747 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "archiconEar.ear" (runtime-name : "archiconEar.ear")
09:47:25,748 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."archiconEar.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "archiconEar.ear"
09:47:25,820 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
09:47:25,823 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
09:47:25,824 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
09:47:25,824 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 18.0.0.Final (WildFly Core 10.0.0.Final) started (with errors) in 18868ms - Started 597 of 859 services (1 services failed or missing dependencies, 408 services are lazy, passive or on-demand)
`
We whatched in the jboss-deployment-structur and we have this:
`
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<sub-deployment name="archiconWeb.war">
<dependencies>
<!-- <module name="org.apache.poi" /> -->
<module name="org.apache.commons.codec" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
`
this is the pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>it.sisal</groupId>
<artifactId>archicon</artifactId>
<version>0.0.39-SNAPSHOT</version>
</parent>
<artifactId>archiconEar</artifactId>
<packaging>ear</packaging>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>${version.ear.plugin}</version>
<configuration>
<wtpContextName>archicon</wtpContextName>
<!-- Tell Maven we are using Java EE 7 -->
<version>7</version>
<!-- Use Java EE ear libraries as needed. Java EE ear libraries
are in easy way to package any libraries needed in the ear, and automatically
have any modules (EJB-JARs and WARs) use them -->
<defaultLibBundleDir>lib</defaultLibBundleDir>
<outputFileNameMapping>#{artifactId}#</outputFileNameMapping>
<contextRoot>/archicon</contextRoot>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>it.sisal</groupId>
<artifactId>archiconWeb</artifactId>
<version>0.0.39-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
</project>
Everyone else got the same file, Do you have any Idea which file should I check and how I can solve this problem.
Thanks to all!!!!
They told me to do:
mvn build, on eclipse do:
mvn update;
Project -> clean;
Project -> build All;
On the right click on the server I selected: clean than Publish.
I'm developing a maven based JSF+JPA+EJB 3.2 Project using Eclipse and Wildfly 11.
While starting the App Server am getting the following error :
20:37:27,664 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003: Processing weld deployment erpmini.war
20:37:28,116 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-4) HV000001: Hibernate Validator 5.3.5.Final
20:37:28,552 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-4) WFLYEJB0473: JNDI bindings for session bean named 'UserManagementServiceSlsb' in deployment unit 'deployment "erpmini.war"' are as follows:
java:global/erpmini/UserManagementServiceSlsb!com.itsys.erp.server.commonservices.usermgmt.UserManagementService
java:app/erpmini/UserManagementServiceSlsb!com.itsys.erp.server.commonservices.usermgmt.UserManagementService
java:module/UserManagementServiceSlsb!com.itsys.erp.server.commonservices.usermgmt.UserManagementService
java:jboss/exported/erpmini/UserManagementServiceSlsb!com.itsys.erp.server.commonservices.usermgmt.UserManagementService
java:global/erpmini/UserManagementServiceSlsb
java:app/erpmini/UserManagementServiceSlsb
java:module/UserManagementServiceSlsb
20:37:29,879 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."erpmini.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."erpmini.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "erpmini.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class com.itsys.erp.server.commonservices.usermgmt.slsbadapter.UserManagementServiceSlsb for component UserManagementServiceSlsb has errors:
WFLYJPA0033: Can't find a persistence unit named null in deployment "erpmini.war"
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:157)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:186)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:143)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 5 more
20:37:30,098 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-2) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final
20:37:31,825 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 63) WFLYCLINF0002: Started client-mappings cache from ejb container
20:37:32,131 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "erpmini.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"erpmini.war\".INSTALL" => "WFLYSRV0153: Failed to process phase INSTALL of deployment \"erpmini.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class com.itsys.erp.server.commonservices.usermgmt.slsbadapter.UserManagementServiceSlsb for component UserManagementServiceSlsb has errors:
WFLYJPA0033: Can't find a persistence unit named null in deployment \"erpmini.war\""},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"erpmini.war\".beanmanager"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"erpmini.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"erpmini.war\".beanmanager]",
"jboss.deployment.unit.\"erpmini.war\".batch.artifact.factory is missing [jboss.deployment.unit.\"erpmini.war\".beanmanager]"
]
}
I'm injecting the EntityManager in stateless bean:
#Stateless
public class UserManagementServiceSlsb implements UserManagementService {
/** The Entity Manager */
#PersistenceContext(name = "TELCOAppPU")
private EntityManager entityManager;
private UserManagementService userMgmtService;
....
}
Why the Container is not able to find persistence.xml file? persistence.xml is present in META-INF directory. Any help would be appreciated.
Thanks.
UPDATE :
here is Project dir structure , persistence.xml is present in META-INF directory.
Project dir structure
persistence.xml contains Entity classes and MySql database connection details.
<persistence-unit name="TELCOAppPU">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>com.itsys.erp.server.dal.entities.City</class>
<class>com.itsys.erp.server.dal.entities.Machine</class>
<class>com.itsys.erp.server.dal.entities.Product</class>
<class>com.itsys.erp.server.dal.entities.ProductType</class>
<class>com.itsys.erp.server.dal.entities.ProductionLog</class>
...
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/erpdb" />
<property name="javax.persistence.jdbc.user" value="root" />
<property name="javax.persistence.jdbc.password" value="root" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
Solved it by adding resources folder (as source folder) to the path src/main/resources and moving the META-INF folder to resources folder, which in turn tells maven to put all files under resources directory to target/classes and in WEB-INF/classes in the WAR.
Try placing your persistance.xml file inside WEB-INF (src/main/webapp/WEB-INF) directory, Since in case of a war, that is where you are supposed to place your persisntence.xml file.
I am currently learning the Java EE and wanted to follow a tutorial, who uses cargo tracker as an example.
I could import the maven project to the eclipse successfully and can build it with mvn clean install successfully.
At the end of the day, there is a war file in the target folder of the project but wildfly 10 could not start it.
In the readme of the project, I have read such a sentence and would like to issue it;
mvn -Pwildfly package cargo:run
however, in this case, maven gives the following error;
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run (default-cli) on project cargo-tracker: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run failed: Failed to create a GlassFish 4.x standalone configuration: GlassFish admin command with args (--interactive=false --user admin --passwordfile /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x/password.properties create-domain --adminport 4848 --instanceport 8080 --domainproperties jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666
--domaindir /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x cargo-domain) failed: asadmin exited 1 -> [Help 1]
If you need more info, I can supply.
Edit
When I deploy the war file manually as K5 mentioned in this comment, I get the following error from wildfly;
19:18:36,042 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
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(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:669)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:274)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:154)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81)
at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:57)
at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
19:18:36,050 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "cargo-tracker.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cargo-tracker.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"cargo-tracker.war\".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment \"cargo-tracker.war\"
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"cargo-tracker.war\".PARSE"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
19:18:36,080 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "cargo-tracker.war" (runtime-name : "cargo-tracker.war")
19:18:36,083 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
On the download page of the wildfly, there are several download options. It is possible that you have downloaded a version, which does not have the needed service for your application. In order to find if the problem is because of your wildfly version, download the Java EE7 Full & Web Distribution and see if something will change.
add dependency :
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
<scope>test</scope>
</dependency>
update maven project and built it and recreate the jar file and try to deploy.
this is the first time I am trying to setup datasource in my Wildfly server. I tried to follow some tutorials which I found on Google but it still doesn't work.
I am working on a web service but I keep getting some errors when I deploy my .war file.
Here is the latest log when app is deployed:
22:16:33,049 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment IslamicPostsWS.war (runtime-name: IslamicPostsWS.war) in 7ms
22:16:33,184 INFO [org.jboss.as.server] (XNIO-1 task-2) JBAS018558: Undeployed "IslamicPostsWS.war" (runtime-name: "IslamicPostsWS.war")
22:16:33,186 INFO [org.jboss.as.controller] (XNIO-1 task-2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."IslamicPostsWS.war".POST_MODULE
22:16:35,518 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment IslamicPostsWS (runtime-name: IslamicPostsWS) in 7ms
22:16:35,660 INFO [org.jboss.as.server] (XNIO-1 task-6) JBAS018558: Undeployed "IslamicPostsWS" (runtime-name: "IslamicPostsWS")
22:16:38,358 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015018: Deployment IslamicPostsWS was previously deployed by this scanner but has been removed from the server deployment list by another management tool. Marker file C:\Users\Ilhami\workspace-services\.metadata\.plugins\org.jboss.ide.eclipse.as.core\WildFly_8.0_Runtime_Server1396040937545\deploy\IslamicPostsWS.undeployed is being added to record this fact.
22:17:00,406 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "IslamicPostsWS.war" (runtime-name: "IslamicPostsWS.war")
22:17:00,540 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "IslamicPostsWS.war")]) - failure description: {
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.IslamicPostsWS.IslamicPostsWS.DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"],
"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => [
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"com.sun.faces.config.ConfigureListener\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"javax.faces.webapp.FacetTag\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"javax.servlet.jsp.jstl.tlv.ScriptFreeTLV\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".component.\"org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap\".START",
"jboss.deployment.unit.\"IslamicPostsWS.war\".deploymentCompleteService",
"jboss.deployment.unit.\"IslamicPostsWS.war\".jndiDependencyService",
"jboss.naming.context.java.module.IslamicPostsWS.IslamicPostsWS.env.jdbc.TestDB",
"jboss.undertow.deployment.default-server.default-host./IslamicPostsWS",
"jboss.undertow.deployment.default-server.default-host./IslamicPostsWS.UndertowDeploymentInfoService"
],
"Services that may be the cause:" => [
"jboss.jdbc-driver.com_mysql_jdbc_Driver",
"jboss.naming.context.java.jboss.datasources.ExampleDS"
]
}
}
22:17:00,683 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "IslamicPostsWS.war" (runtime-name : "IslamicPostsWS.war")
22:17:00,683 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) 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.IslamicPostsWS.IslamicPostsWS.DefaultDataSource]
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 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">
<persistence-unit name="JPADB">
<jta-data-source>java:jboss/datasources/DBTest</jta-data-source>
<properties>
<property name="showSql" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
</persistence>
Just tell me if you need more files.
Go into your wildfly console (something like localhost:9990) and edit the Configuration->Container->EE->Default Bindings section. Set the default datasource to the JNDI name of some valid datasource.
I removed the default one that was there and just pointed it to my main datasource since the server exists to run one app only.
You probably have the ds declaration "java:jboss/datasources/ExampleDS" missing in your standalone.xml xmlns "urn:jboss:domain:datasources:2.0" section, just and it will work (here's the example from the default configuration):
<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>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
Or you can also add through the UI as mentioned by other response.
can you post your datasource definition?
I think it would be the best to test the datasource deployment 'standalone'. I mean separated from an actual application deployment, just to test whether your datasource works or not.
You can test this f.i. using the web console (localhost:9990/console).
It also looks like there are problems with the pre-configured example DS of wildfly. Did you remove this DS? In standalone.xml there is also a reference on ExampleDS which might be broken.
Assuming you are using a MySQL DB, you can create a DS in the following way:
(1) Download the mysql driver from here:
http://dev.mysql.com/downloads/connector/j/
(2) Copy the mysql driver to:
WILDFLY_HOME/modules/system/layers/base/com/mysql/main
(3) From the JBoss (or Wildfly) console, run the command:
/subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql, driver-module-name=com.mysql, driver-class-name=com.mysql.jdbc.Driver)
(4) Then, again from the JBoss (or Wildfly) console, run command:
/subsystem=datasources/data-source=YourDS:add(driver-name=mysql, user-name=USERNAME, password=PASSWORD, connection-url=jdbc:mysql://localhost:3306/YOURDATABASE, min-pool-size=5, max-pool-size=15, jndi-name=java:jboss/datasources/YourDS, enabled=true, validate-on-match=true, valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker, exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter)
Voila. Now you have a Datasource with a JNDI path of:
java:jboss/datasources/YourDS
Check if default-bindings configuration references to correct datasource: https://docs.jboss.org/author/display/WFLY8/Default+EE+Bindings+Configuration
I had
service jboss.naming.context.java.jboss.datasourservice jboss.naming.context.java.jboss.datasources.ExampleDS (missing) dependents:...
on wildfly-8.1.0.Final.
IMHO
in standalone/configuration/standalone-full.xml it had
<default-bindings ... datasource="java:jboss/datasources/ExampleDS" ...
and
<datasource jndi-name="java:/datasources/ExampleDS"...
jndi-name mismatch!
I created ExampleDS2 with jndi-name="java:jboss/datasources/ExampleDS". This solved my problem.
I am self learning the RESTEasy, to be built with Maven and to be deployed in jBoss and later on to integrate it with Jenkins.
Currently I have created a very simple RESTEasy webservice and built it with maven. I've got a .war file and exploded war(which is "unzipped" folder of the war I believe), a 1.0 snapshot folder with WEB-INF and META-INF folders inside of it in my netbeans project target folder.
I've installed jboss 7.x.x in my mac and successfully started and verified it's working on my localhost:8080. I copied my .war file to jboss7.x.x/standalone/deployments folder.
-Ran the server by: sh jboss-7.x.x.Final/bin/standalone.sh
-Got some error such.
-Stopped the jboss, copied the exploded war folder into the standalone/deployments folder and ran the server again.
-Still getting the error.
-What am I missing?
-The error log:
00:12:18,315 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Error listenerStart
00:12:18,316 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Context [/HelloRESTEasy] startup failed due to previous errors
00:12:18,348 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.web.deployment.default-host./HelloRESTEasy: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./HelloRESTEasy: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
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_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
00:12:18,566 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "HelloRESTEasy-1.0-SNAPSHOT.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./HelloRESTEasy" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./HelloRESTEasy: JBAS018040: Failed to start context"}}
00:12:18,589 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment HelloRESTEasy-1.0-SNAPSHOT.war in 21ms
00:12:18,591 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./HelloRESTEasy: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./HelloRESTEasy: JBAS018040: Failed to start context
00:12:18,593 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.web.deployment.default-host./HelloRESTEasy" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./HelloRESTEasy: JBAS018040: Failed to start context"}}}}
^C00:16:14,240 INFO [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011942: Stopping OSGi Framework
And when I access the http://localhost:8080/HelloRESTEasy-1.0-SNAPSHOT/Hello/justin I got a 404.
That log is not complete and you picked the least important part, but my experience on that suggest that your WAR has resteasy*.jar libs inside it. For jboss 7 your pom.xml at resteasy dependency you must put "<scope>provided</scope>", so when you compile and package that lib will be skipped.