Marcus, The error seems to indicate a missing jar that the WebSphere J2EE jar depends on. You can find the right WebSphere jar, update your j2ee.pom and deploy the missing jar with a dummy pom. I have found that to be a frustrating way to do it.
If you are not using WebSphere specific features, just use a plain j2ee.jar. I think I got mine by downloading Sun's J2EE SDK, installing it, using MVN to put some jars into the repo and then deinstalling all the extraneous Sun stuff. I have heard that you might be able to use one from somewhere in the Maven repository. Perhaps from Glassfish or some similar open source project. The thing is that all the true J2EE classes are defined in the J2EE spec and have to be present in any J2EE implementation. Your code should only reference true J2EE classes (unless you are doing WebSphere specific things) so your code can be deployed on any application container. Of course, IBM encourages you to use as many non-standard J2EE features as possible so they can be assured of having you for a customer for as long as possible. Sometimes its hard to do what you need without them. Sometimes its just hard to figure out how to do what you need without them because the standard stuff isn't as well documented. (For example, I decided in one of my apps to use WebSphere to generate the web service server stuff and use its own servlet front end and just get it tied to my own session EJBs. That uses WebSphere specific stuff related to web services so I had to put webservice.jar from WebSphere in my repo and a few of its dependencies.) Part of what makes this work is that j2ee.jar and similar jars should always be <scope>provided</scope> for a J2EE application. You don't want a copy of WebSphere's j2ee.jar inside your generated ear file, anyway. That means all the j2ee.jar has to do is allow you to compile. BTW, make sure to use a j2ee.jar that matches the right version of j2ee for WebSphere 6.0. i used 1.4 as the j2ee version in my pom for my WAS 6.0.1application. -- Lee On Jan 20, 2008 4:59 PM, Siarhei Dudzin <[EMAIL PROTECTED]> wrote: > Try to setup a remote repository like Artifactory. We use one and have not > problems so far... > > Regards, > Siarhei > > On 1/16/08, Marcus Müller <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > I'm currently trying to use Maven2 for creating an EAR file which > > contains among some utitlity-JARs an EJB-project using EJB 2.1 and > > containing one message driven bean. > > > > I have problems there compiling the project as the EJB-implementation > > should be used from a WebSphere 6.0 server. So what I did is to put the > > j2ee.jar from WebSphere into my local Maven2 repository. But when I > > compile with like "mvn install" I get the following error messages: > > > > Downloading: http://repo1.maven.org/maven2/websphere/j2ee/1/j2ee-1.pom > > [WARNING] Unable to get resource from repository central > > (http://repo1.maven.org/maven2) > > [INFO] [compiler:compile] > > [INFO] Compiling 1 source file to D:\projects\ProjectEJB\target\classes > > [INFO] > > > > > ---------------------------------------------------------------------------- > > [ERROR] BUILD FAILURE > > [INFO] > > > > > ---------------------------------------------------------------------------- > > [INFO] Compilation failure > > MDBBean.java:[143,44] cannot resolve symbol > > symbol : method createConnection (java.lang.String,java.lang.String) > > location: interface javax.jms.ConnectionFactory > > MDBBean.java:[146,49] cannot resolve symbol > > symbol : method createSession (boolean,int) > > location: interface javax.jms.Connection > > MDBBean.java:[149,61] cannot resolve symbol > > symbol : method createProducer (javax.jms.Destination) > > location: interface javax.jms.Session > > MDBBean.java:[161,32] cannot resolve symbol > > symbol : method send (javax.jms.MapMessage) > > location: interface javax.jms.MessageProducer > > > > My repository contains the file websphere/j2ee/1/j2ee-1.jar which I > > copied from the WebSphere/lib directory and which indeed does contain > > the classes Maven2 is moaning about. > > > > The dependency config is: > > <dependencies> > > <dependency> > > <groupId>websphere</groupId> > > <artifactId>j2ee</artifactId> > > <version>1</version> > > </dependency> > > <dependency> > > <groupId>websphere</groupId> > > <artifactId>mail</artifactId> > > <version>impl</version> > > </dependency> > > <dependency> > > <groupId>websphere</groupId> > > <artifactId>activation</artifactId> > > <version>impl</version> > > </dependency> > > <dependency> > > > > > > I copied the activation-impl.jar and mail-impl.jar into my local repo > > too, because the MANIFEST.MF of j2ee.jar contains them. Still it doesn't > > compile. > > > > Any help at this point is very appreciated. > > > > Is it possible to include the whole WebSphere runtime or would I need to > > import all the jar's to my local repo (like >100 :( )? > > > > Kind regards > > Marcus > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com
