Andy Pickler [https://community.jboss.org/people/andypickler] created the 
discussion

"jboss-javaee6-webapp-ear-archetype: Doesn't deploy in Eclipse 4.2"

To view the discussion, visit: https://community.jboss.org/message/756546#756546

--------------------------------------------------------------
Platform: Ubuntu 12.04 64-bit
JDK: OpenJDK 7 (1.7.0_03)
Eclipse: 4.2 (Juno)
JBoss Tools: 3.? (Nightly build...updated every day as prompted)
JBoss Server: 7.1.1 Final (full profile)

I generated a basic Java EE multi-module Maven project using the 
jboss-javaee6-webapp-ear-archetype archetype.  If I build on the command line 
using "mvn clean package jboss-as:deploy", it deploys and works fine.  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:

12:00:15,391 INFO  [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', '[email protected]', 
'2125551212')
    at 
org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:451) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:378) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:487) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1746) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
 [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
 [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
 [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
 [hibernate-entitymanager-4.1.6.Final.jar:4.1.6.Final]
    at 
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
 [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at 
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
 [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
[rt.jar:1.7.0_03]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
[rt.jar:1.7.0_03]
    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', 
'[email protected]', '2125551212') [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.readTableOrView(Parser.java:4727)
    at org.h2.command.Parser.parseInsert(Parser.java:949)
    at org.h2.command.Parser.parsePrepared(Parser.java:375)
    at org.h2.command.Parser.parse(Parser.java:279)
    at org.h2.command.Parser.parse(Parser.java:251)
    at org.h2.command.Parser.prepareCommand(Parser.java:217)
    at org.h2.engine.Session.prepareLocal(Session.java:415)
    at org.h2.engine.Session.prepareCommand(Session.java:364)
    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1119)
    at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:121)
    at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:110)
    at 
org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:371)
    at 
org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    at 
org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:446) 
[hibernate-core-4.1.6.Final.jar:4.1.6.Final]
    ... 16 more

12:00:15,417 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service 
thread 1-8) HHH000230: Schema export complete
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/756546#756546]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to