0

我正在尝试从 ANT 脚本(使用 OjDeploy)部署 Jar 文件,该脚本编译成功。但是当我运行主项目(它具有 Jar 依赖项)时,我遇到了一个巨大的事件,当我分析事件日志时,它说

"Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist"

我分析了两个 jar 文件(一个由 ANT 脚本生成,另一个由 Jdev 生成)。我找不到这两个罐子的黑白清单有任何区别。其他的文件夹也是一样的,也就是说,两者几乎是一样的,要不然我也搞不清生成的两个jar文件的区别。

我知道,我错过了一些东西,build.xml 的配置或其他东西,但无法找出确切的问题。

谢谢,

湿婆香卡

4

2 回答 2

0

I figured out a way to solve the problem. Not sure what was the cause of this issue, but a couple of changes made both to JAR/EAR build scripts set the things right

While building JAR files:

  1. Uncheck "Make this the project build file" while creating the ANT build file, while the "Include Packaging Tasks (uses OjDeploy)" must be checked.
  2. Remove "nocompile" parameter from tag in the OjDeploy.

While Building EAR files:

  1. Create EAR in the view controller project.
  2. Go to the View Controller Project Properties-> Project Source Path -> Resources, remove the newly created build file dependency, which specifies that the build file is for the whole project and not for the individual project.
  3. Remove "Project" parameter from tag in the OjDeploy. (Ensures to build for the whole application)
  4. Remove "nocompile" parameter from tag in the OjDeploy.

These are the exhaustive set of changes, which I made to ensure the ANT files are building correctly, if you get any other errors after this EAR is deployed, then its definitely due to code, EO/VO or DB related.

Thanks for all the help!! Shiva Shankar

于 2013-02-27T13:56:47.770 回答
0

我的猜测是问题不在 JAR 文件中,而是在使用它的项目中。似乎该项目中的数据库连接与您的 JAR 项目中的不同 - 这会导致无法找到数据库中所需的表之一。

于 2013-02-07T19:13:08.883 回答