[jboss-user] [EJB 3.0] - Re: Why is Remote Interface not installed

baumar do-not-reply at jboss.com
Wed Apr 30 06:38:06 EDT 2008


Hi Jaikiran,

Thanks for the hint. I checked the run configuration, and found the jar included in the default classpath. I checked if it might need to be higher up in the hierarchy. Since I couldn't move it higher up in the hierarchy (?), I added it manually as its own unit and moved it to all places up and down and got always the same result. 

In my - I confess not very clear understanding - the problem might be already in the packaging or deployment. I deployed a similar construction (the example 4.1 in Chapter 24 of Enterprise JavaBeans 3.0, 5th Edition By Richard Monson-Haefel). When I deploy the jar from the exercise, I can see the bean and the interface in the jmx console, whereas for the construction I made, the remote interface is just a java object, and my jar leads to a StatefulProxyFactory, which is not there in the TravelAgent.

Trave lAgentBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (proxy: $Proxy94 implements interface com.titan.travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
  | 
  | 
  | +- PersonHandlerBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (class: java.lang.Object)
  |   |   +- remoteStatefulProxyFactory (proxy: $Proxy82 implements interface org.jboss.ejb3.ProxyFactory)
  | 
I compared the annotations, the way the remote interfaces are build and implemented, but I cannot see the difference. I was guessing there must be a line that makes the difference, but I didn't find it. 

Then I remembered that I used the conveniant ant file to create the jar, whereas in my code I did it with eclipse. 
So I went back to the exercise 4.1 and tried to deploy it the same way with eclipse. And - surprise or not - it didn't work, but gave the error:


  | --- MBeans waiting for other MBeans ---
  | ObjectName: jboss.j2ee:jar=titanmanual.jar,name=TravelAgentBean,service=EJB3
  |   State: NOTYETINSTALLED
  |   I Depend On:
  |     persistence.units:unitName=titan
  | 
  | --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
  | ObjectName: persistence.units:unitName=titan
  |   State: NOTYETINSTALLED
  |   Depends On Me:
  |     jboss.j2ee:jar=titanmanual.jar,name=TravelAgentBean,service=EJB3
  | 

I my "JBoss-JEE-Errorpatterns" I had this text as a typical sign for having forgotten to include the META-INF with the persistence.xml, but I checked, it is there and contains the persistence-unit name.

I compared the 2 jars file by file and found the manifest having 2 more lines defining the ant-version and a created by


  | Ant-Version: Apache Ant 1.7.0
  | Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
  | 

The other file, that was different, was TravelAgentBean having 1 byte more when created with ant (from the same file), but I have to get a byte comparison tool to find what was different.

Another thing that looks like a bug was the fact that when exporting with eclipse from the original structure, all class files where doubled (in the eclipse export), one file was com.titan.* and the other build.classes.com.titan. I could not find, where and how to eliminate this.
I cleaned build and added bin as destination for the source. Know, every class was deployed only once; strange enough the Client.class was always exported, though I tried several times and excluded it manually - it was always there.

Is this typical to face so many problems and difficulties with deploying the jar file with eclipse to JBoss? (Maybe there is a self-aid group?-) 
I saw later version provide more support, like in 4.2.2, but on one side I was missing documentation and on the other hand, the 'comfort-function' even hided more, what happened.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147782#4147782

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147782



More information about the jboss-user mailing list