0 Replies Latest reply on Feb 26, 2004 10:56 PM by cocone

    problem with jboss-3.2.3-tomcat-4.1-24 and JDataStore 6 data

    cocone Newbie

      Hi,

      I'm trying to setup a jdatastore 6 datasource on jboss-3.2.3-tomcat-4.1-24 .I can get the DataSource,but I fail to get the Connection.The jboss server outputs exceptions:


      12:24:11,866 ERROR [Engine] ----- Root Cause -----
      javax.servlet.ServletException: (class: com/borland/datastore/jdbc/LConnection,
      method: a signature: (Ljava/util/Properties;Ljava/lang/String;)Lcom/borland/data
      store/DataStoreConnection;) Incompatible object argument for function call
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
      textImpl.java:536)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:64)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:210)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
      95)
      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(Appl
      icationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
      .java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
      2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
      rValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
      t.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
      3)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
      :565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
      ool.java:619)
      at java.lang.Thread.run(Thread.java:536)


      My jdatastore-ds.xml is:
      <?xml version="1.0" encoding="UTF-8"?>

      <local-tx-datasource>
      <jndi-name>JDS</jndi-name>
      <connection-url>jdbc:borland:dslocal:E:/MyJava/myrdnw/db/ForeRecp.jds</connection-url>
      <driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
      <user-name>admin</user-name>

      </local-tx-datasource>


      I use a jsp file to test the datasourceconnection:
      <%@ page import="javax.naming.*" %>
      <%@ page import="javax.sql.*" %>
      <%@ page import="java.sql.*" %>

      <%

      InitialContext ctx = new InitialContext();
      DataSource ds = (DataSource) ctx.lookup("java:/JDS");
      out.println((ds==null)?"error":"ok");

      Connection conn = null;
      Statement stmt = null; ResultSet rs = null;
      try {
      conn = ds.getConnection();
      rs = null;
      conn.close(); // Return to connection pool
      conn = null; // Make sure we don't close it twice
      } catch (SQLException e) {
      out.println(e);
      } finally {
      if (rs != null) {
      try { rs.close(); } catch (SQLException e) { ; }
      rs = null;
      }
      if (stmt != null) {
      try { stmt.close(); } catch (SQLException e) { ; }
      stmt = null;
      }
      if (conn != null) {
      try { conn.close(); } catch (SQLException e) { ; }
      conn = null;
      }
      }
      %>


      I believe the exception occurs at "conn = ds.getConnection(); ". Please help me.

      best regards!!