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 Mon, 03 Sep 2007 07:33:01 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">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<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 web.xml, 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.<a class="moz-txt-link-freetext"
 href="http://localhost:8080/test/index.htm"></a><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 class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</a>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;%@ taglib uri=<a class="moz-txt-link-rfc2396E"
 href="http://www.opensymphony.com/sitemesh/decorator">"http://www.opensymphony.com/sitemesh/decorator"</a>
prefix="decorator" %&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;%@ taglib uri=<a class="moz-txt-link-rfc2396E"
 href="http://www.opensymphony.com/sitemesh/page">"http://www.opensymphony.com/sitemesh/page"</a>
prefix="page" %&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;html xmlns=<a class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/1999/xhtml">"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 web.xml<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>
<br>
Paolo<br>
<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;)<br>
</font></font><br>
<br>
Kevan Miller wrote:
<blockquote cite="mid:A165BD5E-969C-4E42-979A-8CE2BD47D6E7@gmail.com"
 type="cite"><br>
  <div>
  <div>On Aug 27, 2007, at 5:47 PM, Paolo Denti wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite"> <font size="-1"><font
 face="Helvetica, Arial, sans-serif">Hi, i am a brand new geronimo user
(or at least i am trying to be)<br>
I am trying to deploy already existing applications (EARs), already
working on jboss, without any particular deployment descriptior, on
geronimo.<br>
I always get NPEs at geronimo startup. below you can find the
stacktrace.<br>
it happens if i deploy with geronimo running or if i deploy with
geronimo stopped and then start geronimo.<br>
    <br>
environment is<br>
- geronimo 2.0.1 with jetty<br>
- os x 10.4.10<br>
- jdk 1.5.0_07<br>
-
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home<br>
    <br>
thanks<br>
Paolo<br>
    <br>
Geronimo Application Server started<br>
23:16:07,293 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;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$ab38932.installModule(&lt;generated&gt;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.installModule(SwitchingModuleBuilder.java:153)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(&lt;generated&gt;)<br>
&nbsp;&nbsp; &nbsp;</font></font></blockquote>
  <br>
  </div>
  <div>Hi Paolo,</div>
  <div>Backing up to your original problem, I've run some hot-deploy
tests (deploying an EAR with WARS, etc), and didn't see a problem. If
you can make your app available, I'm sure somebody would take a look at
it.&nbsp;</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>Alternatively, you can debug the createModule() method in either
the Tomcat or Jetty ModuleBuilders:</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
or</div>
  <div>modules/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>The builder should be setting specDD to contain the entire
contents of the deployment descriptor. It seems that we aren't finding
that file. Since your manual deploy is working, it seems that the DD
must exist and be in the right place. Perhaps some error is occurring
during the hot deployment process...</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>--kevan</div>
  <div>&nbsp;</div>
</blockquote>
</body>
</html>

Mime
View raw message