geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MoleSon <sascha.gebha...@t-online.de>
Subject Problems with CMP mapping and TypeConverter
Date Mon, 18 Jun 2007 15:17:15 GMT

Hello out there!

I have a problem with my CMP-mappings and with using a self-written Type
converter.

In my project there is a class where CMP-mappings are defined the following
way:
<ejb-name>UserEntityEjb</ejb-name>
<table-name>USER</table-name>
<cmp-field-mapping>
	<cmp-field-name>givenName</cmp-field-name>
	<cmp-field-class>java.lang.String</cmp-field-class>
	<table-column>GIVENNAME</table-column>
	<sql-type>CHAR</sql-type>	
</cmp-field-mapping>
<cmp-field-mapping>
	<cmp-field-name>userId</cmp-field-name>
	<cmp-field-class>java.lang.String</cmp-field-class>
	<table-column>USER_ID</table-column>
	<sql-type>CHAR</sql-type>					
</cmp-field-mapping>
	.
	.
	.

My problem is: when this bean is called while running the application,
Geronimo throws a 

java.lang.ClassCastException: java.lang.String
	at *.create(User.java:604)
	at *.nextPageClick(EditUserDataAction.java:166)
	at *.processNextClick(BaseAction.java:302)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at
de.ppi.fis.lbr.framework.controller.BaseAction.access$0(BaseAction.java:1)
	at
de.ppi.fis.lbr.framework.controller.BaseAction.execute(BaseAction.java:96)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	a
t
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
	at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
	at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:869)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.rmi.RemoteException: java.lang.String; nested exception is: 
	java.lang.ClassCastException: java.lang.String
	at
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:173)
	at
org.openejb.proxy.EntityEJBHome$$EnhancerByCGLIB$$9cc09002.create(<generated>)
	at *.create(User.java:600)
	... 35 more
Caused by: java.lang.ClassCastException: java.lang.String
	at org.tranql.sql.jdbc.binding.CharBinding.setValue(CharBinding.java:44)
	at
org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:93)
	at
org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:89)
	at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:65)
	at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:62)
	at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:49)
	at org.tranql.intertxcache.InTxCacheTracker.flush(InTxCacheTracker.java:40)
	at org.tranql.cache.InTxCache.flush(InTxCache.java:86)
	at
org.apache.geronimo.transaction.context.AbstractTransactionContext.flushState(AbstractTransactionContext.java:115)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:175)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
	at
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
	at
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
	at
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
	at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
	at
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:164)
	... 37 more
Caused by: java.rmi.RemoteException: java.lang.String; nested exception is: 
	java.lang.ClassCastException: java.lang.String
	at
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:173)
	at
org.openejb.proxy.EntityEJBHome$$EnhancerByCGLIB$$9cc09002.create(<generated>)
	at *.create(User.java:600)
	at *.nextPageClick(EditUserDataAction.java:166)
	at *.processNextClick(BaseAction.java:302)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
	at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
	at *.access$0(BaseAction.java:1)
	at *.execute(BaseAction.java:96)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
	at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
	at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:869)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: java.lang.String
	at org.tranql.sql.jdbc.binding.CharBinding.setValue(CharBinding.java:44)
	at
org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:93)
	at
org.tranql.sql.jdbc.binding.TypeConverterBinding.setValue(TypeConverterBinding.java:89)
	at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java:65)
	at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:62)
	at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:49)
	at org.tranql.intertxcache.InTxCacheTracker.flush(InTxCacheTracker.java:40)
	at org.tranql.cache.InTxCache.flush(InTxCache.java:86)
	at
org.apache.geronimo.transaction.context.AbstractTransactionContext.flushState(AbstractTransactionContext.java:115)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:175)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
	at
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
	at
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
	at
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
	at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
	at
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:164)
	... 37 more


When I add a type Converter to my CMP-mappings I get a ClassCastException
ClassCastException: <myconverterfile>

Does anybody have an Idea why I do get these Exceptions?

Thx, Sascha
-- 
View this message in context: http://www.nabble.com/Problems-with-CMP-mapping-and-TypeConverter-tf3940963s134.html#a11177849
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message