4 Replies Latest reply: May 17, 2011 6:56 PM by Ted Jones RSS

Generated web service throws 'incorrect syntax' exception

Scott Dawson Apprentice

My environment is:

  • JBoss App Server 5.1
  • Teiid 7.3
  • Teiid Designer 7.3
  • Microsoft SQL Server 2005
  • JTDS JDBC driver 1.2.5
  • JBossWS-CXF 3.2.1
  • Sun JDK 1.6


I'm using the 'Generate JBossWS-CXF War' feature in Teiid Designer. I have everything working until the moment I invoke the web service (from SoapUI). Then I get this exception:

Caused by: java.sql.SQLException: Incorrect syntax near 'call'.

        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)

        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)

        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)

        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)

        at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)

        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)

        at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:558)

        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:299)

        at org.teiid.soap.provider.TeiidWSProvider.execute(TeiidWSProvider.java:124)

        ... 47 more


I can see this in the generated source (TeiidWSProvider.java):

final String executeStatement = "call " + procedureName + (noParm ? "()" : "(?)") + ";"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

statement = conn.prepareStatement(executeStatement);

if (!noParm) {

      statement.setString(1, inputMessage);


final boolean hasResultSet = statement.execute();


Has anyone seen this before? Any thoughts on how to solve it?


When I use the 'Preview Virtual Data' feature of the Operation Editor, everything works correctly, but using the same payload in SoapUI still causes the exception shown above.


(By the way, I was originally using JBossWS-CXF 3.4.1. That was worse. The application will not deploy because of a missing XSD in the warfile. When I manually added the XSD, I was in essentially the same situation I'm in now.)