Re: Problem with Jakarta IIS Redirector
follow the guidelines in http://www.getnet.net/~rbarr/TomcatOnIIS/default.htm modify your code from: # # Sites to be redirected to Tomcat # /193.99.41.1=$(default.worker) /193.99.41.1/*=$(default.worker) to: /*.jsp=$(default.worker) check out above link. Rao Sebastian Leppert [EMAIL PROTECTED] 07/11/02 08:42AM Hi everybody, I've just installed a new Webserver with IIS5.0 and now would like to add support to Servlets and JSP on that Server (all operations should go through the IIS). I've followed the HowTo at: http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/ Everything is fine (I can use the JSPs with :8080-extension in the URL, but when I try to use it with the Redirector over ajp13 there is an HTTP 500 error. Then I've set the Redirect Loglevel to debug und the Request looks like this: --- [Thu Jul 11 14:31:36 2002] [jk_isapi_plugin.c (657)]: HttpFilterProc started [Thu Jul 11 14:31:36 2002] [jk_isapi_plugin.c (705)]: In HttpFilterProc Virtual Host redirection of /193.99.41.111/index.jsp [Thu Jul 11 14:31:36 2002] [jk_uri_worker_map.c (447)]: Into jk_uri_worker_map_t::map_uri_to_worker [Thu Jul 11 14:31:36 2002] [jk_uri_worker_map.c (464)]: Attempting to map URI '/193.99.41.111/index.jsp' [Thu Jul 11 14:31:36 2002] [jk_uri_worker_map.c (489)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 - /193.99.41.111/ [Thu Jul 11 14:31:36 2002] [jk_isapi_plugin.c (721)]: HttpFilterProc [/index.jsp] is a servlet url - should redirect to ajp13 [Thu Jul 11 14:31:36 2002] [jk_isapi_plugin.c (784)]: HttpFilterProc check if [/index.jsp] is points to the web-inf directory So, in my opinion the Redirector operates fine! The next question is about the worker.properties: #-- DEFAULT worket list -- #- # # # The workers that your plugins should create and work with # # Add 'inprocess' if you want JNI connector worker.list=ajp12, ajp13 # , inprocess # #-- DEFAULT ajp12 WORKER DEFINITION -- #- # # # Defining a worker named ajp12 and of type ajp12 # Note that the name and the type do not have to match. # worker.ajp12.port=8007 worker.ajp12.host=localhost worker.ajp12.type=ajp12 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp12.lbfactor=1 # #-- DEFAULT ajp13 WORKER DEFINITION -- #- # # # Defining a worker named ajp13 and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 # # Specifies the load balance factor when used with # a load balancing worker. # Note: # lbfactor must be 0 # Low lbfactor means less work done by the worker. worker.ajp13.lbfactor=1 # # Specify the size of the open connection cache. #worker.ajp13.cachesize - Seems to me very well, too! So, habe a look at the uriworkermap.properties: -- # # Default worker to be used through our mappings # default.worker=ajp13 # # Sites to be redirected to Tomcat # /193.99.41.1=$(default.worker) /193.99.41.1/*=$(default.worker) - IP is not the real one :) My ROOT-Directory for my Testwebsite (with an index.jsp in it) is on: d:\webs\ingcom.de\data So I put the following HOST-Part into server.xml: -- Host name=193.99.41.1 reloadable=true unpackWARs=true Context path= docBase=D:\webs\ingcom.de\data crossContext=false debug=0 reloadable=true / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=test.de. suffix=.log timestamp=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=test.de.access. suffix=.log pattern=common/ /Host - What is wrong? Why can I get over Port 8080 with the HTTP-Connector the JSP Page and the the ajp13-Connector I get nothing? Kind regards :) S e b a s t i a n L e p p e r t -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JDBC OCI driver + Tomcat 4.04
I am having problem connecting to Oracle 9i database using JDBC OCI driver with Named Pipes through Tomcat 4.04. Connection works fine if I run the code as a java application at command prompt, but fails when I connect through JSP page. It gives me ORA-12560: TNS:protocol adapter error . I am using Tomcat 4.04 and IIS 5.0. I would appreciate your valuable help. Thanks Rao ---BeginMessage--- Hi: I am using: Windows 2000 IIS 5.0 Tomcat 4.04 JDK 1.4 Oracle 9i Orcale OCI JDBC driver ( I am using NMP in place of TCP for connecting db server) using JSP/java beans I am getting following error when I tried to connect to database. ORA-12560: TNS:protocol adapter error sqlState=66000 I could able to connect to the database through Oracle SQL SqlPlus with the same userid, password and tnsname that I am using in my Java class file. I also created a simple Java application and run it through command prompt, it connects to the database with out any problem using following code: Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@ + TNSNAME, user, password); (used example mentioned at end of the webpage: http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/getsta.htm ) I tried all the options mentioned below: (obtained from http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/basic.htm#1000881 ) /***/ Connection conn = DriverManager.getConnection (jdbc:oracle:oci:scott/tiger@); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@, scott, tiger); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@MyHostString,scott,tiger); used tnsname for MyHostString Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@(description=(address=(host= myhost) (protocol=tcp)(port=1521))(connect_data=(INSTANCE_NAME=orcl))), scott, tiger); (modified the above one for named pipes as: (description=(address=(protocol=NMP)(server=servername)(pipe=ORAPIPE))(connect_data=(SID=sid))) ) /***/ In all instances I am getting the same error message. Can any one help me connecting to the database? Thanks in advance. Rao Manekar ---End Message--- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JDBC OCI driver + Tomcat 4.04
Yes. For security reasons we cannot use TCP connection. Tim Funk [EMAIL PROTECTED] 07/11/02 09:45AM I know this doesn't solve your problem, but is there a compelling reason to use OCI driver as compared to the type 4 driver? Rao Manekar wrote: I am having problem connecting to Oracle 9i database using JDBC OCI driver with Named Pipes through Tomcat 4.04. Connection works fine if I run the code as a java application at command prompt, but fails when I connect through JSP page. It gives me ORA-12560: TNS:protocol adapter error . I am using Tomcat 4.04 and IIS 5.0. I would appreciate your valuable help. Thanks Rao Subject: TNS:protocol adapter error ; ORA-12560 ; sqlState=66000 From: Rao Manekar [EMAIL PROTECTED] Date: Wed, 10 Jul 2002 12:23:10 -0400 Hi: I am using: Windows 2000 IIS 5.0 Tomcat 4.04 JDK 1.4 Oracle 9i Orcale OCI JDBC driver ( I am using NMP in place of TCP for connecting db server) using JSP/java beans I am getting following error when I tried to connect to database. ORA-12560: TNS:protocol adapter error sqlState=66000 I could able to connect to the database through Oracle SQL SqlPlus with the same userid, password and tnsname that I am using in my Java class file. I also created a simple Java application and run it through command prompt, it connects to the database with out any problem using following code: Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@ + TNSNAME, user, password); (used example mentioned at end of the webpage: http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/getsta.htm ) I tried all the options mentioned below: (obtained from http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/basic.htm#1000881 ) /***/ Connection conn = DriverManager.getConnection (jdbc:oracle:oci:scott/tiger@); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@, scott, tiger); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@MyHostString,scott,tiger); used tnsname for MyHostString Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@(description=(address=(host= myhost) (protocol=tcp)(port=1521))(connect_data=(INSTANCE_NAME=orcl))), scott, tiger); (modified the above one for named pipes as: (description=(address=(protocol=NMP)(server=servername)(pipe=ORAPIPE))(connect_data=(SID=sid))) ) /***/ In all instances I am getting the same error message. Can any one help me connecting to the database? Thanks in advance. Rao Manekar -- 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]
RE: JDBC OCI driver + Tomcat 4.04 ... problem solved
Good news. Good news. Problem solved. For some reason when I run tomcat as a NT service, I am getting TNS: protocol adaptor error. Just today I started tomcat as a stand alone application, manually bingo! it worked. I went back and started tomcat service as an administrator but still gave the same error. I stopped the service and run the application as stand alone. This time I see no error. I could query the database through my JSPs and JavaBeans. I modified wrapper.properties file to contain correct entries. But still gave me same problem. I do have Oracle client on the workstation. I could able to log on through SQL*Plus client. I was able to run a simple Java application from the command prompt and get connected to the database but some how I was bailing out when I execute the same code through JSP. So, for right now I will run Tomcat as stand alone application and NOT as a NT service. Thank you for all your help. Rao Larry Meadors [EMAIL PROTECTED] 07/11/02 11:31AM Yep, you need to have the client installed on the tomcat server. It works the same on linux and Windows, and is a free download, so it is not a BIG deal, just an extra step. If you are running tomcat as a service, you also have to tell it where to find the dll (on windows). Not sure about linux setup. The thin driver is sure easier, but you just cannot argue with the performance, I was SHOCKED. Larry [EMAIL PROTECTED] 07/11/02 09:10 AM Do you have to install the oracle tnsclient software or something like that to use OCI? -- 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]
TNS:protocol adapter error ; ORA-12560 ; sqlState=66000
Hi: I am using: Windows 2000 IIS 5.0 Tomcat 4.04 JDK 1.4 Oracle 9i Orcale OCI JDBC driver ( I am using NMP in place of TCP for connecting db server) using JSP/java beans I am getting following error when I tried to connect to database. ORA-12560: TNS:protocol adapter error sqlState=66000 I could able to connect to the database through Oracle SQL SqlPlus with the same userid, password and tnsname that I am using in my Java class file. I also created a simple Java application and run it through command prompt, it connects to the database with out any problem using following code: Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@ + TNSNAME, user, password); (used example mentioned at end of the webpage: http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/getsta.htm ) I tried all the options mentioned below: (obtained from http://technet.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/basic.htm#1000881 ) /***/ Connection conn = DriverManager.getConnection (jdbc:oracle:oci:scott/tiger@); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@, scott, tiger); Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@MyHostString,scott,tiger); used tnsname for MyHostString Connection conn = DriverManager.getConnection (jdbc:oracle:oci:@(description=(address=(host= myhost) (protocol=tcp)(port=1521))(connect_data=(INSTANCE_NAME=orcl))), scott, tiger); (modified the above one for named pipes as: (description=(address=(protocol=NMP)(server=servername)(pipe=ORAPIPE))(connect_data=(SID=sid))) ) /***/ In all instances I am getting the same error message. Can any one help me connecting to the database? Thanks in advance. Rao Manekar -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]