Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / April 2004

Tip: Looking for answers? Try searching our database.

HelloWord Tutorial

Thread view: 
CaMSaoule - 19 Apr 2004 17:29 GMT
Hi everybody,

I'm new in the world of the EJB so to understand it I try to make the
HelloWorld tutorial that I found there:
http://users.pandora.be/bert.torfs/j2ee.pdf

I have deployed the HelloServer without problems. But when I try to
execute the HelloClient I have an exception:

javax.naming.NoInitialContextException: Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at tutorialClient.HelloClient.main(HelloClient.java:37)
Caused by: java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
    ... 5 more
Exception in thread "main"

Can someone help me and tell me what to do to make it run? :(
CaMSaoule - 20 Apr 2004 17:01 GMT
It's me again.
I have a new problem with this tutorial!
I'm in the 20st page just before "Back to eclipse".
I have te run Ant again to generate the interfaces and the build
failed!!

this is the error given:
[javac] Compiling 19 source files to
C:\applis\middlegen-2.0-b1\samples\build\classes
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\DeletePartAction.java:60:
cannot resolve symbol
   [javac] symbol  : constructor PartPK (int)
   [javac] location: class src.interfaces.PartPK
   [javac] src.interfaces.PartPK part_PK = new
src.interfaces.PartPK(partId);
   [javac] ^
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\EditPartAction.java:63:
cannot resolve symbol
   [javac] symbol  : constructor PartPK (int)
   [javac] location: class src.interfaces.PartPK
   [javac] src.interfaces.PartPK part_PK = new
src.interfaces.PartPK(partId);
   [javac] ^
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\InsertPartAction.java:62:
create(java.lang.Integer,java.lang.String,java.lang.String,double,java.lang.String)
in src.interfaces.PartLocalHome cannot be applied to
(java.lang.String,java.lang.String,double,java.lang.String)
   [javac] src.interfaces.PartLocal part =
src.interfaces.PartUtil.getLocalHome().create(
   [javac] ^
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\UpdatePartAction.java:65:
incompatible types
   [javac] found   : java.lang.Integer
   [javac] required: src.interfaces.PartPK
   [javac] src.interfaces.PartPK part_PK = partForm.getPartId();
   [javac] ^
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\UpdatePartgroupAction.java:65:
incompatible types
   [javac] found   : java.lang.String
   [javac] required: src.interfaces.PartgroupPK
   [javac] src.interfaces.PartgroupPK partgroup_PK =
partgroupForm.getPartgroupcode();
   [javac] ^
   [javac] C:\applis\middlegen-2.0-b1\samples\build\gen-src\src\web\struts\ViewPartAction.java:64:
cannot resolve symbol
   [javac] symbol  : constructor PartPK (int)
   [javac] location: class src.interfaces.PartPK
   [javac] src.interfaces.PartPK part_PK = new
src.interfaces.PartPK(partId);
   [javac] ^
   [javac] 6 errors

What can I do?? :(


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.