You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Nikita Ogievetsky <no...@cogx.com> on 2000/12/25 20:18:55 UTC

XConnection problem

Merry Christmas and Happy New Year Everybody!

XConnection is a really great extension!
I have a little problem and would appreciate
any comments: whether it is a bug or I am doing something 
really stupid.

I used the SQL extension sample provided 
on the xml.apache.org with the command line utility.
It works fine and creates the correct output file.

However, during the execution I am getting an error dump.

I use NT 4.0  service pack 5, MS Access.
I did the following change to the stylesheet:
<xsl:variable name="products" select="sql:new('sun.jdbc.odbc.JdbcOdbcDriver', 'jdbc:odbc:xslt1')"/>


This is the command line:
java org.apache.xalan.xslt.Process -IN xml/test.xml -XSL xml/test.xsl -OUT foo.out


This is the error dump:

javax.xml.transform.TransformerException: TRaX Transform Throwable
        at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java, Compiled Code)
        at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:254)
        at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java, Compiled Code)
        at org.apache.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:1917)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2723)
        at java.lang.Thread.run(Thread.java:479)
---------
java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Invalid transaction state
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
        at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)
        at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:1097)
        at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:850)
        at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:473)
        at org.apache.xalan.lib.sql.XConnection.close(XConnection.java:300)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java, Compiled Code)
        at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:254)
        at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java, Compiled Code)
        at org.apache.xpath.XPath.execute(XPath.java, Compiled Code)
        at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:1917)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java, Compiled Code)
        at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2723)
        at java.lang.Thread.run(Thread.java:479)

PS

On Windows NT I am getting
DrWatson Fatal Error:
"Could not attach to the Application
 Windows NT Error Code = 87"

Interestingly, error code depends on the table being selected from.
For other tables I was getting:
"Could not attach to the Application
 Windows NT Error Code = 5"

Win 2000 gives the same error dump, no DrWatson though :-))

Thanks,

Nikita.

Re: XConnection problem

Posted by Nikita Ogievetsky <no...@cogx.com>.
John,

In attachment is ODBC trace dump for a simple table:
"xslt_test"
with one column:
"test" ( it is also a PK)
with one row: 
"xalan"

Both MS Access and SQL Server 2000 give the same problem.
(Not fatal problem because XML file is built correctly :-))


Nikita.
  ----- Original Message ----- 
  From: John Gentilin 
  To: xalan-dev@xml.apache.org 
  Sent: Tuesday, December 26, 2000 1:23 AM
  Subject: Re: XConnection problem


  Nikita, 
  Can you turn on ODBC Tracking in the ODBC Manager and forward the 
  output. Just send the tail end  of the file. The SQL XConnection/XStatement 
  code only uses plain vanilla JDBC code.  The one area where there may be an 
  issue is that the XConnection code calls setAutoCommit(false), and there is 
  no commit for the query executed. Now this should not cause a problem and 
  has not for the driver I have tested it with (Sybase) but it may for an ODBC 
  type driver. 

  -John G 

  Nikita Ogievetsky wrote: 

    --------- 
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Invalid transaction state 
            at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089) 
            at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246) 
            at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:1097) 
            at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:850)

Re: XConnection problem

Posted by John Gentilin <jo...@eyecatching.com>.
Nikita,

Can you turn on ODBC Tracking in the ODBC Manager and forward the
output. Just send the tail end  of the file. The SQL
XConnection/XStatement
code only uses plain vanilla JDBC code.  The one area where there may be
an
issue is that the XConnection code calls setAutoCommit(false), and there
is
no commit for the query executed. Now this should not cause a problem
and
has not for the driver I have tested it with (Sybase) but it may for an
ODBC
type driver.

-John G

Nikita Ogievetsky wrote:

> ---------
> java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97
> Driver]Invalid transaction state
>         at
> sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
>         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)
>         at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:1097)
>         at
> sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:850)

Re: XConnection problem

Posted by John Gentilin <ge...@eyecatching.com>.
Can you turn on ODBC Tracing and send us the end of the
file. The only thing that may be happening is that the extension
calls setAutoComit(false). The JDBC Driver should be able to
handle that even if it does not support transactions.

-John G


> java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97
> Driver]Invalid transaction state
>         at
> sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
>         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)