You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Tangney <jt...@knowledgeplanet.com> on 2000/07/11 18:50:18 UTC

Problem running example

Hi

I am running the struts example under tomcat (standalone - not in apache) on
Solaris with JDK1.3.0. It works fine, except when I terminate the database
servlet (either using tomcat's admin interface or by shutting down tomcat) I
see the following in servlet.log:

...
Context log path="/struts-example" :database: Finalizing database servlet
Context log path="/struts-example" :database: Database unload exception
Context log path="/admin" :default: destroy

Looking at the example code, it does a log("Database unload exception, e) so
I expect to see a stack trace and info on the exception in the log.

This is probably not a struts bug... or is it?

Then of course there's the underlying problem: Why *can't* it write to
database.xml? (Yes, I did a chmod a+w)

Thanks!
--johnt


Re: Problem running example

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
John Tangney wrote:

> Hi
>
> I am running the struts example under tomcat (standalone - not in apache) on
> Solaris with JDK1.3.0. It works fine, except when I terminate the database
> servlet (either using tomcat's admin interface or by shutting down tomcat) I
> see the following in servlet.log:
>
> ...
> Context log path="/struts-example" :database: Finalizing database servlet
> Context log path="/struts-example" :database: Database unload exception
> Context log path="/admin" :default: destroy
>
> Looking at the example code, it does a log("Database unload exception, e) so
> I expect to see a stack trace and info on the exception in the log.
>
> This is probably not a struts bug... or is it?
>

Sounds like you might be running Tomcat 3.1, which had problems logging the
exception details.  This has been fixed in the 3.2 beta version.

In the mean time, you could add a line to the DatabaseServlet code:

    e.printStackTrace(System.out);

to get the output to your console.


>
> Then of course there's the underlying problem: Why *can't* it write to
> database.xml? (Yes, I did a chmod a+w)
>

It may be some issue with getting the pathname to the file -- but the exception
details will tell us what is actually going on.

>
> Thanks!
> --johnt

Craig