Hi im trying to deploy a javaEE application in my wildfly server and when i try to run my server it throws me an exception about services that are not installed this happened any ideas what can be in conflict? Here is the output:
Deploying C:\wildfly-26.1.0.Final\standalone\deployments\ProyectoServidor.ear
{
"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"ProyectoServidor.ear\".\"ProyectoEJB-ejb.jar\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment \"ProyectoEJB-ejb.jar\" of deployment \"ProyectoServidor.ear\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.fannog.proyectoservidor.utils.Encryptor with ClassLoader ModuleClassLoader for Module \"deployment.ProyectoServidor.ear.ProyectoEJB-ejb.jar\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/jasypt/util/password/StrongPasswordEncryptor
Caused by: java.lang.ClassNotFoundException: org.jasypt.util.password.StrongPasswordEncryptor from [Module \"deployment.ProyectoServidor.ear.ProyectoEJB-ejb.jar\" from Service Module Loader]"},
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.deployment.unit.\"ProyectoServidor.ear\".WeldStartService",
"jboss.deployment.unit.\"ProyectoServidor.ear\".beanmanager"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"ProyectoServidor.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"ProyectoServidor.ear\".beanmanager, jboss.deployment.unit.\"ProyectoServidor.ear\".WeldStartService]"]
}
C:\Users\facun\git\servidor\nbproject\build-impl.xml:330: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 6 seconds)
Your ejb is using org.jasypt.util.password.StrongPasswordEncryptor which is not provided in your application thus you are getting a ClassNotFoundException:
java.lang.ClassNotFoundException: org.jasypt.util.password.StrongPasswordEncryptor from [Module "deployment.ProyectoServidor.ear.ProyectoEJB-ejb.jar" from Service Module Loader]"},
Related
I've a REST application writen in Java EE (JAX-RS 2.1/Resteasy, EJB, CDI, ...) which has to able to create a keycloak user in the Keycloak 2.5.5. To run my application I use a WildFly 10.1.0 server.
To create the keycloak user I'd like to use an Administration REST API publicated by the Keycloak. Because of that I've added a following dependency to my build.gradle:
compile group: 'org.keycloak', name: 'keycloak-admin-client', version: '3.3.0.Final'
After that (only adding dependency) when I deploy my application on the WildFly, I reveice an error due to:
java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.RealmsResource
Sometimes due to:
java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.ServerInfoResource
Here is full stacktrace regarding the first error:
08:14:14,505 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 86) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./myapp: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./myapp: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.RealmsResource
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.RealmsResource
at org.jboss.resteasy.spi.metadata.ResourceBuilder.constructor(ResourceBuilder.java:692)
at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:42)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:208)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:194)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:180)
at org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:157)
at org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:76)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:409)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:250)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
... 6 more
08:14:14,511 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myapp.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./myapp" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./myapp: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.RealmsResource
Caused by: java.lang.RuntimeException: RESTEASY003190: Could not find constructor for class: org.keycloak.admin.client.resource.RealmsResource"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./myapp"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
EDIT:
It could be important, there are dependencies regarding the JAX-RS/Resteasy in a build.gradle:
compile( 'javax:javaee-api:7.0') {
exclude group: 'javax.ws.rs', module: 'javax.ws.rs-api'
}
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1'
compile group: 'org.jboss.resteasy', name: 'resteasy-servlet-initializer', version: '3.1.4.Final'
//compile group: 'org.jboss.resteasy', name: 'resteasy-jaxrs', version: '3.1.4.Final'
compile group: 'org.jboss.resteasy', name: 'resteasy-jaxb-provider', version: '3.1.4.Final'
compile group: 'org.jboss.resteasy', name: 'resteasy-multipart-provider', version: '3.1.4.Final'
When I use a resteasy-jaxrs lib instead of a resteasy-servlet-initializer, I can deploy the application without any issues but then application's endpoints don't work (not found error).
Every time I deploy a war file in wildfly 10, I got this following error :
Cannot upload deployment: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE: WFLYSRV0153:
Failed to process phase FIRST_MODULE_USE of deployment \"member.war\"
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
WFLYJCA0064: Exception deploying datasource java:/PostgresDS Caused
by: org.jboss.msc.service.DuplicateServiceException: Service
jboss.data-source.\"jboss.naming.context.java.PostgresDS\" is already
registered"},"WFLYCTL0412: Required services that are not installed:"
=> ["jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE"],"WFLYCTL0180:
Services with missing/unavailable dependencies" => undefined}
It happens when I changed my persistence.xml and *-ds.xml which is telling my application to use the PostgresDS as its datasource.
Without looking at the files, it seems like you are registering your data source twice, once in the *-ds.xml and once in the persistence.xml (or maybe in the standalone.xml?).
Regarding missing/unavailable dependencies, are you certain the the Postgres SQL Module is installed in Wildfly and the driver is configured in the standalone.xml?
See also:
Wildfly DuplicateServiceException
How to add PostgreSQL datasource to WildFly 9.0?
I recently installed Wildfly-10.0.0.Final. To get my feet wet, I created an elementary EJB that does not require a database connection. For some reason when I try to deploy the EJB, I get the following error:
Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.
\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"JavaEE_Wildfly1.jar\"
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'org.eclipse.persistence.jpa.PersistenceProvider' not found"}}
Since I am not using a database, do I still have to specify a Persistence provider? I do not have a persistence.xml because I did not think I needed one.
I don't think you need a persistence.xml. Check out this EJB-In-A-War wildfly quickstart for an example of a #Stateless EJB deployed without a persistence.xml.
I am using Spring, Maven and creating a web service in eclipse. While deploying the WAR in JBOSS I am getting following error-
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"NextGen-web1.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"NextGen-web1.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"NextGen-web1.war\"
Caused by: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException
Caused by: java.lang.reflect.UndeclaredThrowableException
Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)"}},
"rolled-back" => true
}
you must include this library in your pom.xml:
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1.redhat-9</version>
</dependency>
I am going to develop an web application in JBPM 6.1 using wildfly 8.1 final. But when I deploy my web application in jboss server , it gives following error.
15:49:29,967 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."Jbpm6WithMaven.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."Jbpm6WithMaven.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
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]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Injector with qualifiers #Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] #Inject org.sonatype.guice.bean.locators.DefaultBeanLocator.autoPublish(Injector)
at org.sonatype.guice.bean.locators.DefaultBeanLocator.autoPublish(DefaultBeanLocator.java:0)
I was working on this problem for days and hours.Please can anyone help me for this?
Well you need to check the dependencies that you are adding to your webapp, there is something wrong in there and it doesn't seems to be related with jbpm. You need to solve this issue WELD-001408: Unsatisfied dependencies for type Injector with qualifiers #Default at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] #Inject org.sonatype.guice.bean.locators.DefaultBeanLocator.autoPublish