dbTalk Databases Forums  

Help with Tomcat & Oracle on localhost

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Help with Tomcat & Oracle on localhost in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BikRboy
 
Posts: n/a

Default Help with Tomcat & Oracle on localhost - 10-23-2007 , 01:46 PM






Hello!

My shop recently relocated our Oracle 10g instance to a new box.
Since, this action, I can no longer run JSP's from my local host
(Windows XP) running the Tomcat 5.5.17 web server that came with
NetBeans 5.5.1.

However, the JSP's do connect to Oracle and run as they should on the
HP UNIX host.

I was able to compile my JSP code using NetBeans on my local host and
run it with Tomcat prior to the migration. I am using the J2EE 1.4
framework.

This is an extract of the error I get in Tomcat:

org.apache.jasper.JasperException: Exception in JSP: /gtc_ord.jsp:43

40: ResultSetMetaData rsmd;
41:
42: try {
43: Class.forName("oracle.jdbc.driver.OracleDriver");
44: conn = DriverManager.getConnection(dbConn,
"userName", "passWord");
45:
46: S = conn.createStatement();

When the above code runs on the Oracle Application Server, it is
successful. Data is pulled from the database and the page displays as
it should.

Actions Taken:
--------------------
1. Classpath: Unchanged on the local host.

2. TNSNAMES.ORA: I can connect to Oracle using the NetBeans SQL Editor
& TOAD. They use the same TNSNAMES.ORA file. Addtionally, I can
successfully TNSPING the listener from the DOS prompt.

3. Library: According to the Oracle documentation, I need to include
this JAR file ---- ORAI18N.JAR. Although, I did not need it before I
have added this JAR file to the "WEB-INF/lib" path.

4. Cleaned, rebuilt, and redeployed the project.

Does anyone out there have any ideas?

I prefer to develop code locally before deploying it to the UNIX
server. This used to work.

Thank you, --- Mark


Reply With Quote
  #2  
Old   
Henner Hucke
 
Posts: n/a

Default Re: Help with Tomcat & Oracle on localhost - 10-24-2007 , 01:26 PM






BikRboy schrieb:
Quote:
Hello!

My shop recently relocated our Oracle 10g instance to a new box.
Since, this action, I can no longer run JSP's from my local host
(Windows XP) running the Tomcat 5.5.17 web server that came with
NetBeans 5.5.1.

However, the JSP's do connect to Oracle and run as they should on the
HP UNIX host.

I was able to compile my JSP code using NetBeans on my local host and
run it with Tomcat prior to the migration. I am using the J2EE 1.4
framework.

This is an extract of the error I get in Tomcat:

org.apache.jasper.JasperException: Exception in JSP: /gtc_ord.jsp:43

40: ResultSetMetaData rsmd;
41:
42: try {
43: Class.forName("oracle.jdbc.driver.OracleDriver");
44: conn = DriverManager.getConnection(dbConn,
"userName", "passWord");
45:
46: S = conn.createStatement();

When the above code runs on the Oracle Application Server, it is
successful. Data is pulled from the database and the page displays as
it should.

Actions Taken:
--------------------
1. Classpath: Unchanged on the local host.

2. TNSNAMES.ORA: I can connect to Oracle using the NetBeans SQL Editor
& TOAD. They use the same TNSNAMES.ORA file. Addtionally, I can
successfully TNSPING the listener from the DOS prompt.

3. Library: According to the Oracle documentation, I need to include
this JAR file ---- ORAI18N.JAR. Although, I did not need it before I
have added this JAR file to the "WEB-INF/lib" path.

4. Cleaned, rebuilt, and redeployed the project.

Does anyone out there have any ideas?

I prefer to develop code locally before deploying it to the UNIX
server. This used to work.

Thank you, --- Mark

Hello Mark,

in addition what you already did, I would also write a small java test
program only to see that it can connect to the database using the same
parameters as you are using in the .jsp. If I run an app on my local
tomcat to connect to remote databases I normally get an error stack
including the ORA error number at the top of it. It would help to find
the reason for your problem if we see the error stack.

Henner


Reply With Quote
  #3  
Old   
BikRboy
 
Posts: n/a

Default Re: Help with Tomcat & Oracle on localhost - 11-05-2007 , 09:51 AM



On Oct 24, 1:26 pm, Henner Hucke <henner.hu... (AT) nospam (DOT) de> wrote:
Quote:
BikRboy schrieb:

Hello!

My shop recently relocated our Oracle 10g instance to a new box.
Since, this action, I can no longer run JSP's from my local host
(Windows XP) running the Tomcat 5.5.17 web server that came with
NetBeans 5.5.1.

However, the JSP's do connect to Oracle and run as they should on the
HP UNIX host.

I was able to compile my JSP code using NetBeans on my local host and
run it with Tomcat prior to the migration. I am using the J2EE 1.4
framework.

This is an extract of the error I get in Tomcat:

org.apache.jasper.JasperException: Exception in JSP: /gtc_ord.jsp:43

40: ResultSetMetaData rsmd;
41:
42: try {
43: Class.forName("oracle.jdbc.driver.OracleDriver");
44: conn = DriverManager.getConnection(dbConn,
"userName", "passWord");
45:
46: S = conn.createStatement();

When the above code runs on the Oracle Application Server, it is
successful. Data is pulled from the database and the page displays as
it should.

Actions Taken:
--------------------
1. Classpath: Unchanged on the local host.

2. TNSNAMES.ORA: I can connect to Oracle using the NetBeans SQL Editor
& TOAD. They use the same TNSNAMES.ORA file. Addtionally, I can
successfully TNSPING the listener from the DOS prompt.

3. Library: According to the Oracle documentation, I need to include
this JAR file ---- ORAI18N.JAR. Although, I did not need it before I
have added this JAR file to the "WEB-INF/lib" path.

4. Cleaned, rebuilt, and redeployed the project.

Does anyone out there have any ideas?

I prefer to develop code locally before deploying it to the UNIX
server. This used to work.

Thank you, --- Mark

Hello Mark,

in addition what you already did, I would also write a small java test
program only to see that it can connect to the database using the same
parameters as you are using in the .jsp. If I run an app on my local
tomcat to connect to remote databases I normally get an error stack
including the ORA error number at the top of it. It would help to find
the reason for your problem if we see the error stack.

Henner
================== 05 NOV 07 =========
Hello Henner,

Here is the entry from my Catalina log:
------------------------------------
Nov 2, 2007 2:44:20 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\WINDOWS
\system32;C:\WINDOWS;.;c:\oracle\product\10.2.0\cl ient_1\bin;C:
\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files
\WinSCP\;C:\Program Files\Java\jdk1.5.0_12\bin\;C:\Program Files\Java
\jdk1.5.0_12\bin\java;C:\Program Files\Java\jdk1.5.0_12\bin\javac;
Nov 2, 2007 2:44:21 PM org.apache.coyote.http11.Http11BaseProtocol
init
INFO: Initializing Coyote HTTP/1.1 on http-7779
Nov 2, 2007 2:44:21 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1345 ms
Nov 2, 2007 2:44:21 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 2, 2007 2:44:21 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Nov 2, 2007 2:44:21 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 2, 2007 2:44:22 PM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Documents and
Settings\mark.fontane\My Documents\dev\netBeansPlay\dpi_play\build\web
does not exist or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocB ase(FileDirContext.java:
140)
at
org.apache.catalina.core.StandardContext.resources Start(StandardContext.java:
3814)
at
org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:
3985)
at
org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:
759)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:
739)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:
524)
at
org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:
608)
at
org.apache.catalina.startup.HostConfig.deployDescr iptors(HostConfig.java:
535)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:
470)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1122)
at
org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:
310)
at
org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:
119)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:
1021)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:
1013)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:
442)
at
org.apache.catalina.core.StandardService.start(Sta ndardService.java:
450)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:
709)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:432)
Nov 2, 2007 2:44:22 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Nov 2, 2007 2:44:22 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Nov 2, 2007 2:44:22 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/dpi_play_context] startup failed due to previous
errors



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.