geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viet Nguyen" <vhng...@gmail.com>
Subject Re: Problem at geronimo boot
Date Thu, 06 Sep 2007 02:54:02 GMT
Paolo,

I was able to reproduce this problem with your test app. I also found out
that any EAR deployed at the root context (using tomcat) will have the same
problem. It is not hibernate/spring/sitemesh specific. It may be a bug in
Geronimo. The problem occurs because when the server is shut down, the
sessions are not being saved properly. You can try to get this error with
the following:
1. deploy an EAR at the root context (in tomcat)
2. stop the server (you should get a FileNotFoundException) <-- this is the
cause of the problem
3. start the server
4. try to view the web app at the root context (there should be problems
viewing it)

As you mentioned, this only happens with EARs, the WAR equivalent works
fine.

I will keep digging.

--Viet

p.s. if you want your app to work on tomcat, you have to redeploy the app on
the server. When you visit the website it should be working. But like I
said, if you stop the server, there will be a FileNotFoundException.

On 9/5/07, Viet Nguyen <vhnguy2@gmail.com> wrote:
>
> Hi Paolo,
>
> Which DB are you using? I could not get this to work on the derby db that
> comes with Geronimo because it doesn't support some keywords (e.g.
> AUTO_INCREMENT), but when I used MySQL everything works fine (with or
> without the commenting of the filters in the web.xml and on both jetty and
> tomcat containers).
>
> --Viet
>
> On 9/5/07, Paolo Denti <paolo.denti@gmail.com > wrote:
> >
> >  Hi Kevan,
> > you can find the deployable ear here:
> > http://www.mediafire.com/?8mdty2cu0mm
> > and just the webapp with sources included here:
> > http://www.mediafire.com/?d6ml6l1hgj4
> >
> > in order to deploy the app, you need a connection pools named TestDS,
> > pointing to an existing db, nothing more (a table named test will be
> > automatically created in that db).
> > deploy and just browse to http://localhost:8080/index.htm on the tomcat
> > version to get the problem
> >
> > about the Viet links, those links are jmx related, and i cannot solve
> > the problem just
> > setting MBeanExporter's "exposeManagedResourceClassLoader" property to
> > "true"
> >
> > moreover, seeing in which conditions it happens (for example point 4) it
> > looks more a geronimo problem, being related to the web context.
> >
> > Kevan Miller wrote:
> >
> >
> >  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">
> >             <pattern>/*</pattern>
> >         </decorator>
> >     </decorators>
> > 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"
> > <http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>>
> >     <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"<http://www.opensymphony.com/sitemesh/decorator>prefix="decorator"
%>
> >     <%@ taglib uri="http://www.opensymphony.com/sitemesh/page"<http://www.opensymphony.com/sitemesh/page>prefix="page"
%>
> >     <html xmlns="http://www.w3.org/1999/xhtml"<http://www.w3.org/1999/xhtml>xml:lang="en">
> >         <head>
> >             <title><decorator:title /> (sitemesh decorated)</title>
> >         </head>
> >         <body>
> >             <decorator:body />
> >         </body>
> >     </html>
> > 5) add sitemesh filter to web.xml
> >     <filter>
> >         <filter-name>sitemesh</filter-name>
> >         <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter
> > </filter-class>
> >         <init-param>
> >             <param-name>debug.pagewriter</param-name>
> >             <param-value>false</param-value>
> >         </init-param>
> >     </filter>
> > ....
> >     <filter-mapping>
> >         <filter-name>sitemesh</filter-name>
> >         <url-pattern>/*</url-pattern>
> >     </filter-mapping>
> > 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:
> >
> > http://opensource.atlassian.com/projects/hibernate/browse/HHH-2281
> > http://opensource.atlassian.com/projects/spring/browse/SPR-3571
> >
> > 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
> > java.lang.NullPointerException
> >         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.
> >
> > --kevan
> >
> >
>

Mime
View raw message