Hi
Can it be a static block failing or something like that?
Can you share a project showing it?
I have a JAX-RS application, and if I can I want to use the no-xml
configuration with annotations instead.
So I have written the main stateless EJB with @Path, which
has an @POST annotated method on it, and a second class
derived from Application which has an @ApplicationPath annotation.
The Application has an overridden method:-
@Override public Set<Class<?>>getClasses() {
Set<Class<?>>s = new HashSet<Class<?>>();
s.add(Ejb.class);
return s;
}
I then put the whole lot in a war file which contains just those
classes and a few others that I reference from the @POST method.
They all make reference to libraries that are in the {tomee}/lib
directory. In the war file is also a persistence.xml which defines
the postgresql driver and the JDBC connection info (the driver is
included in the war file)
I finally put the war file in its own directory in the webapps directory
and start tomee (using bin/startup.sh).
In the log file I get information which seems to say that it has
found everything:-
INFO - REST Application: http://localhost:8080/test/* ->
uk.co.dga.test.App
INFO - Service URI: http://localhost:8080/test/ejb -> EJB
uk.co.dga.test.Ejb
INFO - POST http://localhost:8080/test/ejb/ -> Reply
process(JAXBElement<Request>)
So it seems to have found both classes.
Then however is starts to complain:-
SEVERE - Error waiting for multi-thread deployment of directories to
complete
java.util.concurrent.ExecutionException: java.lang.InternalError:
LocalBeanProxyFactory.createProxy:
java.lang.reflect.InvocationTargetException
and a whole stack trace ending with as the inner most part:-
Caused by: java.lang.ClassNotFoundException: uk.co.dga.test.Ejb
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:186)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:83)
... 26 more
How can it have found it and not found it?
David