tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvosbu...@aol.com
Subject Re: Trouble loading MS SQl Server database driver in Tomcat 7.0.37
Date Thu, 04 Apr 2013 19:03:13 GMT

 

 

 

-----Original Message-----
From: Neven Cvetkovic <neven.cvetkovic@gmail.com>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Thu, Apr 4, 2013 12:59 pm
Subject: Re: Trouble loading MS SQl Server database driver in Tomcat 7.0.37


OK, I looked it up again...

Your current hibernate.cfg.xml says:

*<property name="hibernate.transaction.factory_class">org.hibernate.
transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate
.transaction.JBossTransactionManagerLookup</property>
*

You should try replacing this with:

*<property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
*

Give it a whirl, and see if that helps.

Cheers!
Neven




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.

Apr 04, 2013 1:52:10 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NullPointerException
        at java.io.File.<init>(File.java:251)
        at com.systemsmadesimple.struts.WebConfig.initialize(WebConfig.java:50)
        at com.systemsmadesimple.ServletInitializer.init(ServletInitializer.java:92)
        at javax.servlet.GenericServlet.init(GenericServlet.java:160)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)

Apr 04, 2013 1:52:10 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /SystemsMadeSimple threw load() exception
java.lang.NullPointerException
        at java.io.File.<init>(File.java:251)
        at com.systemsmadesimple.struts.WebConfig.initialize(WebConfig.java:50)
        at com.systemsmadesimple.ServletInitializer.init(ServletInitializer.java:92)
        at javax.servlet.GenericServlet.init(GenericServlet.java:160)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)

Thanks to everyone that helped me work through this!

David







 

 

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