Mirth Connect
  1. Mirth Connect
  2. MIRTH-3277

Removed/modified custom metadata columns can cause errors when searching in the message browser

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0, 3.0.1, 3.0.2
    • Fix Version/s: 3.7.0
    • Component/s: Administrator, Server
    • Labels:
      None

      Description

      The custom metadata columns for a channel may change after a user has already entered the message browser. If a user enters the message browser and meanwhile some other user removes a custom metadata column on the channel, searching may cause SQLExceptions:

      ERROR 2014-05-14 08:29:26,350 [qtp72633090-87] com.mirth.connect.server.servlets.MessageObjectServlet: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: column "SOURCE" does not exist
        Position: 191
      ### The error may exist in postgres/postgres-message.xml
      ### The error may involve Message.searchCustomMetaDataTable-Inline
      ### The error occurred while setting parameters
      ### SQL: SELECT MESSAGE_ID AS MESSAGE_ID, METADATA_ID AS METADATA_ID       FROM D_MCM13       WHERE MESSAGE_ID  >=  ?             AND MESSAGE_ID  <=  ?                         AND           (      "SOURCE" ILIKE '%' || ? || '%'     )
      ### Cause: org.postgresql.util.PSQLException: ERROR: column "SOURCE" does not exist
        Position: 191
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95)
      	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:282)
      	at com.sun.proxy.$Proxy7.selectList(Unknown Source)
      	at org.apache.ibatis.session.SqlSessionManager.selectList(SqlSessionManager.java:171)
      	at com.mirth.connect.server.controllers.DonkeyMessageController.searchText(DonkeyMessageController.java:1075)
      	at com.mirth.connect.server.controllers.DonkeyMessageController.searchAll(DonkeyMessageController.java:880)
      	at com.mirth.connect.server.controllers.DonkeyMessageController.searchMessages(DonkeyMessageController.java:649)
      	at com.mirth.connect.server.controllers.DonkeyMessageController.getMessages(DonkeyMessageController.java:192)
      	at com.mirth.connect.server.servlets.MessageObjectServlet.doPost(MessageObjectServlet.java:97)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:363)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
      	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: org.postgresql.util.PSQLException: ERROR: column "SOURCE" does not exist
        Position: 191
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:379)
      	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)
      	at com.sun.proxy.$Proxy11.execute(Unknown Source)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:56)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
      	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
      	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
      	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:141)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:101)
      	... 37 more

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Jaysen Patton
              Reporter:
              Nick Rupley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development