im using weblogic 8.1
my project steps:
1)create a EJBObject ---->Hello.java
2)create a EJBHome object---> HelloHome.java
3) create bean class---> HelloBean.java
4) optaionally i created Local and Local home objects -- HelloLocal.java, HelloLocalHome.java
5)create a META-INF directory
4)in that directory place ejb-jar.xml, sun-ejb-jar.xml, weblogic-ejb-jar.xml
5)set classpath="weblogic-home/lib/weblogic.jar";
6)compiled all calsses with command javac *.java---->all the class files in examples folder are created frm this step
7)created a jar file using
C:\Documents and Settings\Administrator\Desktop\examples>jar cvf helloworld.jar *
helloworld.jar file in examples folder is the result... u can even see what r ziped into jar file using <"jar -tf helloworld.jar">
8)tried to generate vendor specific files using...............
C:\Documents and Settings\Administrator\Desktop\examples>java weblogic.ejbc helloworld.jar
<Aug 23, 2005 9:30:53 AM CDT> <Warning> <EJB> <BEA-010054> <EJB Deployment: HelloBean has a class HelloBean that is in the classpath.
This class should only be located in the ejb-jar file.>
<Aug 23, 2005 9:30:54 AM CDT> <Warning> <EJB> <BEA-010054> <EJB Deployment: HelloBean has a class HelloHome that is in the classpath.
This class should only be located in the ejb-jar file.>
<Aug 23, 2005 9:30:54 AM CDT> <Warning> <EJB> <BEA-010054> <EJB Deployment: HelloBean has a class Hello that is in the classpath.
This class should only be located in the ejb-jar file.>
<Aug 23, 2005 9:30:54 AM CDT> <Warning> <EJB> <BEA-010212> <The EJB 'HelloBean(Jar: helloworld.jar)' contains at least one method
without an explicit transaction attribute setting.
The default transaction attribute of Supports will be usedfor the following methods: remote[hello()] >
Compiler class: 'com.sun.tools.javac.Main', not found
java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:406)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
at weblogic.ejbc20.runBody(ejbc20.java:517)
at weblogic.utils.compiler.Tool.run(Tool.java:192)
at weblogic.utils.compiler.Tool.run(Tool.java:147)
at weblogic.ejbc.main(ejbc.java:29)
ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main', not found
ERROR: ejbc couldn't invoke compiler
ANY IDEA ABOUT THIS ERROR ... PLZ REPLY
THANX IN ADVANCE
-
EJB deployment problem (2 messages)
- Posted by: vijaya bachina
- Posted on: August 23 2005 11:23 EDT
Threaded Messages (2)
- EJB deployment problem by vijaya bachina on August 24 2005 12:13 EDT
- EJB deployment problem by vijaya bachina on August 25 2005 10:54 EDT
-
EJB deployment problem[ Go to top ]
- Posted by: vijaya bachina
- Posted on: August 24 2005 12:13 EDT
- in response to vijaya bachina
i forgot to place tools.jar in classpath
that is the y the error is raising
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 -
EJB deployment problem[ Go to top ]
- Posted by: vijaya bachina
- Posted on: August 25 2005 10:54 EDT
- in response to vijaya bachina
hi
my EJB compiled after placing the jar file in classpath...
but it is 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)
Expecting Reply