[jboss-jira] [JBoss JIRA] (AS7-2538) The jboss-javaee6-ear-webapp Maven archetype generates a project that can cause a database duplicate key conflict
Pete Muir (Resolved) (JIRA)
jira-events at lists.jboss.org
Mon Dec 5 06:25:41 EST 2011
[ https://issues.jboss.org/browse/AS7-2538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Muir resolved AS7-2538.
----------------------------
Fix Version/s: 7.1.0.CR1
Resolution: Done
> The jboss-javaee6-ear-webapp Maven archetype generates a project that can cause a database duplicate key conflict
> -----------------------------------------------------------------------------------------------------------------
>
> Key: AS7-2538
> URL: https://issues.jboss.org/browse/AS7-2538
> Project: Application Server 7
> Issue Type: Bug
> Components: Build System, Documentation
> Reporter: Sande Gilda
> Assignee: Pete Muir
> Fix For: 7.1.0.CR1
>
>
> I created the the kitchensink-ear project using the jboss-javaee6-ear-webapp archetype.
> I built and deployed the application to a server where the kitchensink quickstart was already deployed.
> When I restarted my server, I got a JdbcSQLException:
> org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
> "PRIMARY_KEY_8 ON PUBLIC.MEMBER(ID)"; SQL statement:
> insert into Member (id, name, email, phone_number) values (0, 'John Smith',
> 'john.smith at mailinator.com', '2125551212')
> Unfortunately there is no way to know if the kitchensink is also deployed to the server so it is easy to run into a conflict with the 'id' column.
> We need to make the following 2 changes to the archetype:
> 1. We need to rename the table to avoid conflict. I checked in kitchensink-ear with the table renamed to "Registrant". This required renaming 5 files and changing all "member" references to "registrant". This can be found here: https://github.com/sgilda/quickstart
> 2. We also need to change the index.xhtml message to say "You have successfully deployed a Java EE 6 Enterprise application on JBoss AS 7". This uses the EAR archetype so it is an Enterprise application and not just a web application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list