Problem accessing local interface methods

Hi all,
I have problems accessing local interfaces of entity beans in OC4J.
My application consists of a session bean as a facade for two local entity beans.
Everytime I try to execute methods on the local interfaces for the entity beans, I receive an exception: "java.lang.InternalError: Illegal removing from cache".
When debugging the application everything seems to be fine until the method calls on the local interfaces (lookups, create methods etc OK). I can even see that the local interface method is acually executed when performing a System.out...! But the method doesn't return to the client (session bean). Instead I revieve the exception above.
I found a similar problem on the orion mail archive (http://www.mail-archive.com/[email protected]/msg17754.html). But there they seem to have problem with removing beans. For me, removing beans works fine too.
Any suggestions would be appreciated.
/johan
[email protected]

Hi all,
I have problems accessing local interfaces of entity beans in OC4J.
My application consists of a session bean as a facade for two local entity beans.
Everytime I try to execute methods on the local interfaces for the entity beans, I receive an exception: "java.lang.InternalError: Illegal removing from cache".
When debugging the application everything seems to be fine until the method calls on the local interfaces (lookups, create methods etc OK). I can even see that the local interface method is acually executed when performing a System.out...! But the method doesn't return to the client (session bean). Instead I revieve the exception above.
I found a similar problem on the orion mail archive (http://www.mail-archive.com/[email protected]/msg17754.html). But there they seem to have problem with removing beans. For me, removing beans works fine too.
Any suggestions would be appreciated.
/johan
[email protected]

Similar Messages

  • Please Help!!! Problems access other classes methods

    I am having a problem accessing another classes methods varibles. I have tried a number of ways but with no success. Here is my problem:
    I have the main(), from there it's calls the class GetVar(), GetVar stores info in Class HousingForVar(), and finially, I have a class TryinToTalkToHousing() that I use to access HousingForVar()'s methods. I know I can use the keyword new but if I do that then it erases over the data I put in. Please can anyone help, this has been driving me nutz all day. Thank you in advance.
    Roman03
    ***EACH CLASS IS A DIFFERENT FILE****
    public class TestMain
         public static void main( String args[] )
              GetVar getVarible = new GetVar();
              getVarible.heroF();
    import java.util.Scanner;
    public class GetVar
         public void heroF()
              String someEntered;
              Scanner input = new Scanner( System.in);
              System.out.println("Enter a string: ");
              someEntered = input.next();
              HousingForVar houseForData = new HousingForVar(someEntered);
              System.out.printf("Retieved from Class GetVar, you entered: %s\n", houseForData.getCollectVar() );
    import java.util.Scanner;
    public class HousingForVar
         private String getData;
         public HousingForVar(String enterInfo)
              getData = enterInfo;
         public void setGetVar(String enterInfo)
              getData = enterInfo;
         public String getCollectVar()
              return getData;
    import java.util.Scanner;
    public class TryinToTalkToHousing
         public void someMeth()
              String getInfoFromHousing;          
              System.out.printf("Started out at TryinToTalkToHousing Class\n Retieved from Class GetVar from %s\n",
              houseForData.getCollectVar() );
    \* I know this doesn't work, but if I make a new object of the class HousingForVar it's going to write over my input, so what do I do? I am still learning, Please help*\

    I don't use 1.5, so you'll have to convert it back, but see if you can follow the flow of this
    import java.io.*;
    class TestMain
      GetVar getVarible;
      public TestMain()
        getVarible = new GetVar();
        getVarible.heroF();
        System.out.println("******");
        new TryinToTalkToHousing(this).someMeth();
      public static void main(String[] args){new TestMain();}
    class GetVar
      HousingForVar houseForData;
      public void heroF()
        try
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          System.out.print("Enter a string: ");
          String someEntered = br.readLine();
          houseForData = new HousingForVar(someEntered);
          System.out.println("Retieved from Class GetVar, you entered: "+houseForData.getCollectVar()+"\n");
        catch(Exception e){e.printStackTrace();}
    class HousingForVar
      private String getData;
      public HousingForVar(String enterInfo)
        getData = enterInfo;
      public void setGetVar(String enterInfo)
        getData = enterInfo;
      public String getCollectVar()
        return getData;
    class TryinToTalkToHousing
      TestMain parent;
      public TryinToTalkToHousing(TestMain t){parent = t;}
      public void someMeth()
        System.out.println("Started out at TryinToTalkToHousing Class\n"+
        "Retieved from Class GetVar, you entered: "+parent.getVarible.houseForData.getCollectVar()+"\n");
    }

  • Problem with Local Interfaces (WSAD 5)

    I built an Entity Bean with Local Interface and a Remote Interface (apperently they both have the same JNDI name in WSAD)
    and when I look up for the name from other Session Bean (same EJB group) and I try to cast it to the local interface there is a classCastException.............
    HELP ME

    Nidhi
    I had the same problems as you that went away. If you have both remote and local interfaces defined, and your remote inerface can be accessed via JNDI lookup using (say) "ejb/sessionbean/stateless/HelloHome", then you can access the local intercafe using "local:ejb/ejb/sessionbean/stateless/HelloHome".
    The URL http://localhost:9080/UTC/initialize?port=2809 is very useful to browse the JNDI tree. Just expand "Local EJB beans" and position your mouse over the item of interest. The JNDI lookup name will echo in the bottom (solid) frame of the browser. The only problem is that the jndilookup name will appear (mistakenly) as local:/ejb/ejb/stateless......, just get rid of the first forward-slash to make it look like local:ejb/ejb/stateless....
    Hope this helps
    Somnath

  • Problem with local interface

    Hi all,
    I have a problem with the local interface,
    after I change the Home and Local interface I get a message when compiling saying that the bean has to implement the inherited abstract method javax.ejb.EJBLocalObject.isIdentical (EJBLOcalObject) and the mothd isPrimaryKey()...why is that, do I need to implement these methods?
    Thanks,
    A.

    solved, wrong code

  • Problems Accessing Local Files

    Hi,
    I'm sure this has been discussed before, but I'm havign problems accessing a file on the target machine's local filesystem. I've signed all my jars and added the all-permissions tag to the jnlp file. However, my code:
    ClassLoader cl = getClass().getClassLoader();
    InputStream is = cl.getResourceAsStream("c:/resources/testsuite.xml");
    fails to find the file "testsuite.xml".
    Is this a classpath issue? I've tried to add c:/resources to the class path but with no luck.
    any help would be much appreciated
    Thanks

    Try "file://c:/resources/testsuite.xml" instead. I
    believe you are suppose to be passing in a valid URL
    and what you passed in wasn't.That's wrong. Resource name should be just a path. It could be a full path started from "/" or just a relative path from given class (here better to use this.class.getResourceAsStream() method).
    Better yet, since you are giving full security access
    to the user's local machine you don't really need to
    rely on the class loader at all. It's just a normal
    file, so you could create your File object and read it
    in the way you do normally. I would suggest to do not rely on File object at all because it can only be dealing with local file system and thats can't be changed in future.

  • Problem with local interfaces using oc4j 9.0.4 standalone

    I am not able to get oc4j 9.0.4 standalone to use local interfaces. I belive that my configurations and code are correct. I am receiving javax.naming.NameNotFoundException
    whenever I attempt to lookup a local ejb
    lookup code
    Context context = new InitialContext();
    ApplicationBMPLocalHome appBMPLocalHome = (ApplicationBMPLocalHome)context.lookup("java:comp/env/ejb/ApplicationBMPLocalHome");
    part of ejb-jar.xml
    <ejb-local-ref>
    <ejb-ref-name>ejb/ApplicationBMPLocal</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>JRun2.ApplicationBMPLocalHome</local-home>
    <local>JRun2.ApplicationBMPLocal</local>
    <ejb-link>ApplicationBMP</ejb-link>
    </ejb-local-ref>
    I know that local interfaces did not work in 9.0.3 oc4j, bu t I assume that this problem was fixed in 9.0.4. Correct me if that is not the case.

    In your code you look up ApplicationBMPLocalHome, but your <ejb-ref-name> is ApplicationBMPLocal.
    Try too change your lookup to
    (ApplicationBMPLocalHome)context.lookup("java:comp/env/ejb/ApplicationBMPLocal");
    /Fredrik

  • Accessing Local Interface EJB from Web Container Oracle App Server 9.0.4

    Hi,
    I am developing a struts based small application, which calls a EJB which uses Local Interface from Struts ActionClass.
    I am getting NameNotFoundException. The exact exception is s mentioned below.
    05/03/29 16:15:49 javax.naming.NameNotFoundException: LoginRSL not found
    The deployment descriptors are as mentioned below.
    =============
    ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>LoginRSL</display-name>
    <ejb-name>LoginRSL</ejb-name>
    <local-home>loginApp.model.LoginRHome</local-home>
    <local>loginApp.model.LoginL</local>
    <ejb-class>loginApp.model.LoginRSL</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <relationships/>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>LoginRSL</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment name="LoginRSL"/>
    </enterprise-beans>
    </orion-ejb-jar>
    I also tried adding following code to web.xml
    web.xml
    <ejb-local-ref>
    <ejb-ref-name>LoginRSL</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>LoginRHome</local-home>
    <local>LoginL</local>
    <ejb-link>LoginRSL</ejb-link>
    </ejb-local-ref>
    It is quite evident that it is not able to lookup the JNDI name.
    Can someone throw light on this? If someone has working sample of this, can you mail it to [email protected]?

    Nipun,
    WebLogic and OC4J are not the same thing. That's like saying Oracle and SQL Server are the same thing -- or C++ and Java are the same thing.
    I recall a posting to a forum (don't remember if it was this one), where the poster was complaining that some feature of the application server he had previously used, was not supported by OC4J. Turned out that the feature he was referring to, contradicted the J2EE specification -- which is why it wasn't available in OC4J. In other words, he didn't like the fact that OC4J was more compliant with the J2EE specification than his "other" application server. Go figure!
    So, if you haven't already done so, I suggest you verify that this feature of WebLogic is something that complies with the J2EE specifications -- before expecting OC4J to support the same feature.
    And if it's not clear, from the specifications, then every vendor is free to implement this feature (or not).
    So if it turns out that WebLogic is a more appropriate application server for you -- then why not just stick with it (and forget the others)?
    Good Luck,
    Avi.

  • Problems accessing my "equals" method

    Hi every body,
    Can any one help me on this? I think is not a big problem but I'm new with this language.
    I have a class (with the object constructor)
    class TestClass{
    String data;
    public boolean equals(Object o) {
    if ((o != null) && (o instanceof TestClass)){
    System.out.println("ifffff");
    return data.equals(((TestClass)o).data);
    else{
    System.out.println("elseeeee");
    return false;
    and I have the class containing the main method and a method to remove an object from a linked list. The problem is that the program seems to use the "equals method" from Object and no the one I redefine in my TestClass method.
    Here is the code of my remove method. Please help (I'm sorry about the variables name I use but I'm writing the code in french)
    Object retirer(Object element){ 
    Noeud unNoeud;
    Noeud prec = null;
    Noeud tmp;
    if(estVide()){
    System.out.println("Op�ration r�fus�e. La liste est vide");
    else {
    for (unNoeud = premierNoeud; unNoeud != null; unNoeud = unNoeud.obtenirSuivant()){         
    if (!element.equals(unNoeud.obtenirElement())){
    // ------Even if they are equals, execution keeps entering here
    prec = unNoeud;
    else {
    if (unNoeud == premierNoeud)
    return premierNoeud.obtenirSuivant();
    else{
    tmp = unNoeud.obtenirSuivant();
    prec.majSuivant(tmp);
    return null;
    }

    sigh
    Crossposted:
    http://forum.java.sun.com/thread.jspa?threadID=624690

  • Problems accessing my compareTo method

    Could you any one help me on this please.
    I have 3 classes :
    1- "Test class" that creates the object (works fine) and redefines compareTo method
    2. "XListeChainee" that manage my linked list :
    - insert a new node (problems) in order
    3. "Test" which is the classe containing the main method. here is the code
    class Test {
    public static void test(){
    XListeChainee liste = new XListeChainee();
    liste.insererOrdonne(new TestClass("A"));
    liste.insererOrdonne(new TestClass("B"));
    liste.insererOrdonne(new TestClass("C"));
    liste.insererOrdonne(new TestClass("E"));
    liste.insererOrdonne(new TestClass("D"));
    // ------- here is the main method
    public static void main(String[] args){//main
    Test obj = new Test();/
    obj.test();
    }//end main
    here is the class TestClass with the compareTo method
    class TestClass implements Comparable{
    String data;
    TestClass(String data)
    this.data = data;
    }//end constructor
    public String toString(){
    return (data);
    public int compareTo(Object o) {
    TestClass n = (TestClass)o;
    int compData = data.compareTo(n.data);
    return compData ;
    }//end TestClass
    and this is my XListeChainee class (some of the code)
    public class XListeChainee
    private Noeud premierNoeud; //reference to first node
    private Noeud dernierNoeud; //reference to last node
    boolean estVide(){
    return premierNoeud == null;
    // ------ Insert an object: in order
    void insererOrdonne(Object element) {        
    // Creates a new node with the new element
    Noeud unNoeud;
    unNoeud = new Noeud();
    unNoeud.majElement(element) ;
    if ( premierNoeud == null ) { // if first node = null
    premierNoeud = unNoeud; // new node become first
    //------------------------- problem------------------------------
    //---- Compare the element in the first node with the element : Doesn't work
    // ---- System says that cannot resolve symbol - compareTo
    // This line says: if (firstNode.element.compareTo(element)>=0)
    else if ( premierNoeud.obtenirElement().compareTo(element) >= 0 ) {
    // Le nouvel element est < que le 1er element, alors il est inser� a la tete
    unNoeud.majSuivant(premierNoeud);
    premierNoeud = unNoeud;
    else {
    // Chercher la position du nouvel element dans la liste
    Noeud parcourir; // un noeud pour parcourir la liste
    Noeud prec; //un noeud toujour avant celui qui parcours la liste
    parcourir = premierNoeud.obtenirSuivant();
    prec = premierNoeud;
    while (parcourir != null && parcourir.obtenirElement().compareTo(element) < 0) {
    previous = parcourir;
    parcours = parcourir.obtenirSuivant();
    unNoeud.majSuivant(parcourir); // Insert newNode after previous.
    prec.majSuivant(unNoeud);
    Could you help me doing this please? I' sorry about some variable and method's names but I'm writing a program in french

    [snip]
    public int compareTo(Object o) {
    TestClass n = (TestClass)o;
    int compData = data.compareTo(n.data);
    return compData ;
    }//end TestClass[snip]
    : if (firstNode.element.compareTo(element)>=0)
    else if (
    e if (
    premierNoeud.obtenirElement().compareTo(element) >=0
    ) {What's up with the >=0 business in your method call?
    Based on what your method expects (an Object) I
    I don't know what you're trying to accomplish there?
    Also, please use code tags.Nevermind, after staring at it I can see the closing paranthesis now.

  • Problems accessing variables and methods, not sure if this is even possible

    Hi
    Ive been having problems with a noughts and crosses game. Perhaps i structured it wrong, but i would welcome some advice on how to overcome this problem. I thought i had pretty much completed the game.
    What i have so far is a class called Main and it has a gridlayout. i have 9 JPanels called "Choice" on this main frame, Choice contains a button which is either noughts or crosses depending on whose turn it is. Once pressed the button on the JPanel Choice dissappears and is replaced with a image.
    Now although this works fine, the problem im having is making all the other Buttons on the Choice Jpanels on the Frame Main to turn to the opposite to what they are. The getters and setters are all there, but i just cant seem to figure out how to send information from the buttons upwards to the frame and then backwards to each of the individual buttons.
    It would be easier if i just put it all into one class, but i didnt want it to be messy, is there anyway to send information in this manor?
    I tried to add all my code but it said it exceeded the message length. But let me know if you would like it, perhaps i can send it in bits....The only two classes missing are Noughts.java and Cross.java, they are just classes that create images from urls. Hope that helps
    package NoughtsAndCrossesButtons;
    import javax.swing.*;
    import java.awt.*;
    public class Cross extends JPanel{
        private static Image image;
        public Cross(){
            try{
                image = javax.imageio.ImageIO.read(new java.net.URL("http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Knotwork-cross-multicolored.svg/600px-Knotwork-cross-multicolored.svg.png"));
            }catch(Exception e){
        protected void paintComponent(Graphics g)
        super.paintComponent(g);
        if (image != null)
          g.drawImage(image, 0,0,this.getWidth(),this.getHeight(),this);
    package NoughtsAndCrossesButtons;
    import java.awt.event.*;
    import javax.swing.*;
    public class Choice extends JPanel implements ActionListener{
        private JButton choiceButton = new JButton("Noughts");
        private Cross cross = new Cross();
        private Noughts nought = new Noughts();
        private int x = 5;
        private int y = 10;
        private int bounds = 100;
        private String state = "n";
        public Choice(){
         this.add(choiceButton);
         choiceButton.setBounds(x,y,bounds,bounds);
         choiceButton.addActionListener(this);
         this.setLayout(null);
         //this.setSize(200,200);
         //choices.addActionListener(this);
        public void actionPerformed(ActionEvent e){
            //Object source = e.getSource();
           if(choiceButton.getText().equals("Noughts")){
               this.remove(choiceButton);
               this.add(nought);
               nought.setBounds(x,y,bounds,bounds);
               this.revalidate();
               this.repaint();
           if(choiceButton.getText().equals("Crosses")){
               this.remove(choiceButton);
               this.add(cross);
               cross.setBounds(x,y,bounds,bounds);
               this.revalidate();
               this.repaint();
        public void setState(String s){
            state = s;
            checkState();
        public String getState(){
            return state;
        public void checkState(){
            if(getState().equals("n")){
                choiceButton.setText("Noughts");
            if(getState().equals("c")){
                choiceButton.setText("Crosses");
    }Thank you
    SSkenth

    Thank you for you replys, both of which were helpful. I found out a way of getting what i as looking for by creating a counter.. called clicked
    Each time the button is pressed it adds 1 to its int value of click. (since it can only be clicked once) I then know whos turn it is, by using a modulus of the clicked value... so if its divisible by 2 its a nought otherwise its a cross or vice verse. heres the code for reference
    This code is in the JPanel for choice
    public void actionPerformed(ActionEvent e){
          // Object source = e.getSource();
           if(choiceButton.getText().equals("Noughts")){
               clicked +=1;
               this.remove(choiceButton);
               this.add(nought);
               nought.setBounds(x,y,bounds,bounds);
               state = "c";
               this.revalidate();
               this.repaint();
              // System.out.println(source);
           if(choiceButton.getText().equals("Crosses")){
               clicked +=1;
               this.remove(choiceButton);
               this.add(cross);
               cross.setBounds(x,y,bounds,bounds);
               state = "n";
               this.revalidate();
               this.repaint();
        } This is in the Main class, so im constantly checking for changes
    public void run(){
            while(true){
                int clicks = whosTurn()+1;
                try{
                    if(clicks%2==0){
                        setStateNought();
                    }else{
                        setStateCross();
                    this.sleep(100);
                 }catch(InterruptedException e){
                    System.err.print("error in main thread");
         public int whosTurn(){
            return choice.clicked()+choice2.clicked()
                    +choice3.clicked()+choice4.clicked()+choice5.clicked()
                        +choice6.clicked()+choice7.clicked()+choice8.clicked()+choice9.clicked();
         public void setStateNought(){
             choice.setState("n");
             choice2.setState("n");
             choice3.setState("n");
             choice4.setState("n");
             choice5.setState("n");
             choice6.setState("n");
             choice7.setState("n");
             choice8.setState("n");
             choice9.setState("n");
         public void setStateCross(){
             choice.setState("c");
             choice2.setState("c");
             choice3.setState("c");
             choice4.setState("c");
             choice5.setState("c");
             choice6.setState("c");
             choice7.setState("c");
             choice8.setState("c");
             choice9.setState("c");
         }As im sure you guessed im fairly new at this, well, i seem to do ok with coding its just the GUI i struggle with. Please feel free to criticise(positive that it)
    Thank you again
    SSKenth

  • Questions about EJB local interfaces - 9iAS 9.03

    Intro: I am new in developing EJB, and I am trying to build an example to verify that a stateless session bean with local interfaces is quite efficient.
    Q1: I have read that an application trying to access local interfaces of an EJB must run into the same JVM. Does it means that it should be deployed into the same OC4J instance as the servlet?
    Q2: I am using JDev 10g to build the EJB, with local and remote interfaces. Using the internal OC4J container, I can use the remote interfaces but not the internal one: an object of class "_Proxy1" is returned after the lookup (with the same name as given for the remote interface related call). Is it possible to access the local interface?
    Q3: My application architecture is already defined to split the business logic in two EJBs: one stateless session bean for volatile data and one entity bean for a global user list cache. Where can I find a working example (with source code, please) to be deployed on 9iAS that can validate my design?
    Q4: In many places, I read that CMP entity bean are easier to develop than BMP one. Is there any special consideration I should be aware of before implementing a CMP for my global user list cache?
    Thanks a lot, Dom.

    I have just read:
    I think the problem is that local interfaces can only by
    accessed through the same container, and JSP/Servlet's
    one is different from EJB's one, regardless of you many
    application server's instances do you have... Hope this
    is the answer...Is there anyone who know if it applies too to 9iAS?
    A+, Dom

  • Weblogic 10.3.2 EJB3 Local Interface in POJO/Helper classes

    Hi,
    I have a jar file containing all EJB's in application & some Helper classes. I want to access Local interfaces of EJBs in those helper classes. Is there any way I can do it? I've gone through Maxence Button & Jay SenSharma 's blogs about accessing Local interface. but it doesn't help. May be these two guys can help me more here.. My requirement is very simple. Just to access local interface in POJO/Helper classes that are in same JAR file as EJB's. I can't get reference with @EJB class level annotation as Helper classes are called independently from MBean services.. not from any EJB or Servlert.
    Please if anyone can tell me how do I get reference of local interfaces, that would be really good.
    my environment is
    Weblogic 10.3.2
    EJB3
    Regards,
    Prasad

    Hi,
    Just check ...If you want something like mentioned in the below Link with a complete Example:
    [http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/|http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/]
    Regards
    Jay SenSharma

  • Error in accessing the create method declared in Home interface

    hi,
    I have create method in home interface which takes the following syntax:
    public ShipRemote create(ShipPK id,String name,int capacity,float tonnage) throws CreateException,RemoteException;
    In the client I create a remote object and try to call this create method, but I get a compilation error :
    it says unable to resolve the symbol with a cursor pointing the create method
    interface sampleEJB.ship.shipInfo.ShipHome ShipRemote remoteRef=(ShipRemote)homeRef.create(spk,sname,5000,100.7);
    how can i resolve this.
    I have implemented this create method in my bean

    hi i have compiled the client interfaces and the bean successfully.
    I have also imported the classes in the in the client code .
    I even deployed my jar successfully, but i have problem in accessing the create method specified .
    thank you

  • Accessing bean using its Local interface

    Hi,
    I have a problem accessing a bean using its local interface in J2EE1.3 environment on J2EE test server. I have two beans, one trying to access other, residing in two different ears. During deployment, after I select "Local" interface option in EJB-refs tag of the standard deployment tool of J2ee, it does not show me the bean-name in the "Enterprise Bean Name" combo-box. When I put the name of the actual bean in the box and try to deploy it, gives the null-pointer exception for the above tag as it does not find the corresponding ejb to be referred.
    Is it necessary to have a client bean and actual bean to be in the same ear for local interface access? The specifications says that both the beans must be in the same container that does not mean same ear, right????
    Thanks

    i am having the exact same problem now.
    did anyone solve this.(you can email [email protected])

  • Using EJB Local Interface problem

    Hi to all
    I have got a problem in using Local EJB Interface in Weblogic , please attention to my description
    I use JDeveloper as IDE
    At first I create an Application in JDeveloper that has two projects that their names are Model and ViewContorller that first one contains my EJB and another contains my JSP page respectively
    The EJB code is :
    @Stateless(name="AliEJB001Bean")
    @Remote
    @Local
    public class AliEJB001Bean implements AliEJB001, AliEJB001Local {
    public AliEJB001Bean() {
    public String Hi(){
    return "Hi000";
    And its Local Interface code is :
    @Local
    public interface AliEJB001Local {
    String Hi();
    I deploy Model project to an EJB Jar file that its name is AliEE1ejb1.jar
    and I deploy the ViewContorller project to a WAR file that its name is AliEE1WebApp.war
    Now I add this tags to web.xml
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    </ejb-local-ref>
    Then I deploy the Application to an EAR file by name AliEE1
    After those I run my JSP page witch calls the EJB in JDeveloper (through Local EJB Interface) , JDeveloper deploy my Application to the ItegratedWeblogicServer
    Ultimately the JSP can calls the EJB through Local Interface and use the Hi method and shows me the result but JDeveloper while compiles the application give me these Warnings :
    Warning: <May 15, 2011 9:02:52 AM PDT> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    Warning: There are 1 nested errors:
    Warning: weblogic.servlet.internal.dd.compliance.ComplianceException: Element "<ejb-local-ref>" with ejb-ref-name "ali/testejb" must either specify a valid ejb-link element or have a corresponding ejb-reference-descriptor element in weblogic.xml with a valid jndi-name.
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:74)
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:80)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.validate(EJBRefsComplianceChecker.java:97)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.checkEJBLocalRef(EJBRefsComplianceChecker.java:47)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.check(EJBRefsComplianceChecker.java:39)
    Warning:      at weblogic.servlet.internal.dd.compliance.ComplianceUtils.checkCompliance(ComplianceUtils.java:48)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.checkCompliance(JspcInvoker.java:145)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:198)
    Warning:      at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:376)
    Warning:      at weblogic.application.compiler.WARModule.compile(WARModule.java:245)
    Warning:      at weblogic.application.compiler.flow.SingleModuleCompileFlow.proecessModule(SingleModuleCompileFlow.java:18)
    Warning:      at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    Warning:      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    Warning:      at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    Warning:      at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:29)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:112)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:37)
    Warning:      at weblogic.application.compiler.Appc.runBody(Appc.java:198)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:158)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:115)
    Warning:      at weblogic.application.compiler.Appc.main(Appc.java:257)
    Warning:      at weblogic.appc.main(appc.java:14)
    According to the warning messages I wanna add <ejb-link> tag to the web.xml for resolving warnings I add the <ejb-link> like this:
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    <ejb-link>AliEE1ejb1.jar#AliEJB001Bean </ejb-link>
    </ejb-local-ref>
    But when JDeveloper want deploy my application again it shows me this Error
    [09:29:59 AM] Redeploying Application...
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1305476999381' for task '7'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    [09:30:00 AM] #### Deployment incomplete. ####
    [09:30:00 AM] Remote deployment failed
    Do you know how I can solve this issue ?
    thanks

    Thank you so much
    I find out the solution
    I have to define my EJB in ejb-jar.xml like this
    <enterprise-beans>
         <session>
         <ejb-name>ReplicableSFSB2</ejb-name>
         <business-local>model2.AliEJB001Local</business-local>
         <business-remote>model2.AliEJB001</business-remote>
         <ejb-class>model2.AliEJB001Bean</ejb-class>
         <session-type>Stateless</session-type>
         </session>
    </enterprise-beans>
    And then I use the EJB name witch I defined in <ejb-name> tag in <ejb-link> tag of web.xml
    like this
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model2.AliEJB001Local</local>
    <ejb-link>Model2EJB.jar#ReplicableSFSB2</ejb-link>
    </ejb-local-ref>

Maybe you are looking for

  • Order By clause in Oracle

    Hello, Sorry I am posting it for the second time In Oracle , the order by clause does not return the expected query result, if any of the field value in the order by clause has an empty string. Oracle treats the empty string as null value and ORDER B

  • Cannot load drivers for C5.00

    After instaling PC Suite when first connecting my C5.00 my PC (win 7 64 bit ultimate) consistently fails to load the drivers for: USB OBEX MTB USB Device USB Phonet USB LCIF Subsequently I cannot use PC suite or OVi suite. I have tried uninstalling P

  • How do I stream live video on my website or via Quick Time?

    Okay, so I've searched these discussions and have found many people with the same question going unanswered. Basically. Our dog is at home, just out from surgery and we want to keep an eye on him from work. I've downloaded Quick Time Broadcaster to o

  • How can I paste an image into a text/title box?

    Hi, I am putting together a 'memories' video using the 'Photo Album' theme in iMovie 11. What I want to do is insert some titles along the way (photo album type), have text above (no problem) with a still image in the box below. However, when I try t

  • Set operations usecase

    hi, I am a new bee and would like to understand the use of SET operations ( UNION, UNIONALL, MINUS, INTERSECTION) can't we do the same with the use of JOINS ? Am I wrong ? please correct me....and few examples where there is no alternate except using