Hi,
I have a problem using OpenEJB as JUnit4 container for my EJBs.
I use Java EE 5 and want to setup a unit test environment for this.
I follow the examples on the website with the following JUnit config:
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
properties.setProperty("openejb.deployments.classpath.include",
".*emediaservices.*");
properties.setProperty("openejb.embedded.remotable", "true");
// Uncomment these properties to change the defaults
// properties.setProperty("openejb.ejbd.port", "4201");
// properties.setProperty("openejb.ejbd.bind", "localhost");
// properties.setProperty("openejb.ejbd.threads", "200");
// properties.setProperty("openejb.ejbd.disabled", "false");
// properties.setProperty("openejb.ejbd.only_from",
// "127.0.0.1,192.168.1.1");
new InitialContext(properties);
}
But when I run any test in this class I get the following exception. The
class which java complains about varies, but the message and the
stacktrace are always the same:
lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file javax/resource/ResourceException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
Any hint what is causing this?
Thanks
Markus
--
>
> emedia-solutions wolf web: http://www.emedia-solutions-wolf.de
> Wedeler Landstrasse 63 mail: [EMAIL PROTECTED]
> 22559 Hamburg pgp: http://wwwkeys.de.pgp.net
> (040) 550 083 70 taxid: 57 / 126 / 16123
>