Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-252

as-* quickstart/archetype throw persistence exceptions after arquilian tests executed on same server

    Details

      Description

      Deploy the quickstart/archetype project to jboss as 7.1.1.Final. Use the application to confirm execution. Run the arquilian tests (cli or eclipse). Attempt to use the application again.

      Persistence exceptions are thrown as seen below.

      Caused by: org.h2.jdbc.JdbcSQLException: Table "MEMBER_HTML5MOBI" not found; SQL statement:
      select member0_.id as id0_, member0_.email as email0_, member0_.name as name0_, member0_.phone_number as phone4_0_ from Member_html5mobi member0_ order by member0_.name asc [42102-161]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.get(DbException.java:146)
      at org.h2.command.Parser.readTableOrView(Parser.java:4749)
      at org.h2.command.Parser.readTableFilter(Parser.java:1075)
      at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1681)
      at org.h2.command.Parser.parseSelectSimple(Parser.java:1788)
      at org.h2.command.Parser.parseSelectSub(Parser.java:1675)
      at org.h2.command.Parser.parseSelectUnion(Parser.java:1518)
      at org.h2.command.Parser.parseSelect(Parser.java:1506)
      at org.h2.command.Parser.parsePrepared(Parser.java:405)
      at org.h2.command.Parser.parse(Parser.java:279)
      at org.h2.command.Parser.parse(Parser.java:251)
      at org.h2.command.CommandContainer.recompileIfRequired(CommandContainer.java:51)
      at org.h2.command.CommandContainer.query(CommandContainer.java:79)
      at org.h2.command.Command.executeQuery(Command.java:185)
      at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)
      at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) [:1.6.0_31]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_31]
      at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_31]
      at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
      ... 116 more

        Gliffy Diagrams

          Activity

          Hide
          jbalunas Jay Balunas added a comment -

          Restarting, or redeploying the application fixes the deployment.

          Show
          jbalunas Jay Balunas added a comment - Restarting, or redeploying the application fixes the deployment.
          Hide
          jbalunas Jay Balunas added a comment -

          This is likely caused because the tests and application use the same datasource. During the M2 release we used deployable datasources and I do not believe we had this issue. However we had to remove that functionality because openshift did not support it at that time.

          Since then it seems the jboss-as archetypes have switched to using deployable datasources and do not have this issue. If we switch to this configuration we need to make sure that jboss-as archetypes/quickstarts will also be released this way, and that openshift, and the target jboss-as 7.1 release support this.

          Show
          jbalunas Jay Balunas added a comment - This is likely caused because the tests and application use the same datasource. During the M2 release we used deployable datasources and I do not believe we had this issue. However we had to remove that functionality because openshift did not support it at that time. Since then it seems the jboss-as archetypes have switched to using deployable datasources and do not have this issue. If we switch to this configuration we need to make sure that jboss-as archetypes/quickstarts will also be released this way, and that openshift, and the target jboss-as 7.1 release support this.
          Hide
          jbalunas Jay Balunas added a comment -

          Deferring to M5. Using deployable test datasources is the correct fix for this issue, but too risky to get into M4.

          Show
          jbalunas Jay Balunas added a comment - Deferring to M5. Using deployable test datasources is the correct fix for this issue, but too risky to get into M4.

            People

            • Assignee:
              abstractj Bruno Oliveira
              Reporter:
              jbalunas Jay Balunas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development