[mule-user] Mule 2.1.2 using EJB outbound NullPointerException

0 views
Skip to first unread message

Vash

unread,
Jul 16, 2009, 8:07:49 AM7/16/09
to us...@mule.codehaus.org

Hi all!

I'm using Mule 2.1.2 that receives a message from a VM, and send the answer
to a ejb container in Weblogic.

Everithing works fine, but when it tries to send the message to the ejb
endpoint, always returns me a NullPointerException on Hashtable:396, and
when i see the trace, it seems to be an error with the setParameter method.

I return an String from the component... and i define the method arguments
on the outbound.

The configuration is:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.1"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.1"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.1"
xmlns:cxf="http://www.mulesource.org/schema/mule/cxf/2.1"
xmlns:http="http://www.mulesource.org/schema/mule/http/2.1"
xmlns:ejb="http://www.mulesource.org/schema/mule/ejb/2.1"
xmlns:rmi="http://www.mulesource.org/schema/mule/rmi/2.1"

xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.1
http://www.mulesource.org/schema/mule/core/2.1/mule.xsd
http://www.mulesource.org/schema/mule/stdio/2.1
http://www.mulesource.org/schema/mule/stdio/2.1/mule-stdio.xsd
http://www.mulesource.org/schema/mule/vm/2.1
http://www.mulesource.org/schema/mule/vm/2.1/mule-vm.xsd
http://www.mulesource.org/schema/mule/jms/2.1
http://www.mulesource.org/schema/mule/jms/2.1/mule-jms.xsd
http://www.mulesource.org/schema/mule/cxf/2.1
http://www.mulesource.org/schema/mule/cxf/2.1/mule-cxf.xsd
http://www.mulesource.org/schema/mule/http/2.1
http://www.mulesource.org/schema/mule/http/2.1/mule-http.xsd
http://www.mulesource.org/schema/mule/ejb/2.1
http://www.mulesource.org/schema/mule/ejb/2.1/mule-ejb.xsd
http://www.mulesource.org/schema/mule/rmi/2.1
http://www.mulesource.org/schema/mule/rmi/2.1/mule-rmi.xsd">


<description>
Componente simple para la entrada al servicio de gestion de usuarios y su
acceso al webservice
</description>

<configuration >

<default-threading-profile doThreading="true"/>
<default-dispatcher-threading-profile doThreading="true"
maxBufferSize="50" threadWaitTimeout="2000" maxThreadsActive="20000"
maxThreadsIdle="50" poolExhaustedAction="RUN" threadTTL="5000"/>
<default-receiver-threading-profile doThreading="true"
maxBufferSize="50" threadWaitTimeout="2000" maxThreadsActive="20000"
maxThreadsIdle="50" poolExhaustedAction="RUN" threadTTL="5000"/>
<default-service-threading-profile doThreading="true" maxBufferSize="50"
threadWaitTimeout="2000" maxThreadsActive="20000" maxThreadsIdle="50"
poolExhaustedAction="RUN" threadTTL="5000"/>
</configuration>

<!-- <spring:bean name="jndiFactory"
class="org.mule.transport.ejb.EjbMessageDispatcherFactory"/>

<spring:bean name="jndiContext" factory-bean="jndiFactory"
factory-method="create"/> -->




<ejb:connector name="weblogicEjbConnector"
jndiInitialFactory="weblogic.jndi.WLInitialContextFactory"
jndiProviderUrl="t3://10.16.105.183:7001" >
</ejb:connector>


<!--
The stdio connector is used to send and receive information via System.in
and System.out.
Note this connector is only really useful for testing purposes.
promptMessage - is what is written to the console
messageDelayTime - is the time in milliseconds before the user is prompted
again.
These properties are set as bean properties on the connector.
-->
<cxf:connector name="cxf"/>

<spring:bean id="fEntrada" class="filtros.FiltroEntrada" />


<!--
The Mule model initialises and manages your UMO components
-->

<model name="echoSample">
<service name="EchoUMO">
<!-- any number of endpoints can be added to an inbound router -->
<inbound>
<vm:inbound-endpoint path="1">
<filter ref="fEntrada"/>
</vm:inbound-endpoint>
</inbound>

<component class="prueba.ServicioPruebaImpl"/>

