apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Priyanka Gugale <priya...@datatorrent.com>
Subject Re: [malhar-users] JMS sample application
Date Tue, 13 Oct 2015 10:23:20 GMT
>From exception,  java.lang.ClassCastException:
com.solacesystems.jndi.SolJNDIInitialContextFactory
cannot be cast to javax.jms.ConnectionFactory, it looks like problem is
with loading Solace JMS and not  with having ActiveMQ in classpath.

Just to avoid any such possibility can you try to update Malhar code
directly? The code is available at
https://github.com/apache/incubator-apex-malhar
*Checkout to branch release-3.0.0*

Code changes you might need,
1. JMSBase class update getConnectionFactory method to initialize
"SolJNDIInitialContextFactory"
directly.
2. Update library/pom.xml to refer to your jar

Compile library project and install the updated jar in your local
repository. (use mvn install goal)

Now compile your application with this new malhar-library jar and try it
out.

Hopefully it would help you narrow down the problem.

-Priyanka

On Tue, Oct 13, 2015 at 3:31 PM, Eric Asuncion <easuncion@gmail.com> wrote:

> Yes it is. I suspect ActiveMQ jar is still somewhere in the classpath.
> I've removed the default ActiveMQ jms client jar from the Application
> Package and replaced it with appropriate JMS implementation jars.
>
> On Tuesday, 13 October 2015 17:43:50 UTC+8, Priyanka Gugale wrote:
>>
>> Ohh, sorry I missed that. Yes you seem to have configured the class name.
>>
>> I don't have access to Solace JMS library. Can you confirm that your
>> factory class (which you configured) implements "
>> javax.jms.ConnectionFactory".
>>
>> -Priyanka
>>
>> On Tue, Oct 13, 2015 at 2:37 PM, Eric Asuncion <easu...@gmail.com> wrote:
>>
>>> Hi Priyanka,
>>>
>>> Based on the error message, it looks like I've configured the Connection
>>> Factory property. Am I mistaken?
>>>
>>> Thnx,
>>> Eric
>>>
>>>
>>> On Tuesday, 13 October 2015 13:16:16 UTC+8, Priyanka Gugale wrote:
>>>>
>>>> Hi Eric,
>>>>
>>>> I assume you are not using dtIngest and written your own app. And you
>>>> are using the JMSBase operator.
>>>> Have you configured the factory class name in properties file? If you
>>>> look at the JMSBase operator code it expects a "connectionFactoryClass"
>>>> class name if you are using library other than ActiveMQ.
>>>>
>>>> In your dt-site.xml set following property:
>>>>
>>>> <property>
>>>>
>>>> <name>dt.application.<appName>.operator.<operatorName>.prop.connectionFactoryClass</name>
>>>>   <value>ConnectionFactoryClassName</value>
>>>> </property>
>>>>
>>>> Replace appName, operatorName and the actual class name in value with
>>>> the right values.
>>>>
>>>> -Priyanka
>>>>
>>>>
>>>>
>>>> On Mon, Oct 12, 2015 at 9:42 PM, Eric Asuncion <easu...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Replaced ActiveMQ JMS implementation jar with Solace JMS jar files in
>>>>> the package archive and I encountered the following error:
>>>>>
>>>>> Abandoning deployment due to setup failure.
>>>>> java.lang.RuntimeException: Failed to create connection factory.
>>>>> at
>>>>> com.datatorrent.lib.io.jms.JMSBase.getConnectionFactory(JMSBase.java:372)
>>>>> at
>>>>> com.datatorrent.lib.io.jms.JMSBase.createConnection(JMSBase.java:336)
>>>>> at
>>>>> com.datatorrent.lib.io.jms.AbstractJMSInputOperator.activate(AbstractJMSInputOperator.java:235)
>>>>> at
>>>>> com.datatorrent.lib.io.jms.AbstractJMSInputOperator.activate(AbstractJMSInputOperator.java:70)
>>>>> at com.datatorrent.stram.engine.Node.activate(Node.java:579)
>>>>> at
>>>>> com.datatorrent.stram.engine.StreamingContainer.setupNode(StreamingContainer.java:1299)
>>>>> at
>>>>> com.datatorrent.stram.engine.StreamingContainer.access$100(StreamingContainer.java:87)
>>>>> at
>>>>> com.datatorrent.stram.engine.StreamingContainer$2.run(StreamingContainer.java:1346)
>>>>> Caused by: java.lang.ClassCastException:
>>>>> com.solacesystems.jndi.SolJNDIInitialContextFactory cannot be cast to
>>>>> javax.jms.ConnectionFactory
>>>>> at
>>>>> com.datatorrent.lib.io.jms.JMSBase.getConnectionFactory(JMSBase.java:363)
>>>>> ... 7 more
>>>>>
>>>>> Note, I build my test application using DT  3.0 version and running it
>>>>> on DT Sandbox release. Any idea? Should I use 3.1.1-RC2 release to build
my
>>>>> test app? I tried to build it using 3.1 but encountered
>>>>> "netlet-1.2.0-SNAPSHOT.jar is missing" error.
>>>>>
>>>>> Thanks,
>>>>> Eric
>>>>>
>>>>> On Friday, 9 October 2015 20:54:58 UTC+8, Priyanka Gugale wrote:
>>>>>>
>>>>>> We are shipping activeMQ client jar with dtIngest. You should be
able
>>>>>> to have any JMS server and dtIngest should read messages from that.
If you
>>>>>> face any issues please let us know.
>>>>>>
>>>>>> -Priyanka
>>>>>>
>>>>>> On Fri, Oct 9, 2015 at 5:27 PM, Eric Asuncion <easu...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Quite simple use case; subscribe to JMS topic and archive message
in
>>>>>>> Hadoop for later analysis.
>>>>>>>
>>>>>>> How do you add the JMS implementation provider Jar files? Do
I need
>>>>>>> to add them to DT classpath configuration?
>>>>>>>
>>>>>>> Apology for simple query since I am new to DT/Apex.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 9 Oct 2015, at 6:39 pm, Priyanka Gugale <priy...@datatorrent.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Eric,
>>>>>>>
>>>>>>> Can you elaborate on your use case?
>>>>>>>
>>>>>>> We have JMS input operator. And we also have dtIngest application
>>>>>>> which is free to use (not open sourced though). Once configured
for JMS
>>>>>>> input, dtIngest will read JMS message and sent it to some file
based
>>>>>>> destination or other messaging systems like kafka etc. You can
read about
>>>>>>> dtIngest here
>>>>>>> <https://www.datatorrent.com/dtingest-arrival-scalable-fault-tolerant-bigdata-ingestion/>.
>>>>>>> It's also available for download on Datatorrent site.
>>>>>>> <https://www.datatorrent.com/download/>
>>>>>>>
>>>>>>> -Priyanka
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Oct 9, 2015 at 3:51 PM, Eric Asuncion <easu...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Any sample demos/applications that ingests JMS messages?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Eric
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the
Google
>>>>>>>> Groups "Malhar" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails
from it,
>>>>>>>> send an email to malhar-users...@googlegroups.com.
>>>>>>>> To post to this group, send email to malhar...@googlegroups.com.
>>>>>>>> Visit this group at http://groups.google.com/group/malhar-users.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to a topic
in
>>>>>>> the Google Groups "Malhar" group.
>>>>>>> To unsubscribe from this topic, visit
>>>>>>> https://groups.google.com/d/topic/malhar-users/SDVmCEyuH0Y/unsubscribe
>>>>>>> .
>>>>>>> To unsubscribe from this group and all its topics, send an email
to
>>>>>>> malhar-users...@googlegroups.com.
>>>>>>> To post to this group, send email to malhar...@googlegroups.com.
>>>>>>> Visit this group at http://groups.google.com/group/malhar-users.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Malhar" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from
it,
>>>>>>> send an email to malhar-users...@googlegroups.com.
>>>>>>> To post to this group, send email to malhar...@googlegroups.com.
>>>>>>> Visit this group at http://groups.google.com/group/malhar-users.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Malhar" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to malhar-users...@googlegroups.com.
>>>>> To post to this group, send email to malhar...@googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/malhar-users.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Malhar" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to malhar-users...@googlegroups.com.
>>> To post to this group, send email to malhar...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/malhar-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Malhar" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to malhar-users+unsubscribe@googlegroups.com.
> To post to this group, send email to malhar-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/malhar-users.
> For more options, visit https://groups.google.com/d/optout.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message