Hi
I have a problem with my resin server. It is very unstable and tends to
loose persistence(?). What happens is that database connection is ok for
a while, but as soon as I change a class, or a jsp, it throws the error
mentioned below. What I do is delete all the *.jsp and *.class files form
the WEB-INF/work directory and the files/folders form the WEB-INF/session
directory, restart resin, and everything is ok again. Runs for a while
and then it crashes. All my JSP uses a Java bean that implements the
java.io.Serializable interface.
Here is my configuration:
Win2k Professional edition
Resin-2.1.0
Apache 1.3 Web Server.
Listed below is the stack trace which is displayed in the stderr log
file. What really happens is that the ConnectionPool class fails to
initialise and in effect a connection object is not released from the
connection pool. I have also include after the stack trace some of my
resin.conf settings for arguments
sake.
I am not sure what is causing this. If anyone has any ideas please
help.
TIA
Patrick
public
Connection createConnection
() {
Connection con =
null;
System.out.println("user::createConnection
initialise is
"+String.valueOf(initialise));
if
(!initialise) {
DbPool.initialise(className,url,name,password,dbMinConn,dbMaxConn);
initialise=true;
}
try
{
con = DbPool.getInstance().getConnection();
}
catch
(SQLException se) {
System.err.println("SQLException
found in User:createConnection
"+se.getMessage());
se.printStackTrace();
}
return
con;
}//end of
createConnection Method
Connection Pool is null.. initialising pool now
java.lang.NullPointerException
at
java.lang.Class.forName0(Native Method)
at
java.lang.Class.forName(Class.java:130)
at
ConnectionPool.<init>(ConnectionPool.java:32)
at
DbPool.getInstance(DbPool.java:64)
at
User.closeDB(User.java:1969)
at
User.getOneResultwithConditions(User.java:761)
at
_browsingtopics__jsp._jspService(_browsingtopics__jsp.java:243)
at
com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at
com.caucho.jsp.Page.subservice(Page.java:485)
at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at
com.caucho.server.http.Invocation.service(Invocation.java:291)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:341)
at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:271)
at
com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at
java.lang.Thread.run(Thread.java:536)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<jsp
precompile="true" static-encoding="true"
recompile-on-error="false"></jsp>
<http-server>
<!---
For production sites, change class-update-interval to something
- like
60, so it only checks for updates every minute.-->
<class-update-interval>15</class-update-interval>
<!--
- If true, the classloader order follows the Servlet spec.
- If false, the classloader order follows the JDK spec.
-->
<servlet-classloader-hack>false</servlet-classloader-hack>
<app-dir>C:\Work</app-dir>
<srun
host="localhost" port="6802"></srun>
<caucho-status>true</caucho-status>
<thread-min>50</thread-min>
<thread-max>200</thread-max>
<thread-keepalive>30</thread-keepalive>
<accept-buffer-size
id="256"></accept-buffer-size>
<thread-min
id="5"></thread-min>
<cache
dir="cache" size="1024"
entries="2048"></cache>
<host
id="">
<error-log
id="log/error.log"></error-log>
<stdout-log
href='log/stdout.log' rollover-period='1W'/>
<stderr-log
href='log/stderr.log' rollover-period='1W'/>
<servlet-mapping
url-pattern='*.jsp'
servlet-name='com.caucho.jsp.JspServlet'/>