繁体   English   中英

eclipse:gwt + maven +休眠

[英]eclipse : gwt +maven +hibernate

我真的很困惑。 我一直在与冬眠作斗争很长时间了,并且没有成功运行时间。 我尝试单独运行它时遇到运行时异常。 然后我决定我应该尝试将其与gwt(原始项目是不带休眠状态的gwt)和maven集成。 我通过更新站点和Maven通过市场安装了gwt和hibernate插件,通过市场通过eclipse wtp进行了右键单击,然后将gwt + hibernate项目转换为maven项目,现在出现以下错误。应设置该项目的输出目录到/ BGUSched / war / WEB-INF / classes,这是我自动生成的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-本地运行时共享
-appengine-tools-api
-BGUSched.jar(我的项目的jar)
-commons编解码器-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-user
-httpclient-4.0
-httpcore-4.0.1
-jdo2-api-2.3-eb
-JOpenId-1.08-sources
-jsp-api
-jsr107cache-1.1
-nekohtml-1.9.14
-openid4java-0.9.6
-repackaged-appengine-ant-1.7.1
-repackaged-appengine-ant-launcher-1.7.1
-repackaged-appengine-jasper-6.0.29
重新打包的appengine-jasper-el-6.0.29
重新包装了appengine-tomcat-juli-6.0.29
Servlet API
弹簧4gwt-0.0.1
验证API-1.0.0.GA
validation-api-1.0.0.GA-sources
xercesImpl-2.8.1

GWT SDK(2.5.0)
gwt-用户
gwt-dev
validation-api-1.0.0.GA-sources
验证API-1.0.0.GA

其他罐子:
unit
mysql-connector-java-5.1.6-bin
ojdbc5

希望我不要在这里弄得一团糟,希望你们能帮助我

只需右键单击您的项目-导航到Build Path-配置-> Java Build Path- > Source选项卡->将Default Output文件夹设置为BGUSched / war / WEB-INF / classes

在此处输入图片说明

您可以通过以下方式使用原型:

Mojo GWT-Maven-插件

然后在pom.xml中添加Hibernate依赖项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM