I get the following exception when I try to connect to a solace box via JMS and do the jndi lookup:
Exception in thread "Thread-33" org.wso2.carbon.event.input.adaptor.core.exception.InputEventAdaptorEventProcessingException: Cannot acquire JNDI context, JMS Connection factory : poc_jndi_name7 or default destination : null for JMS CF : StrataTestInputEvent using : {java.naming.provider.url=tcp://10.250.242.89:55555, java.naming.factory.initial=com.solacesystems.jndi.SolJNDIInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.SubscriptionDurable=false, transport.jms.ConnectionFactoryJNDIName=poc_jndi_name7} at org.wso2.carbon.event.input.adaptor.jms.internal.util.JMSConnectionFactory.(JMSConnectionFactory.java:102) at org.wso2.carbon.event.input.adaptor.jms.JMSEventAdaptorType.createJMSAdaptorListener(JMSEventAdaptorType.java:303) at org.wso2.carbon.event.input.adaptor.jms.JMSEventAdaptorType.tryStartAdaptor(JMSEventAdaptorType.java:262) at org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceHolder.loadLateStartEventAdaptors(JMSEventAdaptorServiceHolder.java:66) at org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceHolder$1.run(JMSEventAdaptorServiceHolder.java:43) at java.lang.Thread.run(Thread.java:745) Caused by: javax.naming.NamingException: JNDI lookup failed - 401: Incomplete Authentication Configuration at com.solacesystems.jndi.SolJNDIInitialContextFactory$SolJNDIInitialContextImpl.lookup(SolJNDIInitialContextFactory.java:210) at javax.naming.InitialContext.lookup(InitialContext.java:411) at javax.naming.InitialContext.lookup(InitialContext.java:411) at org.wso2.carbon.event.input.adaptor.jms.internal.util.JMSUtils.lookup(JMSUtils.java:350) at org.wso2.carbon.event.input.adaptor.jms.internal.util.JMSConnectionFactory.(JMSConnectionFactory.java:93) ... 5 more
I have to specify the java.naming.security parameters (principal and credentials) in the startup script as they are required by my solace box for the input jndi lookup and there is no way to specify them in the tool (either the xml or the gui). If I try and specify them in the xml I get an error when I try and save the xml via the management console.
here is my configuration:
<?xml version="1.0" encoding="UTF-8"?>
<inputEventAdaptor name="StrataTestInputEvent" statistics="disable"
trace="disable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
<property name="java.naming.provider.url">tcp://10.250.242.89:55555</property>
<property name="transport.jms.SubscriptionDurable">false</property>
<property name="java.naming.factory.initial">com.solacesystems.jndi.SolJNDIInitialContextFactory</property>
<property name="transport.jms.ConnectionFactoryJNDIName">poc_jndi_name7</property>
<property name="transport.jms.DestinationType">topic</property>
</inputEventAdaptor>
This deploy's fine... but if I specify : name I get : Failed to update event adaptor, Exception: java.naming.security.principal is not a valid property for this Input Event Adaptor type : jms
So I have added it via -D to the wso2server.sh file and now the following happens.
I add an event stream definition...
{
"name": "org.wso2.sample.stock.quote.basic",
"version": "1.0.0",
"payloadData": [
{
"name": "price",
"type": "DOUBLE"
},
{
"name": "symbol",
"type": "STRING"
}
]
}
and then add a builder...
<?xml version="1.0" encoding="UTF-8"?>
<eventBuilder name="StrataTestEventStream" statistics="disable"
trace="disable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="StrataTestInputEvent" eventAdaptorType="jms">
<property name="transport.jms.Destination">poc_topic7</property>
</from>
<mapping customMapping="disable" type="xml"/>
<to streamName="StrataInputEventStream" version="1.0.0"/>
</eventBuilder>
Now the server deploy's and thinks its ok... but its not.. now its in a weird state where I get
Caused by: org.wso2.carbon.event.input.adaptor.core.exception.InputEventAdaptorEventProcessingException: There is no subscription for poc_topic7 for the subscriptionId:bce96483-76ea-4313-8a0e-bf500ddb3002 at org.wso2.carbon.event.input.adaptor.jms.JMSEventAdaptorType.unsubscribe(JMSEventAdaptorType.java:246) at org.wso2.carbon.event.input.adaptor.core.internal.CarbonInputEventAdaptorService.unsubscribe(CarbonInputEventAdaptorService.java:120) ... 73 more
and the topic is defined .. If I restart the server it thinks its up but its not...
Your URL doesn't look right for Solace JNDI.
Try changing java.naming.provider.url from "tcp://10.250.242.89:55555" to "smf://10.250.242.89:55555"
Solace JNDI communications is over the Solace Message Format (SMF) wireline protocol, just like the JMS client connection.
You may also need to set java.naming.security.principal to indicate your username and message-vpn like "robert@myvpnname" or just "robert" if your username is on the default message-vpn.