开发者

How to automatically drop & create tables with Glassfish v3 & PostgreSQL 8.4?

I've got a simple web app that should store data into my postgreSQL database. There's a class "Person" which is annotated as @Entity, there's a JDBC Connection Pool and a JDBC Resource.

When I try to deploy it by the command

asadmin deploy --name=miniejb --force=true --dropandcreatetables=true ~/workspace/miniejb/bin

I get error messages:

Cannot drop tables for application miniejb. The expected DDL file miniejb_miniejb_dropDDL.jdbc is not available.

Cannot create tables for application miniejb. The expected DDL file miniejb_miniejb_createDDL.jdbc is not available.

The Connection Pool is pingable via the glassfish administration interface. The database is running, everything is fine. I just don't get where the error messages are coming from. I think it is a configuration issue, but I don't know what to change. I tried开发者_JAVA百科 everything imaginable with the connection pool properties.

Any ideas?


GlassFish is complaining about not being able to find the drop jdbc ddl file and the the create jdbc ddl file (that must be specified in your persistence.xml).

I don't have much experience with this feature so I'm not sure where those files are supposed to be located but I suggest to check:

  • Glassfish and Automatic Table Generation
  • Generation Options


I also got hit by this on GlassFish 3.1.

Probably this bug: http://java.net/jira/browse/GLASSFISH-12621

Try restarting the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