• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss first session bean

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys, I did exactly the same written to deploy the first session bean in jboss. Please help me out I am having the following problem
when i start the jboss, it says the class loader for the bean class not found. I know its a classpath problem but tried all the permutation and combination. please help me its really urgernt please!!!
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please post the error message.
 
Chapa Gurmukhi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Pradeep,
I have solved the problem. I have a problem with my ejb-jar.xml.
Now I am facing the problem in running the client.

C:\projects\jboss-tutorial>java HelloWorldClient
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldClient (wro
ng name: com/mastertech/sample/HelloWorldClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
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)

I know there is a problem with the classpath again. I am also copying my classpath. please help me whats the problem
My directory structure is C:\projects\jboss-tutorial\com\mastertech\sample
Under sample all my java files are residing
and my ejb-jar xml is residing under C:\projects\jboss-tutorial\META-INF

Here is my classpath also

.;C:\Sun\AppServer\jdk\lib\tools.jar;C:\Program Files\EditPlus;C:\javaexam\javaprac;C:\asheesh\Titan-JBoss-3.2-12d\workbook\ant;%PATH%;C:\eclipse\workspace\IBE\src\server;C:\eclipse\workspace\IBE\src\shared;C:\Sun\AppServer\lib\j2ee.jar;c:\IBE;

C:\projects\jboss-tutorial;C:\Sun\AppServer\lib\j2ee.jar;C:\jboss-4.0.0\client\log4.jar;C:\jboss-4.0.0\client\jboss-common-client.jar;C:\jboss-4.0.0\client\jboss-system-client.jar;C:\jboss-4.0.0\client\jnp-client.jar;C:\jboss-4.0.0\client\jboss-client.jar;C:\jboss-4.0.0\client\jbosssx-client.jar;C:\projects\jboss-tutorial\HelloWorld.jar;C:\jboss-4.0.0\server\default\deploy;C:\jboss-4.0.0\server\default\lib\jboss-j2ee.jar;C:\jboss-4.0.0\client
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put C:\projects\jboss-tutorial\com\mastertech\sample in the CLASSPATH.
 
Chapa Gurmukhi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Pardeep its still not working
Ok Can u help me in this scenarion. There is a jsp file which is calling a servlet and this servlet is looking up a bean. Can you tell me where to put the jsp and servlet. I was working on a weblogic earlier. It was simple to put every file in their respective folder. Can you help me to locate which folder should i put the respective servlet and jsp.

Regarding my previous query i have put my client in the C:\projects\jboss-tutorial\com\mastertech\sample. Can it be a problem of not showing result. Please help me out.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You will have to put C:\projects\jboss-tutorial in the CLASSPATH.
Then invoke

> java com.mastertech.sample.HelloWorldClient


Put your web application in $JBOSS_HOME/server/default/deploy dir.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic