|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
EJB ConnectorHi All,
I'm having problems (NullPointerException) invoking a SessionBean from Mule. Environment: JDK: 1.5 OS: Windows XP - Service Pack 2 (5.1, x86) jboss-4.2.2.GA The SessionBean is an EJB 3.0 one: package com.test1.model; import javax.annotation.PostConstruct; import javax.ejb.Stateful; import javax.interceptor.Interceptors; @Stateful(name="SessionEJB") public class SessionEJBBean implements SessionEJBRemote , SessionEJBLocal { private String desc = null; public SessionEJBBean() { } public void setDesc(String desc) { this.desc=desc; } public String sayHello(String name) { return "hello :"+desc+" "+name; } @PostConstruct public void onConstruct(){ System.out.println("onConstruct est invoquée !!"); } } The JNDI stuff is working ok (i'm not getting NameNotFoundException any more). I can successfully invoke this EJB from a standalone client. Mule-Conf.xml <connector name="ejbConnector" className="org.mule.providers.ejb.EjbConnector"> <properties> <property name="jndiInitialFactory" value="org.jnp.interfaces.NamingContextFactory"/> <property name="jndiUrlPkgPrefixes" value="org.jboss.naming:org.jnp.interfaces"/> <property name="jndiProviderUrl" value="jnp://localhost:1099"/> <property name="securityPolicy" value="./conf/security.policy"/> <property name="pollingFrequency" value="20000"/> </properties> </connector> <inbound-router> <endpoint address="ejb://localhost:1099/SessionEJB?method=sayHello" connector="ejbConnector"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address="stream://System.out"/> </router> </outbound-router> ERROR 2008-09-19 03:08:39,843 [main] org.mule.MuleServer: ******************************************************************************** Message : Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException Type : org.mule.providers.ConnectException Code : MULE_ERROR-84 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html Object : EjbMessageReceiver{this=2ba88c, receiverKey=ejb://localhost:1099, endpoint=ejb://localhost:1099/SessionEJB?method=sayHello} ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.providers.ejb.EjbConnector:48 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html) 2. Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException (java.rmi.RemoteException) org.mule.providers.ejb.EjbConnector:52 (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.html) 3. Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException (org.mule.providers.ConnectException) org.mule.providers.AbstractMessageReceiver:432 (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.providers.ejb.EjbConnector.getRemoteObject(EjbConnector.java:48) at org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java:86) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:411 ) at org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectio nStrategy.java:25) at org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.ja va:98) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:403 ) at org.mule.impl.model.AbstractComponent.connectListeners(AbstractComponent.java:628) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) at org.mule.MuleManager.start(MuleManager.java:892) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfiguration Builder.java:278) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfiguration Builder.java:218) at org.mule.MuleServer.initialize(MuleServer.java:294) at org.mule.MuleServer.run(MuleServer.java:207) at org.mule.MuleServer.start(MuleServer.java:195) at org.mule.MuleServer.main(MuleServer.java:166) ******************************************************************************** ERROR 2008-09-19 03:08:39,859 [main] org.mule.MuleServer: ******************************************************************************** * A Fatal error has occurred while the server was running: * * null (java.lang.NullPointerException) * * * * The error is fatal, the system must shutdown * * Server started: 19/09/08 03:08 * * Server shutdown: 19/09/08 03:08 * ******************************************************************************** Who can help me asap. Thanks in advance Nabil |
|
|
RE: EJB ConnectorHi,
In your SessionEJBBean, desc is initialised by being set to null. When is this changed? If it is not, this could be your NPE A Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM email: antoine.borg@... | blog: blog.ricston.com | web: ricston.com -----Original Message----- From: NabiL [mailto:elaomari.nabil@...] Sent: Friday, September 19, 2008 6:06 AM To: user@... Subject: [mule-user] EJB Connector Hi All, I'm having problems (NullPointerException) invoking a SessionBean from Mule. Environment: JDK: 1.5 OS: Windows XP - Service Pack 2 (5.1, x86) jboss-4.2.2.GA The SessionBean is an EJB 3.0 one: package com.test1.model; import javax.annotation.PostConstruct; import javax.ejb.Stateful; import javax.interceptor.Interceptors; @Stateful(name="SessionEJB") public class SessionEJBBean implements SessionEJBRemote , SessionEJBLocal { private String desc = null; public SessionEJBBean() { } public void setDesc(String desc) { this.desc=desc; } public String sayHello(String name) { return "hello :"+desc+" "+name; } @PostConstruct public void onConstruct(){ System.out.println("onConstruct est invoquée !!"); } } The JNDI stuff is working ok (i'm not getting NameNotFoundException any more). I can successfully invoke this EJB from a standalone client. Mule-Conf.xml <connector name="ejbConnector" className="org.mule.providers.ejb.EjbConnector"> <properties> <property name="jndiInitialFactory" value="org.jnp.interfaces.NamingContextFactory"/> <property name="jndiUrlPkgPrefixes" value="org.jboss.naming:org.jnp.interfaces"/> <property name="jndiProviderUrl" value="jnp://localhost:1099"/> <property name="securityPolicy" value="./conf/security.policy"/> <property name="pollingFrequency" value="20000"/> </properties> </connector> <inbound-router> <endpoint address="ejb://localhost:1099/com/test1/SessionEJB?method=sayHello" connector="ejbConnector"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address="stream://System.out"/> </router> </outbound-router> ERROR 2008-09-19 03:08:39,843 [main] org.mule.MuleServer: **************************************************************************** **** Message : Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException Type : org.mule.providers.ConnectException Code : MULE_ERROR-84 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException. html Object : EjbMessageReceiver{this=2ba88c, receiverKey=ejb://localhost:1099, endpoint=ejb://localhost:1099/SessionEJB?method=sayHello} **************************************************************************** **** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.providers.ejb.EjbConnector:48 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html ) 2. Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException (java.rmi.RemoteException) org.mule.providers.ejb.EjbConnector:52 (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.html) 3. Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: java.lang.NullPointerException (org.mule.providers.ConnectException) org.mule.providers.AbstractMessageReceiver:432 (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException .html) **************************************************************************** **** Root Exception stack trace: java.lang.NullPointerException at org.mule.providers.ejb.EjbConnector.getRemoteObject(EjbConnector.java:48) at org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java: 86) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.j ava:411 ) at org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAttemptCo nnectio nStrategy.java:25) at org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnectionStra tegy.ja va:98) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.j ava:403 ) at org.mule.impl.model.AbstractComponent.connectListeners(AbstractComponent.jav a:628) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) at org.mule.MuleManager.start(MuleManager.java:892) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfig uration Builder.java:278) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfig uration Builder.java:218) at org.mule.MuleServer.initialize(MuleServer.java:294) at org.mule.MuleServer.run(MuleServer.java:207) at org.mule.MuleServer.start(MuleServer.java:195) at org.mule.MuleServer.main(MuleServer.java:166) **************************************************************************** **** ERROR 2008-09-19 03:08:39,859 [main] org.mule.MuleServer: **************************************************************************** **** * A Fatal error has occurred while the server was running: * * null (java.lang.NullPointerException) * * * * The error is fatal, the system must shutdown * * Server started: 19/09/08 03:08 * * Server shutdown: 19/09/08 03:08 * **************************************************************************** **** Who can help me asap. Thanks in advance Nabil -- View this message in context: http://www.nabble.com/EJB-Connector-tp19565911p19565911.html Sent from the Mule - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: EJB Connectorhi again,
I forgot to add jbossall-client.jar to the classpath. Now the error message is changed as shown in the attached file trace+mule_ejb3.txt why ?? NabiL
|
|
|
RE: EJB ConnectorHello Nabil,
The log file states that: java.lang.ClassNotFoundException: com.test1.model.SessionEJBRemote Presumably, this is one of your custom POJOs. Is it on the classpath? A Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM email: antoine.borg@... | blog: blog.ricston.com | web: ricston.com -----Original Message----- From: NabiL [mailto:elaomari.nabil@...] Sent: Thursday, September 25, 2008 1:15 AM To: user@... Subject: RE: [mule-user] EJB Connector hi again, I forgot to add jbossall-client.jar to the classpath. Now the error message is changed as shown in the attached file http://www.nabble.com/file/p19659961/trace%2Bmule_ejb3.txt trace+mule_ejb3.txt why ?? NabiL antoine.borg wrote: > > Hi, > > In your SessionEJBBean, desc is initialised by being set to null. When > is this changed? If it is not, this could be your NPE > > A > > > Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP > 2, 1180 Uccle, Brussels, BELGIUM > email: antoine.borg@... | blog: blog.ricston.com | web: > ricston.com > > -----Original Message----- > From: NabiL [mailto:elaomari.nabil@...] > Sent: Friday, September 19, 2008 6:06 AM > To: user@... > Subject: [mule-user] EJB Connector > > > Hi All, > > I'm having problems (NullPointerException) invoking a SessionBean > from Mule. > > Environment: > JDK: 1.5 > OS: Windows XP - Service Pack 2 (5.1, x86) jboss-4.2.2.GA > > The SessionBean is an EJB 3.0 one: > > package com.test1.model; > > import javax.annotation.PostConstruct; import javax.ejb.Stateful; > import javax.interceptor.Interceptors; > > @Stateful(name="SessionEJB") > > public class SessionEJBBean implements SessionEJBRemote , > SessionEJBLocal { > private String desc = null; > > public SessionEJBBean() { > > > } > public void setDesc(String desc) { > this.desc=desc; > } > > public String sayHello(String name) { > return "hello :"+desc+" "+name; > } > > @PostConstruct > public void onConstruct(){ > System.out.println("onConstruct est invoquée !!"); > } > } > > > The JNDI stuff is working ok (i'm not getting NameNotFoundException > any more). > I can successfully invoke this EJB from a standalone client. > > > Mule-Conf.xml > > <connector name="ejbConnector" > className="org.mule.providers.ejb.EjbConnector"> > <properties> > > <property name="jndiInitialFactory" > > value="org.jnp.interfaces.NamingContextFactory"/> > <property name="jndiUrlPkgPrefixes" > > value="org.jboss.naming:org.jnp.interfaces"/> > <property name="jndiProviderUrl" > value="jnp://localhost:1099"/> > <property name="securityPolicy" > value="./conf/security.policy"/> > <property name="pollingFrequency" value="20000"/> > </properties> > > </connector> > > > > > <inbound-router> > > <endpoint > address="ejb://localhost:1099/com/test1/SessionEJB?method=sayHello" > connector="ejbConnector"/> > </inbound-router> > <outbound-router> > <router > className="org.mule.routing.outbound.OutboundPassThroughRouter"> > <endpoint address="stream://System.out"/> > </router> > </outbound-router> > > > ERROR 2008-09-19 03:08:39,843 [main] org.mule.MuleServer: > ********************************************************************** > ****** > **** > Message : Initialisation Failure: Remote EJBObject lookup > failed for > > 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: > java.lang.NullPointerException > Type : org.mule.providers.ConnectException > Code : MULE_ERROR-84 > JavaDoc : > > > html > Object : EjbMessageReceiver{this=2ba88c, > > receiverKey=ejb://localhost:1099, > > endpoint=ejb://localhost:1099/SessionEJB?method=sayHello} > ********************************************************************** > ****** > **** > Exception stack is: > 1. null (java.lang.NullPointerException) > org.mule.providers.ejb.EjbConnector:48 > > (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerExceptio > n.html > ) > 2. Remote EJBObject lookup failed for > > 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: > java.lang.NullPointerException (java.rmi.RemoteException) > org.mule.providers.ejb.EjbConnector:52 > > (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.html > ) 3. Initialisation Failure: Remote EJBObject lookup failed for > > 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: > java.lang.NullPointerException (org.mule.providers.ConnectException) > org.mule.providers.AbstractMessageReceiver:432 > > (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectExc > eption > .html) > ********************************************************************** > ****** > **** > Root Exception stack trace: > java.lang.NullPointerException > at > > org.mule.providers.ejb.EjbConnector.getRemoteObject(EjbConnector.java:48) > at > > > 86) > at > > org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRece > iver.j > ava:411 > > ) > at > > org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAtt > emptCo > nnectio > > nStrategy.java:25) > at > > org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnecti > onStra > tegy.ja > > va:98) > at > > org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRece > iver.j > ava:403 > > ) > at > > org.mule.impl.model.AbstractComponent.connectListeners(AbstractCompone > nt.jav > a:628) > at > org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) > at > org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) > at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) > at org.mule.MuleManager.start(MuleManager.java:892) > at > > org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXml > Config > uration > > Builder.java:278) > at > > org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXml > Config > uration > > Builder.java:218) > at org.mule.MuleServer.initialize(MuleServer.java:294) > at org.mule.MuleServer.run(MuleServer.java:207) > at org.mule.MuleServer.start(MuleServer.java:195) > at org.mule.MuleServer.main(MuleServer.java:166) > > ********************************************************************** > ****** > **** > > ERROR 2008-09-19 03:08:39,859 [main] org.mule.MuleServer: > ********************************************************************** > ****** > **** > * A Fatal error has occurred while the server was running: > > * > * null (java.lang.NullPointerException) > > * > * > > * > * The error is fatal, the system must shutdown > > * > * Server started: 19/09/08 03:08 > > * > * Server shutdown: 19/09/08 03:08 > > * > ********************************************************************** > ****** > **** > > Who can help me asap. > > Thanks in advance > Nabil > > > -- > View this message in context: > http://www.nabble.com/EJB-Connector-tp19565911p19565911.html > Sent from the Mule - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > -- View this message in context: http://www.nabble.com/EJB-Connector-tp19565911p19659961.html Sent from the Mule - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: EJB ConnectorHello antoine,
Thanks for you reply. I created SessionEJBRemote.java like this package com.test1.model; public interface SessionEJBRemote { public String sayHello(); } "org.jboss.ejb3.remoting.BaseRemoteProxy; local class incompatible" Plz see the attached file : trace+mule_ejb3.txt
|
|
|
RE: EJB ConnectorHi again,
Important : 1- I modified the SessionEJBBean and SessionEJBRemote by adding a create () method) otherwise nothing is called from mule, why ? 2- Mule-conf.xml : ejb transport should be declared as below otherwise it doesn't work !! <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello" connector="ejbConnector"/> I exported my ejb projet into jar file and imported into mule project. Now the mule trace looks like this : INFO 2008-09-25 12:34:13,843 [main] org.mule.impl.model.seda.SedaModel: Component _muleManagerComponent has been started successfully INFO 2008-09-25 12:34:13,843 [main] org.mule.providers.ejb.EjbConnector: Registering listener: CallEJB on endpointUri: ejb://localhost:1099/SessionEJB/remote?method=sayHello ERROR 2008-09-25 12:34:13,953 [main] org.mule.MuleServer: ******************************************************************************** Message : Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB/remote?method=sayHello; nested exception is: javax.naming.NameNotFoundException: SessionEJB not bound Type : org.mule.providers.ConnectException Code : MULE_ERROR-84 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html Object : EjbMessageReceiver{this=1dcc2a3, receiverKey=ejb://localhost:1099, endpoint=ejb://localhost:1099/SessionEJB/remote?method=sayHello} Resolved Name : <none> Remaining Name : <none> ******************************************************************************** Exception stack is: 1. javax.naming.NameNotFoundException: SessionEJB not bound (javax.naming.NameNotFoundException) org.jnp.server.NamingServer:529 (http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/NameNotFoundException.html) 2. Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB/remote?method=sayHello; nested exception is: javax.naming.NameNotFoundException: SessionEJB not bound (java.rmi.RemoteException) org.mule.providers.ejb.EjbConnector:52 (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.html) 3. Initialisation Failure: Remote EJBObject lookup failed for 'ejb://localhost:1099/SessionEJB/remote?method=sayHello; nested exception is: javax.naming.NameNotFoundException: SessionEJB not bound (org.mule.providers.ConnectException) org.mule.providers.AbstractMessageReceiver:432 (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html) ******************************************************************************** Root Exception stack trace: javax.naming.NameNotFoundException: SessionEJB not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) 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:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.mule.providers.rmi.RmiConnector.getRemoteRef(RmiConnector.java:331) at org.mule.providers.ejb.EjbConnector.getRemoteObject(EjbConnector.java:44) at org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java:86) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:411) at org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25) at org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:98) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:403) at org.mule.impl.model.AbstractComponent.connectListeners(AbstractComponent.java:628) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) at org.mule.MuleManager.start(MuleManager.java:892) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:278) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:218) at org.mule.MuleServer.initialize(MuleServer.java:294) at org.mule.MuleServer.run(MuleServer.java:207) at org.mule.MuleServer.start(MuleServer.java:195) at org.mule.MuleServer.main(MuleServer.java:166) ******************************************************************************** ERROR 2008-09-25 12:34:13,984 [main] org.mule.MuleServer: ******************************************************************************** * A Fatal error has occurred while the server was running: * * SessionEJB not bound (javax.naming.NameNotFoundException) * * * * The error is fatal, the system must shutdown * * Server started: 25/09/08 12:34 * * Server shutdown: 25/09/08 12:34 * ********************************************************************************
|
|
|
RE: EJB ConnectorHi antoine,
Hi again, Important : 1- I modified the SessionEJBBean and SessionEJBRemote by adding a create () method) otherwise nothing is called from mule, why ? 2- Mule-conf.xml : ejb transport should be declared as below otherwise it doesn't work !! <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello" connector="ejbConnector"/> I exported my ejb projet into jar file and imported into mule project. Now the mule trace looks like this : INFO 2008-09-25 13:21:13,515 [main] org.mule.providers.ejb.EjbConnector: Registering listener: CallEJB on endpointUri: ejb://localhost:1099/SessionEJB/remote?method=sayHello INFO 2008-09-25 13:21:13,875 [main] org.mule.providers.ejb.EjbMessageReceiver: methodArgumentsList not set on endpoint, assuming method call has no arguments ERROR 2008-09-25 13:21:13,875 [main] org.mule.MuleServer: ******************************************************************************** Message : Initialisation Failure: null Type : org.mule.providers.ConnectException Code : MULE_ERROR-84 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html Object : EjbMessageReceiver{this=179d854, receiverKey=ejb://localhost:1099, endpoint=ejb://localhost:1099/SessionEJB/remote?method=sayHello} ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.providers.rmi.RmiMessageReceiver:104 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html) 2. Initialisation Failure: null (org.mule.providers.ConnectException) org.mule.providers.AbstractMessageReceiver:432 (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java:104) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:411) at org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25) at org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:98) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:403) at org.mule.impl.model.AbstractComponent.connectListeners(AbstractComponent.java:628) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) at org.mule.MuleManager.start(MuleManager.java:892) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:278) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:218) at org.mule.MuleServer.initialize(MuleServer.java:294) at org.mule.MuleServer.run(MuleServer.java:207) at org.mule.MuleServer.start(MuleServer.java:195) at org.mule.MuleServer.main(MuleServer.java:166) ******************************************************************************** ERROR 2008-09-25 13:21:13,906 [main] org.mule.MuleServer: ******************************************************************************** * A Fatal error has occurred while the server was running: * * null (java.lang.NullPointerException) * * * * The error is fatal, the system must shutdown * * Server started: 25/09/08 13:21 * * Server shutdown: 25/09/08 13:21 * ********************************************************************************
|
|
|
RE: EJB ConnectorHi,
The EJB connector should not have to be explicitly referenced on the endpoint (at least, not according to http://mule.mulesource.org/display/MULE2USER/EJB+Transport) unless you have more than one connector declared. Do you? A Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM email: antoine.borg@... | blog: blog.ricston.com | web: ricston.com -----Original Message----- From: NabiL [mailto:elaomari.nabil@...] Sent: Thursday, September 25, 2008 3:35 PM To: user@... Subject: RE: [mule-user] EJB Connector Hi antoine, Hi again, Important : 1- I modified the SessionEJBBean and SessionEJBRemote by adding a create () method) otherwise nothing is called from mule, why ? 2- Mule-conf.xml : ejb transport should be declared as below otherwise it doesn't work !! <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello" connector="ejbConnector"/> I exported my ejb projet into jar file and imported into mule project. Now the mule trace looks like this : INFO 2008-09-25 13:21:13,515 [main] org.mule.providers.ejb.EjbConnector: Registering listener: CallEJB on endpointUri: ejb://localhost:1099/SessionEJB/remote?method=sayHello INFO 2008-09-25 13:21:13,875 [main] org.mule.providers.ejb.EjbMessageReceiver: methodArgumentsList not set on endpoint, assuming method call has no arguments ERROR 2008-09-25 13:21:13,875 [main] org.mule.MuleServer: **************************************************************************** **** Message : Initialisation Failure: null Type : org.mule.providers.ConnectException Code : MULE_ERROR-84 JavaDoc : http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException. html Object : EjbMessageReceiver{this=179d854, receiverKey=ejb://localhost:1099, endpoint=ejb://localhost:1099/SessionEJB/remote?method=sayHello} **************************************************************************** **** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.providers.rmi.RmiMessageReceiver:104 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html ) 2. Initialisation Failure: null (org.mule.providers.ConnectException) org.mule.providers.AbstractMessageReceiver:432 (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectException .html) **************************************************************************** **** Root Exception stack trace: java.lang.NullPointerException at org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java: 104) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.j ava:411) at org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAttemptCo nnectionStrategy.java:25) at org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnectionStra tegy.java:98) at org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageReceiver.j ava:403) at org.mule.impl.model.AbstractComponent.connectListeners(AbstractComponent.jav a:628) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) at org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) at org.mule.MuleManager.start(MuleManager.java:892) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfig urationBuilder.java:278) at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfig urationBuilder.java:218) at org.mule.MuleServer.initialize(MuleServer.java:294) at org.mule.MuleServer.run(MuleServer.java:207) at org.mule.MuleServer.start(MuleServer.java:195) at org.mule.MuleServer.main(MuleServer.java:166) **************************************************************************** **** ERROR 2008-09-25 13:21:13,906 [main] org.mule.MuleServer: **************************************************************************** **** * A Fatal error has occurred while the server was running: * * null (java.lang.NullPointerException) * * * * The error is fatal, the system must shutdown * * Server started: 25/09/08 13:21 * * Server shutdown: 25/09/08 13:21 * **************************************************************************** **** antoine.borg wrote: > > Hello Nabil, > > The log file states that: > > java.lang.ClassNotFoundException: com.test1.model.SessionEJBRemote > > Presumably, this is one of your custom POJOs. Is it on the classpath? > > A > > > Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP > 2, 1180 Uccle, Brussels, BELGIUM > email: antoine.borg@... | blog: blog.ricston.com | web: > ricston.com > > -----Original Message----- > From: NabiL [mailto:elaomari.nabil@...] > Sent: Thursday, September 25, 2008 1:15 AM > To: user@... > Subject: RE: [mule-user] EJB Connector > > > hi again, > > I forgot to add jbossall-client.jar to the classpath. Now the error > message is changed as shown in the attached file > > http://www.nabble.com/file/p19659961/trace%2Bmule_ejb3.txt > trace+mule_ejb3.txt > > why ?? > > NabiL > > antoine.borg wrote: >> >> Hi, >> >> In your SessionEJBBean, desc is initialised by being set to null. >> When is this changed? If it is not, this could be your NPE >> >> A >> >> >> Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., >> BP 2, 1180 Uccle, Brussels, BELGIUM >> email: antoine.borg@... | blog: blog.ricston.com | web: >> ricston.com >> >> -----Original Message----- >> From: NabiL [mailto:elaomari.nabil@...] >> Sent: Friday, September 19, 2008 6:06 AM >> To: user@... >> Subject: [mule-user] EJB Connector >> >> >> Hi All, >> >> I'm having problems (NullPointerException) invoking a SessionBean >> from Mule. >> >> Environment: >> JDK: 1.5 >> OS: Windows XP - Service Pack 2 (5.1, x86) jboss-4.2.2.GA >> >> The SessionBean is an EJB 3.0 one: >> >> package com.test1.model; >> >> import javax.annotation.PostConstruct; import javax.ejb.Stateful; >> import javax.interceptor.Interceptors; >> >> @Stateful(name="SessionEJB") >> >> public class SessionEJBBean implements SessionEJBRemote , >> SessionEJBLocal { >> private String desc = null; >> >> public SessionEJBBean() { >> >> >> } >> public void setDesc(String desc) { >> this.desc=desc; >> } >> >> public String sayHello(String name) { >> return "hello :"+desc+" "+name; >> } >> >> @PostConstruct >> public void onConstruct(){ >> System.out.println("onConstruct est invoquée !!"); >> } >> } >> >> >> The JNDI stuff is working ok (i'm not getting NameNotFoundException >> any more). >> I can successfully invoke this EJB from a standalone client. >> >> >> Mule-Conf.xml >> >> <connector name="ejbConnector" >> className="org.mule.providers.ejb.EjbConnector"> >> <properties> >> >> <property name="jndiInitialFactory" >> >> value="org.jnp.interfaces.NamingContextFactory"/> >> <property name="jndiUrlPkgPrefixes" >> >> value="org.jboss.naming:org.jnp.interfaces"/> >> <property name="jndiProviderUrl" >> value="jnp://localhost:1099"/> >> <property name="securityPolicy" >> value="./conf/security.policy"/> >> <property name="pollingFrequency" value="20000"/> >> </properties> >> >> </connector> >> >> >> >> >> <inbound-router> >> >> <endpoint >> address="ejb://localhost:1099/com/test1/SessionEJB?method=sayHello" >> connector="ejbConnector"/> >> </inbound-router> >> <outbound-router> >> <router >> className="org.mule.routing.outbound.OutboundPassThroughRouter"> >> <endpoint address="stream://System.out"/> >> </router> >> </outbound-router> >> >> >> ERROR 2008-09-19 03:08:39,843 [main] org.mule.MuleServer: >> ********************************************************************* >> * >> ****** >> **** >> Message : Initialisation Failure: Remote EJBObject lookup >> failed for >> >> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >> java.lang.NullPointerException >> Type : org.mule.providers.ConnectException >> Code : MULE_ERROR-84 >> JavaDoc : >> >> > >> html >> Object : EjbMessageReceiver{this=2ba88c, >> >> receiverKey=ejb://localhost:1099, >> >> endpoint=ejb://localhost:1099/SessionEJB?method=sayHello} >> ********************************************************************* >> * >> ****** >> **** >> Exception stack is: >> 1. null (java.lang.NullPointerException) >> org.mule.providers.ejb.EjbConnector:48 >> >> (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerExcepti >> o >> n.html >> ) >> 2. Remote EJBObject lookup failed for >> >> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >> java.lang.NullPointerException (java.rmi.RemoteException) >> org.mule.providers.ejb.EjbConnector:52 >> >> (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.htm >> l >> ) 3. Initialisation Failure: Remote EJBObject lookup failed for >> >> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >> java.lang.NullPointerException (org.mule.providers.ConnectException) >> org.mule.providers.AbstractMessageReceiver:432 >> >> (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectEx >> c >> eption >> .html) >> ********************************************************************* >> * >> ****** >> **** >> Root Exception stack trace: >> java.lang.NullPointerException >> at >> >> org.mule.providers.ejb.EjbConnector.getRemoteObject(EjbConnector.java:48) >> at >> >> > >> 86) >> at >> >> org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRec >> e >> iver.j >> ava:411 >> >> ) >> at >> >> org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAt >> t >> emptCo >> nnectio >> >> nStrategy.java:25) >> at >> >> org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnect >> i >> onStra >> tegy.ja >> >> va:98) >> at >> >> org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRec >> e >> iver.j >> ava:403 >> >> ) >> at >> >> org.mule.impl.model.AbstractComponent.connectListeners(AbstractCompon >> e >> nt.jav >> a:628) >> at >> org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) >> at >> org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) >> at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) >> at org.mule.MuleManager.start(MuleManager.java:892) >> at >> >> org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXm >> l >> Config >> uration >> >> Builder.java:278) >> at >> >> org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXm >> l >> Config >> uration >> >> Builder.java:218) >> at org.mule.MuleServer.initialize(MuleServer.java:294) >> at org.mule.MuleServer.run(MuleServer.java:207) >> at org.mule.MuleServer.start(MuleServer.java:195) >> at org.mule.MuleServer.main(MuleServer.java:166) >> >> ********************************************************************* >> * >> ****** >> **** >> >> ERROR 2008-09-19 03:08:39,859 [main] org.mule.MuleServer: >> ********************************************************************* >> * >> ****** >> **** >> * A Fatal error has occurred while the server was running: >> >> * >> * null (java.lang.NullPointerException) >> >> * >> * >> >> * >> * The error is fatal, the system must shutdown >> >> * >> * Server started: 19/09/08 03:08 >> >> * >> * Server shutdown: 19/09/08 03:08 >> >> * >> ********************************************************************* >> * >> ****** >> **** >> >> Who can help me asap. >> >> Thanks in advance >> Nabil >> >> >> -- >> View this message in context: >> http://www.nabble.com/EJB-Connector-tp19565911p19565911.html >> Sent from the Mule - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/EJB-Connector-tp19565911p19659961.html > Sent from the Mule - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > -- View this message in context: http://www.nabble.com/EJB-Connector-tp19565911p19669641.html Sent from the Mule - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: EJB Connectorhi,
I modified the endpoint but the problem still exists. <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello2"/> Mule EJB provider can only invoke EJB 2.x methods. a new provider (http://www.muleumo.org/display/EJBTHREE/Home) This provider supports invoking EJB3.0 methods. But i don't know how to implement this ? just copying the jar file ti MULE_HOME/lib/user ? Thanks in advance. Nabil
|
|
|
RE: EJB ConnectorHi,
If you need EJB3, then that transport is the one you need. Unfortunately, it looks like there hasn't been much work on it. You could take a look at the source (if any) http://www.mulesource.org/display/EJBTHREE/Source and perhaps extend it yourself. Or you could try and subscribe to their mailing list and see if there's any info about it. http://admin.muleforge.org/projects/ejb3-transport/lists HTH Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM email: antoine.borg@... | blog: blog.ricston.com | web: ricston.com -----Original Message----- From: NabiL [mailto:elaomari.nabil@...] Sent: Friday, September 26, 2008 11:26 AM To: user@... Subject: RE: [mule-user] EJB Connector hi, I modified the endpoint but the problem still exists. <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello2"/> Mule EJB provider can only invoke EJB 2.x methods. a new provider (http://www.muleumo.org/display/EJBTHREE/Home) This provider supports invoking EJB3.0 methods. But i don't know how to implement this ? just copying the jar file ti MULE_HOME/lib/user ? Thanks in advance. Nabil antoine.borg wrote: > > Hi, > > The EJB connector should not have to be explicitly referenced on the > endpoint (at least, not according to > http://mule.mulesource.org/display/MULE2USER/EJB+Transport) unless you > have more than one connector declared. Do you? > > A > > Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP > 2, 1180 Uccle, Brussels, BELGIUM > email: antoine.borg@... | blog: blog.ricston.com | web: > ricston.com > > -----Original Message----- > From: NabiL [mailto:elaomari.nabil@...] > Sent: Thursday, September 25, 2008 3:35 PM > To: user@... > Subject: RE: [mule-user] EJB Connector > > > Hi antoine, > > Hi again, > > Important : > 1- I modified the SessionEJBBean and SessionEJBRemote by adding a > create > () > method) otherwise nothing is called from mule, why ? > > 2- Mule-conf.xml : ejb transport should be declared as below otherwise > it doesn't work !! > <endpoint address="ejb://localhost:1099/SessionEJB/remote?method=sayHello" > connector="ejbConnector"/> > > I exported my ejb projet into jar file and imported into mule project. > > Now the mule trace looks like this : > > INFO 2008-09-25 13:21:13,515 [main] org.mule.providers.ejb.EjbConnector: > Registering listener: CallEJB on endpointUri: > ejb://localhost:1099/SessionEJB/remote?method=sayHello > INFO 2008-09-25 13:21:13,875 [main] > org.mule.providers.ejb.EjbMessageReceiver: methodArgumentsList not set > on endpoint, assuming method call has no arguments ERROR 2008-09-25 > 13:21:13,875 [main] org.mule.MuleServer: > ********************************************************************** > ****** > **** > Message : Initialisation Failure: null > Type : org.mule.providers.ConnectException > Code : MULE_ERROR-84 > JavaDoc : > > html > Object : EjbMessageReceiver{this=179d854, > receiverKey=ejb://localhost:1099, > endpoint=ejb://localhost:1099/SessionEJB/remote?method=sayHello} > ********************************************************************** > ****** > **** > Exception stack is: > 1. null (java.lang.NullPointerException) > org.mule.providers.rmi.RmiMessageReceiver:104 > (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerExceptio > n.html > ) > 2. Initialisation Failure: null (org.mule.providers.ConnectException) > org.mule.providers.AbstractMessageReceiver:432 > (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectExc > eption > .html) > ********************************************************************** > ****** > **** > Root Exception stack trace: > java.lang.NullPointerException > at > > 104) > at > org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRece > iver.j > ava:411) > at > org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleAtt > emptCo > nnectionStrategy.java:25) > at > org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnecti > onStra > tegy.java:98) > at > org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRece > iver.j > ava:403) > at > org.mule.impl.model.AbstractComponent.connectListeners(AbstractCompone > nt.jav > a:628) > at > org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) > at > org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) > at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) > at org.mule.MuleManager.start(MuleManager.java:892) > at > org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXml > Config > urationBuilder.java:278) > at > org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXml > Config > urationBuilder.java:218) > at org.mule.MuleServer.initialize(MuleServer.java:294) > at org.mule.MuleServer.run(MuleServer.java:207) > at org.mule.MuleServer.start(MuleServer.java:195) > at org.mule.MuleServer.main(MuleServer.java:166) > > ********************************************************************** > ****** > **** > > ERROR 2008-09-25 13:21:13,906 [main] org.mule.MuleServer: > ********************************************************************** > ****** > **** > * A Fatal error has occurred while the server was running: > > * > * null (java.lang.NullPointerException) > > * > * > > * > * The error is fatal, the system must shutdown > > * > * Server started: 25/09/08 13:21 > > * > * Server shutdown: 25/09/08 13:21 > > * > ********************************************************************** > ****** > **** > > > > > antoine.borg wrote: >> >> Hello Nabil, >> >> The log file states that: >> >> java.lang.ClassNotFoundException: com.test1.model.SessionEJBRemote >> >> Presumably, this is one of your custom POJOs. Is it on the classpath? >> >> A >> >> >> Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., >> BP 2, 1180 Uccle, Brussels, BELGIUM >> email: antoine.borg@... | blog: blog.ricston.com | web: >> ricston.com >> >> -----Original Message----- >> From: NabiL [mailto:elaomari.nabil@...] >> Sent: Thursday, September 25, 2008 1:15 AM >> To: user@... >> Subject: RE: [mule-user] EJB Connector >> >> >> hi again, >> >> I forgot to add jbossall-client.jar to the classpath. Now the error >> message is changed as shown in the attached file >> >> http://www.nabble.com/file/p19659961/trace%2Bmule_ejb3.txt >> trace+mule_ejb3.txt >> >> why ?? >> >> NabiL >> >> antoine.borg wrote: >>> >>> Hi, >>> >>> In your SessionEJBBean, desc is initialised by being set to null. >>> When is this changed? If it is not, this could be your NPE >>> >>> A >>> >>> >>> Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., >>> BP 2, 1180 Uccle, Brussels, BELGIUM >>> email: antoine.borg@... | blog: blog.ricston.com | web: >>> ricston.com >>> >>> -----Original Message----- >>> From: NabiL [mailto:elaomari.nabil@...] >>> Sent: Friday, September 19, 2008 6:06 AM >>> To: user@... >>> Subject: [mule-user] EJB Connector >>> >>> >>> Hi All, >>> >>> I'm having problems (NullPointerException) invoking a SessionBean >>> from Mule. >>> >>> Environment: >>> JDK: 1.5 >>> OS: Windows XP - Service Pack 2 (5.1, x86) jboss-4.2.2.GA >>> >>> The SessionBean is an EJB 3.0 one: >>> >>> package com.test1.model; >>> >>> import javax.annotation.PostConstruct; import javax.ejb.Stateful; >>> import javax.interceptor.Interceptors; >>> >>> @Stateful(name="SessionEJB") >>> >>> public class SessionEJBBean implements SessionEJBRemote , >>> SessionEJBLocal { >>> private String desc = null; >>> >>> public SessionEJBBean() { >>> >>> >>> } >>> public void setDesc(String desc) { >>> this.desc=desc; >>> } >>> >>> public String sayHello(String name) { >>> return "hello :"+desc+" "+name; >>> } >>> >>> @PostConstruct >>> public void onConstruct(){ >>> System.out.println("onConstruct est invoquée !!"); >>> } >>> } >>> >>> >>> The JNDI stuff is working ok (i'm not getting NameNotFoundException >>> any more). >>> I can successfully invoke this EJB from a standalone client. >>> >>> >>> Mule-Conf.xml >>> >>> <connector name="ejbConnector" >>> className="org.mule.providers.ejb.EjbConnector"> >>> <properties> >>> >>> <property name="jndiInitialFactory" >>> >>> value="org.jnp.interfaces.NamingContextFactory"/> >>> <property name="jndiUrlPkgPrefixes" >>> >>> value="org.jboss.naming:org.jnp.interfaces"/> >>> <property name="jndiProviderUrl" >>> value="jnp://localhost:1099"/> >>> <property name="securityPolicy" >>> value="./conf/security.policy"/> >>> <property name="pollingFrequency" value="20000"/> >>> </properties> >>> >>> </connector> >>> >>> >>> >>> >>> <inbound-router> >>> >>> <endpoint >>> address="ejb://localhost:1099/com/test1/SessionEJB?method=sayHello" >>> connector="ejbConnector"/> >>> </inbound-router> >>> <outbound-router> >>> <router >>> className="org.mule.routing.outbound.OutboundPassThroughRouter"> >>> <endpoint address="stream://System.out"/> >>> </router> >>> </outbound-router> >>> >>> >>> ERROR 2008-09-19 03:08:39,843 [main] org.mule.MuleServer: >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> Message : Initialisation Failure: Remote EJBObject lookup >>> failed for >>> >>> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >>> java.lang.NullPointerException >>> Type : org.mule.providers.ConnectException >>> Code : MULE_ERROR-84 >>> JavaDoc : >>> >>> >> > >>> html >>> Object : EjbMessageReceiver{this=2ba88c, >>> >>> receiverKey=ejb://localhost:1099, >>> >>> endpoint=ejb://localhost:1099/SessionEJB?method=sayHello} >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> Exception stack is: >>> 1. null (java.lang.NullPointerException) >>> org.mule.providers.ejb.EjbConnector:48 >>> >>> (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerExcept >>> i >>> o >>> n.html >>> ) >>> 2. Remote EJBObject lookup failed for >>> >>> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >>> java.lang.NullPointerException (java.rmi.RemoteException) >>> org.mule.providers.ejb.EjbConnector:52 >>> >>> (http://java.sun.com/j2se/1.5.0/docs/api/java/rmi/RemoteException.ht >>> m >>> l >>> ) 3. Initialisation Failure: Remote EJBObject lookup failed for >>> >>> 'ejb://localhost:1099/SessionEJB?method=sayHello; nested exception is: >>> java.lang.NullPointerException (org.mule.providers.ConnectException) >>> org.mule.providers.AbstractMessageReceiver:432 >>> >>> (http://mule.mulesource.org/docs/apidocs/org/mule/providers/ConnectE >>> x >>> c >>> eption >>> .html) >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> Root Exception stack trace: >>> java.lang.NullPointerException >>> at >>> >>> >>> at >>> >>> >> > org.mule.providers.rmi.RmiMessageReceiver.doConnect(RmiMessageReceiver.java: >>> 86) >>> at >>> >>> org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRe >>> c >>> e >>> iver.j >>> ava:411 >>> >>> ) >>> at >>> >>> org.mule.providers.SingleAttemptConnectionStrategy.doConnect(SingleA >>> t >>> t >>> emptCo >>> nnectio >>> >>> nStrategy.java:25) >>> at >>> >>> org.mule.providers.AbstractConnectionStrategy.connect(AbstractConnec >>> t >>> i >>> onStra >>> tegy.ja >>> >>> va:98) >>> at >>> >>> org.mule.providers.AbstractMessageReceiver.connect(AbstractMessageRe >>> c >>> e >>> iver.j >>> ava:403 >>> >>> ) >>> at >>> >>> org.mule.impl.model.AbstractComponent.connectListeners(AbstractCompo >>> n >>> e >>> nt.jav >>> a:628) >>> at >>> org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:225) >>> at >>> org.mule.impl.model.AbstractComponent.start(AbstractComponent.java:204) >>> at org.mule.impl.model.AbstractModel.start(AbstractModel.java:323) >>> at org.mule.MuleManager.start(MuleManager.java:892) >>> at >>> >>> org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleX >>> m >>> l >>> Config >>> uration >>> >>> Builder.java:278) >>> at >>> >>> org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleX >>> m >>> l >>> Config >>> uration >>> >>> Builder.java:218) >>> at org.mule.MuleServer.initialize(MuleServer.java:294) >>> at org.mule.MuleServer.run(MuleServer.java:207) >>> at org.mule.MuleServer.start(MuleServer.java:195) >>> at org.mule.MuleServer.main(MuleServer.java:166) >>> >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> >>> ERROR 2008-09-19 03:08:39,859 [main] org.mule.MuleServer: >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> * A Fatal error has occurred while the server was running: >>> >>> * >>> * null (java.lang.NullPointerException) >>> >>> * >>> * >>> >>> * >>> * The error is fatal, the system must shutdown >>> >>> * >>> * Server started: 19/09/08 03:08 >>> >>> * >>> * Server shutdown: 19/09/08 03:08 >>> >>> * >>> ******************************************************************** >>> * >>> * >>> ****** >>> **** >>> >>> Who can help me asap. >>> >>> Thanks in advance >>> Nabil >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/EJB-Connector-tp19565911p19565911.html >>> Sent from the Mule - User mailing list archive at Nabble.com. >>> >>> >>> -------------------------------------------------------------------- >>> - To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> -------------------------------------------------------------------- >>> - To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/EJB-Connector-tp19565911p19659961.html >> Sent from the Mule - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/EJB-Connector-tp19565911p19669641.html > Sent from the Mule - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > -- View this message in context: http://www.nabble.com/EJB-Connector-tp19565911p19685176.html Sent from the Mule - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |