JBoss EAP 7.1.0.GA + picketlink 2.7.1.Final causes org.jboss.modules.ModuleLoadError - jboss7.x

I'm using an Red Hat JBoss Enterprise Application Platform - Version 7.1.0.GA and trying to use picketlink 2.7.1.Final causes org.jboss.modules.ModuleLoadError.
So, I added in standalone.xml
<extension module="org.wildfly.extension.picketlink"/>
Then ran the picketlink-installer-2.7.1.Final with the ant that gave me: BUILD SUCCESSFUL, and when I try to launch my app with jboss, I get an:
WARN [org.jboss.modules] (ServerService Thread Pool -- 31) Failed to define class org.picketlink.identity.federation.web.handlers.saml2.SAML2IssuerTrustHandler in Module "org.picketlink.federation" from local module loader #58134517 (finder: local module finder #4450d156 (roots: D:\Jboss\bin\..\modules,D:\Jboss\bin\..\modules\system\layers\base)): org.jboss.modules.ModuleLoadError: org.jboss.common-core
I added the picketlink.xml file with the Handlers:
<Handlers xmlns="urn:picketlink:identity-federation:handler:config:2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:picketlink:identity-federation:handler:config:2.1 ">
<Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2IssuerTrustHandler" />
<Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler"/>
<Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler"/>
<Handler class="org.picketlink.identity.federation.web.handlers.saml2.RolesGenerationHandler"/>
</Handlers>

I added in \Jboss\modules\system\layers\base\org\jboss\common-core\main\jboss-common-4.2.2.GA.jar and an module.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.5" name="org.jboss.common-core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<dependencies>
<module name="javax.api"/>
</dependencies>
<resources>
<resource-root path="jboss-common-4.2.2.GA.jar"/>
</resources>
</module>
And that error is gone, I have other errors now...

Related

Can't register AWS-SDK on Jboss modules correctly

I found the dependency aws-java-sdk was being compiled on a legacy code, having as result a very heavy EAR.
I declared this dependency as provided and wanted to put it as part of the Jboss modules, but no matter where I put it, I'm still having the ClassNotFound issue.
Here is my module.xml:
<module xmlns="urn:jboss:module:1.1" name="com.amazonaws">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="aws-java-sdk-1.11.584.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.xml.stream.api"/>
<module name="javax.xml.bind.api"/>
<module name="com.fasterxml.jackson"/>
<module name="org.joda.time"/>
</dependencies>
</module>
And the error:
Caused by: java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials
The problem was on the JAR file, needed sdk-core. Check your JARs always.

JCache with Infinispan in Wildfly 14 generate Unsatisfied dependencies for type InfinispanExtensionEmbedded with qualifiers #Default

I'm following some guide to set JCache in Wildfly 14 enviroment using as provider Infinispan.
I followed these steps :
- I downloaded the wildfly module version 9.4.14 from Infinispan website
- I copied the content of the zip in the module dir of Wildfly
- I added to my application the file jboss-deployment-structure.xml
- I added the interceptors to the beans.xml file on my application
- I add the annotation #CacheResult to a function
- I start Wildfly and I get the following error
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type InfinispanExtensionEmbedded with qualifiers #Default
at injection point [BackedAnnotatedField] #Inject private org.infinispan.cdi.embedded.AdvancedCacheProducer.infinispanExtension
I add information that can be useful. The application that I'm deploying on wildfly is an ear ant this is the structure that I'm using :
ear file
lib
META-INF
JAR library file
META-INF
beans.xml file
jboss-deployment-structure.xml
WAR file
jboss-deployment-structure.xml :
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<module name="org.infinispan" slot="ispn-9.4" services="export"/>
<module name="org.infinispan.cdi.embedded" slot="ispn-9.4" services="export"/>
<module name="org.infinispan.jcache" slot="ispn-9.4" services="export"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
beans.xml :
<beans 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/beans_1_1.xsd"
version="1.1" bean-discovery-mode="all">
<interceptors>
<class>org.infinispan.jcache.annotation.InjectedCacheResultInterceptor</class>
<class>org.infinispan.jcache.annotation.InjectedCachePutInterceptor</class>
<class>org.infinispan.jcache.annotation.InjectedCacheRemoveEntryInterceptor</class>
<class>org.infinispan.jcache.annotation.InjectedCacheRemoveAllInterceptor</class>
<class>org.infinispan.jcache.annotation.CacheResultInterceptor</class>
<class>org.infinispan.jcache.annotation.CachePutInterceptor</class>
<class>org.infinispan.jcache.annotation.CacheRemoveEntryInterceptor</class>
<class>org.infinispan.jcache.annotation.CacheRemoveAllInterceptor</class>
</interceptors>
</beans>
With this standard configuration, I expect the interceptor start to defined in the beans.xml start to function, so I can use a default cache container in the application
org.infinispan.cdi.embedded and org.infinispan.jcache modules have SPI extensions inside them (jar/META-INF/services folder). Just add services="export" in module dependencies in jboss-deployment-structure.xml to enable them.
Here is mine jboss-deployment-structure.xml:
<jboss-deployment-structure>
<deployment>
<module-alias name="deployment.magic-blog" />
<dependencies>
<module name="org.infinispan.cdi.embedded" slot="ispn-9.4" export="true" services="export" />
<module name="org.infinispan.jcache" slot="ispn-9.4" export="true" services="export" />
<module name="javax.cache.api" slot="ispn-9.4" export="true"/>
</dependencies>
</deployment>

