ear

Can someone give me a working example of a build.xml for an EAR that deploys in WebSphere 6

I'm trying to convince my providers to use ANT instead of Rational Application Development so anyone can recompile, recheck, redeploy the solution anyplace, anytime, anyhow. :P I started a build.xml for a project that generates a JAR file but stopped there and I need real examples to compare notes. My good friends! I don't have anyone c...

How do you deploy a WAR that's inside an EAR as the root (/) context in Glassfish?

I have an EAR file that contains two WARs, war1.war and war2.war. My application.xml file looks like this: <?xml version="1.0" encoding="UTF-8"?> <application version="5" 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.c...

OC4J EAR file format - support jar files

I've worked with JBoss and WebLogic before, but this is the first job I've been at where we've used OC4J. We're using version 10.1.2.0.2, but using JRE 1.4.2. I'm creating an EAR file, complete with one WAR file and one EJB file. Instead of entity beans, we're using Spring/Hibernate to access the db, so the EJBs are session beans. The qu...

How do you build an EAR with policy files included using WLS Ant Tasks?

I've been working with JAX-WS with Weblogic Server, using their Ant tasks to build EAR files that can be deployed on the server. I've gotten basic SOAP calls to work with JAX-WS, but now I'm trying to add some message-level security via WS-Security. According to the documentation, there are two ways of adding security policies to web s...

JBoss5: Cannot deploy due to java.util.zip.ZipException: error in opening zip file

I have a web client and a EJB project, which I created with Eclipse 3.4. When I want to deploy it on Jboss 5.0.1, I receive the error below. I searched a lot but I wasn't able to find a solution to this. 18:21:21,899 INFO [ServerImpl] Starting JBoss (Microcontainer)... 18:21:21,900 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1....

How to configure multiple log4j for different wars in a single EAR?

I have a EAR with structures like: APP.ear - APP1.war - WEB-INF/classes/log4j.properties - APP2.war - WEB-INF/classes/log4j.properties - app1-ejb.jar - app2-ejb.jar - log4j.jar - spring.jar - commons-lang.jar (...and other jar) I want each WAR to have their own application log. But it seems the above configuration does not wo...

How to make maven place all jars common to wars inside the same EAR to EAR root?

We have a solution with numerous wars. Wars are similar in the sense they all use hibernate and spring. This means that we have a number of same jars inside each war. This is becoming a problem, because the size of the ear is starting to grow out of proportion. I would like to use Maven to calculate dependencies and to place all jars co...

Scripting the Websphere 7 RAD

We need to prepare part of our EAR for deployment, we usually do this by loading it into the RAD, right clicking on the EJB and selected "Prepare for deployment" option. Then we export the EAR. Is there a scripting interface to the IBM RAD 7 application or running the prepare from the command line so we don't have to manually go through...

JBoss 4.2.3 EAR and Apache 2.2 virtual hosts with jk_mod serving blank white page

I have an EAR file I am trying to deploy alongside various WAR deployments on JBoss 4.2.3 The individual standalone WAR deployments are all working fine and are just a copy of the same application that is contained inside the EAR but the EAR deployment and it's included WAR(s) does not work correctly. I am receiving a blank white page ...

How can I store JEE configuration parameters outside of an EAR or WAR?

I want to store configuration for a web project outside of the web project (ear/war file). The application shouldn't know in which container it's running (WebSphere/JBoss etc.). What is the best way to handle this? Is JNDI a clean way? If JNDI can solve my problems, how should I configure it? (Custom Objects?) In my case are there o...

MyEclipse and making an EAR file

I made an enterprise application in MyEclipse, and it made three projects. The application name is Foo, and MyEclipse made these three projects: Foo, FooWeb, and FooEJB. I am able to deploy Foo in MyEclipse's server (which I set up as Glassfish), and when I expand the application in the server view in MyEclipse, I see the web and EJB mod...

How to filter deployed code when exporting EAR from eclipse?

I have a basic web application (dynamic web project in eclipse) with an associated EAR project. I am trying to make sure that my junit test code stays out of the deployment EAR file. In my web project I have a source folder called "src" and one called "test". I need to keep the .class files from the "test" source folder OUT of the EAR w...

Maven EAR module and EJB dependencies tests

We are building our EAR & EJB projects with maven. It will build all the EJB projects and then they are used as the dependency for EAR, so they are packed into the EAR file eventually. The problem is that each EJB project has junit tests that check the EJB. For now these tests are not very useful because they try to connect to applicati...

How to get current EAR location programmatically with JBoss

Hi there! Does anyone know how to get programmatically the absolute path in the filesystem for an EAR deployed in JBoss, from Java code within that same EAR? I need this because I want to copy some files that are inside the EAR to another part of the filesystem, on deploy-time. Thank you everyone! ...

How do I create an EAR file with an ant build including certain files?

I'm using eclipse to build an ear file using ant. I'm using oc4j, and I want to make sure that orion-application.xml is included in the build. What I'm currently using but does not work is: <target name="ear" depends=""> <echo>Building the ear file</echo> <copy todir="${build.dir}/META-INF"> <fileset dir="${conf.dir}"...

When is it appropriate to use an EAR and when should your apps be in WARs?

We have many Spring web applications to make on a WebLogic server and are curious about when WARs should go in an EAR and when they should just exist as WARs. Occassionally, the WARs will need to access common logic JARs, but I don't see why these would need to go into an EAR when they could just be packaged into the WARs. From what I u...

J2EE: How to package 3rd party JARs into an EJB jar?

I have an old J2EE application (J2EE 1.3), which packages into an EAR, and in the EAR, there are WARs and EJB JARs. Now one of the EJB JARs needs to refer to some 3rd party library JARs, so what's the best place to package those JARs and how? ...

Order of JAR loading inside EAR's APP-INF/lib

Will adding a MANIFEST.MF file with Class-Path attribute to META-INF directory inside EAR influence the order of loading of JARs located in APP-INF/lib under WebLogic 8.1? ...

ant build and deploy question

I have a question about something I encountered today at work. I have two projects that are built with ant build script. Lets call them projectA and projectB. ProjectA builds projectA.jar, and projectB builds projectB.war, and projectB.ear. ProjectB.war includes projectA.jar in the web-inf lib directory. In projectB there is ...

Huge EAR deployment

Hello all, I'm trying to figure out how to deploy a huge (40-50 MB) EAR file to the server through a rather slow VPN connection. The EAR contains EJB and WAR projects created in Glassfish, and 90% of the file size is from external dependency libraries used. Has anyone came up with a strategy for elegant deployment to production system...