File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Java Products and Servers and the fly likes JEE 5 tutorial example - clientsessionmdb - isue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JEE 5 tutorial example - clientsessionmdb - isue" Watch "JEE 5 tutorial example - clientsessionmdb - isue" New topic

JEE 5 tutorial example - clientsessionmdb - isue

Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 94

I am trying clientsessionmdb example on GV v3 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
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
Caused by: java.lang.NoClassDefFoundError: Lsb/PublisherRemote;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(
at java.lang.Class.getDeclaredField(
at com.sun.enterprise.deployment.util.DefaultDOLVisitor.acceptWithCL(
at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(
at com.sun.enterprise.deployment.ApplicationClientDescriptor.visit(
at com.sun.enterprise.deployment.archivist.AppClientArchivist.validate(
at org.glassfish.appclient.client.acc.FacadeLaunchable.validateDescriptor(
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(
at org.glassfish.appclient.client.AppClientFacade.prepareACC(
FATAL ERROR in native method: processing of -javaagent failed
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(
... 6 more
Caused by: java.lang.ClassNotFoundException: sb.PublisherRemote
at Method)
at org.glassfish.appclient.client.acc.ACCClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 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();

public void doTest() {
try {
if(null != publisher) {
System.out.println("To view the bean output,");
" check <install_dir>/domains/domain1/logs/server.log.");
} else {
System.out.println("publisher is null!!!");
} catch (Exception ex) {
System.out.println("Exception: " + ex.getMessage());

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 Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 94
In the second line of my initial post I was meaning GF v3.

Googling I have found the following explanation about this issue at,

[Issue 9068][standalone-client]

But I feel a little lost about that what is exposed.

At the end of the conversation I have found the open issue in glassfish


but in a few words, what are the trying to mean?

Any help should be appreciated!!!

Thanks in advance,
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 94

At the end I have decided to install GF v2.1.1 and try the application on it and the app works as was expected.

Thanks a lot,
I agree. Here's the link:
subject: JEE 5 tutorial example - clientsessionmdb - isue
It's not a secret anymore!