1

我正在我的系统上安装 opentaps,错误是 -

[java] 2016-03-07 11:32:37,428 (main) [    TransactionUtil.java:345:INFO ] [TransactionUtil.rollback] transaction rolled back
 [java] 2016-03-07 11:32:37,428 (main) [   EntityDataLoader.java:218:ERROR] 
 [java] ---- exception report ----------------------------------------------------------
 [java] [install.loadData]: Error loading XML Resource "file:/home/oodles/work/skulocity/custom-erp-crm/opentaps/amazon/data/AmazonDemoSetup.xml"; Error was: A transaction error occurred reading data
 [java] Exception: org.xml.sax.SAXException
 [java] Message: A transaction error occurred reading data
 [java] ---- cause ---------------------------------------------------------------------
 [java] Exception: org.ofbiz.entity.GenericDataSourceException
 [java] Message: SQL Exception occurred on commit (Commit can not be set while enrolled in a transaction)
 [java] ---- cause ---------------------------------------------------------------------
 [java] Exception: java.sql.SQLException
 [java] Message: Commit can not be set while enrolled in a transaction
 [java] ---- stack trace ---------------------------------------------------------------
 [java] java.sql.SQLException: Commit can not be set while enrolled in a transaction
 [java] org.apache.commons.dbcp.managed.ManagedConnection.commit(ManagedConnection.java:214)
 [java] org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:145)
 [java] org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:196)
 [java] org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:493)
 [java] org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:80)
 [java] org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1424)
 [java] org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.java:286)
 [java] org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:265)
 [java] org.ofbiz.entity.util.EntitySaxReader.parse(EntitySaxReader.java:222)
 [java] org.ofbiz.entity.util.EntityDataLoader.loadData(EntityDataLoader.java:214)
 [java] org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:389)
 [java] org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
 [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:273)
 [java] org.ofbiz.base.start.Start.startServer(Start.java:323)
 [java] org.ofbiz.base.start.Start.start(Start.java:327)
 [java] org.ofbiz.base.start.Start.main(Start.java:412)
 [java] --------------------------------------------------------------------------------
 [java] 
 [java] 2016-03-07 11:32:37,428 (main) [    EntitySaxReader.java:221:INFO ] Beginning import from URL: file:/home/oodles/work/skulocity/custom-erp-crm/opentaps/amazon/data/AmazonDemoData.xml
 [java] 2016-03-07 11:32:37,428 (main) [    EntitySaxReader.java:259:INFO ] Transaction Timeout set to 2 hours (7200 seconds)
 [java] 2016-03-07 11:32:37,466 (main) [    EntitySaxReader.java:278:INFO ] Finished 13 values from file:/home/oodles/work/skulocity/custom-erp-crm/opentaps/amazon/data/AmazonDemoData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:404:INFO ] =-=-=-=-=-=-= Here is a summary of the data load:
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00024 of 00024 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/security/data/SecurityData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00023 of 00047 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/CommonSecurityData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00095 of 00142 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/CommonTypeData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00724 of 00866 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/CountryCodeData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00169 of 01035 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/CurrencyData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00279 of 01314 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00016 of 01330 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_AU.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00056 of 01386 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_BG.xml
 [java] 2016-03-07 11:32:37,466 (main) [EntityDataLoadContainer.java:406:INFO ] 00053 of 01439 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_BR.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00066 of 01505 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_CN.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00066 of 01571 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_CO.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00032 of 01603 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_DE.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00138 of 01741 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_ES.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00428 of 02169 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_FR.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00220 of 02389 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_IT.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00070 of 02459 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_IN.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00064 of 02523 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_IRL.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00026 of 02549 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_NL.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00172 of 02721 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_UK.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00240 of 02961 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/GeoData_US.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00433 of 03394 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/LanguageData.xml
 [java] 2016-03-07 11:32:37,467 (main) [EntityDataLoadContainer.java:406:INFO ] 00236 of 03630 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/UnitData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00007 of 03637 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/PeriodData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00012 of 03649 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/common/data/CommonPortletData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00008 of 03657 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/service/data/ScheduledServiceData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00003 of 03660 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/service/data/ServiceSecurityData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00012 of 03672 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/entityext/data/EntityExtTypeData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00003 of 03675 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/entityext/data/EntityExtSecurityData.xml
 [java] 2016-03-07 11:32:37,468 (main) [EntityDataLoadContainer.java:406:INFO ] 00001 of 03676 from file:/home/oodles/work/skulocity/custom-erp-crm/framework/bi/data/BiTypeData.xml

构建失败/home/oodles/work/skulocity/custom-erp-crm/build.xml:510:Java 返回:99

$java -version
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

opentaps=> select version();
                                                    version                                                     
----------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.2.15 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 64-bit
(1 row)

$ant -version
Apache Ant(TM) version 1.9.3 compiled on April 8 2014

我已按照安装文档中提到的所有步骤进行操作。在执行“ant run-install”时,它创建了 1015 个表,但最后失败了。有人能帮我吗?

4

1 回答 1

0

在我的情况下,$JAVA_HOME 指向 JDK1.7 并且 java -version 命令显示 JDK1.6,所以我将 $JAVA_HOME 更改为 1.6,这工作正常。

于 2016-04-05T07:42:33.127 回答