【问题标题】:eclipse : gwt +maven +hibernate日食:gwt +maven +hibernate
【发布时间】:2013-01-16 17:43:05
【问题描述】:

我真的很困惑。 我一直在与休眠作斗争很长时间,但没有成功通过运行时间。当我尝试单独运行它时出现运行时异常。 然后我决定我应该尝试将它与 gwt(原始项目是一个没有休眠的 gwt)和 maven 集成。 我通过更新站点安装了 gwt 和 hibernate 插件 和maven for eclipse wtp via marketplace 我已经右键单击并将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

重量:

-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-tools-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-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
spring4gwt-0.0.1
验证-api-1.0.0.GA
验证-api-1.0.0.GA-来源
xercesImpl-2.8.1

GWT SDK (2.5.0)
gwt-用户
gwt-开发
验证-api-1.0.0.GA-来源
验证-api-1.0.0.GA

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

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

【问题讨论】:

    标签: java hibernate gwt maven


    【解决方案1】:

    只需右键单击您的项目 - 导航到构建路径 - 配置 -> Java 构建路径 -> 源选项卡 -> 将默认输出文件夹设置为 BGUSched/war/WEB-INF/classes

    【讨论】:

      【解决方案2】:

      您可以使用以下原型:

      Mojo gwt-maven-plugin

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-06-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-10-23
        相关资源
        最近更新 更多