66736

Weblogic12c deployment EJB ambiguous error

Question:

I'm trying to deploy the application in Weblogic 12c. During deployment, I'm getting the below error

weblogic.management.DeploymentException: weblogic.application.naming.ReferenceResolutionException: [J2EE:160092]Error: The ejb-link "BeanClass" declared in the ejb-ref or ejb-local-ref "...BeanClassService/beanClass" in the module "....EJB.jar" is ambiguous. Qualify this ejb-link to remove the ambiguity.

Code:

<em>IBeanClass.java</em>

@Local public interface IBeanClass {}

<em>BeanClass.java</em>

@Stateless(name = "BeanClass") @PermitAll public class BeanClass implements IBeanClass { ...... }

<em>IBeanClassService.java</em>

@Local public interface IBeanClassService { ......... }

<em>BeanClassService.java</em>

@Stateless(name = "BeanClassService") public class BeanClassService implements IBeanClassService { @EJB(beanName = "BeanClass") private IBeanClassService beanclass; ... }

I'm making a call to the EJB from the web application project:

<em>ClientClass.java</em>

public class ClientClass{ .... @EJB(beanName = "BeanClassService") private IBeanClassService beanclass; ..... }

The code was working fine in weblogic10 but now in weblogic 12 exception occurs. Please help in resolving this issue.

Answer1:

BeanClass is not an IBeanClassService, so even by basic java convention, you cannot assign a IBeanClass object to that variable there, let alone inject an EJB into that spot. What you should have is

@EJB(beanName = "BeanClass") private IBeanClass beanclass;

Answer2:

i have the same problem the solution was:

<dependency> <groupId>bo.sigep.modulo</groupId> <artifactId>moduloSigep-ejb</artifactId> <version>1.0-SNAPSHOT</version> <scope>provided</scope> </dependency>

in the war pom maven the key is provided regards

Recommend

  • UIButton in objective c [duplicate]
  • error C2234: arrays of references are illegal [duplicate]
  • I cannot access Position of the cursor (move mouse programatically)
  • method name qualification when using a companion object
  • Deploy iOS application for one company employees only
  • Does process termination automatically free all memory used? Any reason to do it explicitly?
  • how to highlight menu item on selection?
  • Adding Reference Line for Weighted Average in Tableau
  • Are Java Spring services evil as they are singleton? [closed]
  • EWS SearchFilter.ContainsSubstring to filter on Sender Email Address
  • Function Overloading for the standard library functions in C++
  • Sending Text Message using JMS on glassfish server
  • ClassCastException when using embedded glassfish for unit tests
  • Is there a way to stop/re-start ejb 3.1 automatic timer during runtime?
  • About multiple inheritance and ambiguity
  • Get indices of array where two conditions (on different arrays) are true
  • Understanding how to construct GHC.Generics Rep's and convert back to values
  • Pandas column creation
  • Selecting TOP 4 records from multiple SQL Server tables. Using vb.net
  • Pass pointer array to function
  • Why is it ambiguous to call overloaded ambig(long) and ambig(unsigned long) with an integer literal?
  • Search function not doing anything
  • integrate POCO library in android ndk
  • Prolog Ambiguous Output
  • Embedded Glassfish JPA Datasource connection fail
  • “mvn clean generate-source” could not resolve dependencies
  • In Java, how can I construct a File from a resource?
  • Android Studio Can't Find tools.jar
  • With Hadoop, can I create a tasktracker on a machine that isn't running a datanode?
  • Regex thinks I'm nesting, but I'm not
  • What is the “return” in scheme?
  • Cross-Platform Protobuf Serialization
  • How to format a variable of double type
  • How to disable jQuery.jplayer autoplay?
  • Acquiring multiple attributes from .xml file in c#
  • coudnt use logback because of log4j
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • How can I remove ASP.NET Designer.cs files?
  • JaxB to read class hierarchy
  • java string with new operator and a literal