geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Denti <paolo.de...@gmail.com>
Subject Re: Problem at geronimo boot
Date Thu, 06 Sep 2007 09:32:12 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Verdana">Mmmhhhhh, not sure of that. i can
deploy and run successfully the application on the tomcat version if i
comment out the sitemesh filter mapping in web.xml even if i get the
filenotfoundexception during shutdown.<br>
<br>
Paolo<br>
</font></font><br>
Viet Nguyen wrote:
<blockquote
 cite="mid:c0ccf8740709051954l1ddacd95r707b58fe9f824332@mail.gmail.com"
 type="cite">Paolo,<br>
  <br>
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:
  <br>
1. deploy an EAR at the root context (in tomcat)<br>
2. stop the server (you should get a FileNotFoundException) &lt;-- this
is the cause of the problem<br>
3. start the server<br>
4. try to view the web app at the root context (there should be
problems viewing it)
  <br>
  <br>
As you mentioned, this only happens with EARs, the WAR equivalent works
fine.<br>
  <br>
I will keep digging.<br>
  <br>
--Viet<br>
  <br>
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.
  <br>
  <br>
  <div><span class="gmail_quote">On 9/5/07, <b class="gmail_sendername">Viet
Nguyen</b> &lt;<a moz-do-not-send="true" href="mailto:vhnguy2@gmail.com">vhnguy2@gmail.com</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">Hi
Paolo,<br>
    <br>
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).<br>
    <span class="sg"><br>
--Viet</span>
    <div><span class="e" id="q_114d67380dc2d193_2"><br>
    <br>
    <div><span class="gmail_quote">On 9/5/07, <b
 class="gmail_sendername">Paolo Denti
    </b> &lt;<a moz-do-not-send="true"
 href="mailto:paolo.denti@gmail.com" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">paolo.denti@gmail.com
    </a>&gt; wrote:</span>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">
      <div bgcolor="#ffffff" text="#000000"><font size="-1"><font
 face="Verdana">Hi Kevan,<br>
you can find the deployable ear here:
      <a moz-do-not-send="true"
 href="http://www.mediafire.com/?8mdty2cu0mm" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">http://www.mediafire.com/?8mdty2cu0mm</a><br>
and just the webapp with sources included here:
      <a moz-do-not-send="true"
 href="http://www.mediafire.com/?d6ml6l1hgj4" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">http://www.mediafire.com/?d6ml6l1hgj4</a><br>
      <br>
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).<br>
deploy and just browse to <a moz-do-not-send="true"
 href="http://localhost:8080/index.htm" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">http://localhost:8080/index.htm</a>
on the tomcat
version to get the problem<br>
      <br>
about the Viet links, those links are jmx related, and i cannot solve
the problem just<br>
      </font></font>setting MBeanExporter's
"exposeManagedResourceClassLoader" property to "true"<br>
      <font size="-1"><font face="Verdana"><br>
moreover, seeing in which conditions it happens (for example point 4)
it looks more a geronimo problem, being related to the web context.<br>
      </font></font>
      <div><span><br>
Kevan Miller wrote:
      <blockquote type="cite"><br>
        <div>
        <div>On Sep 3, 2007, at 3:33 AM, Paolo Denti wrote:</div>
        <br>
        <blockquote type="cite"> <font size="-1"><font face="Verdana">Hi
Kevan, Viet<br>
          <br>
i prepared a basic spring/hibernate application using jta on geronimo.
it works.<br>
then i tried to add all the components i am using in my "bad"
application, one by one, and, finally, i found it:<br>
it was very difficult because the problem happens under an incredible
particular set of conditions in AND:<br>
1) the most important: sitemesh is used to render pages<br>
2) you deploy an ear (deploying just the war, it works always)<br>
3) you use the tomcat version of geronimo (with the jetty version, it
works always; i discovered it at the end of all tests !!)<br>
4) the web app in the ear has the root context (in the sub contexts, it
works always)<br>
          </font></font><font size="-1"><font face="Verdana"><br>
just commenting the sitemesh filter mapping in <a
 moz-do-not-send="true" href="http://web.xml" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">web.xml</a>,
everything
works. if i apply sitemesh filter, i get<br>
          </font></font>
          <pre>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
    </pre>
          <font size="-1"><font face="Verdana"> </font></font><font
 size="-1"><font face="Verdana">i can make it available for everybody
