Unable to start tomcat (JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client.)

2013-04-06 Thread dkumar
Dear All,

JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
I am getting below error when i m trying to access oracle db using oracle 
11g client. It works with earlier oracle client versions. how do i resolve 
this.  is there any issue with version of ojdbc6.jar that i am using??? I 
cant use thin driver since its an old application for which i dont have 
source files.

Apr 6, 2013 1:00:59 PM org.apache.catalina.core.StandardWrapperValve 
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
at 
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java:346)
at 
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at PettyCash.SysDate.getSysSubSys(SysDate.java:232)
at 
org.apache.jsp.PettyCash.index_jsp._jspService(org.apache.jsp.PettyCash.index_jsp:186)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 

Code is as follow for reference

import oracle.jdbc.driver.*;

DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
conn = DriverManager.getConnection (jdbc:oracle:oci8:@ + 
database,db_user, db_pass); 


eNVIRONMENT VARIABLES set are as follows:
classpath
C:\Program 
Files\apache-tomcat-5.5.12\common\lib\servlet-api.jar;C:\Program 
Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\classes12.jar;C:\Program 
Files\apache-tomcat-5.5.12\webapps\ROOT\WEB-INF\lib\ojdbc6.jar;

JAVA_HOME
C:\Program Files\Java\jdk1.5.0_04

PATH
C:\Program Files\Java\jdk1.5.0_04\bin

ORACLE_HOME
D:\Oracle11\product\11.2.0\client_1\BIN


Thanks and Regards
Deepak
Disclaimer and confidentiality clause -
 This message and any attachments relating to official business of CCIL OR ANY 
OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original 
addressee only.
The message may contain information that is confidential and subject to legal 
privilege. 
Any views expressed in this message are those of the individual sender. 
If you have received this message in error, please notify the original sender 
immediately and destroy the message and copies thereof and any attachments 
contained in it .
 If you are not the intended recipient of this message, you are hereby notified 
that you must not disseminate, copy, use, distribute, or take any action in 
connection therewith. 
 CCIL cannot ensure that the integrity of this communication has been 
maintained nor that it is free of errors, viruses, interception and/or 
interference. 
CCIL is not liable whatsoever for loss or damage resulting from the opening of 
this message and/or attachments and/or the use of the information contained in 
this message and/or attachments.

Re: Unable to start tomcat (JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client.)

2013-04-06 Thread Michael-O

Am 2013-04-06 10:30, schrieb dku...@ccilindia.co.in:

Dear All,

JDBC-ORACLE CONNECTIVITY ISSUE WITYH OCI8 DRIVER using oracle 11g client..
I am getting below error when i m trying to access oracle db using oracle
11g client. It works with earlier oracle client versions. how do i resolve
this.  is there any issue with version of ojdbc6.jar that i am using??? I
cant use thin driver since its an old application for which i dont have
source files.

Apr 6, 2013 1:00:59 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path



1. This is not a Tomcat problem but a library path problem.
2. Use the native Java driver, there's no need for the OCI version.
3. Read the Oracle docs how to use OCI8 with JDBC.

Michael

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Better SSL connector setup

2013-04-06 Thread Kevin Jenkins
I have a server that has two hosts:
First:
http://masterserver2.raknet.com/

Second (using alias)
https://lobby3.raknet.com https://milestone.lobby3.raknet.com:444/
https://milestone.lobby3.raknet.com:444/

I would like have access be on these specific URLS. Right now you can use
untrusted URLs, such as
https://masterserver2.raknet.com/
https://milestone.lobby3.raknet.com/

Additionally, I would like to access milestone.lobby3.raknet.com on port
443 rather than 444 (so that 443 does not display a warning like it does
now).

I setup two connectors because I did not know how else to specify there are
two ssl certificate files
Connector port=443 protocol=org.apache.coyote.http11.Http11AprProtocol
SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=SSLv3

 SSLCertificateKeyFile=${catalina.base}\conf\lobby3\privatekey.txt

 SSLCertificateFile=${catalina.base}\conf\lobby3\lobby3.raknet.com.txt
/

Connector port=444 protocol=org.apache.coyote.http11.Http11AprProtocol
SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=false sslProtocol=SSLv3

 SSLCertificateKeyFile=${catalina.base}\conf\milestone_lobby3\privatekey.txt

 