Missing jboss.jdbc-driver.org_postgresql_Driver

I'm trying to configure a Postgres datasource in standalone.xml. I've put the driver jar in the right place "jboss-as-7.2.0.Final\modules\org\postgresql\main" and this is my "standalone.xml":
<datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:postgresql://localhost:5432/camunda_process_engine</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql</driver>
<security>
<user-name>postgres</user-name>
<password>postgres</password>
</security>
</datasource>
<drivers>
</driver>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
...
"jboss-as-7.2.0.Final\modules\org\postgresql\main\module.xml"
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
<resources>
<resource-root path="postgresql-9.3-1102.jdbc41.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
I'm trying to start server but it shows errors.
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.org_postgresql_Driver (missing) dependents: [service jboss.driver-demander.java:jboss/datasources/ProcessEngine, service jboss.data-source.java:jboss/datasources/ProcessEngine]
You also have to add a dependency on your new module to your application. The easiest way to do this is to add a jboss-deployment-structure.xml to the META-INF of your Ear, or if you just have a war, put it in WEB-INF.
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deployment>
<dependencies>
<module name="org.postgresql" />
</dependencies>
</deployment>
</jboss-deployment-structure>
When you redeploy, JBoss will know to put your new custom module in the classpath. Decent guide to classloading in AS7 here.

issues interating jboss eap6 with ActiveMQ 5.9

