java.sql.SQLException

tip

This is a bug in version 4.1.9 and it's fixed from version 4.3.0beta and beyond.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • insert problem
    via by 567684,
  • Ghost index calling oracle function
    via Stack Overflow by Alvaro Gomez
    ,
  • Trouble running Open Anzo snapshot
    via by Rolf Bardeli,
  • We regularly encounter a database error during Sonar analysis. We then relaunch the analysis and it usually completes. So it is not blocking but really annoying because our continuous integration gets broken and we have to relaunch jobs manually. Here is an extract of the maven output when the error/exception is thrown : {noformat} [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.648s [INFO] Finished at: Fri Mar 22 23:48:06 CET 2013 [INFO] Final Memory: 17M/75M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project big-parent: Can not execute Sonar: [ERROR] ### Error updating database. Cause: java.sql.SQLException: ORA-01461: une valeur 'LONG' ne peut être liée que dans une colonne de type 'LONG' [ERROR] [ERROR] ### The error may involve org.sonar.core.resource.ResourceMapper.update-Inline [ERROR] ### The error occurred while setting parameters [ERROR] ### SQL: update projects set name=?, long_name=?, description=?, scope=?, qualifier=?, kee=?, language=?, root_id=?, copy_resource_id=?, person_id=?, enabled=? where id=? [ERROR] ### Cause: java.sql.SQLException: ORA-01461: une valeur 'LONG' ne peut être liée que dans une colonne de type 'LONG' [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project big-parent: Can not execute Sonar at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.sql.SQLException: ORA-01461: une valeur 'LONG' ne peut être liée que dans une colonne de type 'LONG' ### The error may involve org.sonar.core.resource.ResourceMapper.update-Inline ### The error occurred while setting parameters ### SQL: update projects set name=?, long_name=?, description=?, scope=?, qualifier=?, kee=?, language=?, root_id=?, copy_resource_id=?, person_id=?, enabled=? where id=? ### Cause: java.sql.SQLException: ORA-01461: une valeur 'LONG' ne peut être liée que dans une colonne de type 'LONG' at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40) at $Proxy62.update(Unknown Source) at org.sonar.core.resource.ResourceDao.insertOrUpdate(ResourceDao.java:117) at org.sonar.batch.phases.ProjectInitializer.initLanguage(ProjectInitializer.java:59) at org.sonar.batch.phases.ProjectInitializer.execute(ProjectInitializer.java:47) at org.sonar.batch.phases.Phases.execute(Phases.java:90) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:128) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:114) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:109) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:104) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60) at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113) ... 23 more Caused by: java.sql.SQLException: ORA-01461: une valeur 'LONG' ne peut être liée que dans une colonne de type 'LONG' at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677) at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66) at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:47) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:145) ... 42 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException {noformat}
    via by Laurent RICHARD,
    • java.sql.SQLException: ORA-01704: 字符串文字太长 ORA-06512: 在 "GUANGDONGEARTHQUAKE.FINEWAY_METADATA", line 163 ORA-06512: 在 line 1 at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:76) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:105) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:168) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:472) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:422) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1015) at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:200) at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1027) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1325) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3522) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3692) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:7941) at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:135) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168) at com.fineway.mdb.server.oracle.MetadatabaseInstanceForOracle10g.appendMetadata(MetadatabaseInstanceForOracle10g.java:92)

    Users with the same issue

    balintn
    11 times, last one,
    Cafecanudo
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    99 more bugmates