tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iván Escobedo <iescob...@nacion.co.cr>
Subject RE: Problem with jdbc:odbc in Tomcat 5.025
Date Wed, 21 Jul 2004 20:30:32 GMT
Yes Wade, I started Tomcat 5.1 as a standalone and it works, could it be that the service doesnn't
load some jars? Another thing you have to know is that the app is accesing a System DNS .

-----Mensaje original-----
De: Wade Chandler [mailto:wchandler@redesetgrow.com] 
Enviado el: Miércoles, 21 de Julio de 2004 06:13 a.m.
Para: Tomcat Users List
Asunto: Re: Problem with jdbc:odbc in Tomcat 5.025

Iván Escobedo wrote:

> Ok, thanks for replying,
> 
> First, both tomcats are running on the same machine, but not at the same time, i just
wanted to prove to myself that something's changed in Tomcat 5.
> 
> Second, Tomcat 4 is running as a standalone, and the other one as a service, and at first
I was using a user level DNS, but now i'm using a System DNS, and I have a new error.
> 
> Third, they are using the exact same configuration.
> 
> This is the new error:
> 
> java.sql.SQLException: General error
> 	at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)
> 	at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
> 	at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
> 	at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
> 	at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:512)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:171)
> 	at com.crstore.admin.AdminDbBean.getDescriptors(AdminDbBean.java:50)
> 	at org.apache.jsp.jsp.Menu_jsp._jspService(Menu_jsp.java:118)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> 	at org.apache.jsp.jsp.Default_jsp._jspService(Default_jsp.java:102)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
> 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
> 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
> 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
> 	at com.crstore.core.Shopper.doPost(Shopper.java:95)
> 	at com.crstore.core.Shopper.doGet(Shopper.java:64)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> 	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> 	at java.lang.Thread.run(Thread.java:534)
> 
> -----Mensaje original-----
> De: Wade Chandler [mailto:wchandler@redesetgrow.com]
> Enviado el: Martes, 20 de Julio de 2004 03:15 p.m.
> Para: Tomcat Users List
> Asunto: Re: Problem with jdbc:odbc in Tomcat 5.025
> 
> Iván Escobedo wrote:
> 
> 
>>Hello guys I have a question, I have two tomcats. 4.1.30 and 5.0.27, both with the
same application, they are both similar and connect to a MSAccess database thru Jdbc Odbc
bridge, however, in 4.1.30 everything works, but in 5.0.27 i have this message when I try
to connect to the database.
>>
>>I have searched for the answer, but until now i don't know what's the problem, could
you help me?
>>
>>
>>java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified
>>	at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
>>	at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
>>	at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
>>	at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
>>	at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
>>	at java.sql.DriverManager.getConnection(DriverManager.java:512)
>>	at java.sql.DriverManager.getConnection(DriverManager.java:171)
>>	at com.crstore.admin.AdminDbBean.getDescriptors(AdminDbBean.java:50)
>>	at org.apache.jsp.jsp.Menu_jsp._jspService(Menu_jsp.java:118)
>>	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>>	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
>>	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
>>	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
>>	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
>>	at org.apache.jsp.jsp.Default_jsp._jspService(Default_jsp.java:102)
>>	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>>	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
>>	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
>>	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
>>	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
>>	at com.crstore.core.Shopper.doPost(Shopper.java:95)
>>	at com.crstore.core.Shopper.doGet(Shopper.java:64)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>	at java.lang.Thread.run(Thread.java:534)
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
> 
> Looks like 1 of 2 things could be wrong...maybe more, but these seem obvious.
> 
> 1) These are running on two different machines or under different users and the data
source is not created by the same name or is not available...odbc datasource.
> 
> If different users (is one running as a service and one you start manually...tomcat service
or not..would be different users more likely than not for service vs standalone) are you using
a system data source or a user level data source?
> 
> If different machines...check datasources.
> 
> 2) What ever you are using to configure .... config file, xml config info, etc... what
ever you are using is setup incorrectly and has an invalid datasource name on one of the machines.
> 
> I say this mainly because you say they are similar, but don't say this is on the same
machine and using the exact same configuration information.  I get that message sometimes
from odbc datasources when either of these cases is true.
> 
> Wade
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
Just so we can see if it's an issue of some sort of a security could you stop the tomcat service
and then start it in standalone mode and see how it behaves?  I'm curious to see if it is
something dealing with user permissions or not.

If it runs fine in standalone mode then my guess will be that 1) you may need to configure
your tomcat files and directories to be accessible by the special user the service is running
as and possibly 2) you will need to make sure (somehow) that that user can actually use that
ODBC DSN correctly.

I mention this because sometimes things won't work correctly if the server can't access directories
it needs to to create temp files and write runtime configuration info, and two sometimes different
user accounts don't have certain directories in their paths where libs will be found or they
don't have user level permissions on some libs (.dll files).

Have you possibly used any type of a security hardening tool on the machine?  I have had windows
machines that could not even run IIS nor
Apache2 (Apache2 ran fine in standalone though) as a service because someone had gotten the
security of different files and dirs throughout the system in such a jumble that it was easier
to slick the machine and reinstall everything.

So, try it in standalone mode and see how it behaves first.  I know it doesn't fix your issue,
but it will lead us down one path or another.

Wade


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message