permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes EJB deployed on JBoss, and JVM collapses when I lookup the EJB from a main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB deployed on JBoss, and JVM collapses when I lookup the EJB from a main method" Watch "EJB deployed on JBoss, and JVM collapses when I lookup the EJB from a main method" New topic
Author

EJB deployed on JBoss, and JVM collapses when I lookup the EJB from a main method

Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
I don't know why, I did this successfully before, but it fails now.
I write a main method in eclipse, and lookup the EJB with the code showed below. When I execute these code, the OS(Windows) rather than eclipse prompts me with an error message : "javaw.exe has encountered a problem and needs to close. We are sorry for the inconvenience....".



Well, though the above attempt failed, I could lookup the EJB and invoke on it in a Web Application that was deployed on JBoss as well.

Please help!
Your help will be greatly appreciated!
[ April 01, 2008: Message edited by: Kevin Tse ]

Life's been training me so I am stronger.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Does your eclipse build path have all the container-generated classes and the client JAR?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
Yes, all required classes and jars are in the build path. There's no ClassNotFoundException, so I think this is not a problem about that.

might it be a problem about *compilation* of the code? say, code of the EJB are compiled by a JVM of a certain version, and invoked by code compiled by another?

But I checked that the compiler used by eclipse is version 6.0, and all the environment variables are pointing to JDK1.6, so the JBoss is certainly running on JDK1.6.

Anybody out there encountered the same problem?
this' been eating me for days...

please help...
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Rerun in eclipse debug mode, keep stepping over until you find out which line of code is failing.
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
it is this line that caused the problem.


if i don't lookup EJB, everything works fine.
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
I can't even run the code in debug mode. when I try to debug the code, eclipse gives me this error message: cannot connect to VM socket closed. I have googled for hours and found some solutions, but all those are not solutions to my problem, the error keeps occuring...
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
I find that when I add the JBoss Java EE libraries, the error occurs.
With the JBoss Java EE libraries in the build path, I can't even debug a method without any code.
This is annoying...
What's the problem here?
Madhura Oak
Greenhorn

Joined: Apr 02, 2008
Posts: 2
Hi Kevin,

Please check out whether jbossall-client.jar is included in the build path. I was getting a similar problem before. It was solved after including it.

Regards,
Madhura
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
I tried the same code in Linux, it works fine.
I remember that it was after I updated my Windows XP that the error came forth.
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
Which version of JBoss are you using?
Kevin Tse
Greenhorn

Joined: Apr 01, 2008
Posts: 8
I am using JBoss 4.2.2GA.
 
 
subject: EJB deployed on JBoss, and JVM collapses when I lookup the EJB from a main method