On Sep 3, 2007, at 3:33 AM, Paolo Denti wrote:

Hi Kevan, Viet

i prepared a basic spring/hibernate application using jta on geronimo. it works.
then i tried to add all the components i am using in my "bad" application, one by one, and, finally, i found it:
it was very difficult because the problem happens under an incredible particular set of conditions in AND:
1) the most important: sitemesh is used to render pages
2) you deploy an ear (deploying just the war, it works always)
3) you use the tomcat version of geronimo (with the jetty version, it works always; i discovered it at the end of all tests !!)
4) the web app in the ear has the root context (in the sub contexts, it works always)

just commenting the sitemesh filter mapping in web.xml, everything works. if i apply sitemesh filter, i get
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader
i can make it available for everybody if needed.
otherwise, if you prefer, just try to modify Viet app. in this way:
1) add "sitemesh-2.3.jar" to WEB-INF/lib
2) add "decorators.xml" to WEB-INF
    <decorators defaultdir="/WEB-INF/decorators">
        <decorator name="default" page="default.jsp">
3) add "decorators" folder to WEB-INF
4) add default.jsp to decorators folder
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
    <%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page" %>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
            <title><decorator:title />
(sitemesh decorated)</title>
            <decorator:body />
5) add sitemesh filter to web.xml
6) execute your web controller which users jta: you should get an exception

Paolo -- wow! Thanks a bunch for tracking down this detail. This is terrific.

Did you try either of the suggestions that Viet proposed?

On Aug 31, 2007, at 8:40 AM, Viet Nguyen wrote:
I found these two related jiras that I hope will fix your problem:


People have suggested two solutions:
1. switch to using Hibernate 3.2.0 (hibernate "solution")
2. set MBeanExporter's "exposeManagedResourceClassLoader" property to "true" (spring workaround)

On Sep 3, 2007, at 3:33 AM, Paolo Denti wrote:

p.s. about the hot deploy, i cannot hot deploy even my small test application

Geronimo Application Server started
00:54:24,935 ERROR [Deployer] Deployment failed due to
        at org.apache.geronimo.deployment.CopyResourceContext.addFile(CopyResourceContext.java:144)
        at org.apache.geronimo.deployment.DeploymentContext.addFile(DeploymentContext.java:461)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.installModule(AbstractWebModuleBuilder.java:288)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$$FastClassByCGLIB$$8523248f.invoke(<generated>)

Strange. I had no problem with my test ear... If you could make your test app available, that would be great.