tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: resource adapter config with openEJB
Date Mon, 04 Jan 2010 21:47:25 GMT

On Dec 30, 2009, at 8:25 PM, Jason Russo wrote:

> Well, I feel a bit dumb, but I think I figured out the problem  
> here.  It
> seems that the ra.xml within the generic adapter rar package has a tag
> within the <outbound-resourceadapter/> tag as such:
>
>            <transaction-support>
>                XATransaction
>            </transaction-support>
>
> Notice the whitespace.  It appears that openEjb chokes with the below
> error when reading this tag because of the whitespace in between the  
> tag
> ends.  When I remove the carriage returns and other whitespace, like  
> so:
>
>            <transaction-support>XATransaction</transaction-support>
>
> The adapter deploys fine.  So I had to rebuild the genericra.rar  
> with a
> modified ra.xml to correct this tag.  What I don't understand is that
> there are many other tags in the ra.xml that have the same kind
> whitespace within them, but openEjb does not have a problem with those
> tags.  I'm going to suggest that this is a bug.

Definitely seems so.  Might be something we can just have trimmed  
right that JAXB tree.  Seem to recall there is some easy way to ask  
jaxb to trim text input.

> So now that I have been able to deploy the generic adapter, I seem to
> have this problem with getting my MDB to use this adapter.  It appears
> that instead of using this adapter, my MDB is using the 'Default JMS
> Resource Adapter'.  Can anyone tell me how to link to the reference  
> for
> my own adapter?  Is this something I would set up in the
> openejb-jar.xml?

Are you packaging your rar inside the app or deploying it separately?   
We can get it to work either way, just the "automatic" way is when the  
rar is in an ear with the MDB.

-David


