geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Schmidt <schmidt...@gmail.com>
Subject Re: access a BLOB coloumn from a CMP EJB
Date Fri, 29 Jul 2005 22:46:41 GMT
Jeremy,

That was one of the weired things here - there is no true root cause:

08:42:29,134 WARN  [SystemExceptionInterceptor] BookBean
javax.transaction.TransactionRolledbackException: Unable to load data 
for field
    at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:126)
    at 
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
    at 
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
    at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:234)
    at 
org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:129)
    at 
org.openejb.proxy.EntityEJBObject$$EnhancerByCGLIB$$aec278d4.getImage(<generated>)
    at com.ibm.dw.bookshop.ejb.BookShopBean.getBooks(BookShopBean.java:126)
    at 
com.ibm.dw.bookshop.ejb.BookShopBean$$FastClassByCGLIB$$64a01afb.invoke(<generated>)
    at 
org.openejb.dispatch.AbstractMethodOperation.invoke(AbstractMethodOperation.java:90)
    at org.openejb.slsb.BusinessMethod.execute(BusinessMethod.java:67)
    at 
org.openejb.dispatch.DispatchInterceptor.invoke(DispatchInterceptor.java:72)
    at 
org.openejb.slsb.HandlerChainInterceptor.invoke(HandlerChainInterceptor.java:102)
    at 
org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(ComponentContextInterceptor.java:56)
    at 
org.openejb.ConnectionTrackingInterceptor.invoke(ConnectionTrackingInterceptor.java:81)
    at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:119)
    at 
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
    at 
org.openejb.slsb.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:98)
    at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:140)
    at 
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
    at 
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
    at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:234)
    at 
org.openejb.GenericEJBContainer$$FastClassByCGLIB$$60a0c356.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:118)
    at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:719)
    at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
    at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:94)
    at 
org.openejb.EJBContainer$$EnhancerByCGLIB$$c80c52a0.invoke(<generated>)
    at 
org.openejb.server.axis.EJBContainerProvider.processMessage(EJBContainerProvider.java:103)
    at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at 
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
    at 
org.apache.geronimo.axis.server.AxisWebServiceContainer.invoke(AxisWebServiceContainer.java:115)
    at 
org.apache.geronimo.jetty.JettyEJBWebServiceContext.handle(JettyEJBWebServiceContext.java:162)
    at org.mortbay.http.HttpServer.service(HttpServer.java:954)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
    at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

This is all I get...

Thanks for your your help and hopefully the mapping for the array 
serialization is not too hard to implement :-). I think it would be a 
great feature once it is there!

Stefan

Jeremy Boynes wrote:

> It is probably simplest if we add byte[] as a mapped type inside 
> TranQL as that will result in the bytes being written to the LOB 
> rather than having it serialize an array object. I will try to add 
> that mapping over the weekend.
>
> Having said that, the Serializable converter should work if you are 
> inserting the LOB using the EJB (and not directly through JDBC). The 
> stack you sent is from when we decided to roll the transaction back, 
> there should be another stacktrace in the log showing the true root 
> cause - can you post that one please.
>
> -- 
> Jeremy
>
> Stefan Schmidt wrote:
>
>> Hi,
>>
>> I am trying to access a (MySQL) MEDIUMBLOB coloumn from a CMP EJB. 
>> There are some tips @ Wiki but I still can't figure it out.
>>
>> Here are my artefacts:
>>
>> openejb-jar.xml:
>>
>> <cmp-field-mapping>
>>                <cmp-field-name>image</cmp-field-name>
>>                <table-column>image</table-column>
>>                <sql-type>BLOB</sql-type>
>>                
>> <type-converter>org.tranql.sql.typeconverter.SerializableConverter</type-converter>

>>
>> </cmp-field-mapping>
>>
>>
>> CMP EJB fields:
>>
>> public byte[] getImage();
>>
>> public void setImage(byte[] image);
>>
>>
>> When trying to access this coloumn from my Session EJB :
>>
>> book.getImage();
>>
>> I get:
>>
>> javax.transaction.TransactionRolledbackException: Unable to load data 
>> for field
>>    at 
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:126)

>>
>>    at 
>> org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)

>>
>>    at 
>> org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)

>>
>>    at 
>> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:234)
>>    at 
>> org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:129) 
>>
>>    at 
>> org.openejb.proxy.EntityEJBObject$$EnhancerByCGLIB$$227af363.getImage(<generated>)

>>
>>    at 
>> com.ibm.dw.bookshop.ejb.BookShopBean.getBooks(BookShopBean.java:135)
>> ...
>>
>> Do I have to write my own /Type**Converter to get it right?
>>
>> Could anyone provide a short example on this (preferably write it on 
>> the wiki so everyone can see it)?
>>
>> The wiki link: 
>> http://wiki.apache.org/geronimo/Working_with_Enterprise_JavaBeans
>>
>> Thanks,
>>
>> Stefan
>> /
>
>
>


Mime
View raw message