从源代码构建 moqui 时出现问题
Issue when building moqui from source
我已经在 github 上分叉了 moqui、mantle 和 PopCommerce 并按照命令行步骤克隆和构建如下。
git clone git@github.com:moqui/moqui.git moqui
cd moqui/runtime/
git clone git@github.com:moqui/mantle.git mantle
cd component/
git clone git@github.com:moqui/PopCommerce.git PopCommerce
cd ../.. (to the moqui directory)
gradle load
gradle run
我已经在上面的命令中替换了我的存储库名称。
使用 http://localhost:8080 访问 framework/tools 会显示登录页面(未应用 css),当单击“登录”(John Doe) 按钮时会显示下面的错误。
Status Code: 403
Exception: User [john.doe] is not authorized for View on Screen [component://webroot/screen/webroot/apps/AppList.xml]
Stacktrace:
访问 PopCommerce (http://localhost:8080/popc) 显示以下错误。
Status Code: 404
Exception: Could not find subscreen or transition or file/content [popc] under screen [component://webroot/screen/webroot.xml] while finding url for path [popc] under from screen [component://webroot/screen/webroot.xml]
Stacktrace:
我尝试了 运行 framework/tools & Popcommerce 使用二进制分发,它运行良好。
从源代码构建时,我还需要遵循任何其他步骤吗?
更新: gradle 加载期间出错
75816 [ main] INFO pl.entity.EntityDataLoaderImpl - Loaded 29 records from [file:/C:/projects/moqui_ws/moqui/runtime/base-component/example/data/ExampleZzzDemoData.xml] in 6.432 seconds
75940 [ main] INFO pl.entity.EntityDataLoaderImpl - Loading entity data from [file:/C:/projects/moqui_ws/moqui/runtime/base-component/example/data/ZzaExampleRecords.csv]
75992 [ main] WARN .context.TransactionFacadeImpl - Transaction rollback. The rollback was originally caused by: Error loading entity data
org.moqui.entity.EntityException: The name [exampleEmail] is not a valid field name for entity [Example]
at org.moqui.impl.entity.EntityDefinition.convertFieldString(EntityDefinition.groovy:1048)
at org.moqui.impl.entity.EntityValueBase.setString(EntityValueBase.groovy:274)
at org.moqui.impl.entity.EntityDataLoaderImpl$EntityCsvHandler.loadFile(EntityDataLoaderImpl.groovy:698)
at org.moqui.impl.entity.EntityDataLoaderImpl.loadSingleFile(EntityDataLoaderImpl.groovy:283)
at org.moqui.impl.entity.EntityDataLoaderImpl.internalRun(EntityDataLoaderImpl.groovy:249)
at org.moqui.impl.entity.EntityDataLoaderImpl.load(EntityDataLoaderImpl.groovy:125)
at org.moqui.Moqui.loadData(Moqui.java:97)
at MoquiStart.main(MoquiStart.java:105)
75997 [ main] WARN .context.TransactionFacadeImpl - Transaction rollback for [Error loading entity data]. Here is the current location:
org.moqui.BaseException: Rollback location
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:405)
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:389)
at org.moqui.impl.entity.EntityDataLoaderImpl.loadSingleFile(EntityDataLoaderImpl.groovy:298)
at org.moqui.impl.entity.EntityDataLoaderImpl.internalRun(EntityDataLoaderImpl.groovy:249)
at org.moqui.impl.entity.EntityDataLoaderImpl.load(EntityDataLoaderImpl.groovy:125)
at org.moqui.Moqui.loadData(Moqui.java:97)
at MoquiStart.main(MoquiStart.java:105)
76372 [ main] INFO moqui.impl.entity.EntityDbMeta - Created table [ARTIFACT_HIT_BIN] for entity [moqui.server.ArtifactHitBin]
这些看起来像是 seed/setup 数据未加载的症状。您的步骤看起来不错,应该可以。查找 "gradle load" 步骤中的错误。
我已经在 github 上分叉了 moqui、mantle 和 PopCommerce 并按照命令行步骤克隆和构建如下。
git clone git@github.com:moqui/moqui.git moqui
cd moqui/runtime/
git clone git@github.com:moqui/mantle.git mantle
cd component/
git clone git@github.com:moqui/PopCommerce.git PopCommerce
cd ../.. (to the moqui directory)
gradle load
gradle run
我已经在上面的命令中替换了我的存储库名称。
使用 http://localhost:8080 访问 framework/tools 会显示登录页面(未应用 css),当单击“登录”(John Doe) 按钮时会显示下面的错误。
Status Code: 403
Exception: User [john.doe] is not authorized for View on Screen [component://webroot/screen/webroot/apps/AppList.xml]
Stacktrace:
访问 PopCommerce (http://localhost:8080/popc) 显示以下错误。
Status Code: 404
Exception: Could not find subscreen or transition or file/content [popc] under screen [component://webroot/screen/webroot.xml] while finding url for path [popc] under from screen [component://webroot/screen/webroot.xml]
Stacktrace:
我尝试了 运行 framework/tools & Popcommerce 使用二进制分发,它运行良好。
从源代码构建时,我还需要遵循任何其他步骤吗?
更新: gradle 加载期间出错
75816 [ main] INFO pl.entity.EntityDataLoaderImpl - Loaded 29 records from [file:/C:/projects/moqui_ws/moqui/runtime/base-component/example/data/ExampleZzzDemoData.xml] in 6.432 seconds
75940 [ main] INFO pl.entity.EntityDataLoaderImpl - Loading entity data from [file:/C:/projects/moqui_ws/moqui/runtime/base-component/example/data/ZzaExampleRecords.csv]
75992 [ main] WARN .context.TransactionFacadeImpl - Transaction rollback. The rollback was originally caused by: Error loading entity data
org.moqui.entity.EntityException: The name [exampleEmail] is not a valid field name for entity [Example]
at org.moqui.impl.entity.EntityDefinition.convertFieldString(EntityDefinition.groovy:1048)
at org.moqui.impl.entity.EntityValueBase.setString(EntityValueBase.groovy:274)
at org.moqui.impl.entity.EntityDataLoaderImpl$EntityCsvHandler.loadFile(EntityDataLoaderImpl.groovy:698)
at org.moqui.impl.entity.EntityDataLoaderImpl.loadSingleFile(EntityDataLoaderImpl.groovy:283)
at org.moqui.impl.entity.EntityDataLoaderImpl.internalRun(EntityDataLoaderImpl.groovy:249)
at org.moqui.impl.entity.EntityDataLoaderImpl.load(EntityDataLoaderImpl.groovy:125)
at org.moqui.Moqui.loadData(Moqui.java:97)
at MoquiStart.main(MoquiStart.java:105)
75997 [ main] WARN .context.TransactionFacadeImpl - Transaction rollback for [Error loading entity data]. Here is the current location:
org.moqui.BaseException: Rollback location
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:405)
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:389)
at org.moqui.impl.entity.EntityDataLoaderImpl.loadSingleFile(EntityDataLoaderImpl.groovy:298)
at org.moqui.impl.entity.EntityDataLoaderImpl.internalRun(EntityDataLoaderImpl.groovy:249)
at org.moqui.impl.entity.EntityDataLoaderImpl.load(EntityDataLoaderImpl.groovy:125)
at org.moqui.Moqui.loadData(Moqui.java:97)
at MoquiStart.main(MoquiStart.java:105)
76372 [ main] INFO moqui.impl.entity.EntityDbMeta - Created table [ARTIFACT_HIT_BIN] for entity [moqui.server.ArtifactHitBin]
这些看起来像是 seed/setup 数据未加载的症状。您的步骤看起来不错,应该可以。查找 "gradle load" 步骤中的错误。