-
1. Re: Help with deploying a war
jonlee Aug 15, 2003 6:21 PM (in response to mortsahl)This is not particularly a JBoss-related issue as such. There are third-party servlet containers that come with JBoss - you either have the embedded Tomcat or the embedded Jetty distribution. Both of these servlet containers use Jasper to compile and run JSPs - http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html for some information about Jasper.
The servlet container is complaining about running the JSP and gives you the line number in the Java code created from the JSP - notice_jsp.java:568.
You will need to look for this Java code. Usually for Jetty, this is created in the /tmp directories (or the Windows temp directories). For Tomcat, this is usually in the JBoss temp directories.
If you examine this code, it should tell you more about the nature of the run-time exception. I suspect it will be with respect to the javax.naming (DataSource JNDI reference may be wrong) but you will need to confirm the code fragment before we can get any further. -
2. Re: Help with deploying a war
mortsahl Aug 15, 2003 10:55 PM (in response to mortsahl)Interesting ...
The error appears to be in generated code. The problem code is ....
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
with line 568 starting with "if (pageContext != null)"
What can I do about that? (Again, this war works as is in JRun4 and Weblogic 6.1) -
3. Re: Help with deploying a war
jonlee Aug 16, 2003 12:51 AM (in response to mortsahl)OK. You'll need to go further back in the code. The exception is being caught but not handled properly for some reason.
However, you'll want to go back and look at the code that caused the exception in the first place. Perhaps, it might be easier to add some System.out.println statements in your JSP, notice.jsp to see how far along it gets. Primitive, but effective in trapping around your JSP when it isn't clear on the nature of the actual offending code. -
4. Re: Help with deploying a war
mortsahl Aug 16, 2003 2:17 AM (in response to mortsahl)Looks like you're right ... I get nailed the first time I try to access my data access ojbect. Guess it's back to the doc to figure out how I screwed up my data source declaration.
Just for kicks, here it is .... see anything wrong?
<local-tx-datasource>
<jndi-name>jdbc/idea</jndi-name>
<connection-url>jdbc:mysql://192.168.1.102:3306/idea</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>root</user-name>
admin
</local-tx-datasource> -
5. Re: Help with deploying a war
jonlee Aug 16, 2003 2:54 AM (in response to mortsahl)The DataSource configuration itself seems fine. Assuming your JDBC driver is in the server/instance/lib directory, you should egt a connection fine.
The JNDI binding is going to be java:/jdbc/idea or should be anyway. You can check the JBoss JMX console and get a listing from the JNDI view. This will list all bindings to confirm your set up. Most likely this is the issue. The JMX console can be accessed from your JBoss via http://localhost:8080/jmx-console or whatever is correct for your web configuration. -
6. Re: Help with deploying a war
mortsahl Aug 16, 2003 11:08 AM (in response to mortsahl)jonlee
Thanks for your help ... I got it working.
Seems the problem was the following line ...
datasource = (DataSource)initialcontext.lookup("java:comp/env/jdbc/" + appl);
That works with Weblogic and JRun ... JBoss doesn't like it, I changed it to ...
datasource = (DataSource)initialcontext.lookup("java:jdbc/" + appl);
and now all is fine.
Thanks again!