where is your database (what machine the linux box), what happens when you "telnet <db_server> 3306"
-----Original Message----- From: prathap chnadran chandran [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 11:01 PM To: [EMAIL PROTECTED] Subject: naming exception Hi I have developed a search servlet and deployed it in tomcat 4.0.3 and connected to mysql database through jdbc by specifying jndi. I have coded JNDI lookup name as "java:comp/env/jdbc/KgoogleDB" I have added a context in server.xml file of tomcat for DBCP connection pooling .I have tested this in windows and it is running well in it. But when i hosted this in linux i got error like this INIT OF SEARCH SERVLET Error in file reading Connection refused File Not Found javax.naming.NameNotFoundException: Name java:comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:811) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at javax.naming.InitialContext.lookup(InitialContext.java:354) at DbConnect.getConnection(DbConnect.java:35) at QueryDetails.Query(QueryDetails.java:32) at Search.doPost(Search.java:66) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at filters.ExampleFilter.doFilter(ExampleFilter.java:149) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at filters.ExampleFilter.doFilter(ExampleFilter.java:149) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194) at java.lang.Thread.run(Thread.java:536) Connection ID null Entered FINALLY ================================= What would be the cause of this error?.Please help me. My server.xml context is - <Host className="org.apache.catalina.connector.warp.WarpHost" name="www.keralagoogle.com" debug="0" appBase="/domains/www.yy.com/tomcat/webapps" unpackWARs="true"> - <Context path="/yyjava" docBase="/domains/www.yy.com/tomcat/webapps/yyjava" debug="0" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_KgoogleDB." suffix=".txt" timestamp="true" /> <Resource name="jdbc/KgoogleDB" auth="Container" type="javax.sql.DataSource" /> - <ResourceParams name="jdbc/KgoogleDB"> - <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> - <!-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --> - <parameter> <name>maxActive</name> <value>500</value> </parameter> - <!-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. --> - <parameter> <name>maxIdle</name> <value>300</value> </parameter> - <!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> - <parameter> <name>maxWait</name> <value>12000</value> </parameter> - <!-- MySQL dB username and password for dB connections --> - <parameter> <name>username</name> <value>pratap</value> </parameter> - <parameter> <name>password</name> <value>ky67yumXg</value> </parameter> - <!-- Class name for mm.mysql JDBC driver --> - <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter> - <!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> - <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/kgoogle?</value> </parameter> </ResourceParams> </Context> ============================== Please help me find if i have to change the syntax for linux in the above code. Thanks in Advance Prathap ________________________________________________________________ NIIT supports World Computer Literacy Day on 2nd December. Enroll for NIIT SWIFT Jyoti till 2nd December for only Rs. 749 and get free Indian Languages Office software worth Rs. 2500. For details contact your nearest NIIT centre, SWIFT Point or click here http://swift.rediff.com/ cpc -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
