on 12-07-2006 11:46 AM
Hi All,
i am trying to develop a demo EJB project in Eclipse 3.2 so after it i can use it in some other demo project.....i am not developing a adapter module.....i am developing a simple EJB project by implementing SessionBean only.
now i am facing a problem that i am not able to see EJB Candidate in my EJB-Project, so i am not able to add my class file to ejb-jar xml file........i am also not able to see ejb-j2ee-engine.xml............
So can anybody help me to rectify this situation.
Thanks,
Rajeev Gupta
Hi Rajeev,
I met the same probelm with you several days ago, the following method solves my problem and hope it also works for you
After setting up the EJB environment, you receive the error message: Bean problem: No
interface classes found. The reason for this is that no Java source is available for the EJB
interface classes. Navigate to the developer studios Package Explorer view and perform
the following steps:
1. Select your project and choose Close Project in the context menu.
2. Choose Open Project.
3. Return to the J2EE Explorer view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wang,
i am not developing a adapter module......i am developing just a demo ejb project in Eclipse 3.2 for using it in another java prj.....well my above problem is resolved now...........
now i am facing the below issue:
i created a jar file for my ejb project...........then i imported that jar file in a new java prj, then i am able to instantiate that ejb class in the main method of the new java prj.........
In the window i can also see all methods of the ejb class.........
My ejb-jar xml file is having the below content:
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">;
<description>Hello World EJB description</description>
<display-name>prjHelloWorldEJB</display-name>
<enterprise-beans>
<ejb-name>HelloWorldEJB</ejb-name>
<ejb-class>pkgHelloWorldEJB.HelloWorldEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
</ejb-jar>
Like i declared a function:
public String strReturn(){
return "Hello JAVA EJB World";
}
When i called this function by obj.strReturn() then no compilation error was there.
<b>But when i run this JAVA prj application, it gave error java.lang.NoClassDefFoundError: pkgEJB/ClassEJB
at pkg.class.main of JAVA prj application.</b>
Can anybody suggest me what should i do to rectify this situation.
Thanks,
Rajeev Gupta
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.