You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "sebastien chatel (JIRA)" <ji...@apache.org> on 2009/08/16 06:11:14 UTC

[jira] Commented: (GERONIMO-3874) Deployment of Spring SpringContextResourceAdapter fails

    [ https://issues.apache.org/jira/browse/GERONIMO-3874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743809#action_12743809 ] 

sebastien chatel commented on GERONIMO-3874:
--------------------------------------------

It's caused by the protected getter :

protected String getContextConfigLocation() {
		return this.contextConfigLocation;
}

Here is how the ConnectorModuleBuilder find property methods :
Class activationSpecClass = cl.loadClass(activationSpecClassName);
methods = activationSpecClass.getMethods();

but getMethods() return public methods only.

And then a getters.keySet().retainAll(setters);
Doesnt keep the setter property.

> Deployment of Spring SpringContextResourceAdapter fails
> -------------------------------------------------------
>
>                 Key: GERONIMO-3874
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3874
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.1
>         Environment: Running the full geronimo tomcat 6 - 2.1 distribution on Fedora Core 5 Linux
>            Reporter: Michael Lee
>
> I have been trying to prototype the deployment of Spring JMS application components in a Resource Adaptor format using the org.springframework.jca.context.SpringContextResourceAdapter introduced in Spring 2.5.  
> After playing with various configurations I've attempted to take this right back to "vanilla" configurations of Spring RA config and Geronimo Deployment and I still get the same problem with deployment failure with the error message (in the server geronimo.out log): Unknown attribute "ContextConfigLocation".
> ------------------------------------------------------------------------------
> ra.xml Descriptor
> ------------------------------------------------------------------------------
> My ra.xml is currently a straight copy from http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jca/context/SpringContextResourceAdapter.html  
> <?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">
>          <vendor-name>Spring Framework</vendor-name>
>          <eis-type>Spring Connector</eis-type>
>          <resourceadapter-version>1.0</resourceadapter-version>
>          <resourceadapter>
>                  <resourceadapter-class>org.springframework.jca.context.SpringContextResourceAdapter</resourceadapter-class>
>                  <config-property>
>                          <config-property-name>ContextConfigLocation</config-property-name>
>                          <config-property-type>java.lang.String</config-property-type>
>                          <config-property-value>META-INF/applicationContext.xml</config-property-value>
>                  </config-property>
>          </resourceadapter>
>  </connector>
> ------------------------------------------------------------------------------
> geronimo-ra.xml (built using maven - so pom values replaced)
> ------------------------------------------------------------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <con:connector xmlns:con="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
> 	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
> 	xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1">
> 	<sys:environment> 
> 		<sys:moduleId>
>         	<sys:groupId>${pom.groupId}</sys:groupId>
>             <sys:artifactId>${pom.artifactId}</sys:artifactId>
>             <sys:version>${pom.version}</sys:version>
>             <sys:type>rar</sys:type>
> 		</sys:moduleId>
>         <sys:dependencies>
>             <sys:dependency>
>                 <sys:groupId>console.dbpool</sys:groupId>
>                 <sys:artifactId>domain</sys:artifactId>
>             </sys:dependency>
>         </sys:dependencies>
> 	</sys:environment>
> 	
> 	<con:resourceadapter>
> 		<con:resourceadapter-instance>
> 			<con:resourceadapter-name>SpringCommonContextResourceAdapter</con:resourceadapter-name>
> 			<nam:workmanager>
> 				<nam:gbean-link>DefaultWorkManager</nam:gbean-link>
> 			</nam:workmanager>
> 		</con:resourceadapter-instance>
> 	</con:resourceadapter>
> 	 
> </con:connector>
> ------------------------------------------------------------------------------
> Stack trace during deployment failure
> ------------------------------------------------------------------------------
> 14:50:02,735 WARN  [ConfigurationUtil] Could not load gbean default/job-creation-files/1.0.0-SNAPSHOT/rar?J2EEApplication=null,JCAResource=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapter=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapterModule=default/job-creation-files/1.0.0-SNAPSHOT/rar,j2eeType=JCAResourceAdapter,name=SpringCommonContextResourceAdapter
> org.apache.geronimo.gbean.InvalidConfigurationException: Could not inject configuration data into the GBean default/job-creation-files/1.0.0-SNAPSHOT/rar?J2EEApplication=null,JCAResource=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapter=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapterModule=default/job-creation-files/1.0.0-SNAPSHOT/rar,j2eeType=JCAResourceAdapter,name=SpringCommonContextResourceAdapter
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.java:377)
>         at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:354)
>         at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:441)
>         at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
>         at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
>         at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:515)
>         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:585)
>         at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>         at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>         at sun.reflect.GeneratedMethodAccessor214.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>         at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>         at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
>         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
>         at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
>         at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
>         at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1348)
>         at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
>         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:585)
>         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
>         at sun.rmi.transport.Transport$1.run(Transport.java:153)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.geronimo.kernel.NoSuchAttributeException: Unknown attribute "ContextConfigLocation" in gbean default/job-creation-files/1.0.0-SNAPSHOT/rar?J2EEApplication=null,JCAResource=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapter=default/job-creation-files/1.0.0-SNAPSHOT/rar,ResourceAdapterModule=default/job-creation-files/1.0.0-SNAPSHOT/rar,j2eeType=JCAResourceAdapter,name=SpringCommonContextResourceAdapter
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.getAttributeByName(GBeanInstance.java:802)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.setAttribute(GBeanInstance.java:751)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.java:372)
>         ... 43 more
> Worth noting that that this deployment descriptor appeared to deploy correctly in 2.0.2 (indicating the deployer reflection on available properties has changed?) but the deployment failed in 2.0.2 because the attempted resolution of JNDI datasources by a Spring component (org.springframework.jndi.JndiObjectFactoryBean) produced a NullPointerException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.