Migration from Wildfly 10.0.0.Final to 10.1.0.Final - wildfly

I'm migrating a project we're developing on to the latest stable release of Wildfly. The project has been started with version 10.0.0.Final, latest version is 10.1.0.Final: thus i didn't expect issues.
But I get the following error while deploying the JMS queues the project defines (they're all deployed via the #JMSDestinations annotation within the EAR):
16:06:55,674 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "togather-0.0.1-SNAPSHOT.ear")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.ra.deployer.\"jmsra.rar\""],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]",
"jboss.connector.direct-connection-factory-activator.java:/jms/******* is missing [jboss.ra.deployer.\"jmsra.rar\"]"
]
I've tried with all the full profiles (standalon-full, standalon-ha-full) in both versions: with version 10.0.0.Final it works fine, in version 10.1.0.Final I got the deploy issue.
What am I doing wrong and how can I fix it?

Related

Getting Exception while migrating jboss version 6.4 to 7.2

At the time of starting Jboss server I am getting below exception.
ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
Note: I am doing Jboss migration from 6.4 to 7.2
Please help.

Jboss 7 deployment error: WFLYCTL0412: Required services that are not installed & WFLYCTL0180: Services with missing/unavailable dependencies

I deployed my application on JBoss EAP 7.2.0 and get the following error:
> {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.naming.context.java.jboss.resources.wm.WorkManager1",
"jboss.naming.context.java.jboss.resources.eis.XUConnectionFactory"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.clos.clos.env.eis.XUConnectionFactory is missing [jboss.naming.context.java.jboss.resources.eis.XUConnectionFactory]",
"jboss.naming.context.java.module.clos.clos.env.wm.WorkManager1 is missing [jboss.naming.context.java.jboss.resources.wm.WorkManager1]"
]
}
In my web.xml have config:
<resource-ref>
<res-ref-name>eis/XUConnectionFactory</res-ref-name>
<res-type>javax.resource.cci.ConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>wm/WorkManager1</res-ref-name>
<res-type>commonj.work.WorkManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
commonj.work.WorkManager is in lib commonj-twm.jar and javax.resource.cci.ConnectionFactory is in java ee 1.5
What should I do with this error?
Please help me, Any help will be appreciated.

Jboss 7 migration - ValidationException: Unable to find provider: HibernateValidator

my work place is migrating from Jboss 6 to Jboss 7.
We use v 5.1.3 Hibernate Validator, and when we tried to deploy our web application in the Jboss 7 server, and it threw an exception.
09:23:56,031 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 4) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("deployment" => "ROOT.war"),
("subsystem" => "jaxrs"),
("rest-resource" => "org.apache.cxf.rs.security.oauth.services.RequestTokenService")
]): javax.validation.ValidationException: RESTEASY008520: Unable to load Validation support
Caused by: javax.validation.ValidationException: Unable to find providerclass org.hibernate.validator.HibernateValidator
I am not overly familiar with ether Jboss and Hibernate Validator, and tried googling the issue with little success.
Look here https://coredump.su/questions/35063076/how-can-i-disable-javaxvalidationapi-in-jboss-64. Try add this to your jboss-deployment-structure.xml:
<exclude-subsystems>
<subsystem name="jaxrs"/>
</exclude-subsystems>
<exclusions>
<module name="javaee.api"/>
<module name="javax.validation.api"/>
<module name="javax.faces.api"/>
<module name="org.hibernate.validator"/>
</exclusions>
Maybe you have conflict with jboss modules.

How to resolve missing required bundle for SonarLint eclipse

