weblogic 12c deployment failure

19,131

Solution 1

Thank you so much everybody, I've finally found the solution, it is to simply delete/remove the META-INF/MANIFEST.MF file from the .war file. That way the EJBs aren't double referenced.

Solution 2

1.Add below dependency in Ear Pom.xml

  <dependency>
      <groupId>com.example</groupId>
      <artifactId>ejbModel</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb</type>
  </dependency> 

2.In Ear pom.xml in modules add ejb module

  <modules>
      <ejbModule>
        <groupId>com.example</groupId>
        <artifactId>ejbModel</artifactId>
        <bundleFileName>ejbModel-1.0-SNAPSHOT.jar</bundleFileName>
      </ejbModule>
      .......
   </modules>

3.Change scope of ejbmodel dependency to provided in application pom.xml

   <dependency>
     <groupId>com.example</groupId>
     <artifactId>ejbModel</artifactId>
     <version>1.0-SNAPSHOT</version>
     <type>jar</type>
     <scope>provided</scope>
   </dependency>

4.add persistence.xml of ejbmodel application to resource folder

Share:
19,131
michael_demonio
Author by

michael_demonio

java, oracle, bpm, git, azure, maven, springboot

Updated on June 17, 2022

Comments

  • michael_demonio
    michael_demonio almost 2 years

    I'm migrating from Weblogic 11g to 12c, during the deployment process it fails and shows the following error:

    Caused by: weblogic.application.naming.ReferenceResolutionException: [J2EE:160199]Error resolving ejb-ref "ejb/BizRuleFacade" from module "BizAgi-ejb.jar" of application "BizAgi-ear-Weblogic". 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 multiple EJBs in the application were found to implement the "BizAgi.bpm.rules.entities.BizRuleFacade" interface, including BizAgi-war.war/BizRuleFacadeBean, BizAgi-ejb.jar/BizRuleFacadeBean. Specify a qualified ejb-link for this ejb-ref to indicate which EJB is the target of this ejb-ref.

    My web.xml file looks like this:

    <ejb-local-ref> <ejb-ref-name>ejb/BAScopeLogFacade</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>BizAgi.PAL.historylog.entities.BAScopeLogFacade</local> <ejb-link>BizAgi-ejb.jar#BAScopeLogFacadeBean</ejb-link> </ejb-local-ref>

    The BizAgi-ejb.jar is a module inside the ear (BizAgi-ear-Weblogic.ear).

    How can i properly deploy my application?

    • Robert Panzer
      Robert Panzer almost 10 years
      It seems that WebLogic complains about an ejb-ref in the EJB-jar.xml of the EJB module, not the one from the web.xml.
    • Display Name is missing
      Display Name is missing almost 10 years
      Can you share your whole <session> tag? There may be an another issue. This may help as well coderanch.com/t/451012/EJB-JEE/java/…
  • michael_demonio
    michael_demonio almost 10 years
    I found this problem only happens in weblogic 12c.
  • Pedro García Medina
    Pedro García Medina almost 7 years
    Hi. I'm experiencing the same problem, but unfortunately your solution does not work for me because my war file doesn't have a MANIFEST.MF file. ¿Have you found something new about this problem?
  • michael_demonio
    michael_demonio almost 7 years
    @PedroGarcíaMedina In my case it was due to a double referenced library because of the two manifest files, one in the .war file and the other in the .ear file containing the war file.