Can't deploy war to Weblogic--server is unable to resolve classpath ejb-refs that aren't mine

I have a Maven application .war that I am using the Weblogic Maven Plugin for (great plugin, btw), and I am deploying it to a Weblogic server (of course). Unfortunately, I keep getting a deploy failure message:

weblogic.deployment.EnvironmentException: [J2EE:160200]Error resolving ejb-ref 'com.vendor.thing.UsingHelloWorldEJB/h' from module 'myapp.war' of application 'myapp'. The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the 'com.vendor.thing.HelloWorld' interface. Please link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.


This HelloWorld EJB isn't part of my application, and the only place that I know this class exists for Weblogic to even reference it is in a classpath jar that I use within the .war. This is a vendor .jar, so it makes sense that they might have some classes that I don't use or know about. In this case, it appears they bundled an EJB class into the .jar that I can't remove.


I'm not a Weblogic expert, so this behavior is odd to me. Is this standard servlet behavior to try to link and then fail a .war deploy based on some arbitrary class EJB's that aren't directly a part of my .war (other than as an API .jar in the classpath)?

How to fix?

How can I get my .war deployed to the Weblogic server? I don't know anything about this ejb-ref, nor does it seem to affect anything in how my app works when running locally with Jetty. Is there a way to tell Weblogic to ignore all classes in this .jar or package scope?


Per mhaller's answer, I did some more investigation and found that:

  • weblogic-maven-plugin uses the .war generated from the maven-war-plugin, so it doesn't interfere with the generation of the war.
  • There are no additional deployment descriptors (no weblogic.xml or similar) other than my web.xml.
  • manually deploying the .war behaves no differently than using the maven plugin (so I think the weblogic-maven-plugin isn't causing the fault)

My web.xml

<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="" xmlns:xsi="" xsi:schemaLocation=""> <servlet> <servlet-name>Jersey Web Application</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> <init-param> <param-name></param-name> <param-value></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <!-- All web services will be under http://localhost:{port}/{context}/ws/ --> <servlet-name>Jersey Web Application</servlet-name> <url-pattern>/ws/*</url-pattern> </servlet-mapping> </web-app>

-------------Problems Reply------------

  • Check if the final .war file contains additional deployment descriptors, which you do not need. I suspect the maven-weblogic-plugin adds custom deployment descriptors.
  • Use maven-war-plugin instead.
Category:maven Views:3 Time:2010-12-28

Related post

Copyright (C), All Rights Reserved.

processed in 0.140 (s). 11 q(s)