HI !!
I can not access DB and get a Database Metadata from JSP via Servlet.
I use tomcat4 and JDK1.4 and SQLServer2000(JDBCDriver).
I have  following error message.
Please advice me.

Thanks.


pache Tomcat/4.0.3
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
setting
up static cursor cache.
        at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseImplSortCursorResultSet.setupTempFile(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseImplSortCursorResultSet.postSetupInitialize(Unkn
own Source)
        at com.microsoft.jdbc.base.BaseResultSet.<init>(Unknown Source)
        at
com.microsoft.jdbc.base.BaseStatement.commonGetNextResultSet(UnknownSource)
        at
com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
        at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown
Source)
        at com.microsoft.jdbc.base.BaseDatabaseMetaData.getTables(Unknown
Source)
        at
jp.co.sorun.pola.project.servlet.ProjectServlet.doPost(ProjectServlet.java:6
2)

I use Tomcat4 and J2SE(jdk1.4).
I add statements to host section of server.xml as follows.
     <Context .......>
         ....

         <parameter>
           <name>factory</name>
           <value>org.apache.naming.factory.TyrexDataSourceFactory</value>
         </parameter>
         <parameter>
           <name>user</name>
           <value>java</value>
         </parameter>
         <parameter>
           <name>password</name>
           <value>sorun</value>
         </parameter>
         <parameter>
           <name>driverClassName</name>
           <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
         </parameter>
         <parameter>
           <name>driverName</name>

<value>jdbc:microsoft:sqlserver://xxxx:1433;DatabaseName=xxxx</value>
         </parameter>
       .........
     </Context>

and, I add the following statements in web.xml.

   <resource-ref>
     <description>
      XXXXXXXXX
    </description>
    <res-ref-name>
      xxxxxxxxxxxx    <---Context ParameterName
    </res-ref-name>
    <res-type>
      javax.sql.DataSource
    </res-type>
    <res-auth>
      Container
    </res-auth>
  </resource-ref>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to