我真的很困惑。我已经与hibernate斗争了很长一段时间,但在运行时都没有成功。当我尝试单独运行它时,我得到了运行时异常。然后我决定尝试将它与gwt (最初的项目是一个没有hibernate的gwt)和maven集成。我通过更新站点和maven for eclipse wtp通过marketplace安装了gwt和hibernate插件我右击并将gwt+hibernate项目转换为maven项目,现在我得到了以下错误项目的输出目录应设置为/BGUSched/war/WEB-INF/ pom.xml这是我自动生成的类(位于顶级目录- BGUSched)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>BGUSched</groupId>
<artifactId>BGUSched</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>我的类路径:-hibernate (作为用户库):
-antlr-2.7.6.jar
-commons-collections 3.1.jar
-dom4j-1.6.1.jar
-hibernate3.jar
-hibernate-jpa-2.0-api-1.0.0.Final.jar
-javassist-3.9.0.GA.jar
-slf4j-api-1.5.8.jar
-slf4j-simple-1.5.8.jar
gwt:
-appengine-api-1.0-sdk-1.6.3
-appengine-api-1.0-sdk-1.6.4
-appengine-api-1.0-sdk-1.7.0
-appengine-api-labs-1.6.3
-appengine-api-labs-1.6.4
-appengine-jsr107cache-1.6.3
-appengine-jsr107cache-1.6.4
-appengine-local-runtime shared
-appengine-工具-api
-BGUSched.jar (我的项目的jar)
-commons-codec-1.3
-commons-fileupload-1.2.2
-commons-io-2.1
-commons-logging-1.03
-datanucleus-appengine-1.0.10.final
-datanucleus-core-1.1.5
-datanucleus-jpa-1.1.5
-el-api
-facebook4gwt-1.0.8
-geronimo-jpa_3.0_spec-1.1.1
-geronimo-jta_1.1_spec-1.1.1
-guice-2.0
-gwt-cal-0.9.3 (嵌入到我的项目中的其他项目)
-gwt-dev
-gwt-dnd-3.1.2
-gwt-log-3.1.8-javadoc
-gwt-plus-v1-0.2-alpha
-gwt-servlet
-gwt-用户
-httpclient-4.0
-httpcore-4.0.1
-jdo2-api-2.3-eb
-JOpenId-1.08-源
-jsp-api
-jsr107cache-1.1
-nekohtml-1.9.14
-openid4java-0.9.6
-重新打包-appengine-ant-1.7.1
-重新打包-appengine-ant-launcher-1.7.1
-重新打包-appengine-jasper-6.0.29
repackaged-appengine-jasper-el-6.0.29
repackaged-appengine-tomcat-juli-6.0.29
servlet-api
spring4gwt-0.0.1
validation-api-1.0.0.GA
validation-api-1.0.0.GA-sources
xercesImpl-2.8.1
GWT SDK (2.5.0)
gwt-用户
gwt-开发
validation-api-1.0.0.GA-sources
validation-api-1.0.0.GA
其他jars:
junit
mysql-connector-java-5.1.6-bin
ojdbc5
希望我没有把这里搞得一团糟,希望你们能帮助我
发布于 2013-01-17 01:47:34
只需右键单击您的项目-导航到Build Path - Configure -> Java Build Path -> Source选项卡->将缺省输出文件夹设置为BGUSched/war/WEB-INF/classes

发布于 2013-01-17 17:03:14
您可以使用以下内容中的原型:
Mojo gwt-maven-plugin
然后在pom.xml中添加Hibernate依赖项。
https://stackoverflow.com/questions/14364452
复制相似问题