ofbiz折腾笔记
Apache    2016-09-04 07:49:44    340    0    0
tianwaifeixian   Apache

折腾这个软件是因为我想找一个开源的仓库管理方面的软件 

找着找着就找到这个了

官方网站http://ofbiz.apache.org/

牠的上游好像是这个https://www.apache.org/

这是一个博客页面 https://cwiki.apache.org/confluence/collector/pages.action?key=MAVEN

第一次从官方网站下载的文件解压 运行./ant start后无法在浏览器打开连接 报错如下:

org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)

看不粗哪里的原因

然后又从wiki里面svn过来另一个版本(svn co http://svn.apache.org/repos/asf/ofbiz/trunk ofbiz

wiki http://ofbiz.apache.org/documentation.html

svn的连接在这里 https://cwiki.apache.org/confluence/display/OFBIZ/Demo+and+Test+Setup+Guide#DemoandTestSetupGuide-BuildingOFBiz

 

第三步时间很长 大约四十分钟多 按照上面这个wiki进行到:

3.(not for snapshots) Load OFBiz demo data in the embedded Apache Derby data base running "gradlew loadDefault" on Windows or"./gradlew loadDefault" on Linux/Unix/OSX. 

这一步很长很长时间。 之后出现提示打开这个页面  https://docs.gradle.org/2.13/userguide/gradle_daemon.html

继续下一步:

 ./gradlew start

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib64/jdk1.8.0_101/bin/java

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

官方issue https://issues.apache.org/jira/browse/MNG-5195?jql=text%20~%20%22JAVA_HOME%20is%20set%20to%20an%20invalid%20directory%22 也没发现解决办法 郁闷了~

 

这里http://stackoverflow.com/questions/17315425/error-in-setting-java-home找到了个解决方法:

30down voteaccepted

JAVA_HOME should point to jdk directory and not to jre directory. Also JAVA_HOME should point to the home jdk directory and not to jdk/bin directory.

Assuming that you have JDK installed in your program files directory then you need to set the JAVA_HOME like this:

JAVA_HOME="C:\Program Files\Java\jdkxxx"

xxx is the jdk version

Follow this link to learn more about setting JAVA_HOME:

http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html

然后我把~/.bashrc里面的java环境变量改成:

#java1.8环境变量
export JAVA_HOME=/usr/lib64/jdk1.8.0_101/       //这是更改后的
#export JAVA_HOME=/usr/lib64/jdk1.8.0_101/bin/java   //这是原来的
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=$CLASSPATH:.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib


不知道行不行正在测试.........

./gradlew tasks

貌似可以了。。。。。。。。。

然后

4.Start OFBiz with embedded Tomcat by going into the ofbiz directory and then running

  • Windows: "gradlew start" or "startofbiz.bat" (or even "%JAVA_HOME%\bin\java -jar build\libs\ofbiz.jar")
  • Linux/Unix/OSX: "./gradlew start" or "./startofbiz.sh" (or even "$JAVA_HOME/bin/java -jar build/libs/ofbiz.jar").

这里不能用 ./gradlew start  要用 java -jar build/libs/ofbiz.jar

报错:

Task 'start' not found in root project 'ofbiz'

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info o
r --debug option to get more log output.

BUILD FAILED

Total time: 12.284 secs
----------------------------------------------------------------------------------------------------

liangzi@suse:~/ofbiz> ./gradlew tacks --stacktrace

FAILURE: Build failed with an exception.

* What went wrong:
Task 'tacks' not found in root project 'ofbiz'. Some candidates are: 'tasks'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.execution.TaskSelectionException: Task 'tacks' not found in root project 'ofbiz'. Some candidates are: 'tasks'.
       at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:100)
       at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:75)
       at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:42)
       at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAct
ion.java:44)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.
java:48)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter
.java:25)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.
java:54)
       at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:44)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.
java:48)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter
.java:25)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.
java:54)
       at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigur
ationAction.java:47)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.
java:48)
       at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(DefaultBuildConfigurationActionExecuter.jav
a:36)
       at org.gradle.initialization.DefaultGradleLauncher$3.run(DefaultGradleLauncher.java:143)
       at org.gradle.internal.Factories$1.create(Factories.java:22)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
       at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
       at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
       at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
       at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
       at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
       at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.j
ava:94)
       at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
       at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
       at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
       at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
       at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecu
ter.java:51)
       at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecu
ter.java:28)
       at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
       at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
       at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:241)
       at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:214)
       at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
       at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
       at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:207)
       at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
       at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
       at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
       at org.gradle.launcher.Main.doAction(Main.java:33)
       at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
       at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
       at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
       at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
       at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
       at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
       at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)


BUILD FAILED

Total time: 9.751 secs

晕了~~~~~~~~~~~~~~~~~~

我要是 把这个家伙 chown成 root:root会不会启动得了?

 



 下一步就是数据库了 

这是个大块头~~~~~~~~~~

 

上一篇: tomcat for openSUSE

下一篇: openSUSE java配置

340 人读过
立即登录, 发表评论.
没有帐号? 立即注册
0 条评论
文档导航