Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EJB compilation error

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
I am trying to do a very simple session EJB on weblogic 5.1. I have the home and remote interfaces, the bean class, and the XML descriptor compiled and set up in a jar file. At this point I am now trying to get the ejbc compiler to create the deployable jar but I am getting a weird error which I have no idea how to deal with:
[red]
C:\weblogic\examples\ejb\basic\ejbTest>java -classpath %MYCLASSPATH% -DWeblogic.home weblogic.ejbc -compiler javac build\std_ejb_basic_ejbTest.jar weblogic\myserver\ejb_basic_ejbTest.jar

ERROR: Error from ejbc: C:\weblogic\examples\ejb\basic\ejbTest\ejbcgen\Files\JavaSoft\JRE\1\3\lib\rt\jar;C:\ProgramAD.ser (The filename, directory name, or volume label syntax is incorrect)
ERROR: ejbc found errors[/red]

This is obviously not easy to diagnose. It doesn't seem traceable to anything in my class files in an obvious way because it involves directory paths that ejbc is creating during compilation. However, if anyone has experienced this error or has any idea what could be causing it, I would immensely appreciate comments.

--Will Duty
wduty@radicalfringe.com

 
If anyone was going to reply, never mind. I got it to work. Apparently the ejbc command-line syntax was changed as of weblogic 5.1.

--Will Duty
wduty@radicalfringe.com

 
I've received emails from several people recently regarding this problem (although nobody has actually posted here). So I thought I'd post more details.

I don't know enough about Weblogic's implementation to explain clearly what the change means. Apparently, there was previously some other file (a .ser) involved in the process which is no longer part of the ejbc syntax. Here's a cut and paste of my command line syntax which worked for two test ejbs I did: one a stateless session bean and the other a container managed entity bean both of which compiled and deployed ok:


command line syntax:
-------------------------------------------
java -cp %EJBCP% weblogic.ejbc -compiler javac std_ejb_basic_ejbTest.jar ejb_basic_ejbTest.jar


my classpath variable which I called %EJBCP% is:
-------------------------------------------
\weblogic;\jdk1.3\lib\classes.zip;\weblogic\lib\weblogicaux.jar;\weblogic\myserver\clientclasses;\weblogic\classes


The prompt responded (after about 30 seconds) with:
-------------------------------------------
[EJB]: Creating output jar:ejb_basic_ejbTest.jar


and the new jar file appeared in the directory. After that I moved it to the the c:\weblogic\myserver directory and added a line in the weblogic properties file to deploy the bean. After restarting the server, the bean deployed ok. I'm working on NT4.0 with jdk1.3 and weblogic 5.1.0

To read more about it go to:


--Will Duty
wduty@radicalfringe.com
 
I had the same problem and I found out the real reason is that the default java runtime environment in window registry is pointing to "\Program Files\Javasoft\jre\1.2\..", the space in between "Program Files" cause the problem(you can tell from the error message itself). Do the following modification:
1. use command regedt32.exe to open the registry window.
2. select the HKEY_LOCAL_MACHINE window , you will the java runtime environment setting is under "/Software/javasoft/java runtime environment/1.2/"
3. click on the 1.2 folder and then change the path to "c:\jdk1.2.2\jre"

the problem should be fixed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top