• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile time Error(EJB)  RSS feed

 
kuralmani Elango
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using weblogic 5.1,I got a problem "cannot
resolve Symbol" when i compile HomeInterface i get
this error,
my Remote Interface is
import java.rmi.RemoteException;
import java.rmi.Remote;
import javax.ejb.*;
public interface Demo extends EJBObject, Remote {
public String demoSelect() throws RemoteException;
}
and my HomeInterface is
import javax.ejb.*;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.*;
public interface DemoHome extends EJBHome {
public Demo create() throws CreateException,
RemoteException;
}

ERROR:cannot resolve symbol Demo
Note:Remote interface is compling fine
I already run setenv.Is it anything wrong on setEnv then how can i overcome this
PLs help me
Thanks
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you extending Remote when EJBObject already does that?
Kyle
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kuralmani Elango,
I think we need to go back to basics of Java class/interface can't extend more than one class/interface.
And as Kyle said,RemoteObject is already extends Remote interface,so there is no need to extend Remote Interface.Just refer EJB API.you will come to know.
Cheers....
James
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by james edwin:
I think we need to go back to basics of Java class/interface can't extend more than one class/interface.

An interface can extend any number of interfaces. A class can implement any number of interfaces. A class however can only extend from a single class.
As Kyle said, this doesn't mean that Demo should extend Remote.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kuralmani Elango:
Hi,
I am using weblogic 5.1,I got a problem "cannot
resolve Symbol" when i compile HomeInterface i get
this error,
my Remote Interface is
import java.rmi.RemoteException;
import java.rmi.Remote;
import javax.ejb.*;
public interface Demo extends EJBObject, Remote {
public String demoSelect() throws RemoteException;
}
and my HomeInterface is
import javax.ejb.*;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.*;
public interface DemoHome extends EJBHome {
public Demo create() throws CreateException,
RemoteException;
}

ERROR:cannot resolve symbol Demo
Note:Remote interface is compling fine
I already run setenv.Is it anything wrong on setEnv then how can i overcome this
PLs help me
Thanks

There is no package declaration either. Try putting these both in the SAME package and compiling them together and see if that helps.
Kyle
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ouch James, that hurts... I could point you to some good COBOL forums if you'd like! <smile>
[ March 01, 2003: Message edited by: Dana Hanna ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!