Hibernate 如何修复InvalidMappingException

Hibernate 如何修复InvalidMappingException,hibernate,Hibernate,我从当前正在使用的web应用程序中收到此错误: Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/mygwtapp/shared/DTO/Account.hbm.xml Starting Jetty on port 8888 [WARN] Exception while dispatc

我从当前正在使用的web应用程序中收到此错误:

Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/mygwtapp/shared/DTO/Account.hbm.xml
Starting Jetty on port 8888
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.mygwtapp.client.service.UserService.createUser(com.mygwtapp.shared.DTO.Account)' threw an unexpected exception: java.lang.ExceptionInInitializerError
这是我的


这是我的

结果它缺少一个JAR文件:
mysql-connector-java-5.1.18-bin.JAR

需要放在
/WEB-INF/lib
文件夹中

以及Account.hbm.xml类名称标记:

<class name="com.mygwtapp.DTO.Account" table="account">

应该是:

<class name="com.mygwtapp.shared.DTO.Account" table="account">


您可以扩展此异常吗?这就是你从日志中得到的吗?我找到了解决办法。我已经在下面发了帖子。