zoukankan      html  css  js  c++  java
  • OFBIZ+ECLIPSE

    1. 首先要安装好OFBIZ,参考《OFBIZ安装》。

    2. 安装ECLIPSE。

    3. 安装FreeMarker插件,这是OFBIZ的模版引擎。在"Eclipse Marketplace..."搜索"JBoss Tools",点击"Install",然后选择"FreeMarker IDE".

    4. 关联*.bsh编辑器 Windows > Preferences > General > Editors > File Associations:

    5. 导入OFBIZ项目File > Import > Existing Projects into Workspace,必须将项目编码设为UTF-8,否则个别文件会出现下面这样的乱码:

     6. 创建一个新的Debug配置,启动类必须是org.ofbiz.base.start.Start:

     

    7. 现在,可以开始调试OFBIZ了:

    问题一:Can't find bundle for base name cache, locale en

    Start.java using configuration file org/ofbiz/base/start/start.properties
    Set OFBIZ_HOME to - Z:/eclipse-jee-juno-SR2-win32/workspace/ofbiz.12.04
    Admin socket configured on - /127.0.0.1:10523
    Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.ofbiz.base.util.Debug.<clinit>(Debug.java:88)
        at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:77)
        at org.ofbiz.base.start.Start.initStartLoaders(Start.java:263)
        at org.ofbiz.base.start.Start.init(Start.java:232)
        at org.ofbiz.base.start.Start.main(Start.java:131)
    Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en
        at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at org.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:214)
        at org.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:210)
        at org.ofbiz.base.util.cache.UtilCache.<init>(UtilCache.java:138)
        at org.ofbiz.base.util.cache.UtilCache.createUtilCache(UtilCache.java:1017)
        at org.ofbiz.base.util.UtilProperties.<clinit>(UtilProperties.java:71)
        ... 5 more

    解决方法:在Build Path 里加上base/config,base/cert,base/dtd目录:

    参考:

    Running and Debugging OFBiz in Eclipse

  • 相关阅读:
    Java实战之03Spring-01Spring概述
    Java实战之02Hibernate-08二级缓存
    Java实战之02Hibernate-07与效率性能相关配置
    css3 移入移出动画
    ng2 搭建本地开发环境
    ng2模板语法/内置指令速查表
    node + npm 命令
    什么是作用域?什么是上下文?浅解
    get? post? put? delete? head? trace? options? http请求方法
    什么是http?
  • 原文地址:https://www.cnblogs.com/eastson/p/3195109.html
Copyright © 2011-2022 走看看