if needed.<br>
otherwise, if you prefer, just try to modify Viet app. in this way:<br>
1) add "sitemesh-2.3.jar" to WEB-INF/lib<br>
2) add "decorators.xml" to WEB-INF<br>
&nbsp;&nbsp;&nbsp; &lt;decorators defaultdir="/WEB-INF/decorators"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;decorator name="default"
page="default.jsp"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;pattern&gt;/*&lt;/pattern&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/decorator&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/decorators&gt;<br>
3) add "decorators" folder to WEB-INF<br>
4) add default.jsp to decorators folder<br>
&nbsp;&nbsp;&nbsp; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<a
 moz-do-not-send="true"
 href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
          </a>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;%@ taglib uri=<a moz-do-not-send="true"
 href="http://www.opensymphony.com/sitemesh/decorator" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">"http://www.opensymphony.com/sitemesh/decorator"</a>
prefix="decorator" %&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;%@ taglib uri=<a moz-do-not-send="true"
 href="http://www.opensymphony.com/sitemesh/page" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">"http://www.opensymphony.com/sitemesh/page"</a>
prefix="page" %&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;html xmlns=<a moz-do-not-send="true"
 href="http://www.w3.org/1999/xhtml" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">"http://www.w3.org/1999/xhtml"</a>
xml:lang="en"&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;head&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;&lt;decorator:title
/&gt;</font></font><font
 size="-1"><font face="Verdana"> (sitemesh decorated)</font></font><font
 size="-1"><font face="Verdana">&lt;/title&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/head&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;body&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &lt;decorator:body
/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/html&gt;<br>
5) add sitemesh filter to <a moz-do-not-send="true"
 href="http://web.xml" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">web.xml</a><br>
&nbsp;&nbsp;&nbsp; &lt;filter&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;filter-class&gt;com.opensymphony.module.sitemesh.filter.PageFilter&lt;/filter-class&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;init-param&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;param-name&gt;debug.pagewriter&lt;/param-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;param-value&gt;false&lt;/param-value&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/filter&gt;<br>
....<br>
&nbsp;&nbsp;&nbsp; &lt;filter-mapping&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/filter-mapping&gt;<br>
6) execute your web controller which users jta: you should get an
exception<br>
          </font></font></blockquote>
        <div><br>
        </div>
        <div>Paolo -- wow! Thanks a bunch for tracking down this
detail. This
is terrific.</div>
        <div><br>
        </div>
        <div>Did you try either of the suggestions that Viet proposed?</div>
        <div><br>
        </div>
        <div>
        <div>
        <div>On Aug 31, 2007, at 8:40 AM, Viet Nguyen wrote:</div>
        <blockquote type="cite">I found these two related jiras that I
hope
will fix your problem:<br>
          <br>
          <a moz-do-not-send="true"
 href="http://opensource.atlassian.com/projects/hibernate/browse/HHH-2281"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://opensource.atlassian.com/projects/hibernate/browse/HHH-2281
          </a><br>
          <a moz-do-not-send="true"
 href="http://opensource.atlassian.com/projects/spring/browse/SPR-3571"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://opensource.atlassian.com/projects/spring/browse/SPR-3571</a><br>
          <br>
People have suggested two solutions:<br>
1. switch to using Hibernate 3.2.0 (hibernate "solution")<br>
2. set MBeanExporter's "exposeManagedResourceClassLoader" property to
"true" (spring workaround)</blockquote>
        </div>
        </div>
        <div><br>
        </div>
        <div>On Sep 3, 2007, at 3:33 AM, Paolo Denti wrote:</div>
        <div><br>
        </div>
        <blockquote type="cite"><font size="-1"><font face="Verdana"><br>
p.s. about the hot deploy, i cannot hot deploy even my small test
application<br>
          <br>
Geronimo Application Server started<br>
00:54:24,935 ERROR [Deployer] Deployment failed due to <br>
java.lang.NullPointerException<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.deployment.CopyResourceContext.addFile(CopyResourceContext.java:144)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.deployment.DeploymentContext.addFile(DeploymentContext.java:461)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.installModule(AbstractWebModuleBuilder.java:288)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$$FastClassByCGLIB$$8523248f.invoke(&lt;generated&gt;)<font
 face="Helvetica" size="3"><span style="font-size: 12px;"><br>
          </span></font></font></font></blockquote>
        <br>
        </div>
        <div>Strange. I had no problem with my test ear... If you could
make
your test app available, that would be great.</div>
        <br>
        <div>--kevan</div>
      </blockquote>
      </span></div>
      </div>
    </blockquote>
    </div>
    <br>
    </span></div>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message