<!--
An outbound router can have one or more router configurations that can
be
invoked depending on business rules, message contents, headers or any
other
criteria. The pass-through-router is a router that automatically passes
on every message it receives
-->
<outbound>
<filtering-router>
<ejb:outbound-endpoint host="10.16.105.183" port="7001"
object="es.telefonica.ejb.ejemplo.Integracion" name="con" method="retorno"
connector-ref="weblogicEjbConnector"
methodArgumentTypes="java.lang.String"/>
<!-- address="ejb://localhost:7001/ejb.Integracion?method=retorno" -->
</filtering-router>
</outbound>

</service>

</model>
</mule>


The stacktrace is:

44500 [weblogicEjbConnector.dispatcher.1] ERROR
org.mule.retry.notifiers.Connect
Notifier - Failed to connect/reconnect:
endpoint.outbound.ejb://10.16.105.183:7
001/es.telefonica.ejb.ejemplo.Integracion. Root Exception was: null. Type:
class
java.lang.NullPointerException
44531 [weblogicEjbConnector.dispatcher.1] ERROR
org.mule.DefaultExceptionStrateg
y -
********************************************************************************

Message : Initialisation Failure: null
Type : org.mule.retry.RetryPolicyExhaustedException
Code : MULE_ERROR-84
JavaDoc :
http://www.mulesource.org/docs/site/current2/apidocs/org
/mule/retry/RetryPolicyExhaustedException.html
Object :
endpoint.outbound.ejb://10.16.105.183:7001/es.telefonica
.ejb.ejemplo.Integracion
********************************************************************************

Exception stack is:
1. null (java.lang.NullPointerException)
java.util.Hashtable:396
(http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Nul
lPointerException.html)
2. Initialisation Failure: null
(org.mule.retry.RetryPolicyExhaustedException)
org.mule.retry.policies.AbstractPolicyTemplate:88
(http://www.mulesource.org/d
ocs/site/current2/apidocs/org/mule/retry/RetryPolicyExhaustedException.html)
********************************************************************************

Root Exception stack trace:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at java.util.Properties.setProperty(Properties.java:128)
at java.lang.System.setProperty(System.java:701)
at
org.mule.transport.rmi.RmiMessageDispatcher.doConnect(RmiMessageDispa
tcher.java:47)
at
org.mule.transport.AbstractConnectable$1.doWork(AbstractConnectable.j
ava:204)
at
org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicy
Template.java:51)
at
org.mule.transport.AbstractConnectable.connect(AbstractConnectable.ja
va:197)
at
org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessa
geDispatcher.java:270)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.run
Worker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)

********************************************************************************


44610 [weblogicEjbConnector.dispatcher.1] ERROR
org.mule.DefaultExceptionStrateg
y - The object that failed was:
endpoint.outbound.ejb://10.16.105.183:7001/es.telefonica.ejb.ejemplo.Integracion
--
View this message in context: http://www.nabble.com/Mule-2.1.2-using-EJB-outbound-NullPointerException-tp24515136p24515136.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


Antoine Borg

unread,
Jul 17, 2009, 2:35:22 AM7/17/09
to us...@mule.codehaus.org
I'm not much of an EJB user but the message:

Failed to connect/reconnect


makes me think that perhaps Mule is not connected to 10.16.105.183

HTH

A

Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

email: _antoin...@ricston.com <mailto:antoin...@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>

Vash

unread,
Jul 17, 2009, 5:58:05 AM7/17/09
to us...@mule.codehaus.org

Hi Antoine,

It must be a problem with the outbound. I tried to put another component
acting like a EJB client and it's works fine.

The ejb-connector works fine, because when i down the server, it fails
trying to connect to the t3 server. It must be a problem with the
ejb:outbound then...

Thanks anyway. I will try another ways to do that.

Bye!

--
View this message in context: http://www.nabble.com/Mule-2.1.2-using-EJB-outbound-NullPointerException-tp24515136p24531684.html


Sent from the Mule - User mailing list archive at Nabble.com.

Mario Klaver

unread,
Jul 17, 2009, 6:53:36 AM7/17/09
to us...@mule.codehaus.org
You didn't set a securityPolicy on your ejb connector.

See [http://www.mulesource.org/display/MULE2CB/Integration+with+BEA+WebLogic] for an example.

Success,
Mario

Reply all
Reply to author
Forward
0 new messages