You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2020/03/16 16:59:00 UTC

[jira] [Commented] (ARTEMIS-2628) Persistence issue: column "recordType" not found

    [ https://issues.apache.org/jira/browse/ARTEMIS-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17060375#comment-17060375 ] 

Justin Bertram commented on ARTEMIS-2628:
-----------------------------------------

I just installed MySQL 5.7.29 on my machine. I created a database named {{test}} and user named {{test}} to whom I granted all permissions on the {{test}} database. I created a new instance of the broker (2.11.0) using this config and copied the MySQL JDBC driver jar to the instance's {{lib}} directory:

{code:xml}
<store>
   <database-store>
      <jdbc-driver-class-name>com.mysql.cj.jdbc.Driver</jdbc-driver-class-name>
      <jdbc-connection-url>jdbc:mysql://localhost:3306/test?serverTimezone=CST6CDT</jdbc-connection-url>
      <jdbc-user>test</jdbc-user>
      <jdbc-password>pass</jdbc-password>
      <message-table-name>MESSAGES</message-table-name>
      <bindings-table-name>BINDINGS</bindings-table-name>
      <large-message-table-name>LARGE_MESSAGES</large-message-table-name>
      <page-store-table-name>PAGE_STORE</page-store-table-name>
      <node-manager-store-table-name>NODE_MANAGER_STORE</node-manager-store-table-name>
      <jdbc-lock-expiration>20000</jdbc-lock-expiration>
      <jdbc-lock-renew-period>4000</jdbc-lock-renew-period>
      <jdbc-network-timeout>20000</jdbc-network-timeout>
    </database-store>
</store>
{code}
The broker started up without any issues. I then ran the {{./artemis producer}} and {{./artemis consumer}} commands to make sure everything was working problem. The commands succeeded with no issues.

> Persistence issue: column "recordType" not found
> ------------------------------------------------
>
>                 Key: ARTEMIS-2628
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2628
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: Yasin Koyuncu
>            Priority: Major
>
> I am trying to setup an environment with database as persistent storage. However when the server starts I get the following error: 
>  
> {noformat}
> 2020-02-16 15:31:55,014 WARN [org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] Unknown column 'recordType' in 'field list': java.sql.SQLSyntaxErrorException: Unknown column 'recordType' in 'field list'
>  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) [mysql-connector-java-8.0.19.jar:8.0.19]
>  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) [mysql-connector-java-8.0.19.jar:8.0.19]
>  at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) [mysql-connector-java-8.0.19.jar:8.0.19]
>  at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) [mysql-connector-java-8.0.19.jar:8.0.19]
>  at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003) [mysql-connector-java-8.0.19.jar:8.0.19]
>  at org.apache.activemq.artemis.jdbc.store.logging.LoggingPreparedStatement.executeQuery(LoggingPreparedStatement.java:55) [artemis-jdbc-store-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl.load(JDBCJournalImpl.java:832) [artemis-jdbc-store-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl.load(JDBCJournalImpl.java:904) [artemis-jdbc-store-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.journal.Journal.load(Journal.java:200) [artemis-journal-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadBindingJournal(AbstractJournalStorageManager.java:1491) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.loadJournals(ActiveMQServerImpl.java:3194) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2890) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:76) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:601) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:528) [artemis-server-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:70) [artemis-cli-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:84) [artemis-cli-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:150) [artemis-cli-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:98) [artemis-cli-2.11.0.jar:2.11.0]
>  at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:125) [artemis-cli-2.11.0.jar:2.11.0]
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_232]
>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_232]
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_232]
>  at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_232]
>  at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129) [artemis-boot.jar:2.11.0]
>  at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49) [artemis-boot.jar:2.11.0]
> 2020-02-16 15:31:55,042 WARN [org.apache.activemq.artemis.core.server] AMQ222010: Critical IO Error, shutting down the server. file=NULL, message=Critical IO Error. Failed to process JDBC Record statements: java.sql.SQLSyntaxErrorException: Unknown column 'recordType' in 'field list'
> {noformat}
>  
> This is weird since the bindings table is setup properly on the database and it's still complaining. I've tried it Postgresql and Mysql and both have the same issue. I was wondering if it ever worked?
> My configuration:
> {code:xml}
> <store>
>    <database-store>
>       <jdbc-connection-url>jdbc:mysql://user:pass@mysql.default.svc.cluster.local:3306/artemis</jdbc-connection-url>
>       <bindings-table-name>BINDINGS</bindings-table-name>
>       <message-table-name>MESSAGES</message-table-name>
>       <page-store-table-name>PAGE_STORE</page-store-table-name>
>       <large-message-table-name>LARGE_MESSAGES</large-message-table-name>
>       <node-manager-store-table-name>NODE_MANAGER</node-manager-store-table-name>
>       <jdbc-driver-class-name>com.mysql.cj.jdbc.Driver</jdbc-driver-class-name>
>    </database-store>
>  </store>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)