I am having a problem loading SonarLint 2.2.0 in my Eclipse Luna. The official web document says that 2.2.0 version is supported for Eclipse Luna. I also can install SonarLint from Eclipse Marketplace without any problem. But on eclipse restart, SonarLint cannot load. Diagnosing the plugin, I found that there are some missing bundles as shown in image below.
While checking the bundle from OSGI console, I had the bundle and it was in ACTIVE status but of different version as shown below.
Looking at this, I don't think I should downgrade equinox to version 0.0.0 if there's any. And not sure how can I deal with it. Any help would be appreciated guys.
Thanks
Version 2.2.0 of SonarLint for Eclipse moved to Java 8 (as well as the library SonarLint Core). As a consequence, the MANIFEST of all those bundle was updated to require JavaSE-1.8 execution environment.
If your Eclipse installation is not able to provide this requirement, the SonarLint plugin will not be loaded. I agree this silent failure is a shame, but if you have an idea on how to improve, let me know.
Possible reasons why your Eclipse doesn't provide JavaSE-1.8:
Eclipse was started with Java < 8. To be sure simply open Help -> About Eclipse -> Installation details -> Configuration and look for property java.version. Here the solution is simple: run Eclipse with a JVM 1.8+.
You are using a very old Eclipse version (< Kepler SR1). There is no Java 1.8 profile so it will not work even if you use a JVM 1.8 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=387699). Luna is supposed to be supported, but if you upgraded from an older version of Eclipse if may be broken (see How do I add execution environment 1.8 to Eclipse Luna?). Try with a fresh installation of Luna or a more recent version.
I'm seeing the same issue and ran diag in the OSGi console.
I've found that the SonarLint eclipse bundles have references to 2.3.1 versions of the core SonarLint bundles, while the plug-in payload includes the 2.4.0 versions of the core packages.
For example: The diag command shows that the sonarlint.eclipse.core bundle is referencing sonarlint-client-api_2.3.1 while the plug-in payload includes sonarlint-client-api_2.4.0.
Note: I'm seeing the same version issue at the bottom of the diag window provided by the OP.
I'm thinking the SonarLint 2.2 bundle needs to be rebuilt/repackaged with the correct package versions.
Here's my OSGi console output for reference.
osgi> ss
...
1241 INSTALLED org.sonarlint.eclipse.core_2.2.0.201607291419-RELEASE
1242 INSTALLED org.sonarlint.eclipse.jdt_2.2.0.201607291419-RELEASE
1243 INSTALLED org.sonarlint.eclipse.ui_2.2.0.201607291419-RELEASE
1244 INSTALLED org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0
1245 INSTALLED org.sonarsource.sonarlint.core.sonarlint-core_2.4.0
osgi> diag 1241
reference:file:plugins/org.sonarlint.eclipse.core_2.2.0.201607291419-RELEASE.jar [1241]
Direct constraints which are unresolved:
Missing required bundle org.sonarsource.sonarlint.core.sonarlint-client-api_2.3.1.
Missing required bundle org.sonarsource.sonarlint.core.sonarlint-core_2.3.1.
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
Leaf constraints in the dependency chain which are unresolved:
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-core_2.4.0.jar [1245]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.jar [1244]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
osgi> diag 1242
reference:file:plugins/org.sonarlint.eclipse.jdt_2.2.0.201607291419-RELEASE.jar [1242]
Direct constraints which are unresolved:
Missing required bundle org.sonarlint.eclipse.core_0.0.0.
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
Leaf constraints in the dependency chain which are unresolved:
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-core_2.4.0.jar [1245]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.jar [1244]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
reference:file:plugins/org.sonarlint.eclipse.core_2.2.0.201607291419-RELEASE.jar [1241]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
osgi> diag 1243
reference:file:plugins/org.sonarlint.eclipse.ui_2.2.0.201607291419-RELEASE.jar [1243]
Direct constraints which are unresolved:
Missing required bundle org.sonarlint.eclipse.core_0.0.0.
Missing imported package org.sonarsource.sonarlint.core.client.api.connected_0.0.0.
Missing imported package org.sonarsource.sonarlint.core.client.api.util_0.0.0.
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
Leaf constraints in the dependency chain which are unresolved:
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-core_2.4.0.jar [1245]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.jar [1244]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
reference:file:plugins/org.sonarlint.eclipse.core_2.2.0.201607291419-RELEASE.jar [1241]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
osgi> diag 1244
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.jar [1244]
Direct constraints which are unresolved:
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
osgi> diag 1245
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-core_2.4.0.jar [1245]
Direct constraints which are unresolved:
Missing required bundle org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
Leaf constraints in the dependency chain which are unresolved:
reference:file:plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_2.4.0.jar [1244]
Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".
Have you added the these plugins as a 'Required-Bundle' in your Manifest?

Deploying Apache Isis on WildFly

I'm trying to deploy an Apache Isis project on a WildFly server.
The project is just the simpleapp-archetype-1.10.0 and it starts and works well with mvn antrun:run -P self-host and mvn jetty:run-war.
For the jetty part, I added configuration to the org.eclipse.jetty plugin of the parent pom.xml
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.2.v20150730</version>
<configuration>
<war>${project.basedir}/webapp/target/simpleapp.war</war>
</configuration>
</plugin>
Now I wanted to deploy this on a WildFly server, but I get the following error:
Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"simpleapp.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"simpleapp.war\".WeldStartService: Failed to start service Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type IsisJdoSupport with qualifiers #Default at injection point [BackedAnnotatedField] #Inject org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService.isisJdoSupport at org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService.isisJdoSupport(TimestampService.java:0) "}}
How can I fix this error, and why does jetty bypass this error?
I got an answer via the Apache Isis Mailing List.
The error says that WildFly tries to do CDI work. Jetty is just a web server and doesn't support Java EE stuff like CDI. Try to disable CDI support for this application (I have no idea how exactly).
http://isis.markmail.org/message/d3coq6qus3rca7kx
To fix this error:
Add the file jboss-all.xml to Simple App Webapp/Web Pages/WEB-INF with the following code:
<jboss xmlns="urn:jboss:1.0">
<weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
</jboss>
https://docs.jboss.org/author/display/WFLY8/CDI+Reference
Credits to Martin Grigorov though.