I have the activeMQ server running in the jvm at tcp://localhost:61616
then i place the activemq-rar-5.9.0.redhat-610379 unzipped
adaptor
in the
\runtimes\jboss-eap\modules\system\layers\base\org\apache\activemq\main
in the adaptor i have the Meta-INF
in the jboss EAP6 , standalone.xml i have specified the
But when i start the server ... i get the below error
**
12:05:39,910 ERROR [org.jboss.as.controller.management-operation]
(ServerService Thread Pool -- 40) JBAS014612: Operation ("add") failed
- address: ([
("subsystem" => "resource-adapters"),
("resource-adapter" => "activemq-rar.rar") ]) - failure description: "JBAS010473: Failed to load module for RA
[org.apache.activemq]"
**
Your question is missing some information, but in reviewing what you have typed it sounds like you are missing the module.xml that needs to go in your module directory (\runtimes\jboss-eap\modules\system\layers\base\org\apache\activemq\main)
For ActiveMQ RAR version 5.9 a module.xml would look like the following
<module xmlns="urn:jboss:module:1.1" name="org.apache.activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<resources>
<resource-root path="."/>
<resource-root path="activemq-broker-5.9.0.jar"/>
<resource-root path="activemq-client-5.9.0.jar"/>
<resource-root path="activemq-jms-pool-5.9.0.jar"/>
<resource-root path="activemq-kahadb-store-5.9.0.jar"/>
<resource-root path="activemq-openwire-legacy-5.9.0.jar"/>
<resource-root path="activemq-pool-5.9.0.jar"/>
<resource-root path="activemq-protobuf-1.1.jar"/>
<resource-root path="activemq-ra-5.9.0.jar"/>
<resource-root path="activemq-spring-5.9.0.jar"/>
<resource-root path="aopalliance-1.0.jar"/>
<resource-root path="commons-pool-1.6.jar"/>
<resource-root path="commons-logging-1.1.3.jar"/>
<resource-root path="hawtbuf-1.9.jar"/>
<resource-root path="spring-aop-3.2.4.RELEASE.jar"/>
<resource-root path="spring-beans-3.2.4.RELEASE.jar"/>
<resource-root path="spring-context-3.2.4.RELEASE.jar"/>
<resource-root path="spring-core-3.2.4.RELEASE.jar"/>
<resource-root path="spring-expression-3.2.4.RELEASE.jar"/>
<resource-root path="xbean-spring-3.14.jar"/>
</resources>
<exports>
<exclude path="org/springframework/**"/>
<exclude path="org/apache/xbean/**"/>
<exclude path="org/apache/commons/**"/>
<exclude path="org/aopalliance/**"/>
<exclude path="org/fusesource/**"/>
</exports>
<dependencies>
<module name="javax.api"/>
<module name="org.slf4j"/>
<module name="javax.resource.api"/>
<module name="javax.jms.api"/>
<module name="javax.management.j2ee.api"/>
</dependencies>
</module>
Also, you should really not create custom modules under \modules\system\layers\base\ as this is used by JBoss and could be modified during patches and new releases. You are best to either create your own layer or simply create you module directly under the /modules folder.
As previous answer has noted, especially in a standalone setup it might be easier to just directly deploy the RAR instead.
I am having trouble reading your question. In general, I would recommend deploying the A-MQ JCA rar file via either the command line CLI or via the web UI and not as a module. Just go to the web UI, find the "Deployments" page and deploy the A-MQ JCA.
I had the same problem when I followed the tutorial http://www.mastertheboss.com/jboss-frameworks/ironjacamar/configuring-a-resource-adapter-for-activemq-on-jbosswildfly.
I'm using a JBoss EAP 6.3.x and in my case the problem was in reference to the META-INF/ra.xml file. If I comment out the config-property below the note
<!-- NOTE disable the following property if you do not wish to deploy an embedded broker -->
I got the same error like you. If I removed the config-property the problem was solved and it's working as expected.

JBoss 7.1.1 Final Jasperreports 4.0.2 as a module

I am trying this new class loading feature of JB7, witch sounds pretty good and i want to implement in a new project, but i am kinda stuck at this point... this is what i got:
<module xmlns="urn:jboss:module:1.1" name="net.sourceforge.jasperreports">
<resources>
<resource-root path="commons-javaflow-20060411.jar"/>
<resource-root path="iText-2.1.0.jar"/>
<resource-root path="jasperreports-4.0.2.jar"/>
<resource-root path="jcommon-1.0.15.jar"/>
<resource-root path="jfreechart-1.0.14.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="org.apache.commons.beanutils"/>
<module name="org.apache.commons.collection"/>
<module name="org.apache.commons.digester" slot="1.7"/>
<module name="org.apache.commons.logging"/>
</dependencies>
</module>
Without the <module name="org.apache.commons.logging"/> dependency, the trace stack was showing an error of it being missing, even when this particular jar is already being deployed with the application by default, so i took out the jar from the app java libs folder and made a module for it, now my application hangs when the module net.sourceforge.jasperreports is needed, is there something am i missing?
This is the JBoss-deployment-structure if needed:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.apache.commons.collections"/>
<module name="org.apache.commons.logging"/>
<module name="net.sourceforge.jasperreports"/>
<module name="org.apache.log4j"/>
</dependencies>
<resources>
<resource-root path="."/>
</resources>
</deployment>
</jboss-deployment-structure>
Its a Java EE project deploying as a war.
I have <module name="org.apache.commons.collection"/>
And sould be <module name="org.apache.commons.collections"/>
And that was it... "-.-
Its weird because, when a module in Jboss sctructure fails to load, the war deployment fails and shows an error in the console, in this case it should be something about "org.apache.commons.collection not found" but somehow, my app was running normally, and any jasper report sevlet used was hanging eternally because of this missing module dependency.
Edit: Jboss doesn't show any error when a dependency is missing, it just hangs in that line. But it does show an error when a module fails to load resources.