-
1. Re: How to add additional jars to the deployed war
luxspes Jun 30, 2009 5:55 PM (in response to bossy)How did you add those additional jars? Did you copy them in WEB-INF\lib?
-
2. Re: How to add additional jars to the deployed war
bossy Jun 30, 2009 6:01 PM (in response to bossy)In my eclipse project I have them included in my build path. But they don't get copied in WEB-INF/lib authomatically as the rest of the seam jars by the builders(or whatever process that deploys the war to JBoss). That's what my question is about - how to copy them authomatically when the war file is built and deployed to JBoss.
-
3. Re: How to add additional jars to the deployed war
luxspes Jun 30, 2009 9:02 PM (in response to bossy)You configure that at Project Properties -> Java EE Module Dependencies. In that place you will see a table with all your referenced .jars, if the checkbox for each .jar is checked, the .jar is copied to WEB-INF\lib
-
4. Re: How to add additional jars to the deployed war
asookazian Jun 30, 2009 10:46 PM (in response to bossy)build.xml:
<target name="ear" description="Build the EAR"> <copy todir="${ear.dir}"> <fileset dir="${basedir}/resources"> <include name="*jpdl.xml" /> <include name="*hibernate.cfg.xml" /> <include name="jbpm.cfg.xml" /> </fileset> <fileset dir="${lib.dir}"> <include name="jboss-seam.jar" /> </fileset> <!-- refactored these libraries into deployed-jars-ear.list <fileset dir="${basedir}"> <include name="lib/jbpm*.jar" /> <include name="lib/jboss-el.jar" /> <include name="lib/drools-*.jar"/> <include name="lib/janino-*.jar"/> <include name="lib/antlr-*.jar"/> <include name="lib/mvel*.jar"/> <include name="lib/richfaces-api*.jar" /> <include name="lib/jcifs*.jar" /> <include name="lib/v20070621-common.jar" /> <include name="lib/*-cadils.jar" /> </fileset> --> </copy> <copy todir="${ear.dir}/lib"> <fileset dir="${lib.dir}"> <includesfile name="deployed-jars-ear.list" /> </fileset> </copy> <copy todir="${ear.dir}/META-INF"> <fileset dir="${basedir}/resources/META-INF"> <include name="application.xml" /> <include name="jboss-app.xml" /> </fileset> </copy> </target>
-
5. Re: How to add additional jars to the deployed war
bossy Jul 1, 2009 10:33 AM (in response to bossy)Thanks Francisco,
That's exactly what I was after. -
6. Re: How to add additional jars to the deployed war
peduardo Aug 2, 2009 8:02 AM (in response to bossy)Hello, I'm try to copy my jar file to myproject.ear\lib, and I have in my build.xml
`<copy todir="${ear.dir}/lib">
<fileset dir="${lib.dir}">
<includesfile name="deployed-jars-ear.list"/>
<include name="myjar1.jar"/>
<include name="myjar2.jar"/>
</fileset>
</copy>`
I don't know how to put my jars files into deployed-jars-ear.list.
All files are copied to myproject\lib , but myjars files not.
Can you help-me?
thanks. -
7. Re: How to add additional jars to the deployed war
bossy Aug 2, 2009 1:34 PM (in response to bossy)Hello,
this works for me:
<copy todir="${ear.dir}/lib"> <fileset dir="${lib.dir}"> <include name="*.jar"/> </fileset> </copy>
-
8. Re: How to add additional jars to the deployed war
ptbnl123 Sep 2, 2010 1:20 PM (in response to bossy)
You configure that at Project Properties -> Java EE Module Dependencies.I can't find Java EE Module Dependencies in my Eclipse Project Properties (Eclipse Galileo 3.5.2). I see Resource, Builders, CDI Settings, Hibernate Settings, Java Build Path, etc. but not Java EE Module Dependencies.
I tried changing my build.xml file from:
<copy todir="${ear.dir}/lib"> <fileset dir="${lib.dir}"> <includesfile name="deployed-jars-ear.list"/> <exclude name="icefaces-ahs.jar" if="icefaces.present"/> </fileset> </copy>
to:
<copy todir="${ear.dir}/lib"> <fileset dir="${lib.dir}"> <include name="*.jar"/> </fileset> </copy>
The copying worked fine, but then I get a deployment error.
08:01:30,944 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/Users/JT/Desktop/jboss-5.1.0.GA/server/MyProj/deploy/MyProj.ear/ state=PreReal mode=Manual requiredState=Real org.jboss.deployers.spi.DeploymentException: Error deploying MyProj.ear: failed to initialize bean container at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196) at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99) at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702) at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117) at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70) at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53) at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461) at org.jboss.Main.boot(Main.java:221) at org.jboss.Main$1.run(Main.java:556) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: failed to initialize bean container at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:253) at org.jboss.ejb3.session.SessionContainer.<init>(SessionContainer.java:119) at org.jboss.ejb3.session.SessionSpecContainer.<init>(SessionSpecContainer.java:69) at org.jboss.ejb3.stateless.StatelessContainer.<init>(StatelessContainer.java:112) at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:310) at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:203) at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718) at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669) at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651) at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614) at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491) at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182) ... 33 more Caused by: java.lang.IllegalStateException: Null beannMetaData at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315) at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235) at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138) at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48) at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:194) at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:249) ... 44 more Caused by: java.lang.NullPointerException at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268) ... 49 more 08:01:30,989 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/Users/JT/Desktop/jboss-5.1.0.GA/server/MyProj/deploy/MyProj.ear/" is in error due to the following reason(s): java.lang.NullPointerException
When I switch back to the original build.xml, everything works fine again. Any help would be appreciated. Thanks.
-
9. Re: How to add additional jars to the deployed war
cosmo Sep 3, 2010 2:01 PM (in response to bossy)Try editting deployed-jars-ear.list xor deployed-jars-war.list(textfiles) after you copy your jar(s) in ${lib.dir} (within your eclipse project).