title: Pentaho 6 Quartz DB error after switching to postgres
body: <p>I am moving our Pentaho 4 installation to new server and also updating it to pentaho 6 with postgresSQL databases instead of hypersql.</p>
  
  <p>I have been following this guide: <a href="http://helicaltech.com/steps-migrate-oracle-pentaho/" rel="nofollow">http://helicaltech.com/steps-migrate-oracle-pentaho/</a>
  even that it is meant for Oracle, files needed to be edited looks pretty much same.
  There is one exception, as I have not changed file <em>biserver-ce/pentaho-solutions/system/quartz/quartz.properties</em> because it already contains <code>org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</code> which I believe is postgres configuration.</p>
  
  <p>However, when I try to start my bi-server, I am getting into error that prevents my bi-server to start. Here is the <em>catalina.out</em> exception:</p>
  
  <pre><code>18-Oct-2016 15:56:57.618 INFO [Thread-17] org.apache.cxf.endpoint.ServerImpl.initDestination Setting the server's publish address to be /lineage
  18-Oct-2016 15:56:58.421 INFO [Thread-17] org.apache.cxf.endpoint.ServerImpl.initDestination Setting the server's publish address to be /marketplace
  15:56:58,467 ERROR [0] [[org.osgi.service.cm.ConfigurationAdmin]]Cannot use configuration org.pentaho.requirejs for [org.osgi.service.cm.ManagedService, id=495, bundle=187/mvn:pentaho/pentaho-requirejs-osgi-manager/6.0.1.0-386]: No visibility to configuration bound to mvn:pentaho/pentaho-server-bundle/6.0.1.0-386
  ********************************************************************************
  15:57:14,694 ERROR [EmbeddedQuartzSystemListener] EmbeddedQuartzSystemListener.ERROR_0007_SQLERROR
  org.postgresql.util.PSQLException: ERROR: syntax error at or near "RUNSCRIPT"
    Position: 1
          at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
          at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
          at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
          at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
          at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)
          at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:333)
          at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
          at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
          at org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener.verifyQuartzIsConfigured(EmbeddedQuartzSystemListener.java:176)
          at org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener.startup(EmbeddedQuartzSystemListener.java:100)
          at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:436)
          at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:427)
          at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:406)
          at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:427)
          at org.pentaho.platform.engine.core.system.PentahoSystem.access$000(PentahoSystem.java:82)
          at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:358)
          at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:355)
          at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:406)
          at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:355)
          at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:326)
          at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:222)
          at org.pentaho.platform.web.http.context.SolutionContextListener.contextInitialized(SolutionContextListener.java:154)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101)
          at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1786)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:745)
  15:57:14,696 ERROR [Logger] Error: Pentaho
  15:57:14,696 ERROR [Logger] misc-org.pentaho.platform.engine.core.system.PentahoSystem: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
  org.pentaho.platform.api.engine.PentahoSystemException: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
          at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:363)
          at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:326)
          at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:222)
          at org.pentaho.platform.web.http.context.SolutionContextListener.contextInitialized(SolutionContextListener.java:154)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101)
          at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1786)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:745)
  Caused by: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
          at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:445)
          at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:427)
          at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:406)
          at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:427)
          at org.pentaho.platform.engine.core.system.PentahoSystem.access$000(PentahoSystem.java:82)
          at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:358)
          at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:355)
          at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:406)
          at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:355)
          ... 16 more
  Caused by: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error while trying to execute startup sequence for org.pentaho.platform.scheduler2.quartz.EmbeddedQuartzSystemListener
          at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:437)
          ... 24 more
  15:57:14,696 ERROR [Logger] Error end:
  Pentaho BI Platform server failed to properly initialize. The system will not be available for requests. (Pentaho Open Source BA Server 6.0.1.0-386) Fully Qualified Server Url = http://localhost:8080/pentaho/, Solution Path = /home/app_core/flexcore/pentaho/biserver-ce/pentaho-solutions
  18-Oct-2016 15:57:17.747 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/app_core/flexcore/pentaho/biserver-ce/tomcat/webapps/pentaho has finished in 43,862 ms
  18-Oct-2016 15:57:17.747 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/app_core/flexcore/pentaho/biserver-ce/tomcat/webapps/ROOT
  18-Oct-2016 15:57:17.882 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  18-Oct-2016 15:57:17.883 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/app_core/flexcore/pentaho/biserver-ce/tomcat/webapps/ROOT has finished in 136 ms
  18-Oct-2016 15:57:17.885 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
  18-Oct-2016 15:57:17.889 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
  18-Oct-2016 15:57:17.890 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 45068 ms
  </code></pre>
  
  <p>I am not very certain with Java, so I would like to ask, if anybody can give me some hints where should I look for problem. Or what files should I check.</p>
  
  <p>PS:</p>
  
  <ol>
  <li>Yes, I have used <em>biserver-ce\data\postgres</em> files to create
  databases.</li>
  <li>I have also checked pentaho oficial guide at link: <em><a href="https://help.pentaho.com/Documentation/6.0/0F0/0K0/040/0A0" rel="nofollow">https://help.pentaho.com/Documentation/6.0/0F0/0K0/040/0A0</a></em> but the Quartz settings looks same as mine.</li>
  <li>I have tried different <code>validationQuery</code> settings, but that did not help.</li>
  <li>I was also trying to find "Listener". And I have found it in
  <em>bi-server/pentaho-solutions/system/quartz/quartz.properties</em> but it is commented (dummy one = <code>#org.quartz.triggerListener.dummy.class = org.quartz.examples.DumbTriggerListener</code>) and no guide is doing anything with that
  setting.</li>
  </ol>