NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
pepelara
Joined: 29 Nov 2008 Posts: 115
|
Posted: Sat Jan 15, 2011 8:22 pm Post subject: Re: JEE 5 tutorial example throws execption |
|
|
I have found a web that tries to explain the issue at,
http://markmail.org/message/njnnlktq6q4f55v5#query:clientsessionmdb%20java.lang.NoClassDefFoundError%3A%20Lsb%2FPublisherRemote+page:1+mid:njnnlktq6q4f55v5+state:results
It is a conversation between two people that takes at the end to open an issue in Glassfish,
http://java.net/jira/browse/GLASSFISH-9092
But it is hard to understand. I would really appreciate if anyone took a look at those web pages and helped me.
Regards,
Jose
From: Jose Alvarez de Lara ([email]address-removed[/email])
Sent: Wednesday, January 12, 2011 11:27 AM
To: NetBeans JEE Users ([email]address-removed[/email])
Subject: [nbj2ee] JEE 5 tutorial example throws execption
Hi,
I am trying clientsessionmdb example but I can not get it works.
I get the following exception,
12-ene-2011 10:39:05 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.NoClassDefFoundError: Lsb/PublisherRemote;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredField(Class.java:1880)
at com.sun.enterprise.deployment.util.DefaultDOLVisitor.acceptWithCL(DefaultDOLVisitor.java:350)
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:188)
at com.sun.enterprise.deployment.ApplicationClientDescriptor.visit(ApplicationClientDescriptor.java:657)
at com.sun.enterprise.deployment.archivist.AppClientArchivist.validate(AppClientArchivist.java:168)
at org.glassfish.appclient.client.acc.FacadeLaunchable.validateDescriptor(FacadeLaunchable.java:175)
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:350)
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:311)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:264)
FATAL ERROR in native method: processing of -javaagent failed
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)
... 6 more
Caused by: java.lang.ClassNotFoundException: sb.PublisherRemote
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.glassfish.appclient.client.acc.ACCClassLoader.findClass(ACCClassLoader.java:211)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 18 more
Exception in thread "main" Java Result: 1
And it is something estrange because as the exception says "Caused by: java.lang.NoClassDefFoundError: Lsb/PublisherRemote;"
there is not any calling to "Lsb/PublisherRemote". In fact the PublisherRemote is in the packege sb (Session Bean)
The ear includes an -ejb.jar that contains the session bean and a MDB and on the other hand exists a appclient.jar that looks as follows,
public class MyAppClient {
@EJB(name = "PublisherRemote")
private static PublisherRemote publisher;
public static void main(String[] args) {
MyAppClient client = new MyAppClient();
client.doTest();
System.exit(0);
}
public void doTest() {
try {
if(null != publisher) {
publisher.publishNews();
publisher.publishNews();
System.out.println("To view the bean output,");
System.out.println(
" check <install_dir>/domains/domain1/logs/server.log.");
} else {
System.out.println("publisher is null!!!");
}
} catch (Exception ex) {
System.out.println("Exception: " + ex.getMessage());
ex.printStackTrace();
}
}
}
The if clause in the doTest() method is mine to test if publisher is not injected correctly.
If need more code let me know it and I post it.
Thanks in advance,
Jose |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|