1 Reply Latest reply on May 2, 2003 12:31 AM by Jon Barnett

    [SQLServer]Line 1: Incorrect syntax near ','

    Keith Elliott Newbie

      Hi Folks,

      I'm running Jboss 3.0.4 on W2K with MS SQLServer. When I start Jboss for the first time, I get the following error:

      2003-04-30 10:26:35,454 ERROR [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exception caught executing SQL
      java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near ','.

      More of the stack trace is below.

      Any ideas to why this is happening? I don't know where the ',' is that is causing the problem. The same code runs fine with MySQL. I setup the new datasource config file for MS SQLServer.

      Some of the tables are created, and some are not. So it seems we at least can communicate with the db.

      Thanks in advance for any insight!

      More stack trace...

      2003-04-30 10:26:35,454 ERROR [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exception caught executing SQL
      java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near ','.
      at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
      at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
      at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
      at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
      at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
      at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
      at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
      at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleResult(JDBCUpdateCommand.java:61)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:176)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCInitCommand.execute(JDBCInitCommand.java:149)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.create(JAWSPersistenceManager.java:131)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:155)
      at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337)
      at org.jboss.ejb.Container.invoke(Container.java:752)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:315)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy11.create(Unknown Source)
      at org.jboss.ejb.EjbModule.createService(EjbModule.java:386)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:136)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:315)
      at org.jboss.system.ServiceController.create(ServiceController.java:243)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy9.create(Unknown Source)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:377)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:760)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:620)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: [SQLServer]Line 1: Incorrect syntax near ','
          Jon Barnett Master

          Looks like a problem with the SQL generated by the CMP. Try turning on debug so you can see the JBOSS-QL generated and post the results here, if the query you trap seems ok when you run it directly with the database.

          This is probably not a datasource error as such but a CMP mapping problem.

          Do the following:
          set true in your jaws.xml

          You may want to move this to the CMP forum as well for a better directed response. You may also find some answers in that forum.