I have two web REST applications that I would like to deploy using the same path:
http://server:8080/commonpath/applicationA
http://server:8080/commonpath/applicationB
In both webapps I have configured web.xml under WEB-INF:
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<module-name>commonpath</module-name>
</web-app>
I have also tried the same using jboss-web.xml:
<jboss-web>
<context-root>commonpath</context-root>
</jboss-web>
Nothing seems to work however and I see the following exception:
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"applicationB.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"applicationB.war\"
14:16:34 Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.module.distribution.distribution.ValidatorFactory is already registered"}}}}
If I use two different module-names they deploy without problem. My server is Wildfly 23.0.2
Related
We have a Java SOAP service running on Wildlfy & Java 8 currently. We are migrating from Wildfly 10 to 26, java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64
Running into all kinds of issues.
Below is my web.xml
<display-name>SearchWS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<!-- <listener><listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class></listener> -->
<servlet>
<servlet-name>SolrSearchWS</servlet-name>
<servlet-class>com.solr.service.SolrSearchWS</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SolrSearchWS</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
when i try to deploy my web service, i get the following in my log file
2022-12-07 11:30:06,133 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."SearchWS-0.0.1-SNAPSHOT.war".undertow-deployment.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.deployment.unit."SearchWS-0.0.1-SNAPSHOT.war".undertow-deployment.UndertowDeploymentInfoService: Failed to start serviceorg.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: UT010009: Servlet SolrSearchWS of type class com.solr.service.SolrSearchWS does not implement javax.servlet.Servletio.undertow.servlet#2.2.19.Final//io.undertow.servlet.api.ServletInfo.(ServletInfo.java:98)
org.wildfly.extension.undertow#26.1.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:749)
org.wildfly.extension.undertow#26.1.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:312)
org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
org.jboss.msc#1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
... 6 more
2022-12-07 11:30:06,141 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."SearchWS-0.0.1-SNAPSHOT.war".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service
Caused by: java.lang.IllegalArgumentException: UT010009: Servlet SolrSearchWS of type class com.solr.service.SolrSearchWS does not implement javax.servlet.Servlet"}}
Any help will be greatly appreciated.
regards
preet
We have tried many different combinations of files in POM. Nothing seems to help
I have to deploy my EAR at Weblogic 14. When I Run application and try to publish this . I face the below errors:
java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
at oracle.eclipse.tools.weblogic.server.internal.DeploymentProgressListener.watch(DeploymentProgressListener.java:193)
at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.redeploy(WlsJ2EEDeploymentHelper.java:686)
at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deploy(WlsJ2EEDeploymentHelper.java:495)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1486)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:944)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:735)
at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:584)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:776)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3184)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:357)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: weblogic.application.ModuleException: java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.event.PrettyPhaseListener
java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.event.PrettyPhaseListener
I have downloaded various versions of ocpsoft-pretty-faces.jar but it didn't work at all.
Below the faces-config.xml of the project.
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
.
.
.
<application>
<view-handler>com.ocpsoft.pretty.faces.application.PrettyViewHandler</view-handler>
<navigation-handler>com.ocpsoft.pretty.faces.application.PrettyNavigationHandler</navigation-handler>
</application>
<lifecycle>
<phase-listener>com.ocpsoft.pretty.faces.event.PrettyPhaseListener</phase-listener>
</lifecycle>
How to fix this error.
I am trying to use liquibase on startup in my JEE+WildFly app.
When launching AS, liquibase throws ChangeLogParseException:
09:41:40,602 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "bets.war" was rolled back with the following failure message:
{
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./bets" => "java.lang.RuntimeException: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: java.lang.RuntimeException: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist
Caused by: liquibase.exception.ChangeLogParseException: :classpath/WEB-INF/db-changelog.xml does not exist"},
Liquibase params are set in web.xml:
<!-- liquibase auto startup -->
<context-param>
<param-name>liquibase.changelog</param-name>
<param-value>:classpath/WEB-INF/db-changelog.xml</param-value>
</context-param>
<context-param>
<param-name>liquibase.datasource</param-name>
<param-value>java:jboss/datasources/BetsDS</param-value>
</context-param>
<context-param>
<param-name>liquibase.onerror.fail</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>liquibase.contexts</param-name>
<param-value>production</param-value>
</context-param>
<listener>
<listener-class>liquibase.integration.servlet.LiquibaseServletListener</listener-class>
</listener>
Structure is as below:
Looked through subjects here in SO, db-changelog is in .war package:
Tried already renaming liquibase.changelog value to WEB-INF/db-changelog.xml and /WEB-INF/db-changelog.xml, still the same.
Already figured it out.
Moved db-changelog to main/resources/META-INF and set param to
<param-value>META-INF/db-changelog.xml</param-value>
Everything works now:
[2018-05-27 11:27:42,823] Artifact bets:war: Artifact is deployed successfully
[2018-05-27 11:27:42,823] Artifact bets:war: Deploy took 13 582 milliseconds
Sorry about my bad question but I am trying to have a simple project with work maven with vaadin7,I have problem when deploy to jboss 7,
here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Student Manager Example</display-name>
<description>
This is example for research Maven work with Vaadin
</description>
<servlet>
<servlet-name>StudentManager</servlet-name>
<servlet-class>servlet.StudentManagerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>StudentManager</servlet-name>
<url-pattern>/student</url-pattern>
</servlet-mapping>
</web-app>
my Servlet
#Theme("mytheme")
public class StudentManagerServlet extends UI {
private static final long serialVersionUID = 1L;
#Override
protected void init(VaadinRequest request) {
VerticalLayout view = new VerticalLayout();
view.addComponent(new Label("Hello Vaadin!"));
setContent(view);
}
}
And here is my error when deploy jboos
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: servlet.StudentManagerServlet from [Module "deployment.StudentManager-0.0.1-SNAPSHOT.war:main" from Service Module Loader]
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:290)
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scanWebDeployment(JaxrsScanningProcessor.java:155)
at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
14:19:10,848 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.\"StudentManager-0.0.1-SNAPSHOT.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"StudentManager-0.0.1-SNAPSHOT.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"StudentManager-0.0.1-SNAPSHOT.war\""}}}}
thankyou very much
You should use full package name and Servlet name, while declaring it in web.xml. Is servlet.StudentManagerServlet the full path of your class?
<servlet>
<servlet-name>StudentManager</servlet-name>
<servlet-class>full.path.to.package.StudentManagerServlet</servlet-class>
</servlet>
I developed a resource adapter that I would like to use within my application ear, deployed in JBoss 5.1. After playing around with annotations and xml files, I came up with the following setup.
ejb-jar.xml
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
<enterprise-beans>
<message-driven>
<display-name>MyUpdateService</display-name>
<ejb-name>MyUpdateService</ejb-name>
<ejb-class>com.my.package.MyUpdateService</ejb-class>
<messaging-type>com.my.other.package.AdapterListener</messaging-type>
<transaction-type>Bean</transaction-type>
</message-driven>
</enterprise-beans>
</ejb-jar>
jboss.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>MyUpdateService</ejb-name>
<activation-config>
<activation-config-property>
<activation-config-property-name>parameter1</activation-config-property-name>
<activation-config-property-value>value1</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>parameter2</activation-config-property-name>
<activation-config-property-value>value2</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-adapter-name>myear.ear#adaptor.rar</resource-adapter-name>
<depends>jboss.jca:service=RARDeployment,name='myear.ear#adaptor.rar'</depends>
</message-driven>
</enterprise-beans>
</jboss>
MyUpdateService
#TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class EuronextUpdateService implements MulticastListener, MessageDrivenBean {
[snip]
}
I also tried most combinations of annotations as opposed to xml files, however, I always get the same result:
All beans are deployed fine, also the MyUpdateService bean. The resource adapter does send messages to my bean, which can process it just fine.
While I can work with the adapter like this, I do get the following exception in my log, which I really would like to get rid of:
2011-02-23 11:15:54,640 WARN [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-75) Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec#26af5ca9(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter#157024fc destination=/topic/MyTopic destinationType=javax.jms.Topic tx=false ack=Auto-acknowledge durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=1 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=0)
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.IllegalStateException: BaseClassLoader#26780d3c{vfszip:/opt/jboss-5.1.0.GA/server/default/deploy/myear.ear/} classLoader is not connected to a domain (probably undeployed?) for class org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.jboss.util.naming.Util.lookup(Util.java:179)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupJMSProviderAdapter(JmsActivation.java:397)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:346)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: BaseClassLoader#26780d3c{vfszip:/opt/jboss-5.1.0.GA/server/default/deploy/myear.ear/} classLoader is not connected to a domain (probably undeployed?) for class org.jnp.interfaces.NamingContextFactory
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:793)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 12 more
Any ideas?
Cheers,
Che