geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Yet another ActivationSpec NotFound Problem
Date Wed, 08 Mar 2006 16:14:59 GMT

On Mar 8, 2006, at 7:48 AM, johnxmas wrote:

> Hi,
>
> I deploy an Inbound Resource Adapter at server level (and, no I  
> don't want to include it in my ear). This RA
> have all is classes in a jar (including the infamous  
> ActivationSpec :-D)
>
> I deploy an EAR with a message-driven bean. And bingo, at  
> deployment time
>
> [************************> ] 93%  25s  Loading  
> scortInboundCustListMdb16:14:53,2
> 99 ERROR [GBeanInstanceState] Error while starting; GBean is now in  
> the FAILED s
> tate:  
> objectName="geronimo.server:EJBModule=inboundCustListMdb.jar,J2EEAppli 
> cati
> on=scortInboundCustListMdb,J2EEServer=geronimo,j2eeType=JCAActivationS 
> pec,name=S
> cortInboundCustListMdb"
> java.lang.ClassNotFoundException:  
> com.scort.inbound.jca.socket.impl.SocketActiva
> tionSpec
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>
>
> I expected the Resource Adapter class loader to be a  parent of the  
> EAR class loader !

What did you do to make this be the case?  Assuming you are using  
geronimo 1.0 or trunk/head, your ra plan should have something like  
this:

<..... configId="myGroupId/myJCAAdapter/1.0/car"....>

and the ear should include up before the dependencies (IIRC)

<import>
   <groupId>myGroupId</groupId>
   <type>car</type>
   <artifactId>myJCAAdapter</artifactId>
   <version>1.0</version>
</import>

This specifies that one of the parent classloaders of the ear is the  
classloader of the deployed jca adapter.

thanks
david jencks

>
> Any help will be welcomed
>
> Jean-Noël
>
>
>
> Here are my deployment descriptors:
>
> For the Adapter
>
> Ra.xml
> ______
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <connector xmlns="http://java.sun.com/xml/ns/j2ee"
>            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>            xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>            http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
>            version="1.5">
>
>   <description>EIS Resource Adapter 1.5</description>
>   <display-name>EIS JCA Adapter 1.5</display-name>
>   <vendor-name>SCORT</vendor-name>
>   <eis-type>Serveur EIS</eis-type>
>   <resourceadapter-version>4.0</resourceadapter-version>
>
>   <license>
>     <description>Copyright (c) 2005 SCPRT</description>
>     <license-required>false</license-required>
>   </license>
>
>   <resourceadapter>
>
>     <resourceadapter- 
> class>com.scort.inbound.jca.InboundResourceAdapter</resourceadapter- 
> class>
>
>     <outbound-resourceadapter>
>
>       <connection-definition>
>
> <managedconnectionfactory- 
> class>com.scort.ctg.cics.eci.jca.EciManagedConnectionFactory</ 
> managedconnectionfactory-class>
>
>         <config-property>
>           <description>URL of the CTG</description>
>           <config-property-name>ConnectionUrl</config-property-name>
>           <config-property-type>java.lang.String</config-property- 
> type>
>           <config-property-value>tcp:localhost:2006</config- 
> property-value>
>         </config-property>
>         <config-property>
>           <description>Server Name</description>
>           <config-property-name>ServerName</config-property-name>
>           <config-property-type>java.lang.String</config-property- 
> type>
>           <!-- config-property-value></config-property-value -->
>         </config-property>
>
>         <config-property>
>           <description>Jndi names of equivalent factories</ 
> description>
>           <config-property-name>AlternateConfigsNames</config- 
> property-name>
>           <config-property-type>java.lang.String</config-property- 
> type>
>           <config-property-value>tcp:localhost:2006</config- 
> property-value>
>         </config-property>
>
>         <connectionfactory- 
> interface>javax.resource.cci.ConnectionFactory</connectionfactory- 
> interface>
>         <connectionfactory-impl- 
> class>com.scort.ctg.cics.eci.jca.EciConnectionFactory</ 
> connectionfactory-impl-class>
>         <connection-interface>javax.resource.cci.Connection</ 
> connection-interface>
>         <connection-impl- 
> class>com.scort.ctg.cics.eci.jca.EciConnection</connection-impl-class>
>
>       </connection-definition>
>
>       <transaction-support>LocalTransaction</transaction-support>
>
>       <authentication-mechanism>
>         <authentication-mechanism-type>BasicPassword</ 
> authentication-mechanism-type>
>         <credential- 
> interface>javax.resource.spi.security.PasswordCredential</ 
> credential-interface>
>       </authentication-mechanism>
>       <reauthentication-support>true</reauthentication-support>
>
>     </outbound-resourceadapter>
>
>
>     <inbound-resourceadapter>
>       <messageadapter>
>         <messagelistener>
>           <messagelistener- 
> type>com.scort.inbound.jca.api.InboundListener</messagelistener-type>
>           <activationspec>
>             <activationspec- 
> class>com.scort.inbound.jca.socket.impl.SocketActivationSpec</ 
> activationspec-class>
>             <required-config-property>
>               <config-property-name>id</config-property-name>
>             </required-config-property>
>             <required-config-property>
>               <config-property-name>port</config-property-name>
>             </required-config-property>
>
>           </activationspec>
>         </messagelistener>
>       </messageadapter>
>     </inbound-resourceadapter>
>
>     <adminobject>
>       <adminobject- 
> interface>com.scort.ctg.cics.eci.jca.EciConnectionSpecInterface</ 
> adminobject-interface>
>       <adminobject- 
> class>com.scort.ctg.cics.eci.jca.EciConnectionSpec</adminobject-class>
>       <config-property>
>         <config-property-name>userName</config-property-name>
>         <config-property-type>java.lang.String</config-property-type>
>       </config-property>
>       <config-property>
>         <config-property-name>password</config-property-name>
>         <config-property-type>java.lang.String</config-property-type>
>       </config-property>
>     </adminobject>
>
>     <adminobject>
>       <adminobject- 
> interface>com.scort.ctg.cics.eci.jca.EciInteractionSpecInterface</ 
> adminobject-interface>
>       <adminobject- 
> class>com.scort.ctg.cics.eci.jca.EciInteractionSpec</adminobject- 
> class>
>       <config-property>
>         <config-property-name>commareaLength</config-property-name>
>         <config-property-type>java.lang.Integer</config-property-type>
>         <config-property-value>20000</config-property-value>
>       </config-property>
>       <config-property>
>         <config-property-name>compactOutgoingData</config-property- 
> name>
>         <config-property-type>java.lang.Boolean</config-property-type>
>       </config-property>
>       <config-property>
>         <config-property-name>dumpCodePage</config-property-name>
>         <config-property-type>java.lang.String</config-property-type>
>       </config-property>
>       <config-property>
>         <config-property-name>executionTimeout</config-property-name>
>         <config-property-type>java.lang.Integer</config-property-type>
>         <config-property-value>0</config-property-value>
>       </config-property>
>       <config-property>
>         <config-property-name>mode</config-property-name>
>         <config-property-type>java.lang.Integer</config-property-type>
>         <config-property-value>1</config-property-value>
>       </config-property>
>       <config-property>
>         <config-property-name>transactionName</config-property-name>
>         <config-property-type>java.lang.String</config-property-type>
>       </config-property>
>     </adminobject>
>
>   </resourceadapter>
> </connector>
>
>
> geronimo-ra.xml
> ______________
> <?xml version="1.0" encoding="UTF-8"?>
>
>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
>            configId="ScortJcaAdapter15"
>            version="1.5">
>
>   <resourceadapter>
>
>     <resourceadapter-instance>
>       <resourceadapter-name>ScortJcaAdapter15</resourceadapter-name>
>       <workmanager>
>         <gbean-link>DefaultWorkManager</gbean-link>
>       </workmanager>
>     </resourceadapter-instance>
>
>     <outbound-resourceadapter>
>       <connection-definition>
>         <connectionfactory- 
> interface>javax.resource.cci.ConnectionFactory</connectionfactory- 
> interface>
>         <connectiondefinition-instance>
>           <name>demoInbound.managedConnectionFactory</name>
>           <implemented- 
> interface>com.scort.ctg.cics.eci.jca.EciConnectionFactory</ 
> implemented-interface>
>           <connectionmanager>
>             <xa-transaction>
>               <transaction-caching/>
>             </xa-transaction>
>             <single-pool>
>               <max-size>10</max-size>
>               <blocking-timeout-milliseconds>5000</blocking-timeout- 
> milliseconds>
>               	<match-one/>
>             </single-pool>
>           </connectionmanager>
>         </connectiondefinition-instance>
>       </connection-definition>
>     </outbound-resourceadapter>
>
>
>   </resourceadapter>
>
>   <adminobject>
>       <adminobject- 
> interface>com.scort.ctg.cics.eci.jca.EciConnectionSpecInterface</ 
> adminobject-interface>
>       <adminobject- 
> class>com.scort.ctg.cics.eci.jca.EciConnectionSpec</adminobject-class>
>       <adminobject-instance>
>         <message-destination-name>demoInbound.CS</message- 
> destination-name>
>         <config-property-setting name="userName">aa</config- 
> property-setting>
>         <config-property-setting name="password">aa</config- 
> property-setting>
>       </adminobject-instance>
>   </adminobject>
>
>     <adminobject>
>       <adminobject- 
> interface>com.scort.ctg.cics.eci.jca.EciInteractionSpecInterface</ 
> adminobject-interface>
>       <adminobject- 
> class>com.scort.ctg.cics.eci.jca.EciInteractionSpec</adminobject- 
> class>
>       <adminobject-instance>
>         <message-destination-name>demoInbound.IS</message- 
> destination-name>
>         <config-property-setting name="commareaLength">20000</ 
> config-property-setting>
>         <config-property-setting name="compactOutgoingData">true</ 
> config-property-setting>
>         <config-property-setting name="dumpCodePage">cp037</config- 
> property-setting>
>         <config-property-setting name="executionTimeout">10000</ 
> config-property-setting>
>         <config-property-setting name="mode">1</config-property- 
> setting>
>       </adminobject-instance>
>   </adminobject>
>
> </connector>
>
> For the EAR
>
> application.xml
> ____________
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application  version="1.4"
>               xmlns="http://java.sun.com/xml/ns/j2ee"
>               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>               http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
>
>   <display-name>InboundCustListMdb</display-name>
>
>   <description></description>
>
>   <module>
>     <ejb>inboundCustListMdb.jar</ejb>
>   </module>
>
> </application>
>
>
> ejb-jar.xml (in a META-INF dir in the right jar)
> _________	
>
> <?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"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>          http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
>          version="2.1">
>
>   <enterprise-beans>
>     <message-driven>
>       <ejb-name>ScortInboundCustListMdb</ejb-name>
>       <ejb- 
> class>com.scort.inbound.test.custlist.GeronimoInboundCustListMdb</ 
> ejb-class>
>       <messaging-type>com.scort.inbound.jca.api.InboundListener</ 
> messaging-type>
>       <transaction-type>Container</transaction-type>
>
>       <activation-config>
>         <activation-config-property>
>           <activation-config-property-name>id</activation-config- 
> property-name>
>           <activation-config-property-value>CUSTLIST</activation- 
> config-property-value>
>         </activation-config-property>
>         <activation-config-property>
>           <activation-config-property-name>port</activation-config- 
> property-name>
>           <activation-config-property-value>23072</activation- 
> config-property-value>
>         </activation-config-property>
>       </activation-config>
>
>     </message-driven>
>   </enterprise-beans>
>
>   <assembly-descriptor>
>     <container-transaction>
>       <method>
>         <ejb-name>ScortInboundCustListMdb</ejb-name>
>           <method-name>*</method-name>
>        </method>
>        <trans-attribute>NotSupported</trans-attribute>
>       </container-transaction>
>   </assembly-descriptor>
>
> </ejb-jar>
>
>
> opnejb-jar.xml (in a META-INF dir in the right jar)
> ____________	
>
> 	<openejb-jar
>     xmlns="http://www.openejb.org/xml/ns/openejb-jar"
>     xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
>     xmlns:security="http://geronimo.apache.org/xml/ns/security"
>     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
>     configId="ScortInboundCustListMdb">
>  <enterprise-beans>
>  	<message-driven>
>     <ejb-name>ScortInboundCustListMdb</ejb-name>
> <!--
>     <resource-adapter>
>       <target- 
> name>geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResou 
> rce=ScortJcaAdapter15,j2eeType=JCAResourceAdapter,name=ScortJcaAdapter 
> 15</target-name>
>     </resource-adapter>
> -->
>     <resource-adapter>
>        <resource-link>ScortJcaAdapter15</resource-link>
>     </resource-adapter>
>     <activation-config>
>       <activation-config-property>
>       	<activation-config-property-name>id</activation-config- 
> property-name>
>         <activation-config-property-value>CUSTLIST</activation- 
> config-property-value>        		
>       </activation-config-property>
>       <activation-config-property>
>       	<activation-config-property-name>port</activation-config- 
> property-name>
>         <activation-config-property-value>23072</activation-config- 
> property-value>        		
>       </activation-config-property>
>     </activation-config>
> 	</message-driven>
>  </enterprise-beans>
> </openejb-jar>
>


Mime
View raw message