I am having problems using the new AmazonAWS SDK in a JBoss AS 7.1 (EE6) project
I am just using the S3 library, so in accordance with the new release (1.9.7) I am only using the s3, core, kms jars
-aws-java-sdk-core-1.9.17.jar
-aws-java-sdk-s3-1.9.17.jar
-aws-java-sdk-kms-1.9.17.jar
So I have created 3 separate module.xml entries for each jar within the /com/amazonaws directory:
/com/amazonaws/aws-java-sdk-s3/main/module.xml
<module xmlns="urn:jboss:module:1.1" name="com.amazonaws.aws-java-sdk-s3">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="aws-java-sdk-s3-1.9.17.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="com.amazonaws.aws-java-sdk-core" />
<module name="com.amazonaws.aws-java-sdk-kms" />
</dependencies>
</module>
/com/amazonaws/aws-java-sdk-kms/main/module.xml
<resources>
<resource-root path="aws-java-sdk-kms-1.9.17.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="com.amazonaws.aws-java-sdk-core" />
</dependencies>
/com/amazonaws/aws-java-sdk-core/main/module.xml
<module xmlns="urn:jboss:module:1.1" name="com.amazonaws.aws-java-sdk-core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="aws-java-sdk-core-1.9.17.jar"/>
<resource-root path="commons-logging-1.1.3.jar"/>
<resource-root path="httpclient-4.3.4.jar"/>
<resource-root path="jackson-databind-2.3.2.jar"/>
<resource-root path="joda-time-2.2.jar"/>
<!-- Insert resources here -->
</resources>
</module>
(I have put the extra dependencies eg. apache-commons, jodatime etc. directly in the module directory)
The following jboss-deployment-structure.xml entry:
<sub-deployment name="Processor-ejb.jar">
<dependencies>
<module name="com.amazonaws.aws-java-sdk-core" />
<module name="com.amazonaws.aws-java-sdk-s3" />
<module name="com.amazonaws.aws-java-sdk-kms" />
</dependencies>
</sub-deployment>
(I have also tried declaring these as EAR-level dependancies with export=true)
The the following pom.xml entry:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.9.17</version>
<scope>provided</scope>
</dependency>
But whenever I try to initialise a new S3 client:
AWSCredentials credentials = new ProfileCredentialsProvider("ProcessingApp").getCredentials();
AmazonS3 s3 = new AmazonS3Client(credentials);
I get the following exception:
Caused by: java.lang.NoClassDefFoundError: javax/management/MalformedObjectNameException
at com.amazonaws.jmx.SdkMBeanRegistrySupport.registerMetricAdminMBean(SdkMBeanRegistrySupport.java:27)
at com.amazonaws.metrics.AwsSdkMetrics.registerMetricAdminMBean(AwsSdkMetrics.java:330)
at com.amazonaws.metrics.AwsSdkMetrics.<clinit>(AwsSdkMetrics.java:308)
at com.amazonaws.services.s3.AmazonS3Client.<clinit>(AmazonS3Client.java:261)
at net.processor.actions.scheduled.ScheduledActionsBean.minuteActions(ScheduledActionsBean.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_65]
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.intercept.Interceptor.aroundTimeout(Interceptor.java:201)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:74)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79)
... 56 more
My hunch would be a conflict with apache-commons-logging as there is an import in the SdkMBeanRegistrySupport class and I know JBoss uses this library elsewhere using an alias to org.slf4j.jcl-over-slf4j, but I thought that putting the apache lib in with the jar would sort this out?
I am fairly new to AS7 so maybe I'm missing a trick?
Ok I got eventually thanks to #Federico Sierra, here is the sdk-core module.xml (nb. I had to drop the commons-logging, httpclient and httpcore jars into the module folder as the ones shipped with JBoss arent compatible, I added the jackson and joda libs as their own modules)...
<module xmlns="urn:jboss:module:1.1" name="com.amazonaws.aws-java-sdk-core">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="aws-java-sdk-core-1.9.17.jar"/>
<resource-root path="commons-logging-1.1.3.jar"/>
<resource-root path="httpclient-4.3.4.jar"/>
<resource-root path="httpcore-4.3.2.jar"/>
<!-- Insert resources here -->
</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 sdk-s3 module.xml needed javax.xml.stream.api too
<resources>
<resource-root path="aws-java-sdk-s3-1.9.17.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="com.amazonaws.aws-java-sdk-core" />
<module name="com.amazonaws.aws-java-sdk-kms" />
<module name="javax.xml.stream.api"/>
</dependencies>
Hope this helps someone else
I want to share my code, it is working to me, I hope that it be useful to you
<module xmlns="urn:jboss:module:1.5" name="com.amazonaws.aws-java-sdk-s3">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="aws-java-sdk-s3-1.11.106.jar"/>
<resource-root path="aws-java-sdk-core-1.11.106.jar"/>
<resource-root path="aws-java-sdk-kms-1.11.106.jar"/>
<resource-root path="jmespath-java-1.11.106.jar"/>
<resource-root path="commons-logging-1.1.1.jar"/>
<resource-root path="httpclient-4.5.2.redhat-1.jar"/>
<resource-root path="httpcore-4.4.4.redhat-1.jar"/>
<resource-root path="jackson-annotations-2.8.9.redhat-1.jar"/>
<resource-root path="jackson-databind-2.8.9.redhat-1.jar"/>
<resource-root path="jackson-core-2.8.9.redhat-1.jar"/>
<resource-root path="jackson-dataformat-cbor-2.6.6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.xml.bind.api"/>
<module name="javax.xml.stream.api"/>
<module name="org.joda.time"/>
</dependencies>
</module>
I use only a folder "com/amazonaws/aws-java-sdk-s3" in the jboss y there I put all the jars.
Related
I have two EAR (ear01-0.0.1-SNAPSHOT.ear, ear02-0.0.1-SNAPSHOT.ear) applications and both of them are useing a common library (common-0.0.1-SNAPSHOT.jar). I decided to move out that common part and add it as module to a Wildfly 14 but even with a deployment descritor I get exception during the EAR deployment:
java.lang.NoClassDefFoundError: Failed to link ki/wildfly_deps/ejbs01/EchoBean01
I used this CLI to add the new module:
module add --name=ki.wildfly_deps.common --resources=common-0.0.1-SNAPSHOT.jar
and the JAR now is in
$JBOSS_HOME/modules/ki/wildfly_deps/common/main
1. QUESTION
This JAR shouldn't be in folder
$JBOSS_HOME/modules/system/layers/base/ki/wildfly_deps/common/main
beside the other modules?
After adding the module, the module.xml look like this:
<?xml version='1.0' encoding='UTF-8'?>
<module xmlns="urn:jboss:module:1.1" name="ki.wildfly_deps.common">
<resources>
<resource-root path="common-0.0.1-SNAPSHOT.jar"/>
</resources>
</module>
The jboss-deployment-structure.xml from each EAR declares a dependency on the above common library:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deployment>
<dependencies>
<module name="ki.wildfly_deps.common" />
</dependencies>
</deployment>
2. QUESTION
Should I specify the package what must be imported from the common module?
<jboss-deployment-structure
xmlns="urn:jboss:deployment-structure:1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deployment>
<dependencies>
<module name="ki.wildfly_deps.common" //>
<imports>
<include path="META-INF**" />
<include path="ki.wildfly_deps.common**" />
</imports>
</module>
</dependencies>
</deployment>
I'm trying to install neo4j-jdbc-driver-3.3.1 as a module on Wildfly 11. I created the folders org/neo4j/driver/main and added the module.xml file as following:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.5" name="org.neo4j.driver">
<resources>
<resource-root path="neo4j-jdbc-driver-3.3.1.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="sun.jdk"/>
</dependencies>
</module>
I added the jar neo4j-jdbc-driver-3.3.1.jar in the same directory, but the module does not get deployed.
If I add the jar on the deployments folder it works, but I need the driver as a module.
I'm attempting to deploy the packager-01 EAR from https://github.com/dewthefifth/java-examples/tree/master/multi-ear-jms on Wildfly 8.2.1, and am receiving the following error because Wildfly is insisting on loading the hibernate-validator module out of $JBOSS_HOME/modules/org/hibernate/validator/main instead of the one located inside of my EAR.
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:223)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Note: this is a custom deployed module required by a different application deployed on the same app server. Prior to deploying the other application, which includes multiple custom hibernate modules, I was able to get the EAR to deploy.
I've attempted to exclude the validator module using the following jboss-deployment-structure (assembled out of basically adding every exclusion any google result even hinted at), but have had no luck. No matter what I do the validator being loaded is Hibernate Validator 4.2.0.Final while the validator I'm providing in my EAR is hibernate-validator-6.0.7.Final.jar.
<jboss-deployment-structure>
<!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->
<!-- This is the top level ear module, which contains all the classes in the EAR's lib folder -->
<deployment>
<exclude-subsystems>
<subsystem name="jaxrs" />
<subsystem name="resteasy" />
</exclude-subsystems>
<exclusions>
<!-- Exclude Jackson - I included my own -->
<module name="com.fasterxml.jackson.core.jackson-annotations" />
<module name="com.fasterxml.jackson.core.jackson-core" />
<module name="com.fasterxml.jackson.core.jackson-databind" />
<module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" />
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
<module name="org.jboss.resteasy.resteasy-jackson2-provider" />
<module name="org.apache.xalan" />
<module name="org.apache.xerces" />
<module name="org.jboss.logging" />
<!-- Exclude Hibernate -->
<module name="org.hibernate" />
<!-- Exclude hibernate validation -->
<module name="org.jboss.resteasy.resteasy-validator-provider-11" />
<module name="org.hibernate.validator" />
<module name="javax.validation.api" />
<module name="javaee.api" />
<module name="javax.faces.api" />
</exclusions>
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
<dependencies>
</dependencies>
</deployment>
If anybody knows which subsystem I need to exclude I'd greatly appreciate the help.
Note: I'm sharing my Wildfly 8.2.1, and even using my Wildfly 8.2.1 because those are constraints placed on me by my customer deployment site.
Update 1:
Thanks for the help so far.
I've reached the point that my new excludes list includes the following
false
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
<module name="org.jboss.resteasy.resteasy-jackson2-provider" />
<module name="org.apache.xalan" />
<module name="org.apache.xerces" />
<module name="org.jboss.logging" />
<!-- Exclude Hibernate -->
<module name="org.hibernate" />
<module name="javax.persistence.api" />
<!-- Exclude hibernate validation -->
<module name="org.hibernate.validator" />
<module name="org.jboss.invocation" />
<module name="org.jboss.as.connector" />
<module name="org.jboss.as.ee" />
<module name="org.jboss.as.jpa" />
<module name="org.jboss.as.jpa.hibernate" />
<module name="javax.resource.api" />
<module name="org.jboss.as.ejb-client" />
<module name="org.jboss.as.weld" />
<module name="org.jboss.ironjacamar.impl" />
<module name="org.jboss.ironjacamar.jdbcadapters" />
<module name="org.jboss.resteasy.resteasy-jaxrs" />
<module name="org.jboss.resteasy.resteasy-validator-provider-11" />
<module name="javaee.api" />
<module name="javax.el.api" />
<module name="javax.enterprise.api" />
<module name="javax.faces.api" />
<module name="javax.persistence.api" />
<module name="javax.servlet.jsp.api" />
<module name="javax.validation.api" />
</exclusions>
<!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
<dependencies>
</dependencies>
</deployment>
which I determined by turning TRACE level logging on for all JBOSS and basically adding exclusions the the first listed entry until I stopped seeing Hibernate 4.0.2 was being loaded. I haven't yet been able to run down exactly which of these were the real culperite, but we're getting somewhere.
I will add that the WAR no longer deploys, now because it's missing core jee libraries... (as you might expect). I'll update as I find time, hopefuly eventually producing the genuine (minimal) set of exclusions required for it to work.
I think you need to exclude it from all dependencies also. I'm working on 6.4EAP so it could change slightly for your version of jboss, but try it. So go to your modules jboss subdirectory and grep for org.hibernate.validator (grep -ir "org.hibernate.validator" .) if you are on linux.
That will show you result like:
./system/layers/base/org/hibernate/validator/main/module.xml:<module xmlns="urn:jboss:module:1.1" name="org.hibernate.validator">
./system/layers/base/org/jboss/as/jpa/hibernate/3/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/as/jpa/hibernate/4/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/as/jpa/main/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/as/ee/main/module.xml: <module name="org.hibernate.validator" optional="true"/>
./system/layers/base/org/jboss/as/connector/main/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/resteasy/resteasy-hibernatevalidator-provider/main/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/ironjacamar/impl/main/module.xml: <module name="org.hibernate.validator"/>
./system/layers/base/org/jboss/ironjacamar/jdbcadapters/main/module.xml: <module name="org.hibernate.validator"/>
Then you could know which modules you need and from which you need to exclude it. Here I'm posting my configuration...maybe it will help you
<deployment>
<exclusions>
<module name="org.apache.log4j"/>
<module name="org.apache.commons.logging"/>
<module name="org.slf4j"/>
<module name="org.jboss.logging"/>
<module name="org.hibernate"/>
<module name="org.hibernate.validator"/>
<module name="javaee.api"/>
<module name="javax.el.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.faces.api"/>
<module name="javax.persistence.api"/>
<module name="javax.servlet.jsp.api"/>
<module name="javax.validation.api"/>
</exclusions>
<dependencies>
<module name="javax.annotation.api" export="true"/>
<module name="javax.ejb.api" export="true"/>
<module name="javax.interceptor.api" export="true"/>
<module name="org.jboss.modules" export="true"/>
<module name="javax.servlet.jsp.api" export="true">
<imports>
<include path="/**"/>
<exclude-set>
<path name="javax/el"/>
</exclude-set>
</imports>
</module>
<module name="javax.enterprise.api" export="true">
<imports>
<include path="/**"/>
<exclude-set>
<path name="javax/el"/>
</exclude-set>
</imports>
</module>
</dependencies>
</deployment>
<sub-deployment name="admin.war">
<exclusions>
<module name="javaee.api"/>
<module name="javax.el.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.faces.api"/>
<module name="javax.persistence.api"/>
<module name="javax.servlet.jsp.api"/>
<module name="javax.validation.api"/>
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.hibernate"/>
<module name="org.hibernate.validator"/>
<module name="org.slf4j"/>
</exclusions>
<local-last value="true"/>
</sub-deployment>
for me worked when I removed javax/el
I ended up having some success with this on a different project/module which is available at https://github.com/dewthefifth/spring-boot-ear-skinny-war/tree/spring-boot-2.0-with-spring-legacy-with-wfcore-209-workaround.
Specifically the web0 project had luck removing the validator, but any attempt to remove it from the EAR fails.
The github link is focused on making the removal so that Spring 5+ can be used on JBOSS and Wildfly. It includes a README with detailed information on exactly which versions of Wildfly and JBOSS were tested, and a workaround for the versions of JBOSS that didn't work (it's not pretty).
I'm trying to implement module for my grails application, which is using Spring Security. Since the Spring Security and Grails are having large number of dependencies, the war size becomes more than 80MB. In order to avoid this, I'm trying to access these dependency from the module.
But, I'm getting the following error when trying to deploy the grails WAR in jboss 7.1.1.Final.
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.module.service."deployment.IFP.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.IFP.war".main: Failed to load module: deployment.IFP.war:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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:1110) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
Caused by: org.jboss.modules.ModuleNotFoundException: Module org.springframework:main is not found in local module loader #1f88953 (roots: C:\Jboss\jboss-as-7.1.1.Final\modules)
at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
at org.jboss.modules.Module.addPaths(Module.java:841)
at org.jboss.modules.Module.link(Module.java:1181)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1207)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="com.sits.grails">
<imports>
<include path="META-INF**"/>
<include path="org**"/>
</imports>
</module>
</dependencies>
</deployment>
</jboss-deployment-structure>
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.sits.grails">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="activation-1.1.jar"/>
<resource-root path="antlr-2.7.7.jar"/>
.........
.........
<resource-root path="jboss-logging-3.1.0.GA.jar"/>
<resource-root path="jboss-logging-annotations-1.2.0.Beta1.jar"/>
<resource-root path="jboss-transaction-api_1.2_spec-1.0.0.Final.jar"/>
<resource-root path="jcl-over-slf4j-1.7.5.jar"/>
<resource-root path="jsr166y-1.7.0.jar"/>
<resource-root path="jul-to-slf4j-1.7.5.jar"/>
<resource-root path="liquibase-core-2.0.5.jar"/>
<resource-root path="log4j-1.2.17.jar"/>
<resource-root path="mysql-connector-java-5.1.13.jar"/>
<resource-root path="netty-all-4.0.15.Final.jar"/>
<resource-root path="rhino-1.7R4.jar"/>
<resource-root path="serializer-2.7.1.jar"/>
<resource-root path="sitemesh-2.4.jar"/>
<resource-root path="slf4j-api-1.7.5.jar"/>
<resource-root path="spring-aop-4.0.7.RELEASE.jar"/>
<resource-root path="spring-aspects-4.0.7.RELEASE.jar"/>
<resource-root path="spring-beans-4.0.7.RELEASE.jar"/>
<resource-root path="spring-context-4.0.7.RELEASE.jar"/>
<resource-root path="spring-context-support-4.0.7.RELEASE.jar"/>
<resource-root path="spring-core-4.0.7.RELEASE.jar"/>
<resource-root path="spring-expression-4.0.7.RELEASE.jar"/>
<resource-root path="spring-jdbc-4.0.7.RELEASE.jar"/>
<resource-root path="spring-orm-4.0.7.RELEASE.jar"/>
<resource-root path="spring-security-core-3.2.7.RELEASE.jar"/>
<resource-root path="spring-security-web-3.2.7.RELEASE.jar"/>
<resource-root path="spring-tx-4.0.7.RELEASE.jar"/>
<resource-root path="spring-web-4.0.7.RELEASE.jar"/>
<resource-root path="spring-webmvc-4.0.7.RELEASE.jar"/>
<resource-root path="tomcat-embed-logging-log4j-7.0.50.jar"/>
<resource-root path="tomcat-jdbc-7.0.50.jar"/>
<resource-root path="tomcat-juli-7.0.50.jar"/>
<resource-root path="validation-api-1.1.0.Final.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="sun.jdk"/>
<module name="org.javassist" optional="true"/>
<module name="javax.servlet.api"/>
<module name="org.apache.commons.logging"/>
</dependencies>
</module>
In my MANIFEST.MF file have the dependencies declared
Dependencies: org.apache.log4j,com.sits.grails,org.springframework
I'm not understanding what causes this issue. If anyone can help me to identify will be a great help. Thanks.
ApplicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
</bean>
<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
<description>A bean that manages Grails plugins</description>
<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
<property name="application" ref="grailsApplication" />
</bean>
<bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
<constructor-arg>
<ref bean="grailsApplication" />
</constructor-arg>
<property name="pluginManager" ref="pluginManager" />
</bean>
<bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
<property name="encoding">
<value>utf-8</value>
</property>
</bean>
<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans>
The module names specified in MANIFEST.MF are not package names but module names as define in the module.xml in JBoss
Your module.xml which contains spring jar is named as com.sits.grails.Hence your MANIFEST.MF should not include org.springframework as its not defined as a separate module.
I'm trying to use the ivy-maven-plugin in order to execute SBT launcher from another Scala program that builds with Maven. (Side note: I'm not looking for answers like: use SBT...)
My ivyconf.xml looks like this:
<ivysettings>
<property name='ivy.checksums' value=''/>
<resolvers>
<url name='typesafe-repo' alwaysCheckExactRevision='yes' checkmodified='true'>
<ivy pattern='http://repo.typesafe.com/typesafe/releases/[organization]/[module]/[revision]/ivys/ivy.xml'/>
<artifact pattern='http://repo.typesafe.com/typesafe/releases/[organization]/[module]/[revision]/jars/[artifact](.[ext])'/>
</url>
<ibiblio name="maven2-repo" m2compatible="true"/>
</resolvers>
<modules>
<module organisation='com.jcraft' matcher='regexp' resolver='maven2-repo'/>
<module organisation='jline' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.apache.ivy' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.scalacheck' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.scala-lang' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.scala-sbt' name='test-interface' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.scala-sbt' matcher='regexp' resolver='typesafe-repo'/>
<module organisation='org.scala-tools.sbinary' matcher='regexp' resolver='typesafe-repo'/>
<module organisation='org.scala-tools.testing' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.sonatype.oss' matcher='regexp' resolver='maven2-repo'/>
<module organisation='org.specs2' matcher='regexp' resolver='maven2-repo'/>
</modules>
</ivysettings>
And the Maven plugin definition like this:
<plugin>
<groupId>com.github.goldin</groupId>
<artifactId>ivy-maven-plugin</artifactId>
<version>0.2.5</version>
<executions>
<execution>
<id>add-idea-artifacts-compile-scope</id>
<goals>
<goal>ivy</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<ivyconf>${project.basedir}/src/main/resources/ivyconf.xml</ivyconf>
<scope>compile</scope>
<dependencies>
<dependency>
<groupId>ivy.org.scala-sbt</groupId>
<artifactId>launcher</artifactId>
<version>0.13.0-RC4</version>
<!--<classifier>???</classifier>-->
</dependency>
</dependencies>
</configuration>
</execution>
</executions>
</plugin>
When I execute the build, I get:
[ERROR] Failed to execute goal com.github.goldin:ivy-maven-plugin:0.2.5:ivy
(add-idea-artifacts-compile-scope) on project escalante-play:
Execution add-idea-artifacts-compile-scope of goal com.github.goldin:ivy-maven-plugin:0.2.5:ivy failed:
Multiple artifacts resolved for [org.scala-sbt:launcher:0.13.0-RC4:jar] -
[ivy.org.scala-sbt:launcher:jar:launcher:0.13.0-RC4:compile,
ivy.org.scala-sbt:launcher-interface:jar:launcher-interface:0.13.0-RC4:compile,
ivy.org.apache.ivy:ivy:jar:ivy:2.3.0-rc1:compile,
ivy.org.scala-sbt:io:jar:io:0.13.0-RC4:compile,
ivy.org.scala-sbt:control:jar:control:0.13.0-RC4:compile,
ivy.org.scalacheck:scalacheck_2.10:jar:scalacheck_2.10:1.10.0:compile,
ivy.org.scala-tools.testing:test-interface:jar:test-interface:0.5:compile,
ivy.org.scala-lang:scala-actors:jar:scala-actors:2.10.1:compile,
ivy.org.specs2:specs2_2.10:jar:specs2_2.10:1.12.3:compile,
ivy.org.specs2:specs2-scalaz-core_2.10.0-RC3:jar:specs2-scalaz-core_2.10.0-RC3:6.0.1:compile,
ivy.org.scala-lang:scala-reflect:jar:scala-reflect:2.10.2:compile,
ivy.org.scala-sbt:interface:jar:interface:0.13.0-RC4:compile],
specify <classifier> so that only one artifact is resolved. -> [Help 1]
I assume I need to use a classified but I've no idea really what this classifier really should contain. I tried launcher but did not work, any other ideas?
Cheers,
Galder