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: ra.xml parse error when deploying JCA adapter
Date Mon, 17 Sep 2007 02:37:24 GMT
Hi Ed,
On Sep 16, 2007, at 9:44 PM, Ed Hillmann wrote:

> Hi all.  I'm trying to deploy a Resource Adapter into a Geronimo 2.0.1
> environment.  When I attempt to deploy the RAR file (via the console
> web application), I get the following.
>
>
> org.apache.geronimo.common.DeploymentException: Could not parse ra.xml
> descriptor
> org.apache.geronimo.common.DeploymentException:
> org.apache.geronimo.common.DeploymentException: Could not parse ra.xml
> descriptor
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:385)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
> 	at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$ 
> $734a235d.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:124)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:865)
> 	at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
> (BasicKernel.java:239)
> 	at  
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
> ploy(AbstractDeployCommand.java:116)
> 	at  
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
> (DistributeCommand.java:61)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.geronimo.common.DeploymentException: Could not
> parse ra.xml descriptor
> 	at  
> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.create 
> Module(ConnectorModuleBuilder.java:200)
> 	at  
> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.create 
> Module(ConnectorModuleBuilder.java:167)
> 	at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder$ 
> $FastClassByCGLIB$$a535b6aa.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:124)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:830)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> 	at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.ActivationSpecInfoLocator$ 
> $EnhancerByCGLIB$$aa3481fe.createModule(<generated>)
> 	at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan 
> (EARConfigBuilder.java:295)
> 	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
> $FastClassByCGLIB$$38e56ec6.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:124)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:830)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> 	at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.deployment.ConfigurationBuilder$ 
> $EnhancerByCGLIB$$d2868893.getDeploymentPlan(<generated>)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:234)
> 	... 10 more
> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
> descriptor: errors:
>
> error: cvc-complex-type.2.4b: Element not allowed:
> config-property-name@http://java.sun.com/xml/ns/j2ee in element
> required-config-property@http://java.sun.com/xml/ns/j2ee
>
> Descriptor:
> <connector version="1.5" xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd">
>   <display-name>Singl.eView Connector"</display-name>
>   <vendor-name>Intec</vendor-name>
>   <eis-type>Singl.eView Server</eis-type>
>   <resourceadapter-version>1.0</resourceadapter-version>
>   <resourceadapter>
>     <resourceadapter- 
> class>com.intecbilling.connector.SVResourceAdapter</resourceadapter- 
> class>
>     <!--Can define config-property entries here, if you settings that
> are constant across the Resource Adapter-->
>     <outbound-resourceadapter>
>       <connection-definition>
>         <managedconnectionfactory- 
> class>com.intecbilling.connector.SVManagedConnectionFactory</ 
> managedconnectionfactory-class>
>         <config-property>
>           <config-property-name>ServerName</config-property-name>
>           <config-property-type>java.lang.String</config-property- 
> type>
>           <config-property-value><snip></config-property-value>
>         </config-property>
>         <config-property>
>           <config-property-name>PortNumber</config-property-name>
>           <config-property-type>java.lang.Integer</config-property- 
> type>
>           <config-property-value><snip></config-property-value>
>         </config-property>
>         <connectionfactory- 
> interface>javax.resource.cci.ConnectionFactory</connectionfactory- 
> interface>
>         <connectionfactory-impl- 
> class>com.intecbilling.connector.SVConnectionFactory</ 
> connectionfactory-impl-class>
>         <connection-interface>javax.resource.cci.Connection</ 
> connection-interface>
>         <connection-impl- 
> class>com.intecbilling.connector.SVConnection</connection-impl-class>
>       </connection-definition>
>       <transaction-support>LocalTransaction</transaction-support>
>       <reauthentication-support>false</reauthentication-support>
>     </outbound-resourceadapter>
>     <inbound-resourceadapter>
>       <messageadapter>
>         <messagelistener>
>           <messagelistener- 
> type>com.intecbilling.connector.TreEventListener</messagelistener- 
> type>
>           <activationspec>
>             <activationspec- 
> class>com.intecbilling.connector.TreEventActivationSpec</ 
> activationspec-class>
>             <required-config-property>
>               <config-property-name>ConnectionAddress</config- 
> property-name>
>               <config-property-name>EventPatterns</config-property- 
> name>
>             </required-config-property>
>           </activationspec>
>         </messagelistener>
>       </messageadapter>
>     </inbound-resourceadapter>
>     <security-permission>
>       <description>Permissions allowed to the Singl.eView
> Connector</description>
>       <security-permission-spec/>
>     </security-permission>
>   </resourceadapter>
> </connector>
>
> 	at org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil.validateDD 
> (XmlBeansUtil.java:223)
> 	at  
> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.conver 
> tToConnectorSchema(ConnectorModuleBuilder.java:276)
> 	at  
> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.create 
> Module(ConnectorModuleBuilder.java:197)
> 	... 31 more
>
> It sounds like it's complaining about this part of the deployment  
> descriptor
>
>             <required-config-property>
>               <config-property-name>ConnectionAddress</config- 
> property-name>
>               <config-property-name>EventPatterns</config-property- 
> name>
>             </required-config-property>
>
>
> From what I've read of the Schema, this is valid.


Here's the relevant bit of schema:

   <xsd:complexType name="required-config-propertyType">
     <xsd:annotation>
       <xsd:documentation>
	<![CDATA[

	  The required-config-propertyType contains a declaration
	  of a single configuration property used for specifying a
	  required configuration property name. It is used
	  by required-config-property elements.

	  Example:

	  <required-config-property>Destination</required-config-property>

	  ]]>
       </xsd:documentation>
     </xsd:annotation>

     <xsd:sequence>
       <xsd:element name="description"
		   type="j2ee:descriptionType"
		   minOccurs="0"
		   maxOccurs="unbounded"/>
       <xsd:element name="config-property-name"
		   type="j2ee:config-property-nameType"/>
     </xsd:sequence>
     <xsd:attribute name="id" type="xsd:ID"/>
   </xsd:complexType>


now I can see how you might be confused since the example in the  
documentation has no relation to the schema whatsover, but its pretty  
clear that although you can have as many or as few descriptions of  
the required-config-property it can have only one config-property-name.

You need something like

             <required-config-property>
               <config-property-name>ConnectionAddress</config- 
property-name>
             </required-config-property>
             <required-config-property>
               <config-property-name>EventPatterns</config-property- 
name>
             </required-config-property>


> This has deployed
> in other application containers.

Evidently they are not validating against the schema.

>
> What I don't have is any geronimo-ra.xml file.  I was trying to
> ascertain if one was required or not.  From what documentation I could
> find, it did not sound like it was required.

You do need a plan to deploy a rar.  Although you can repackage your  
rar to include a META-INF/geronimo-ra.xml file, I think that is kinda  
dumb and recommend you use an external plan.  If you include the rar  
in an ear you can include the plan for the rar in an ear plan.  Let  
me know if you need any help setting up such a plan.  Note that the  
activation spec will get configured with an MDB that will be using  
it, not in the rar plan.  I'm not sure how much testing non-jms  
inbound adapters have gotten in 2.0.1 so your experience would be  
very valuable to us.

>
> Have I missed something?  Thanks for any help.

np
thanks
david jencks

>
> Ed


Mime
View raw message