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: $Proxy33 cannot be cast to com.dsoft.jca.eis.EisConnection
Date Fri, 10 Oct 2008 17:01:24 GMT
We have some code that tries to imitate DissociatableManagedConnection  
functionality to avoid connection leaks that wraps the Connection from  
the ManagedConnection in a proxy that implements all the interfaces  
the Connection implements.  However EisConnectionFactory is casting  
the connection to EisConnection rather than say IEisConnection... the  
proxy implements all the interfaces but not the class.

We'll have to think about what to do about this.  Perhaps we need a  
flag to turn on this proxying behavior.  Another solution would be to  
patch TxConnector to implement DissociatableManagedConnection, but  
considering the level of activity on that project this may not work  
too well.

I've opened https://issues.apache.org/jira/browse/GERONIMO-4350 to  
track this issue.

thanks
david jencks


On Oct 10, 2008, at 2:37 AM, Juergen Weber wrote:

>
> Hi,
>
> anybody an idea on this?
>
> I tried the connector on Weblogic server 10.3 and Glassfish 2.1 b54,  
> it
> works on both.
>
> So I think the problem is with Geronimo. How could I get to the root  
> of the
> problem?
>
>
>
> java.lang.ClassCastException: $Proxy51 cannot be cast to
> com.dsoft.jca.eis.EisConnection
> 	at
> com 
> .dsoft 
> .jca 
> .eis.EisConnectionFactory.getConnection(EisConnectionFactory.java:69)
>
> Thanks,
> Juergen
>
>
> Juergen Weber wrote:
>>
>>
>> I tried to run the TxConnect Socket Connector
>> (http://txconnect.sourceforge.net/) on Geronimo 2.1.3, a test  
>> servlet gets
>> the ConnectionFactory, but on the second line below there is an  
>> exception:
>>
>>    ConnectionFactory connectionFactory = (ConnectionFactory)obj;
>>    Connection connection = connectionFactory.getConnection();
>> 	
>> Connection: com.dsoft.jca.eis.EisConnectionFactory
>> 17:05:40,981 ERROR [EisConnectionFactory] Problem when getting a
>> connection
>> java.lang.ClassCastException: $Proxy33 cannot be cast to
>> com.dsoft.jca.eis.EisConnection
>>        at
>> com 
>> .dsoft 
>> .jca 
>> .eis.EisConnectionFactory.getConnection(EisConnectionFactory.java:69)
>>
>> 	
>> Anybody an idea what went wrong?
>>
>> Thanks,
>> Juergen
>>
>> geronimo-ra.xml
>> ------------
>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>> <conn:connector
>> 	xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
>>
>> xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0 
>> "
>> 	xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
>> 	xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
>> 	xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
>> 	xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
>> 	xmlns:pers="http://java.sun.com/xml/ns/persistence"
>> 	xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
>> 	xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
>> 	xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
>> 	<dep:environment>
>> 		<dep:moduleId>
>> 			<dep:groupId>default</dep:groupId>
>> 			<dep:artifactId>LinuxRA</dep:artifactId>
>> 			<dep:version>1.0</dep:version>
>> 			<dep:type>car</dep:type>
>> 		</dep:moduleId>
>> 	</dep:environment>
>>
>>
>> 	<conn:resourceadapter>
>>
>> 		<conn:resourceadapter-instance>
>> 			<conn:resourceadapter-name>LinuxRA</conn:resourceadapter-name>
>> 			<conn:config-property-setting name="hostname">
>> 				ubuntu
>> 			</conn:config-property-setting>
>>
>> 			<name:workmanager>
>> 				<name:gbean-link>DefaultWorkManager</name:gbean-link>
>> 			</name:workmanager>
>> 		</conn:resourceadapter-instance>
>>
>>
>>
>> 		<conn:outbound-resourceadapter>
>> 			<conn:connection-definition>
>> 				<conn:connectionfactory-interface>
>> 					javax.resource.cci.ConnectionFactory
>> 				</conn:connectionfactory-interface>
>> 				
>> 				<conn:connectiondefinition-instance>
>> 					<conn:name>MyLinuxConnectionFactory</conn:name>
>> 					<conn:config-property-setting
>> name="driver">com.dsoft.socket.SocketAdapter</conn:config-property- 
>> setting>
>> 					<conn:config-property-setting
>> name="hostname">ubuntu</conn:config-property-setting>
>> 					<conn:config-property-setting
>> name="port">18136</conn:config-property-setting>
>> 					<conn:connectionmanager>
>> 						<conn:no-transaction />
>> 						<conn:no-pool />
>> 					</conn:connectionmanager>
>> 				</conn:connectiondefinition-instance>
>> 			</conn:connection-definition>
>> 		</conn:outbound-resourceadapter>
>> 	</conn:resourceadapter>
>> </conn:connector>
>>
>
> -- 
> View this message in context: http://www.nabble.com/%24Proxy33-cannot-be-cast-to-com.dsoft.jca.eis.EisConnection-tp19610387s134p19915090.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message