>
>
>
> Jason Russo
>
> Application Developer
>
> Genscape– See the Energy
>
> 445 E. Market St, Suite 200
>
> Louisville, KY 40202
>
> Tel: 502-583-2091
>
> www.genscape.com
>
>
>
> On Wed, 2009-12-30 at 12:45 -0500, Jason Russo wrote:
>
>> To be more specific, when I install the adapter, I keep getting the
>> following error message in the log.  Again, this is from openEjb
>> embedded in Tomcat 6.x (You may notice the references to Fiorano  
>> JMS.  I
>> am first trying to test with Fiorano, as that is our older JMS  
>> provider,
>> but eventually we want to use this with Tibco).  Any help would be
>> appreciated:
>>
>>
>> 2009-12-30 12:39:17,229 - INFO  - Configuring
>> Service(id=genscape-generic-adapter-1.0-SNAPSHOTRA, type=Resource,
>> provider-id=genscape-generic-adapter-1.0-SNAPSHOTRA)
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [XATopicConnectionFactoryClassName 
>> =fiorano.jms.runtime.pubsub.xa.FioranoXATopicConnectionFactoryProxy]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [QueueConnectionFactoryClassName 
>> =fiorano.jms.runtime.ptp.FioranoQueueConnectionFactory]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [TopicConnectionFactoryClassName 
>> =fiorano.jms.runtime.pubsub.FioranoTopicConnectionFactory]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [QueueClassName=fiorano.jms.runtime.ptp.FioranoQueue]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [ConnectionFactoryClassName 
>> =fiorano.jms.runtime.common.FioranoConnectionFactoryProxy]
>> 2009-12-30 12:39:17,229 - DEBUG - [UserName=anonymous]
>> 2009-12-30 12:39:17,229 - DEBUG - [Password=<hidden>]
>> 2009-12-30 12:39:17,229 - DEBUG - [ProviderIntegrationMode=jndi]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [JndiProperties 
>> =java.naming.factory.url.pkgs=fiorano.jms.runtime.naming
>> java 
>> .naming 
>> .factory 
>> .initial=fiorano.jms.runtime.naming.FioranoInitialContextFactory  
>> java.naming.provider.url=http://hades.genscape.com:1656  
>> java.naming.provider.principal=anonymous  
>> java.naming.provider.credentials=anonymous]
>> 2009-12-30 12:39:17,229 - DEBUG - [SupportsXA=false]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [XAConnectionFactoryClassName 
>> =fiorano.jms.runtime.common.FioranoXAConnectionFactory]
>> 2009-12-30 12:39:17,229 - DEBUG -
>> [TopicClassName=fiorano.jms.runtime.pubsub.FioranoTopic]
>> 2009-12-30 12:39:17,230 - DEBUG -
>> [XAQueueConnectionFactoryClassName 
>> =fiorano.jms.runtime.ptp.xa.FioranoXAQueueConnectionFactory]
>> 2009-12-30 12:39:17,231 - ERROR - FATAL ERROR: Unknown error in
>> Assembler.  Please send the following stack trace and this message to
>> users@openejb.apache.org :
>> java.lang.NullPointerException
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config.AppInfoBuilder.buildConnectorModules(AppInfoBuilder.java:346)
>> 	at
>> org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java: 
>> 106)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:604)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:488)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .getOpenEjbConfiguration(ConfigurationFactory.java:356)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java: 
>> 299)
>> 	at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>> 278)
>> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> 	at
>> org 
>> .apache.openejb.tomcat.catalina.TomcatLoader.init(TomcatLoader.java: 
>> 123)
>> 	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:597)
>> 	at org.apache.openejb.loader.Embedder.init(Embedder.java:75)
>> 	at  
>> org.apache.openejb.tomcat.loader.TomcatHook.hook(TomcatHook.java:98)
>> 	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:597)
>> 	at
>> org 
>> .apache 
>> .openejb.tomcat.loader.TomcatEmbedder.embed(TomcatEmbedder.java:77)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .tomcat.loader.OpenEJBListener.lifecycleEvent(OpenEJBListener.java: 
>> 53)
>> 	at
>> org 
>> .apache 
>> .catalina 
>> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>> 	at
>> org 
>> .apache.catalina.core.StandardServer.initialize(StandardServer.java: 
>> 770)
>> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
>> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
>> 	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:597)
>> 	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
>>
>> 2009-12-30 12:39:17,232 - FATAL - OpenEJB has encountered a fatal  
>> error
>> and cannot be started: Assembler failed to build the container  
>> system.
>> org.apache.openejb.OpenEJBException: java.lang.NullPointerException:
>> null
>> 	at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>> 292)
>> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
>> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
>> 	at
>> org 
>> .apache.openejb.tomcat.catalina.TomcatLoader.init(TomcatLoader.java: 
>> 123)
>> 	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:597)
>> 	at org.apache.openejb.loader.Embedder.init(Embedder.java:75)
>> 	at  
>> org.apache.openejb.tomcat.loader.TomcatHook.hook(TomcatHook.java:98)
>> 	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:597)
>> 	at
>> org 
>> .apache 
>> .openejb.tomcat.loader.TomcatEmbedder.embed(TomcatEmbedder.java:77)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .tomcat.loader.OpenEJBListener.lifecycleEvent(OpenEJBListener.java: 
>> 53)
>> 	at
>> org 
>> .apache 
>> .catalina 
>> .util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>> 	at
>> org 
>> .apache.catalina.core.StandardServer.initialize(StandardServer.java: 
>> 770)
>> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
>> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
>> 	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:597)
>> 	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
>> Caused by: java.lang.NullPointerException
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config.AppInfoBuilder.buildConnectorModules(AppInfoBuilder.java:346)
>> 	at
>> org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java: 
>> 106)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:604)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .configureApplication(ConfigurationFactory.java:488)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .config 
>> .ConfigurationFactory 
>> .getOpenEjbConfiguration(ConfigurationFactory.java:356)
>> 	at
>> org 
>> .apache 
>> .openejb 
>> .assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java: 
>> 299)
>> 	at
>> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
>> 278)
>> 	... 25 more
>>
>>
>>
>> Jason Russo
>>
>> Application Developer
>>
>> Genscape– See the Energy
>>
>> 445 E. Market St, Suite 200
>>
>> Louisville, KY 40202
>>
>> Tel: 502-583-2091
>>
>> www.genscape.com
>>
>>
>>
>> On Wed, 2009-12-30 at 11:22 -0500, Jason Russo wrote:
>>
>>> Hello all,
>>>
>>> I am new to openEjb, and I am trying to use it to develop a proof of
>>> concept for my company.  I want to use openEjb to build a message  
>>> driven
>>> bean that can read messages from an external Tibco provider.   
>>> Since we
>>> use the Tomcat 6.x platform for deploying applications, I have set  
>>> up an
>>> environment with openEjb embedded into Tomcat to test this POC.
>>>
>>> I've been doing a lot of research over the past two weeks, and  
>>> have read
>>> that openEjb is supposed to support installing a JCA resource  
>>> adapter.
>>> Since Tibco does not provide me with an adapter of their own, I have
>>> looked into using Sun's generic adapter, but when I try to deploy  
>>> it to
>>> openEjb, is will not install properly.  Can I get some help on how  
>>> to
>>> install and configure the genericRA into openEjb so it can read  
>>> from an
>>> external provider?
>>>
>>> Many thanks.
>>>
>>>
>>>
>>> Jason Russo
>>>
>>> Application Developer
>>>
>>> Genscape– See the Energy
>>>
>>> 445 E. Market St, Suite 200
>>>
>>> Louisville, KY 40202
>>>
>>> Tel: 502-583-2091
>>>
>>> www.genscape.com
>>>
>>>
>>>


Mime
View raw message