Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46577

JdbcSQLException: Table "MAVEN_ARTIFACT" not found

    Details

    • Similar Issues:

      Description

      Run make run in this directory and after the scheduled triggers start the job using withMaven, I get

      ... org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig getDao
      WARNING: Exception creating database dao, skip
      org.jenkinsci.plugins.pipeline.maven.util.RuntimeSqlException: org.h2.jdbc.JdbcSQLException: Table "MAVEN_ARTIFACT" not found; SQL statement:
      SELECT count(*) FROM MAVEN_ARTIFACT [42102-196]
      	at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.testDatabase(PipelineMavenPluginH2Dao.java:390)
      	at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.<init>(PipelineMavenPluginH2Dao.java:69)
      	at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:82)
      	at org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener.onCompleted(DownstreamPipelineTriggerRunListener.java:66)
      	at org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener.onCompleted(DownstreamPipelineTriggerRunListener.java:46)
      	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:664)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:135)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:967)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1221)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.h2.jdbc.JdbcSQLException: Table "MAVEN_ARTIFACT" not found; SQL statement:
      SELECT count(*) FROM MAVEN_ARTIFACT [42102-196]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
      	at org.h2.message.DbException.get(DbException.java:179)
      	at org.h2.message.DbException.get(DbException.java:155)
      	at org.h2.command.Parser.readTableOrView(Parser.java:5552)
      	at org.h2.command.Parser.readTableFilter(Parser.java:1266)
      	at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1946)
      	at org.h2.command.Parser.parseSelectSimple(Parser.java:2095)
      	at org.h2.command.Parser.parseSelectSub(Parser.java:1940)
      	at org.h2.command.Parser.parseSelectUnion(Parser.java:1755)
      	at org.h2.command.Parser.parseSelect(Parser.java:1743)
      	at org.h2.command.Parser.parsePrepared(Parser.java:449)
      	at org.h2.command.Parser.parse(Parser.java:321)
      	at org.h2.command.Parser.parse(Parser.java:293)
      	at org.h2.command.Parser.prepareCommand(Parser.java:258)
      	at org.h2.engine.Session.prepareLocal(Session.java:578)
      	at org.h2.engine.Session.prepareCommand(Session.java:519)
      	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
      	at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:73)
      	at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.testDatabase(PipelineMavenPluginH2Dao.java:379)
      	... 18 more
      

      Not fatal.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            On MacOSX, I get the following exception, I'm investigating

            docker volume create --name=m2repo
            m2repo
            sudo chmod a+rw $(docker volume inspect -f '{{.Mountpoint}}' m2repo)
            chmod: /var/lib/docker/volumes/m2repo/_data: No such file or directory
            make: *** [volume] Error 1
            

            https://gist.github.com/cyrille-leclerc/96a2e0cdfc1873d38baf98f7d045dcbf

            Show
            cleclerc Cyrille Le Clerc added a comment - On MacOSX, I get the following exception, I'm investigating docker volume create --name=m2repo m2repo sudo chmod a+rw $(docker volume inspect -f '{{.Mountpoint}}' m2repo) chmod: /var/lib/docker/volumes/m2repo/_data: No such file or directory make: *** [volume] Error 1 https://gist.github.com/cyrille-leclerc/96a2e0cdfc1873d38baf98f7d045dcbf
            Hide
            jglick Jesse Glick added a comment -

            I would not expect the demo to work as is with the weird Docker setup on Mac OS X, since the mountpoint would be inside the Linux VM.

            Show
            jglick Jesse Glick added a comment - I would not expect the demo to work as is with the weird Docker setup on Mac OS X, since the mountpoint would be inside the Linux VM.
            alobato Alvaro Lobato made changes -
            Field Original Value New Value
            Assignee Alvaro Lobato [ alobato ]
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is related to JENKINS-47558 [ JENKINS-47558 ]
            cleclerc Cyrille Le Clerc made changes -
            Link This issue is duplicated by JENKINS-47558 [ JENKINS-47558 ]
            Hide
            cleclerc Cyrille Le Clerc added a comment - - edited

            The cause is that on this environment, "Thread.currentThread().getContextClassLoader().getResourceAsStream("sql/h2/01_migration.sql")" returns "null".

            https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.5/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java#L331

            Show
            cleclerc Cyrille Le Clerc added a comment - - edited The cause is that on this environment, " Thread.currentThread().getContextClassLoader().getResourceAsStream("sql/h2/01_migration.sql") " returns " null ". https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.0.5/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java#L331
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/98677c47b60c4dc7a61a363d76f2606adfa26632
            Log:
            JENKINS-46577 Better detection of plugin loading issues

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java http://jenkins-ci.org/commit/pipeline-maven-plugin/98677c47b60c4dc7a61a363d76f2606adfa26632 Log: JENKINS-46577 Better detection of plugin loading issues
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/a57a33b321dc642340427cb0ebaa6b0793d3b0e9
            Log:
            Merge pull request #113 from jenkinsci/JENKINS-46577

            JENKINS-46577 Better detection of plugin loading issues

            Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/ddf7842b37a2...a57a33b321dc

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java http://jenkins-ci.org/commit/pipeline-maven-plugin/a57a33b321dc642340427cb0ebaa6b0793d3b0e9 Log: Merge pull request #113 from jenkinsci/ JENKINS-46577 JENKINS-46577 Better detection of plugin loading issues Compare: https://github.com/jenkinsci/pipeline-maven-plugin/compare/ddf7842b37a2...a57a33b321dc
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/ClassUtils.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/ClassUtilsTest.java
            jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/util/classutils-test-1.txt
            http://jenkins-ci.org/commit/pipeline-maven-plugin/76e6db899cc954f42e120a5e31c2e747f2e3fb16
            Log:
            JENKINS-46577 More robust resource loading strategy

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/ClassUtils.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/ClassUtilsTest.java jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/util/classutils-test-1.txt http://jenkins-ci.org/commit/pipeline-maven-plugin/76e6db899cc954f42e120a5e31c2e747f2e3fb16 Log: JENKINS-46577  More robust resource loading strategy
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/ef3d4cbfa21011b7e781e68bbd08fcba4e962275
            Log:
            JENKINS-46577 cleanup logging

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java http://jenkins-ci.org/commit/pipeline-maven-plugin/ef3d4cbfa21011b7e781e68bbd08fcba4e962275 Log: JENKINS-46577 cleanup logging
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Fixed in 3.0.6-beta-1

            Show
            cleclerc Cyrille Le Clerc added a comment - Fixed in 3.0.6-beta-1
            cleclerc Cyrille Le Clerc made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Assignee Cyrille Le Clerc [ cleclerc ]
            Resolution Fixed [ 1 ]
            Show
            cleclerc Cyrille Le Clerc added a comment - Jesse Glick PR submitted https://github.com/jglick/jk--/pull/1
            cleclerc Cyrille Le Clerc made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: