Problem in EJB

Hello

I am new in EJB.I am i am trying to make app with Weblogic.

i have run following command

1. javac *.java

2. jar cvf a.jar *.*

3. java weblogic.ejbc a.jar e.jar

but after this command its return error

error is " Exception in thread "main" java.lang.NoClassDefFoundError:java/util/logging/Handler

at weblogic.ejbc20.<init>(ejbc20.java:82)

at weblogic.ejbc.main(ejbc.java:29)"

can anybody help me ,how can i solve this error. i am using weblogic 8.1

Regard

Anupam...

[555 byte] By [AnupamCinsa] at [2007-10-2 5:57:06]
# 1
You need to be sure the rt.jar is in your classpath.
swatdbaa at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

I have added rt.jar file in classpath,but now this exception is coming..

Exception in thread "main" java.lang.SecurityException: Prohibited package name:

java.util.logging

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)

at weblogic.ejbc20.<init>(ejbc20.java:82)

at weblogic.ejbc.main(ejbc.java:29)

AnupamCinsa at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Hi Anupam,I'm also facing the same issue. Please let me know if you 've found the solution.I'm also using weblogic8.1.Thanks and regards,Makrand
Maka at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Hi Anup/Mak, I m facing the same problem.. Could u plz tel me if u have found out a soln ?
Kavi@sdna at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

when you jar make sure that you jarring it from the right directory.

i mean the packages should match. for eg. if your class is in the package my.package , then you should jar it from the directory where you my directory resides. i think that is why you are having the problem.

This should solve the problem

cheers

Nishita at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
No.. I dont have any packages declared.. I have the class files in F:/SamplesEJB. and i m compiling it from there only.
Kavi@sdna at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7
set to classpath -> weblogic.jar and webservices.jarand then check it
coolMana at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 8
No.. Its not working ......
Kavi@sdna at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 9
make sure you have compatible version of jdk in your path variable for weblogic. if it is weblogic 8.1, give jdk 1.4.2. I did that it worked
r12a at 2007-7-16 2:06:09 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...