SSLCertificateFile=${catalina.base}\conf\milestone_lobby3\milestone.lobby3.raknet.com.txt
/

This is my host setup:
Host name=www.masterserver2.raknet.com appBase=RakNet/masterserver2
unpackWARs=true autoDeploy=true
Aliasmasterserver2.raknet.com/Alias
Aliasmilestone.masterserver2.raknet.com/Alias
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
   prefix=masterserver2.raknet.com_access_log. suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b /
  /Host
Host name=www.lobby3.raknet.com appBase=RakNet/lobby3
unpackWARs=true autoDeploy=true
Aliaslobby3.raknet.com/Alias
Aliasmilestone.lobby3.raknet.com/Alias
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
   prefix=lobby3.raknet.com_access_log. suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b /
  /Host

This is not a major issue, but just cleanup. Does anyone have suggestions?
Thanks.


RE: Better SSL connector setup

2013-04-06 Thread Harris, Jeffrey E.


 -Original Message-
 From: Kevin Jenkins [mailto:rak...@jenkinssoftware.com]
 Sent: Saturday, April 06, 2013 10:10 PM
 To: Tomcat Users List
 Subject: Better SSL connector setup

 I have a server that has two hosts:
 First:
 http://masterserver2.raknet.com/

 Second (using alias)
 https://lobby3.raknet.com https://milestone.lobby3.raknet.com:444/
 https://milestone.lobby3.raknet.com:444/

 I would like have access be on these specific URLS. Right now you can
 use untrusted URLs, such as https://masterserver2.raknet.com/
 https://milestone.lobby3.raknet.com/

 Additionally, I would like to access milestone.lobby3.raknet.com on
 port
 443 rather than 444 (so that 443 does not display a warning like it
 does now).

 I setup two connectors because I did not know how else to specify there
 are two ssl certificate files Connector port=443
 protocol=org.apache.coyote.http11.Http11AprProtocol
 SSLEnabled=true
maxThreads=150 scheme=https secure=true
clientAuth=false sslProtocol=SSLv3

  SSLCertificateKeyFile=${catalina.base}\conf\lobby3\privatekey.txt


 SSLCertificateFile=${catalina.base}\conf\lobby3\lobby3.raknet.com.txt
 /

 Connector port=444
 protocol=org.apache.coyote.http11.Http11AprProtocol
 SSLEnabled=true
maxThreads=150 scheme=https secure=true
clientAuth=false sslProtocol=SSLv3


 SSLCertificateKeyFile=${catalina.base}\conf\milestone_lobby3\privateke
 y.txt


 SSLCertificateFile=${catalina.base}\conf\milestone_lobby3\milestone.lo
 bby3.raknet.com.txt
 /

 This is my host setup:
 Host name=www.masterserver2.raknet.com
 appBase=RakNet/masterserver2
 unpackWARs=true autoDeploy=true
 Aliasmasterserver2.raknet.com/Alias
 Aliasmilestone.masterserver2.raknet.com/Alias
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
prefix=masterserver2.raknet.com_access_log. suffix=.txt
pattern=%h %l %u %t quot;%rquot; %s %b /
   /Host
 Host name=www.lobby3.raknet.com appBase=RakNet/lobby3
 unpackWARs=true autoDeploy=true
 Aliaslobby3.raknet.com/Alias
 Aliasmilestone.lobby3.raknet.com/Alias
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs
prefix=lobby3.raknet.com_access_log. suffix=.txt
pattern=%h %l %u %t quot;%rquot; %s %b /
   /Host

 This is not a major issue, but just cleanup. Does anyone have
 suggestions?
 Thanks.

You probably do not want to share one IP address between two different hosts and
certificates when using SSL.  It is better to bind each host to a different IP
address, using the address attribute within each connector:

address=192.168.47.5

If each host is bound to a different IP address, then each host can use 443.

The rule is that the IP address and port combination for each host must be 
different;
hosts can share either IP addresses or ports, but not both.  Again, though, 
with SSL,
it is better they do not share IP addresses.

I am not sure that I addressed your question of untrusted URLs, but I will 
leave
that question for others on the mailing list to address if the change above 
does not resolve
it.

Jeffrey Harris

This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org