Hello,
I was banging my head on this yesterday to try and track down the issue, but
whenever I try to use the WSAS business service, I'm getting this exception
back: "org.apache.stonehenge.stocktrader.dal.DAOException: Exception was thrown
when instantiating a MSSQLCustomerDAO, Caused by: java.sql.SQLException: No
suitable driver found for jdbc:jtds:sqlserv
er://localhost:1433/stocktraderdb;user=trade;password=yyy;" (see full stack
trace at the bottom of this message).
The good news is, it looks like the interop works with the latest version of
WSAS, but the bad news is it's bombing in the DAL. This is my db.properties
file (as it appears under the
caborn_home\webapps\ROOT\WEB-INF\classes\db.properties):
org.apache.stonehenge.stocktrader.database.host=localhost
org.apache.stonehenge.stocktrader.database.port=1433
org.apache.stonehenge.stocktrader.database.db=stocktraderdb
org.apache.stonehenge.stocktrader.database.user=trade
org.apache.stonehenge.stocktrader.database.password=yyy
org.apache.stonehenge.stocktrader.database.type=mssql
I have jtds-1.2.5.jar under carbon_home\lib\extensions (for WSAS). The same jar
functioned properly in identity server allowing for access to external users.
At this point I'm stumped, and don't have enough carbon debugging skills to
figure out why it can't seem to find a suitable driver.
The SQL server instance does have TCP/IP enabled, port 1433 is the correct
port, and the db and login is also correct.
- Nick
Full stack trace:
[2010-02-10 12:32:53,910] ERROR - org.apache.stonehenge.stocktrader.dal.DAOExce
ption: Exception was thrown when instantiating a MSSQLCustomerDAO
org.apache.axis2.AxisFault: org.apache.stonehenge.stocktrader.dal.DAOException:
Exception was thrown when instantiating a MSSQLCustomerDAO
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.tempuri.TradeServiceWcfMessageReceiverInOut.invokeBusinessLogic(T
radeServiceWcfMessageReceiverInOut.java:369)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
ssageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:167)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleR
equest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(P
roxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyS
ervlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:685)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: org.apache.stonehenge.stocktrader.dal.DAO
Exception: Exception was thrown when instantiating a MSSQLCustomerDAO
at org.apache.stonehenge.stocktrader.services.TradeServiceImpl.getHoldin
gs(TradeServiceImpl.java:296)
at org.tempuri.TradeServiceWcfMessageReceiverInOut.invokeBusinessLogic(T
radeServiceWcfMessageReceiverInOut.java:154)
... 27 more
Caused by: org.apache.stonehenge.stocktrader.dal.DAOException: Exception was thr
own when instantiating a MSSQLCustomerDAO
at org.apache.stonehenge.stocktrader.mssql.MSSQLDAOFactory.getCustomerDA
O(MSSQLDAOFactory.java:83)
at org.apache.stonehenge.stocktrader.services.TraderServiceManager.getHo
ldings(TraderServiceManager.java:219)
at org.apache.stonehenge.stocktrader.services.TradeServiceImpl.getHoldin
gs(TradeServiceImpl.java:292)
... 28 more
Caused by: java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserv
er://localhost:1433/stocktraderdb;user=trade;password=yyy;
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at org.apache.stonehenge.stocktrader.mssql.MSSQLDAOFactory.getConnection
(MSSQLDAOFactory.java:124)
at org.apache.stonehenge.stocktrader.mssql.MSSQLDAOFactory.getCustomerDA
O(MSSQLDAOFactory.java:79)
... 30 more