> I am trying to redeploy war file with out restarting the tomcat.
> When I copied the changed war file into tomcat, my application got
> undeployed and tomcat is trying to deploy the application as per
> changed war file. But not able to redeploy the war file.
> In our application we are connecting to H2 database. One servlet
> Context Listener starts with tomcat which takes care of connecting to
> database and creating tables . When the servlet Context is going to
> destroy(stopping tomcat) H2 data base will get closed.
It looks like you didn't close all database connection. Could you
verify all connections are closed?
> So when i am
> trying to redeploy the application war file I am getting the above
> error.
This exception shouldn't be a problem. Is there another exception in
the log file? For example that the database is already in use by
another process?
Regards,
Thomas
> This exception shouldn't be a problem.
What I mean is: it shouldn't prohibit to start the web application
again. But it's not a nice exception, and I will try to find a
solution so the exception doesn't appear. In the next release, the
database will try to detect if the classloader or virtual machine has
almost shut down by checking if static final variables are set to
null. This should help reduce exceptions when stopping the web
application.
Regards,
Thomas
> The below problem got solved by closing the connctions properly.
> But my tomcat is undeployed the application and trying to deploy the
> new war file.
> But tomcat did not able to redeploy the war file and no errors in to
> log file also.
That's strange. Could you check the database log file as well
(.trace.db files)? If you don't find the reason in a log file then I
don't know exactly how this could be solved... You could try to debug
Tomcat but I guess that's complicated. Maybe a thread is stuck? You
could create a few 'full thread dumps' (Ctrl+Pause in Windows; if you
have Java 1.6 you could you jps -l, and then jstack <pid>). Sometimes
threads are stuck in strange places (I remember the random generator
was sometimes stuck when initializing).
Regards,
Thomas