This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

EJB deployment error  RSS feed

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

THANX IN ADVANCE
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you need to have tools.jar in your CLASSPATH.
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thx a lot... my EJB deployed successfully
but when i try to compile client.. again i am getting error
i am beginner to ejbs and this is my first EJB...


C:\Documents and Settings\Administrator\Desktop\examples>javac HelloClient.java
HelloClient.java:46: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
HelloHome home = (HelloHome)
^
HelloClient.java:46: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
HelloHome home = (HelloHome)
^
HelloClient.java:48: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
obj, HelloHome.class);
^
HelloClient.java:53: cannot resolve symbol
symbol : class Hello
location: class examples.HelloClient
Hello hello = home.create();
^
4 errors

Plz reply if anybody know
thanx
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure if you have the EJB's visible to the client. My guess is, you do not have the EJB's available for the client ( problem in referring them). Please make sure you have the package structure etc correct.

let us know what happens...
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I placed EJBObject-->hello.java ,
EJBHome object---> HelloHome.java
and bean class---> HelloBean.java
and META-INf in examples folder which is on my desktop

and compiled nad packaged them from there

finally i put my client program also in examples folder




how can i make my EJBs visible to client
i even placed the helloworld.jar in classpath also
plz tell me
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Actually i am getting errors like this


C:\Documents and Settings\Administrator\Desktop\examples>javac HelloClient.java
HelloClient.java:17: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.n
arrow(obj, HelloHome.class);
^
HelloClient.java:17: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.n
arrow(obj, HelloHome.class);
^
HelloClient.java:17: cannot resolve symbol
symbol : class HelloHome
location: class examples.HelloClient
HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.n
arrow(obj, HelloHome.class);

^
HelloClient.java:19: cannot resolve symbol
symbol : class Hello
location: class examples.HelloClient
Hello hello = home.create();
^
4 errors
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Do one thing create a jar of our EJB files
and put that in classpath

I feel it shd work

Kunal
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Thx kunal..my EJB client compiled after placed the jar file in classpath..but not executing


C:\Documents and Settings\Administrator\Desktop\ejbs\examples>java HelloClient
Exception in thread "main" java.lang.NoClassDefFoundError: HelloClient (wrong na
me: examples/HelloClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

Plz reply
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read the J2ee1.4 tutorial on "Getting Started with Enterprise Beans" in this section you will get the answers how to run your Clients
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!