本帖最后由 102010cncger 于 2009/8/30 00:48 编辑
1.
下载 1.4 版本
http://downloads.sourceforge.net/project/opentaps/opentaps%201.4/opentaps-1.4-preview1.zip?use_mirror=ncu
2.
解压到系统 路径不带空格目录(能通过 cd 进入此目录,目录路径无空格)
3.
安装 jboss
4.
设置 javahome 和 jboss 路径
build-ear.properties
# set the location of your JVM here
JAVA_HOME=D\://Program Files//Java//jdk1.6.0_02
# set the location of your JBoss server here
JBOSS_HOME=E\://jboss-5.1.0.GA
5.
打开
framework/entity/config/entityengine.xml
将所有数据 源改为默认那个localderby这里将不使用 Oracle 数据库
<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
<group-map group-name="org.opentaps.analytics" datasource-name="localderby"/>
<group-map group-name="org.opentaps.testing" datasource-name="localderby"/>
</delegator>
<delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
</delegator>
<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
</delegator>
<delegator name="other" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
</delegator>
6.
第一次运行
cd C:\opentaps
ant run-install
。。。
[java] 2009-08-29 11:37:19,000 (main) [EntityDataLoadContainer.java:296:INF
O ] =-=-=-=-=-=-= Finished the data load with 15218 rows changed.
[java] 2009-08-29 11:37:19,015 (main) [
ContainerLoader.java:96 :INFO ]
Shutting down containers
BUILD SUCCESSFUL
Total time: 8 minutes 47 seconds
C:\opentaps>
最后出现表示安装成功
7.
非第一次运行
cd C:\opentaps
startofbiz.bat
或
cd C:\opentaps
java -jar ofbiz.jar
次方法可以直接看到输出信息,但没有启动参数
如果是第二次运行
启动 的时候, ofbiz 的 DatabaseUtils 会检查数据库中是否已经存在系统的表,没有就会自动创建的,一般的创建过程不会出错误的。慢慢等吧
因为没有加到服务,关闭 cmd 窗口将关闭服务
8.
打开网页
For version 1.4: http://localhost:8080/opentaps
相关账户
·
http://localhost:8080/ecommerce
For the online store, use username DemoCustomer and password ofbiz .
·
http://localhost:8080/crmsfa
For CRM application, use DemoSalesManager and crmsfa .
·
http://localhost:8080/warehouse
For the warehouse application, use demowarehouse1 and opentaps .
·
http://localhost:8080/financials
For financials, use demofinadmin and opentaps .
·
http://localhost:8080/purchasing
For purchasing, use demopurch1 and opentaps .
·
http://localhost:8080/ partymgr
For administrative applications, use flexadmin and ofbiz
·
http://localhost:8080/analytics
Use username analytics and password opentaps to sign it to opentaps Analytics.
·
http://localhost:8080/catalog
·
http://localhost:8080/webtools
Admin,ofbiz
错误 1
注册没多久,不能传图片,呵呵。这里的错误就看不到了,反正是编译的时候通不过的问题。
解决 办法
C:\opentaps\hot-deploy\opentaps-common\build-aspects.xml
<!-- ================================================================== -->
<!-- Weave advice into target jars
-->
<!-- ================================================================== -->
<target name="weave" depends="detect-dependencies" if="processRequired">
<echo message="[build] =========== Start Building Aspect (Weave) ============="/>
<java classname="org.codehaus.aspectwerkz.compiler.AspectWerkzC" fork="true">
<jvmarg value="-Daspectwerkz.definition.file=${aopConfig}"/>
<jvmarg value="-Daspectwerkz.transform.filter=no"/>
<arg value="-verify"/>
<classpath refid="local.class.path" />
<classpath>
<pathelement path="${build.dir}/classes/common"/>
</classpath>
<!-- below is the jars to post-process -->
<arg value="${ofbiz.dir}/framework/entity/build/lib/ofbiz-entity.jar"/>
</java>
<java classname="org.codehaus.aspectwerkz.compiler.AspectWerkzC" fork="true">
<jvmarg value="-Daspectwerkz.definition.file=${aopConfig}"/>
<jvmarg value="-Daspectwerkz.transform.filter=no"/>
<arg value="-verify"/>
<classpath refid="local.class.path" />
<classpath>
<pathelement path="${build.dir}/classes/common"/>
</classpath>
<!-- below is the jars to post-process, if these jar not effect each other you can put them in same pos, else please seperate them into another task -->
<arg value="${ofbiz.dir}/framework/common/build/lib/ofbiz-common.jar"/>
</java>
<java classname="org.codehaus.aspectwerkz.compiler.AspectWerkzC" fork="true">
<jvmarg value="-Daspectwerkz.definition.file=${aopConfig}"/>
<jvmarg value="-Daspectwerkz.transform.filter=no"/>
<arg value="-verify"/>
<classpath refid="local.class.path" />
<classpath>
<pathelement path="${build.dir}/classes/common"/>
</classpath>
<!-- below is the jars to post-process -->
<arg value="${ofbiz.dir}/applications/order/build/lib/ofbiz-order.jar"/>
</java>
<jar jarfile="${lib.dir}/${name}.jar" update="true" basedir="${build.dir}/classes/common" includes="org/opentaps/aspect/secas/**" />
<!-- put aop.xml into target jar META-INF dir -->
<mkdir dir="${build.dir}/classes/META-INF" />
<copy file="${aopConfig}" tofile="${build.dir}/classes/META-INF/aop.xml" overwrite="true"/>
<jar jarfile="${ofbiz.dir}/framework/entity/build/lib/ofbiz-entity.jar" update="true" basedir="${build.dir}/classes " includes="META-INF/aop.xml" />
<jar jarfile="${ofbiz.dir}/framework/common/build/lib/ofbiz-common.jar" update="true" basedir="${build.dir}/classes " includes="META-INF/aop.xml" />
<jar jarfile="${ofbiz.dir}/applications/order/build/lib/ofbiz-order.jar" update="true" basedir="${build.dir}/classes " includes="META-INF/aop.xml" />
<echo message="[build] =========== Done Building Aspect (Weave) =============="/>
</target>
修改其中
<jar jarfile="${ofbiz.dir}/framework/entity/build/lib/ofbiz-entity.jar" update="true" basedir="${build.dir}/classes/common" includes="META-INF/aop.xml" />
<jar jarfile="${ofbiz.dir}/framework/common/build/lib/ofbiz-common.jar" update="true" basedir="${build.dir}/classes/common" includes="META-INF/aop.xml" />
<jar jarfile="${ofbiz.dir}/applications/order/build/lib/ofbiz-order.jar" update="true" basedir="${build.dir}/classes/common" includes="META-INF/aop.xml" />
错误 2 run-install:
[java] Error occurred during initialization of VM
[java] Could not create the Java virtual machine.
[java] Could not reserve enough space for object heap
[java] Java Result: 1
解决办法
修改 C:\opentaps\bulid.xml
<property name="memory.max.param" value="-Xmx1024M"/>
<property name="permmemory.max.param" value="-XX:MaxPermSize=512m"/>
该校就可以了
<property name="memory.max.param" value="-Xmx512M"/>
<property name="permmemory.max.param" value="-XX:MaxPermSize=64m"/>
If you have not already run the installation data loading script, from the ofbiz home directory run "ant run-install" or "java -jar ofbiz.jar install"
错误 3 Exception in thread "RMI RenewClean-[192.168.1.100:3250,org.ofbiz.service.rmi.so
cket.ssl.SSLClientSocketFactory@394ffa]" java.lang.OutOfMemoryError: Java heap s
pace
at com.sun.net.ssl.internal.ssl.InputRecord.<init>(InputRecord.java:65)
at com.sun.net.ssl.internal.ssl.AppInputStream.<init>(AppInputStream.jav
a:31)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(SSLSocketImpl.java:51
8)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:
351)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSoc
ketFactoryImpl.java:71)
at org.ofbiz.service.rmi.socket.ssl.SSLClientSocketFactory.createSocket(
SSLClientSocketFactory.java:46)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)
at sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.jav
a:342)
at sun.rmi.transport.DGCClient$EndpointEntry.access$1600(DGCClient.java:
153)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCCli
ent.java:555)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:315)
at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:310)
at java.util.jar.Manifest.read(Manifest.java:178)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:165)
at java.util.jar.JarFile.getManifest(JarFile.java:146)
at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:693)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:221)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:86)
at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:82)
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java
:66)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationPar
ser.java:202)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationP
arser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationPa
rser.java:52)
at java.lang.reflect.Field.declaredAnnotations(Field.java:1016)
at java.lang.reflect.Field.getAnnotation(Field.java:1000)
at java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObje
ct.java:168)
at org.hibernate.annotations.common.reflection.java.JavaAnnotationReader
.isAnnotationPresent(JavaAnnotationReader.java:27)
at org.hibernate.annotations.common.reflection.java.JavaXAnnotatedElemen
t.isAnnotationPresent(JavaXAnnotatedElement.java:43)
at org.hibernate.cfg.AnnotationBinder.mustBeSkipped(AnnotationBinder.jav
a:1111)
解决办法,同样修改启动内存大小 , 将参数改小(我机器破)
C:\opentaps\startofbiz.bat
REM "%JAVA_HOME%\bin\java" -Xms256M -Xmx512M -XX:MaxPermSize=64M -Duser.language=en -jar ofbiz.jar > runtime\logs\console.log
"%JAVA_HOME%\bin\java" -Xms512M -Xmx1024M -XX:MaxNewSize=128m -XX:MaxPermSize=256m
-Duser.language=en -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ofbiz.jar > runtime\logs\console.log
REM This one is for more of a debugging mode
REM "%JAVA_HOME%\bin\java" -Xms512M -Xmx1024M -XX:MaxPermSize=128M -Duser.language=en -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ofbiz.jar > runtime\logs\console.log
错误 4 C:\opentaps>"D:\Java\jdk1.6.0_02\bin\java" -Xms256M -Xmx512M -XX:MaxPermSize=64M
-Duser.language=en -jar ofbiz.jar
1>runtime\logs\console.log
0 [main] INFO net.fckeditor.handlers.PropertiesLoader - User's properties loaded
successfully!
16 [main] INFO net.fckeditor.connector.ConnectorServlet - ConnectorServlet succe
ssful initialized!
Exception in thread "org.ofbiz.service.job.JobPoller@1bd9de3" java.lang.OutOfMem
oryError: PermGen space
Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
PermGen space 的全称是 Permanent Generation space, 是指内存的永久保存区域 OutOfMemoryError: PermGen space 从表面上看就是内存益出,解决方法也一定是加大内存。说说为什么会内存益出:这一部分用于存放 Class 和 Meta 的信息 ,Class 在被 Load 的时候被放入 PermGen space 区域,它和和存放 Instance 的 Heap 区域不同 ,GC(Garbage Collection) 不会在主程序运行期对 PermGen space 进行清理,所以如果你的 APP 会 LOAD 很多 CLASS 的话 , 就很可能出现 PermGen space 错误。这种错误常见在 web 服务器 对 JSP 进行 pre compile 的时候。
改正方法,在 run.bat 中加入: -Xms256m -Xmx512m -XX:MaxNewSize=256m -XX:MaxPermSize=256m
因为项目 中引用了很多的 jar 包,而这些 jar 包中的 class 信息会被 JBoss 的 class loader 加载到 PermGen space 区域,在 JVM 默认的情况下,该部分空间的大小只有 4M ,在 jar 包非常多的情况下,显然是不够用的,所以通过 -XX:MaxPermSize=256m 指定最大值后即可解决问题。
另外,如果 heap 内存不足出现 java.lang.OutOfMemoryError: Java heap space 时,可以通过 -Xmx512m 指定最大 heap 内存来解决这样的问题
其他备注
(
查找 datasource-name
更改为 localoracle
查找 localoracle
修改 orcle配置
拷贝 orcle的驱动到
framework/entity/lib/jdbc
注意设置 Eclipse的 ant的 utf-8值
)
Ant启动可以选择 不同的方式。
set JAVA_HOME=D:\Java\jdk1.6.0_02
set PATH=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
set CLASSPATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
C:\opentaps> java -jar ofbiz.jar -pos
cd C:\opentaps
java -jar ofbiz.jar -setup test
打包 10. 关掉 Tomcat
11. 在 DOS 命令行下( C:\OpenbravoERP \AppsOpenbravo )
ant compile.complete
ant war
ant deploy
12. 把 Tomcat 5.5\webapps 下的 openbravo 文件 夹删掉
重启 Tomcat
OK !
init :官方垃圾安装说明
General Installation |
PDF |
Installing opentaps ERP + CRM is fairly easy, and you do not need root user privileges. These instructions will help you get started running opentaps ERP + CRM on both Unix/Linux and Windows operating systems. Prerequisites The first step is to make sure that you have the correct Java Virtual Machine installed. For opentaps 0.8.x and 0.9.x, you must use Java 1.4.2. For opentaps 1.0.x, you must use Java 5. opentaps 1.4 works with both Java 5 or Java 6. In both cases, you must use the Sun Java SDK , not GNU gcj which may have been supplied with Fedora Core or Ubuntu or the Java Runtime JRE supplied with Windows. To determine what version of Java you are using, type the following command: $ java -version For opentaps 0.8.x and opentaps 0.9.x, you must see something like this: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_xxxx) For opentaps 1.0.x, you must see something like the following: Java(TM) 2 RuntimeEnvironment, Standard Edition (build 1.5.xxxx) You must not see anything like gij (GNU libgcj) version 4.0.1 20050727 (Red Hat 4.0.1-5) or anything that says "JRE". If you do not see the correct JVM, you must go download it from Sun. Next, you should unzip the opentaps ERP + CRM .zip file you have just downloaded and go into the directory where it is unzipped: $ cd opentaps Starting on Unix/Linux If you are using a Unix/Linux system, you should make the startup scripts executable: $ chmod u+x startofbiz.sh $ chmod u+x stopofbiz.sh IMPORTANT : If your system already has gcj and you just installed new Sun JVM, you must tell opentaps ERP + CRM to use the Sun JVM instead of the GCJ JVM in /bin/java by specifying where the JVM is: $ export JAVA_HOME=/usr/java/j2sdk_xxxx/ (or whichever directory your Sun JVM was installed.) You can even put this directive into startofbiz.sh and stopofbiz.sh To start the opentaps server, $ ./startofbiz.sh The server is started as a background process, and the logs are piped to a file called "console.log" in the logs/ sub-directory for opentaps 0.8.x and 0.9.x and runtime/logs sub-directory for opentaps 1.0.x To see the logs, $ tail -f runtime/logs/console.log or $ tail -f logs/console.log To stop the opentaps ERP + CRM server, $ ./stopofbiz.sh To start the Point Of Sales terminal, instead of using startofbiz.sh and stopofbiz.sh, use $ java -jar ofbiz.jar -pos Starting on Windows IMPORTANT : If you are using Windows, you may run into problems with having paths with directories that have spaces in the name, such as "C:\Documents and Settings". You can avoid these problems by unzipping in your C:\ directory. IMPORTANT : opentaps ERP + CRM runs as a server on your computer and needs to access a number of ports. If you are having start up problems, try re-configuring or temporarily disabling your firewall. If you are using Windows, call up a command line terminal (Windows > Run Program > "cmd") From the terminal, go to your opentaps ERP + CRM directory C:> cd c:\opentaps You may need set a variable called JAVA_HOME first to tell Windows where Java is located: C:> set JAVA_HOME=c:\java_x.x.x Or which ever directory Java was installed in. Now run the batch file to start the opentaps ERP + CRM server: C:\opentaps> startofbiz.bat The server will run in the terminal. Alternatively, you can create a Windows shortcut to the startofbiz.bat and place it on your desktop. If you want to start the Point Of Sales system, use this command instead: C:\opentaps> java -jar ofbiz.jar -pos Mac OS X Users A recent update to OS X 10.4.6 has made Java 5 the default JVM. To use Java 1.4.2 for opentaps 0.8.x or 0.9.x, set your JAVA_HOME to the correct path: $ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home You can also use /Applications/Utilities/Java/J2SE 5.0/Java Preferences.app to set your preferred Java environment. Accessing the Server To access the opentaps ERP + CRM server, open any browser and type in the following: · · With opentaps 1.4, you will see a greeting page which prompts you to login. The applications you can access are displayed as icons: In earlier versions of opentaps, you will see a menu in your browser which shows you all the applications available. You can now click on the application you wish to access. If you are using an older version of Sequoia ERP, you will need to access the applications directly using: http://locahost:8080/crmsfa/control/main for CRMSFA or http://localhost:8080/ecommerce/control/main for the online store. Oh No! It Didn't Work! What Do I Do? Look in your runtime/logs/console.log and runtime/logs/ofbiz.log (or simply logs/console.log or logs/ofbiz.log files for opentaps 0.8.x and 0.9.x) and see what error messages are recorded. Check that you are using the correct version, that your database connection is successful, that there were no port conflicts, and that none of the required ports are blocked. Signing In For the back end web applications, such as catalog, order, manufacturing, and facility managers, use the username "admin" and the password "ofbiz". For the ecommerce online store application, use username "DemoCustomer" and password "ofbiz". For the Point Of Sales application, use username "1" and password "1" for a manager and username "2" and password "2" for a cashier. What to do if you get an RMIDispatcher Error If you see an error message like this: Exception in thread "main" java.lang.NoSuchMethodError: sun.rmi.transport.Object Table.getStub(Ljava/rmi/Remote;)Ljava/rmi/server/RemoteStub; at org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.unexportObject(JUnicastRemoteObject.java:138) at org.objectweb.carol.rmi.multi.JrmpPRODelegate.unexportObject(JrmpPRODelegate.java:94) at org.objectweb.carol.rmi.multi.MultiPRODelegate.unexportObject(MultiPRODelegate.java:132) at javax.rmi.PortableRemoteObject.unexportObject(Unknown Source) at org.objectweb.jotm.SubCoordinator.doAfterCompletion(SubCoordinator.java:1548) You are experiencing a problem instantiating the RMI dispatcher. The RMI dispatcher is used to call remote services running on another instance of oopentaps. For demo purposes, you can usually turn this off by editing the file base/config/ofbiz-containers.xml and commenting out the <containers> for rmi-dispatcher and rmi-print-server. What to do if you get a BSH Error If you see this error message: java.lang.NoSuchMethodError: bsh.BshClassManager.createClassManager()Lbsh/BshClassManager; at org.ofbiz.base.util.BshUtil.getMasterInterpreter(BshUtil.java:124) at org.ofbiz.base.util.BshUtil.makeInterpreter(BshUtil.java:95) at org.ofbiz.base.util.BshUtil.runBshAtLocation(BshUtil.java:144) The problem is that your computer has another copy of beanshell (bsh.jar) installed in the Java class path. For example, OS X sometimes has a bsh.jar in /Library/Java/Extensions/ Simply move it out of the way and try again. |