Hello,


I have 2 EJB (one statefull "Engine" and 
one stateless "Component"). Engine behaves
like a client for the component. 

"Engine" gets InitialContext, looks up for
homeInterface, calls create() to create
a component and finally calls a component 
business method.

In ejb-jar.xml for the "Engine" there is no
<ejb-ref> for the "Component" because, actually,
"Components" are "generic" beans with predefined
business interfaces and create methods. "Component"s
real home and business interfaces are unknown to 
"Engine".

I'm using java-reflection to obtain a "create" method
from the "component" homeInterface. But when I invoke
this create method to obtain a business interface, I'm
getting:

TRANSACTION ROLLBACK EXCEPTION:null; nested exception is: 
        java.lang.NullPointerException

[ComponentA] java.lang.NullPointerException
[ComponentA]    at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:411)
[ComponentA]    at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:72)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[ComponentA]    at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
[ComponentA]    at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[ComponentA]    at
org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:247)
[ComponentA]    at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:207)
[ComponentA]    at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
[ComponentA]    at $Proxy6.create(Unknown Source)
[ComponentA]    at java.lang.reflect.Method.invoke(Native
Method)
[ComponentA]    at b2b.EngineBean.compute(EngineBean.java:81)
[ComponentA]    at java.lang.reflect.Method.invoke(Native
Method)
[ComponentA]    at
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:564)
[ComponentA]    at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[ComponentA]    at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:198)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[ComponentA]    at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[ComponentA]    at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[ComponentA]    at
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:320)
[ComponentA]    at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:222)
[ComponentA]    at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:187)
[ComponentA]    at java.lang.reflect.Method.invoke(Native
Method)
[ComponentA]    at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[ComponentA]    at
sun.rmi.transport.Transport$1.run(Transport.java:142)
[ComponentA]    at
java.security.AccessController.doPrivileged(Native Method)
[ComponentA]    at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[ComponentA]    at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[ComponentA]    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[ComponentA]    at java.lang.Thread.run(Thread.java:484)

So, my question is:

am I doing ILLEGAL thing or it's a bug/feature of jBoss?

(EJB spec says that I have to use <ejb-ref> and <ejb-link>
for bean to bean communications)

I'm running jBoss 2.0 BETA-PROD-03 with JDK1.3

Thanks for any suggestions.

Alex.


-- 
_________________________________________________________
Alexander Kogan    Parametric Technology Corporation
[EMAIL PROTECTED]      128 Technology Drive, Waltham MA 02453


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to