tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neven Cvetkovic <>
Subject Re: Trouble loading MS SQl Server database driver in Tomcat 7.0.37
Date Thu, 04 Apr 2013 23:34:40 GMT
On Thu, Apr 4, 2013 at 3:03 PM, <> wrote:

> I just thought I'd post the solution I found in case anybody else runs
> into this trying to migrate an app from JBoss to Tomcat. Neven, I tried
> your last suggestion and was still getting an error. I then took another
> look at my localhost log and investigated further into an error message I
> was getting in there
> Caused by: java.lang.ClassNotFoundException:
> javax.transaction.Synchronization.

I looked up what jar file this class is found in and for hibernate I found
> it was is in jta-1.1.jar. After downloading that jar and putting it in the
> application's /lib directory the app is now working. I still get this error
> in my log however. I'll have to investigate that some more but I haven't
> been able to find anything broken on the site yet because of this error.

David, that solves your problem just on a surface. The class (interface)
javax.transaction.Synchronization is part of JavaEE, which Tomcat does not
support out of the box. If you want to leverage transactional
functionality, you should have an external transactional manager. Now, I am
curious to see the code for your HibernateUtil class (just to see how your
developers are calling underlying APIs) ... Let's tackle that problem

Apr 04, 2013 1:52:10 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.NullPointerException
>         at<init>(
>         at
> com.systemsmadesimple.struts.WebConfig.initialize(
>         at
> com.systemsmadesimple.ServletInitializer.init(
>         at javax.servlet.GenericServlet.init(

Now back to your new NPE (NullPointerException) ... What does the line 50
says in com.systemsmadesimple.struts.WebConfig.initialize method? What does
that initialize() method look like? How are you calling the IO API from
there? My guess is that your developers are not checking for null there and
you get the NPE at runtime.

So, yes - JBoss-to-Tomcat migration can be challenging. There are few
gotchas, but your developers should definitely help you out.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message