<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    jboss-javaee6-webapp-ear-archetype: Doesn't deploy in Eclipse 4.2
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/andypickler">Andy Pickler</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/756546#756546">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p style="text-align: left;">Platform: Ubuntu 12.04 64-bit</p><p style="text-align: left;">JDK: OpenJDK 7 (1.7.0_03)</p><p style="text-align: left;">Eclipse: 4.2 (Juno)</p><p style="text-align: left;">JBoss Tools: 3.? (Nightly build...updated every day as prompted)</p><p style="text-align: left;">JBoss Server: 7.1.1 Final (full profile)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="text-align: left;">I generated a basic Java EE multi-module Maven project using the jboss-javaee6-webapp-ear-archetype archetype.&#160; If I build on the command line using "mvn clean package jboss-as:deploy", it deploys and works fine.&#160; However, if I import the project into Eclipse and deploy to the same JBoss server (configured within Eclipse and deployed internally as "Run on server"), I get the following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">12:00:15,391 INFO&#160; [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-8) HHH000227: Running hbm2ddl schema export
12:00:15,403 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-8) HHH000231: Schema export unsuccessful: org.hibernate.tool.hbm2ddl.ImportScriptException: Error during statement execution (file: '/import.sql'): insert into Registrant(id, name, email, phone_number) values (0, 'John Smith', 'john.smith@mailinator.com', '2125551212')
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:451) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:378) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:487) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1746) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.ejb.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:94) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
&#160;&#160;&#160; at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
&#160;&#160;&#160; at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
&#160;&#160;&#160; at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: org.h2.jdbc.JdbcSQLException: Table "REGISTRANT" not found; SQL statement:
insert into Registrant(id, name, email, phone_number) values (0, 'John Smith', 'john.smith@mailinator.com', '2125551212') [42102-161]
&#160;&#160;&#160; at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
&#160;&#160;&#160; at org.h2.message.DbException.get(DbException.java:169)
&#160;&#160;&#160; at org.h2.message.DbException.get(DbException.java:146)
&#160;&#160;&#160; at org.h2.command.Parser.readTableOrView(Parser.java:4749)
&#160;&#160;&#160; at org.h2.command.Parser.readTableOrView(Parser.java:4727)
&#160;&#160;&#160; at org.h2.command.Parser.parseInsert(Parser.java:949)
&#160;&#160;&#160; at org.h2.command.Parser.parsePrepared(Parser.java:375)
&#160;&#160;&#160; at org.h2.command.Parser.parse(Parser.java:279)
&#160;&#160;&#160; at org.h2.command.Parser.parse(Parser.java:251)
&#160;&#160;&#160; at org.h2.command.Parser.prepareCommand(Parser.java:217)
&#160;&#160;&#160; at org.h2.engine.Session.prepareLocal(Session.java:415)
&#160;&#160;&#160; at org.h2.engine.Session.prepareCommand(Session.java:364)
&#160;&#160;&#160; at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1119)
&#160;&#160;&#160; at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:121)
&#160;&#160;&#160; at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
&#160;&#160;&#160; at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:371)
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:446) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
&#160;&#160;&#160; ... 16 more

12:00:15,417 INFO&#160; [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-8) HHH000230: Schema export complete
</code></pre></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/756546#756546">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>