• Post Reply Bookmark Topic Watch Topic
  • New Topic

deploytool---Could not invoke javac

 
lucy hu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning J2EE by following sun's tutorial, and got a problem again, when I finished all the steps to create all the components, and tried to deploy that application, but during the process of deployment, got an error message like this:
----------------
there was a deployment error
java.rmi.ServerExcpetion:RemoteException occured in server thread;
nested exception is: java.rmi.RemoteException:Error processing ejb jar:
Could not invoke javac
-----------------
can anybody help me?
Lucy
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure your JAVA_HOME is set so that the combination of JAVA_HOME+/bin is the location of javac.exe.
 
mohammad h
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem, and tried evrything , I finaly found out that there is a file in ejb sdk the name is userconfig.sh under bin you have to set you java home there , send me an email if you can not fix it
 
shailesh sonavadekar
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lucy , when you install j2ee sdk , you also get documentation along with it & readme file is very important file which must be read . there you get all the environmetal variables to be set & where to set.
you set java_home & j2ee_home properly . then , i feel you will not have any problem.
on win95,98 platform , you can set it in autoexec.bat. onm win nt & 2000 platform , you will have to set environmental variables. Plus , you have to be careful about small caps & large caps with JAVA_HOME & J2EE_HOME. they are all capitals.
I hope it will help to some extent.
Shailesh.
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it is classpath problem. Setup the classpath correctly, you will be OK. Follow the J2EE Developer's Guide, you will be OK. Follow that I did everything OK.
Good luck.
Originally posted by lucy hu:
I am learning J2EE by following sun's tutorial, and got a problem again, when I finished all the steps to create all the components, and tried to deploy that application, but during the process of deployment, got an error message like this:
----------------
there was a deployment error
java.rmi.ServerExcpetion:RemoteException occured in server thread;
nested exception is: java.rmi.RemoteException:Error processing ejb jar:
Could not invoke javac
-----------------
can anybody help me?
Lucy

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BE sure you are setting the User CLASSPATH if logged in as that user. I set the SYSTEM CLASSPATH and then discovered my User CLASSPATH was overriding it and not correct. This was on Windows.
 
Chris Newman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just had a similar problem with the EJBs not getting compiled with the deploytool. I knew I had set JAVA_HOME, J2EE_HOME and J2EE_CLASSPATH correctly but was getting the classic classpath related java.lang.NoClassDefFoundError: sun/tools/javac/Main
On closer inspection, it turns out that the userconfig.sh (in J2EE_HOME/bin) was overriding the JAVA_HOME to /usr/local/java/jdk1.2.2/solaris for some bizarre reason (I'm running on Linux). So, I just commented it out.

 
Carlos Cuevas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone, I just encountered this problem and had another answer to it....
Some how I ran the J2EE.bat using a JAVA_HOME pointing to an JRE different to the sdk needed and corrrectly pointed by the JAVA_HOME used by the deploytool...
The two programs must point to the same JAVA_HOME amd must use an SDK.
hope it helps!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!