Le 01/06/2014 07:42, Ron Wheeler a écrit :
I am working my way through this in the hope that I will end up with a working
system.
https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide
I have found some information that is wrong or missing. I notice that the page
has not been changed since 2012.
1) It says that you need to have ant installed. That is not enough. You also
need to have ant-apache-regexp or you will get
"java.lang.ClassNotFoundException:
org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp"
I have removed the section about ant needed to be installed. You should better use the embedded ant following the way I documented in the page
above this afternoon (ie use ./ant on *nix systems, always from OFBiz root on any plaftorm
I which case did you get the Jdk14RegexpRegexp ClassNotFoundException? Doing
what I mean? Could you retry using ./ant ?
2) It says that you should run ant as "ant run-install" but when you do, the script says
that you should have actually run "ant load-demo".
I will fix that one, the 1st is to be used before R12.04 release (and branch)
the 2nd after
3) There are a lot of warnings about deprecrated methods
You are welcome to help about that
4) Not sure if this matters Warning : Module classpath component
'/usr/java/packages/lib/amd64' is not valid and will be ignored...
You can normally neglect such warning, just an information about your system
5) A lot of these: "warning: [options] bootstrap class path not set in conjunction
with -source 1.6"
This is because you compile with Java 7. You can use it (and it's better/faster) but if you want to run tests (ant run-tests) then you need to use
an *Oracle* JDK 6.
6) Warning that " /usr/share/tomcat7/webapps/accounting/specialpurpose/scrum/src/org/ofbiz/scrum/ScrumServices.java uses unchecked or unsafe
operations."
That's interesting, I will have a look at it
7) When trying to follow this "Find the "default" delegator near the top of the file and change the datasource-name attribute value in the
group-map tag under it to the name of the data source you modified or created. ", you find that the default delegator has several group-names
commented out and several not commented out. In my case, I want to use mySQL which is commented out so I changed that and commented out every
other one. The instructions should be a bit clearer about what this means and what is the right configuration of coments and group-maps.
You are welcome to help improving the documentation in the open wiki. As explained at the top of its pages, you must register in Confluence and
then ask us for a write access.
8) In changing the database, the actual : ${ofbiz install dir}/framework/entity/config/entityengine.xml file has a note about making the test
delegator match the default. This is missing in the documentation.
Are you referring to a specific part of the documentation? Again you are welcome to help improving the documentation in the open wiki, but if it's
in a part (Confluence workspace) you can't have access then let us know and we will add/amend there.
9) The ant run ends with a wonderful combination of a series of warnings followed by a null pointer and "BUILD SUCCESSFUL" with no tables created
in the mySQL database.
[java] 2014-06-01 01:30:32,232 (main) [ ModelViewEntity.java:551:WARN ] [ExampleStatusDetail]: Conversion for complex-alias needs to be
implemented for cache and in-memory eval stuff to work correctly, will not work for alias: statusDelay
[java] 2014-06-01 01:30:32,570 (main) [ ModelReader.java:436:INFO ] FINISHED LOADING ENTITIES - ALL FILES; #Entities=863 #ViewEntities=300
#Fields=9049 #Relationships=2961 #AutoRelationships=2186
[java] 2014-06-01 01:30:32,679 (main) [ GenericDelegator.java:234:INFO ]
Doing entity definition check...
[java] 2014-06-01 01:30:32,694 (main) [ ModelEntityChecker.java:508:INFO ]
[initReservedWords] array length=1023
[java] java.lang.NullPointerException
[java] at
org.ofbiz.entity.GenericDelegator.getEntityFieldType(GenericDelegator.java:541)
[java] at
org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityChecker.java:107)
[java] at
org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:235)
[java] at
org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:33)
[java] at
org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:25)
[java] at
org.ofbiz.base.util.UtilObject.getObjectFromFactory(UtilObject.java:202)
[java] at
org.ofbiz.entity.DelegatorFactory.getDelegator(DelegatorFactory.java:51)
[java] at
org.ofbiz.entityext.data.EntityDataLoadContainer.loadContainer(EntityDataLoadContainer.java:272)
[java] at
org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:236)
[java] at
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:230)
[java] at org.ofbiz.base.start.Start.startStartLoaders(Start.java:362)
[java] at org.ofbiz.base.start.Start.start(Start.java:337)
[java] at org.ofbiz.base.start.Start.main(Start.java:139)
[java] 2014-06-01 01:30:33,679 (Thread-0) [ ContainerLoader.java:246:INFO
] Shutting down containers
[java] Java Result: 99
BUILD SUCCESSFUL
Total time: 31 seconds
Only when using the embedded Derby you can expect OFBiz to wipe and create the
DB for you. When using another DBMS you must 1st create the DB in it.
I hope that these comments help.
Thanks for sharing, yes that helps...
I will try to see what I did to cause the null pointer since the person writing
the code did not think that any error was possible at that point!
Perhaps I commented out too many group-map entities.
I will take this up on the user forum until the wiki gets fixed.
You must have done something specific, yes
Jacques
Ron.