我正在遵循</wiki/ERP/2.50/Developers_Guide/How_To_Create_and_Package_a_Module>上的指南。
但是,步骤ant export.database
与Exception in thread "main" java.lang.NullPointerException
并存。
错误原因可能是什么?
Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3>ant export.database
Buildfile: Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\build.xml
init:
core.lib:
init:
compile:
build.jar:
build:
database.lib:
compile:
jar:
generate.entities.quick:
init:
compile.src.gen:
[javac] Compiling 4 source files to Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\build\classes
[copy] Copying 53 files to Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\build\classes
generate.entities.quick:
[java] 6245 [main] INFO org.openbravo.base.gen.GenerateEntitiesTask - Model has not changed since last run, not re-generating entities
[javac] Compiling 1 source file to Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\build\classes
export.database:
export.database.structure:
[java] 980 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
[java] 1235 [main] INFO org.openbravo.base.model.ModelProvider - Building runtime model
[java] 6183 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
[java] 14417 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
[java] 14591 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Database connection: jdbc:postgresql://localhost:5432/openbravo. User: tad
[java] 15308 [main] INFO org.apache.ddlutils.platform.PlatformImplBase - Loading model from database...
[java] 15319 [main] INFO org.apache.ddlutils.platform.PlatformImplBase - Reading tables...
[java] Exception in thread "main" java.lang.NullPointerException
[java] at org.openbravo.ddlutils.task.ExportDatabase.execute(ExportDatabase.java:312)
[java] at org.openbravo.ddlutils.task.ExportDatabase.main(ExportDatabase.java:77)
[java] Caused by: java.lang.NullPointerException
[java] at org.apache.ddlutils.platform.ModelLoaderBase$6.fillRow(ModelLoaderBase.java:330)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.fillList(ModelLoaderBase.java:871)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.readTable(ModelLoaderBase.java:327)
[java] at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.readTable(PostgreSqlModelLoader.java:645)
[java] at org.apache.ddlutils.platform.ModelLoaderBase$1.getRow(ModelLoaderBase.java:248)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.readList(ModelLoaderBase.java:816)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.readTables(ModelLoaderBase.java:244)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.readDatabase(ModelLoaderBase.java:194)
[java] at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.readDatabase(PostgreSqlModelLoader.java:90)
[java] at org.apache.ddlutils.platform.ModelLoaderBase.getDatabase(ModelLoaderBase.java:121)
[java] at org.apache.ddlutils.platform.PlatformImplBase.loadModelFromDatabase(PlatformImplBase.java:2297)
[java] at org.apache.ddlutils.platform.PlatformImplBase.loadModelFromDatabase(PlatformImplBase.java:2287)
[java] at org.openbravo.ddlutils.task.ExportDatabase.execute(ExportDatabase.java:132)
[java] ... 1 more
BUILD FAILED
Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\build.xml:700: The following error occurred while executing this line:
Z:\DK\openbravo-3.0PR19Q3\Openbravo-3.0PR19Q3\src-db\database\build.xml:122: Java returned: 1
Total time: 31 seconds