- This topic has 6 replies, 2 voices, and was last updated 19 years, 10 months ago by bgilbert.
-
AuthorPosts
-
bgilbertMemberI’m trying to import oracle.jdbc.pool.* in my JSP. I’ve mounted oracles classes12.jar file in my project. I don’t get an error in the editor when I import the jar but when I deploy the JSP to tomcat and try to run it I get a package not found error. What am I doing wrong?
Riyad KallaMemberIIRC the Oracle driver has a native DLL counter part to it, you will need to put this DLL in your System’s library path (Oracle’s driver should have information on how to “install” it).
Also what exactly is the entire error from the Tomcat log?
bgilbertMemberThe oracle DLL is ‘installed’ oracle wouldn’t work with out it. Like I stated I can use the jdbc classes in the java code of my project just not in the jsp’s. Here is the tomcat log:
2005-03-14 09:03:03 Error compiling file: C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\/_22B_jsp.java [javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:10: package oracle.jdbc.pool does not exist
import oracle.jdbc.pool.OracleConnectionPoolDataSource;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:70: cannot resolve symbol
symbol : class OracleConnectionPoolDataSource
location: class org.apache.jsp._22B_jsp
OracleConnectionPoolDataSource bob = new OracleConnectionPoolDataSource();
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:70: cannot resolve symbol
symbol : class OracleConnectionPoolDataSource
location: class org.apache.jsp._22B_jsp
OracleConnectionPoolDataSource bob = new OracleConnectionPoolDataSource();
^
3 errors2005-03-14 09:03:03 Info: Compile: javaFileName=C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\/_22B_jsp.java
classpath=/C:/Program Files/Apache Group/Tomcat 4.1/webapps/webTest/WEB-INF/classes/;/C:/Program Files/Apache Group/Tomcat 4.1/webapps/webTest/WEB-INF/classes/;C:/Program Files/Apache Group/Tomcat 4.1/shared/classes/;C:/Program Files/Apache Group/Tomcat 4.1/common/classes/;C:/Program Files/Apache Group/Tomcat 4.1/common/endorsed/xercesImpl.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/endorsed/xmlParserAPIs.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/activation.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/ant.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/commons-collections.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/commons-dbcp-1.1.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/commons-logging-api.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/commons-pool-1.1.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/jasper-compiler.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/jasper-runtime.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/jdbc2_0-stdext.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/jndi.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/jta.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/mail.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/naming-common.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/naming-factory.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/naming-resources.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/servlet.jar;C:/Program Files/Apache Group/Tomcat 4.1/common/lib/tools.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\webapps\webTest\WEB-INF\classes
cp=C:\Program Files\Apache Group\Tomcat 4.1\webapps\webTest\WEB-INF\classes
cp=C:\Program Files\Apache Group\Tomcat 4.1\shared\classes
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\classes
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed\xercesImpl.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\endorsed\xmlParserAPIs.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\activation.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\ant.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.1.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-logging-api.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jasper-compiler.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jasper-runtime.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jdbc2_0-stdext.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jndi.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\jta.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mail.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-common.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-factory.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\naming-resources.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar
cp=C:\Program Files\Apache Group\Tomcat 4.1\common\lib\tools.jar
work dir=C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest
srcDir=C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest
include=_22B_jsp.java
Exception compiling Compile failed; see the compiler error output for details.2005-03-14 09:03:03 Exception:
Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:978)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:799)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)2005-03-14 09:03:04 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 12 in the jsp file: /22B.jsp
Generated servlet error:
[javac] Compiling 1 source fileC:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:10: package oracle.jdbc.pool does not exist
import oracle.jdbc.pool.OracleConnectionPoolDataSource;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:70: cannot resolve symbol
symbol : class OracleConnectionPoolDataSource
location: class org.apache.jsp._22B_jsp
OracleConnectionPoolDataSource bob = new OracleConnectionPoolDataSource();
^An error occurred at line: 12 in the jsp file: /22B.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:70: cannot resolve symbol
symbol : class OracleConnectionPoolDataSource
location: class org.apache.jsp._22B_jsp
OracleConnectionPoolDataSource bob = new OracleConnectionPoolDataSource();
^
3 errorsat org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Riyad KallaMemberC:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\webTest\_22B_jsp.java:10: package oracle.jdbc.pool does not exist
import oracle.jdbc.pool.OracleConnectionPoolDataSource;It seems pretty clear here that you are either omitting the driver from your WEB-INF/lib dir or from your /lib or /common/lib folder for your app server.
bgilbertMemberSeemed clear to me until you said ‘driver’ what driver are you talking about. I imported the oracle classes into the WEB-INF/lib dir with no luck. I’m running out of things to do.
Riyad KallaMemberIf you are running Tomcat, I suggest putting it in your common/lib directory and see if that works.
What I meant by “clear” is that the compiler can not find the package you ahve declared… which means either your import is invalid (I don’t think that’s it) or the JAR with that package in it is not being found by the classloader.
Also note that if you are only running Tomcat via MyEclipse, you can modify the classpath of Tomcat by going to your Tomcat 4 connector settings in MyEclipse and appending the Oracle JAR to the end… however this is not what I suggest now because if you run Tomcat outside of MyEclipse, it won’t be able to find the class, so just drop it under common/lib so it can find it.
bgilbertMemberOK, that worked!!!! (putting it in the common/lib dir that is ) I don’t understand though how it wouldn’t work with putting it in the WEB-INF/lib dir. That doesn’t make sense.
Anyway, thanks for the help and quick responses!!
-
AuthorPosts