users@genericjmsra.java.net

RE: RE: Re: InvalidPropertyException when deploying MDB on Weblogic

From: Evans, Martin <martin.evans_at_credit-suisse.com>
Date: Fri, 7 Aug 2009 14:38:12 -0400

Here's part of the stack trace, looks the JNDI name isn't being passed
through?

If the name were passed through, I would expect to see a name not found
exception. I can also emulate this exception in code by passing a null
String to lookup.

Weblogic stack;

Caused by: java.lang.NullPointerException
        at
javax.naming.InitialContext.getURLScheme(InitialContext.java:269)
        at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:3
18)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at
com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObje
ct(ObjectBuilderFactory.java:98)
        at
com.sun.genericra.util.ObjectBuilder.build(ObjectBuilder.java:99)
        at
com.sun.genericra.inbound.EndpointConsumer.initializeAdministeredObjects
(EndpointConsumer.java:333)
        at
com.sun.genericra.inbound.EndpointConsumer.<init>(EndpointConsumer.java:
75)
        at
com.sun.genericra.GenericJMSRA.endpointActivation(GenericJMSRA.java:214)


My code stack;

         
Exception in thread "Main Thread" java.lang.NullPointerException
        at
javax.naming.InitialContext.getURLScheme(InitialContext.java:269)
        at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:3
18)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.cs.messaging.JMSBrowser.start(JMSBrowser.java:93)
        at com.cs.messaging.JMSBrowserTest.main(JMSBrowserTest.java:11)


Offending code;

        String s=null;
        qcf = (QueueConnectionFactory)ic.lookup(s);

Martin



-----Original Message-----
From: Evans, Martin
Sent: 07 August 2009 12:01
To: users_at_genericjmsra.dev.java.net
Subject: RE: Re: InvalidPropertyException when deploying MDB on Weblogic


I do, I'm using it elsewhere.

Martin


 

-----Original Message-----
From: Ramesh.Parthasarathy_at_Sun.COM [mailto:Ramesh.Parthasarathy_at_Sun.COM]

Sent: 07 August 2009 11:59
To: users_at_genericjmsra.dev.java.net
Subject: Re: InvalidPropertyException when deploying MDB on Weblogic

Hi Martin,
    Thanks for clarifying, do you have the fscontext.jar file , as well
as the WSMQ client jar files in the Weblogic server classpath ?

Thanks
-Ramesh

Evans, Martin wrote:
> Hi Ramesh,
>
> Here's my weblogic-ejb-jar.xml
>
> <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
> http://www.bea.com/ns/weblogic/920/weblogic-ejb-jar.xsd">
> <weblogic-enterprise-bean>
> <ejb-name>MessageProcessor</ejb-name>
> <message-driven-descriptor>
> <pool>
> <max-beans-in-free-pool>1</max-beans-in-free-pool>
> <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
> </pool>
>
>
<resource-adapter-jndi-name>GenericJMSConnector</resource-adapter-jndi-n
> ame>
> </message-driven-descriptor>
> </weblogic-enterprise-bean>
> </weblogic-ejb-jar>
>
>
> And in weblogic-ra.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
> http://www.bea.com/ns/weblogic/90/weblogic-ra.xsd">
> <jndi-name>GenericJMSConnector</jndi-name>
> <enable-access-outside-app>true</enable-access-outside-app>
>
>
<enable-global-access-to-classes>true</enable-global-access-to-classes>
> <properties>
> <property>
> <name>ProviderIntegrationMode</name>
> <value>jndi</value>
> </property>
> <property>
> <name>SupportsXA</name>
> <value>false</value>
> </property>
> <property>
> <name>JndiProperties</name>
>
<value>java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFa
> ctory,java.naming.provider.url=file:/H:/JNDI</value>
> </property>
> <property>
> <name>RMPolicy</name>
> <value>ProviderManaged</value>
> </property>
>
> </properties>
> </weblogic-connector>
>
>
> I'm using file based JNDI for this test so everything is local.
>
> Thanks,
>
>
> Martin
>
>
>
> -----Original Message-----
> From: Ramesh.Parthasarathy_at_Sun.COM
[mailto:Ramesh.Parthasarathy_at_Sun.COM]
>
> Sent: 07 August 2009 11:44
> To: users_at_genericjmsra.dev.java.net
> Subject: Re: InvalidPropertyException when deploying MDB on Weblogic
>
> Hi Martin,
> Do you have this section in the weblogic-ejb-jar.xml
>
> <message-driven-descriptor>
> <!-- instead of GenericRAJMS use whatever is the jndi name configured

> in weblogic-ra.xml-->
> <resource-adapter-jndi-name>GenericRAJMS</resource-adapter-jndi-name>
> </message-driven-descriptor>
>
> Thanks
> -Ramesh
> Evans, Martin wrote:
>
>> Hi,
>>
>> I'm getting an exception when deploying an MDB in Weblogic;
>>
>>
>>
>
javax.resource.spi.InvalidPropertyExceptionweblogic.connector.external.E
> ndpointActivationException:
>
>> javax.resource.spi.InvalidPropertyException
>>
>> I set the debug level to finest and turned on debug in weblogic but
>> still don't see what the invalid property is?
>>
>> I've set the appropriate properties in weblogic-ra.xml to enable
JNDI.
>>
>> This is my ejb-jar.xml
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> _http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd_">
>>
>> <display-name>Message Processor Configuration</display-name>
>> <enterprise-beans>
>> <message-driven>
>> <display-name>MessageProcessor</display-name>
>> <ejb-name>MessageProcessor</ejb-name>
>>
>> <ejb-class>com.cs.dtacc.messaging.WeblogicJMS</ejb-class>
>>
<transaction-type>Container</transaction-type>
>> <activation-config>
>> <activation-config-property>
>>
>>
>>
>
<activation-config-property-name>ConnectionFactoryJndiName</activation-c
> onfig-property-name>
>
>>
>>
>>
>
<activation-config-property-value>WMQ_QM1CF</activation-config-property-
> value>
>
>> </activation-config-property>
>> <activation-config-property>
>>
>>
>>
>
<activation-config-property-name>DestinationJndiName</activation-config-
> property-name>
>
>>
>>
>>
>
<activation-config-property-value>WMQ_MARTIN_TEST</activation-config-pro
> perty-value>
>
>> </activation-config-property>
>> </activation-config>
>> </message-driven>
>> </enterprise-beans>
>> <assembly-descriptor>
>> <container-transaction>
>> <method>
>> <ejb-name>MessageProcessor</ejb-name>
>> <method-name>*</method-name>
>> </method>
>>
>>
> <trans-attribute>NotSupported</trans-attribute>
>
>> </container-transaction>
>> </assembly-descriptor>
>> </ejb-jar>
>>
>> Martin
>>
>>
>>
>>
>>
>>
>
========================================================================
> ======
>
>> Please access the attached hyperlink for an important electronic
>> communications disclaimer:
>> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>>
>>
>
========================================================================
> ======
>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
> For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>
>
>
========================================================================
=======
> Please access the attached hyperlink for an important electronic
communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
========================================================================
=======
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
> For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net


========================================================================
=======
 Please access the attached hyperlink for an important electronic
communications disclaimer:
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
 
========================================================================
=======
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net


===============================================================================
 Please access the attached hyperlink for an important electronic communications disclaimer:
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
 ===============================================================================