有没有装orancle的jdbc驱动程序呢?还有可能要注册数据源在先的 我没用过orancle 所以不敢肯定 不过ms sql是要先注册的

解决方案 »

  1.   

    我以用前没有用Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();是直接Class.forName("oracle.jdbc.driver.OracleDriver")就行了!还有把你的错贴出来看啊!
      

  2.   

    有种方法是 jdbc:oracle:thin:@localhost:1521:yourdatebasename
      

  3.   


    出现以下错误页面HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP. 
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK 
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart. 
    If using an alternate Java compiler, please check its installation and access path. org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Tomcat logs.
    --------------------------------------------------------------------------------Apache Tomcat/5.0.16
      

  4.   

    No Java compiler was found to compile the generated source for the JSP. 
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK 
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart. 
    If using an alternate Java compiler, please check its installation and access path.别用这个jdbc:oracle:oci9:@jetdata用jdbc:oracle:thin:@localhost:1521:yourdatebasename
      

  5.   

    原来是这个错误啊 !!
    你只要找到tools.jar ,通常这个文件在jdbk下面的bin里面的 如果你找不到用搜索好了
    然后把这个文件复制到你的tomcat里面的common里面就可以了 
      

  6.   

    上面几个文件我是有copy过去的了,现在又有下面的错误了。--------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: Io ??: The Network Adapter could not establish the connection
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
    org.apache.jsp.testOracle_jsp._jspService(testOracle_jsp.java:71)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause java.sql.SQLException: Io ??: The Network Adapter could not establish the connection
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
    oracle.jdbc.driver.OracleConnection.(OracleConnection.java:361)
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
    java.sql.DriverManager.getConnection(Unknown Source)
    java.sql.DriverManager.getConnection(Unknown Source)
    org.apache.jsp.testOracle_jsp._jspService(testOracle_jsp.java:48)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Tomcat logs.
      

  7.   

    去oracle9i安装目录里找新的jdbc驱动,原来8i的class1.zip, class12.zip好像不好用了。
    换成9i的新jdbc驱动以后,连接字符串的格式也要改,具体看9i安装目录下jdbc驱动目录下的readme之类的,里面有说。