com.dotmarketing.exception.DotDataException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Procedure's source not shown
    via squirrel-sql by skinny1973
    ,
  • I'm using Sqoop to import various tables from an MS SQL Server instance. The majority of imports are fine but a couple of tables fail to import due to what apparently is the specific naming of some table columns. Such columns are actually named "group", "merge", "order", "from", etc. It looks like when executing the final Java statement, SQL Server thinks those are actual SQL keywords instead of column names, and hence tries to execute commands like "group by" or "order by". Or at least so it seams... Eliminating those specific columns from the Sqoop import job ends up in a successful table import. But of course, I need those columns as well and changing their name in SQL Server is not an option (production DB with thousands of users and many other live applications connected to it constantly). Sqoop command sample: {noformat} sqoop import --connect 'jdbc:sqlserver://SERVER\INSTANCE;database=DB;username=USR;password=PWD' --driver com.microsoft.sqlserver.jdbc.SQLServerDriver --table TABLE --columns IdGGD,IdGGM,IdImage,LinkName,Invert,Merge,Mirror,Order,GGMXTId,GGMXTName,GGMXTP,MarkerP,MarkerW,MarkerH,MarkerX1,MarkerY1,Instruction --direct --outdir /some/local/directory --as-textfile --target-dir /some/HDFS/directory --null-string NULL --null-non-string NULL --append {noformat} The obtained error looks like this: {noformat} 2016-01-05 18:55:42,469 INFO - [main:] ~ map 0% reduce 0% (Job:1367) 2016-01-05 18:55:47,531 INFO - [main:] ~ Task Id : attempt_1451990134058_0040_m_000000_0, Status : FAILED (Job:1406) Error: java.io.IOException: SQLException in nextKeyValue at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:277) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:556) at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80) at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91) at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145) at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'Merge'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1635) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:426) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:372) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284) at org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111) at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:235) ... 12 more {noformat} One workaround that I found is to use the Sqoop --query option instead of the --table one. But even in this case I can only import all the columns of the specific table, without being able to select specific columns. Sqoop comand sample: {noformat} sqoop import --connect 'jdbc:sqlserver://SERVER\INSTANCE;database=DB;username=USR;password=PWD' --driver com.microsoft.sqlserver.jdbc.SQLServerDriver --query 'SELECT * FROM TABLE WHERE $CONDITIONS' --num-mappers 1 --direct --outdir /some/local/directory --as-textfile --target-dir /some/HDFS/directory --null-string NULL --null-non-string NULL --append {noformat}
    via by Vlad MARIN,
  • For example, enabling {{org.hibernate.test.subselect.CompositeIdTypeBindingTest}} for SQL-Server by removing the corresponding annotation {{@SkipForDialect}} and running the matrix-test on an SQL-Server would produce the following exception. {noformat} org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79) at org.hibernate.loader.Loader.getResultSet(Loader.java:2115) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1898) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1874) at org.hibernate.loader.Loader.doQuery(Loader.java:919) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:306) at org.hibernate.loader.Loader.loadCollectionSubselect(Loader.java:2385) at org.hibernate.loader.collection.SubselectCollectionLoader.initialize(SubselectCollectionLoader.java:63) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:682) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2004) at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:562) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:246) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:558) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:131) at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:160) at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:145) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:246) at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:144) at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:261) at org.hibernate.test.subselect.CompositeIdTypeBindingTest.testCompositeTypeBinding(CompositeIdTypeBindingTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: An expression of non-boolean type specified in a context where a condition is expected, near ','. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1635) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:426) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:372) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70) ... 33 more {noformat} This is due to execution of this SQL-statement which is invalid for SQL-Server: {noformat} select employees0_.EmployeeGroup_departmentName as Employee1_2_1_, employees0_.EmployeeGroup_groupName as Employee2_2_1_, employees0_.employees_id as employee3_2_1_, employee1_.id as id1_0_0_, employee1_.name as name2_0_0_ from EmployeeGroup_Employee employees0_ inner join Employee employee1_ on employees0_.employees_id=employee1_.id where ( employees0_.EmployeeGroup_departmentName, employees0_.EmployeeGroup_groupName ) in ( select employeegr0_.departmentName, employeegr0_.groupName from EmployeeGroup employeegr0_ where employeegr0_.departmentName=? and employeegr0_.groupName=? or employeegr0_.departmentName=? and employeegr0_.groupName=? or employeegr0_.departmentName=? and employeegr0_.groupName=? ) {noformat}
    via by Tobias Brueggemann,
  • For example, enabling {{org.hibernate.test.subselect.CompositeIdTypeBindingTest}} for SQL-Server by removing the corresponding annotation {{@SkipForDialect}} and running the matrix-test on an SQL-Server would produce the following exception. {noformat} org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79) at org.hibernate.loader.Loader.getResultSet(Loader.java:2115) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1898) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1874) at org.hibernate.loader.Loader.doQuery(Loader.java:919) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:306) at org.hibernate.loader.Loader.loadCollectionSubselect(Loader.java:2385) at org.hibernate.loader.collection.SubselectCollectionLoader.initialize(SubselectCollectionLoader.java:63) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:682) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2004) at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:562) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:246) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:558) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:131) at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:160) at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:145) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:246) at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:144) at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:261) at org.hibernate.test.subselect.CompositeIdTypeBindingTest.testCompositeTypeBinding(CompositeIdTypeBindingTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: An expression of non-boolean type specified in a context where a condition is expected, near ','. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1635) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:426) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:372) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70) ... 33 more {noformat} This is due to execution of this SQL-statement which is invalid for SQL-Server: {noformat} select employees0_.EmployeeGroup_departmentName as Employee1_2_1_, employees0_.EmployeeGroup_groupName as Employee2_2_1_, employees0_.employees_id as employee3_2_1_, employee1_.id as id1_0_0_, employee1_.name as name2_0_0_ from EmployeeGroup_Employee employees0_ inner join Employee employee1_ on employees0_.employees_id=employee1_.id where ( employees0_.EmployeeGroup_departmentName, employees0_.EmployeeGroup_groupName ) in ( select employeegr0_.departmentName, employeegr0_.groupName from EmployeeGroup employeegr0_ where employeegr0_.departmentName=? and employeegr0_.groupName=? or employeegr0_.departmentName=? and employeegr0_.groupName=? or employeegr0_.departmentName=? and employeegr0_.groupName=? ) {noformat}
    via by Tobias Brueggemann,
    • com.dotmarketing.exception.DotDataException: Error Clearing Field 'description' for Structure with id: 7bb66a89-03f0-444b-8562-a6187f76c336 at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.clearField(ESContentFactoryImpl.java:2293)[dotcms_3.6.1_cfa5586.jar:?] at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.cleanField(ESContentletAPIImpl.java:845)[dotcms_3.6.1_cfa5586.jar:?] at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.cleanField(ContentletAPIInterceptor.java:385)[dotcms_3.6.1_cfa5586.jar:?] at com.dotmarketing.quartz.job.DeleteFieldJob.execute(DeleteFieldJob.java:116)[dotcms_3.6.1_cfa5586.jar:?] at org.quartz.core.JobRunShell.run(JobRunShell.java:223)[dot.quartz-all-1.8.6_2.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)[dot.quartz-all-1.8.6_2.jar:?] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The data types text and varchar are incompatible in the not equal to operator. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1635)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:426)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:372)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159)[sqljdbc42.jar:?] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284)[sqljdbc42.jar:?] at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)[tomcat-dbcp.jar:8.0.18] at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)[tomcat-dbcp.jar:8.0.18] at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.clearField(ESContentFactoryImpl.java:2275)[dotcms_3.6.1_cfa5586.jar:?] ... 5 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    SteVio1989
    3 times, last one,
    Unknown visitor1 times, last one,
    Andreas Häber
    1 times, last one,
    102 more bugmates