This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes NeedJ2EE 1.3 RI server Installation Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "NeedJ2EE 1.3 RI server Installation Help" Watch "NeedJ2EE 1.3 RI server Installation Help" New topic
Author

NeedJ2EE 1.3 RI server Installation Help

Isha Garg
Greenhorn

Joined: Mar 12, 2010
Posts: 29
Hi All,

I have downloaded and installed j2ee 1.3 from j2ee 1.3 download

I have got several batch files like userconfig,j2ee etc in bin folder.

I am not getting what all settings do I need to complete my installation process.

I have set my JAVA_HOME, J2EE_HOME and Path variables as:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_21
J2EE_HOME=F:\J2EE\j2sdkee1.3.1
PATH=%PATH%F:\J2EE\j2sdkee1.3.1\bin\;C:\Program Files\Java\jdk1.6.0_21\bin\;


But if from cmd prompt I try to get the version of j2ee, I get following error. (My j2ee 1.3 is installed in F:\J2EE folder)


F:\J2EE\j2sdkee1.3.1\bin>j2ee -version
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Common
Caused by: java.lang.ClassNotFoundException: Files\Common
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Files\Common. Program will exit.


Also, If I try to compile my first Ejbs i.e AdviceBean.java from first chapter of Headfirst Ejbs, i get following error.

F:\Temp Workspace\projects\advice\src>javac -d ../classes headfirst/*.java

headfirst\Advice.java:9: package javax.ejb does not exist
import javax.ejb.EJBObject;
^
headfirst\Advice.java:15: cannot find symbol
symbol: class EJBObject
public interface Advice extends EJBObject{
^
headfirst\AdviceBean.java:9: package javax.ejb does not exist
import javax.ejb.EJBException;
^
headfirst\AdviceBean.java:10: package javax.ejb does not exist
import javax.ejb.SessionBean;
^
headfirst\AdviceBean.java:11: package javax.ejb does not exist
import javax.ejb.SessionContext;
^
headfirst\AdviceBean.java:17: cannot find symbol
symbol: class SessionBean
public class AdviceBean implements SessionBean{
^
headfirst\AdviceBean.java:21: cannot find symbol
symbol : class SessionContext
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx) throws EJBException, Remo
eException {
^
headfirst\AdviceBean.java:21: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx) throws EJBException, Remo
eException {
^
headfirst\AdviceBean.java:24: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbRemove() throws EJBException, RemoteException {
^
headfirst\AdviceBean.java:28: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbActivate() throws EJBException, RemoteException {
^
headfirst\AdviceBean.java:32: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbPassivate() throws EJBException, RemoteException {
^
headfirst\AdviceHome.java:9: package javax.ejb does not exist
import javax.ejb.CreateException;
^
headfirst\AdviceHome.java:10: package javax.ejb does not exist
import javax.ejb.EJBHome;
^
headfirst\AdviceHome.java:16: cannot find symbol
symbol: class EJBHome
public interface AdviceHome extends EJBHome{
^
headfirst\AdviceHome.java:18: cannot find symbol
symbol : class CreateException
location: interface headfirst.AdviceHome
public Advice create() throws CreateException, RemoteException;
^
15 errors

I believe there is some problem in my classpath. But I am not getting what should I include in my classpath, I think need to add ejb.jar to my classpath.

Any help would be appreciated.

Thanks in advance.




Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

1.3 ? This is way too old. Are starting studying EJB2.x ? If so, I'd advice you to stop and study for EJB3 instead. The current SCBCD5 is about EJB3.0 and JPA1.0.


[My Blog]
All roads lead to JavaRanch
Isha Garg
Greenhorn

Joined: Mar 12, 2010
Posts: 29
hmmm.. ya, actually I liked Head first series, so thought of following HF EJB... But it is for ejb2.0.

So will get some other book for EJB 3.0 and will follow that..
Thanks for your advice.
T. Huy Nguyen
Ranch Hand

Joined: Nov 02, 2010
Posts: 57
EJB 3 container is required to support all previous version of EJB specification. So you can use any current EJB 3 server for your EJB 2.0 without any problem.


My material for SCJP (2008), SCWCD (2010), SCBCD (2010). About me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NeedJ2EE 1.3 RI server Installation Help
 
Similar Threads
error compiling ejb, first time prompt compile
having issues with compile for AdviceBean from HF EJB
error in compiling, ejb
AdviceBean - compile time erorr
Trying to Compile code From "Head First EJB"