Hi everybody,
I just started working with ofbiz today. After downloading Si Chen's version 7445, everything is running smoothly when just starting it using the startofbiz.bat file. Next, I wanted to use my MySQL database (4.1.19). So I dropped the jdbc driver jar into the entity module's lib directory and changed the entityengine.xml file to use the mysql connector. I ran: %JAVA_HOME%\bin\java -jar ofbiz.jar install -readers=seed > install.txt The tables where created OK and I could not find any error messages in the install log. Now comes the problem: I try to start the engine again using the startofbiz.bat file, and after a little while it dies with a NullPointerException. It happens in this block of DatabaseUtil.java: ColumnCheckInfo ccInfo = new ColumnCheckInfo(); ccInfo.tableName = ColumnCheckInfo.fixupTableName(rsCols.getString("TABLE_NAME"), lookupSchemaName, needsUpperCase); // ignore the column info if the table name is not in the list we are concerned with if (!tableNames.contains(ccInfo.tableName)) { continue; } ccInfo.tableName is null, as are pretty much all other fields of the ccInfo object, so the tableNames.contains() call gets the NPE . Does anybody know what causes this problem? Thanks, MARK Here is the stacktrace: C:\WorkSpace\ofbiz\ofbiz_7445>"c:\WorkSpace\ofbiz\j2re1.4.2_08\bin\java" -Xms256M -Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ofbiz.jar > logs\console.log java.lang.NullPointerException at java.util.TreeMap.compare(Unknown Source) at java.util.TreeMap.getEntry(Unknown Source) at java.util.TreeMap.containsKey(Unknown Source) at java.util.TreeSet.contains(Unknown Source) at org.ofbiz.entity.jdbc.DatabaseUtil.getColumnInfo(DatabaseUtil.java:1041) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:154) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:130) at org.ofbiz.entity.datasource.GenericDAO.checkDb(GenericDAO.java:1108) at org.ofbiz.entity.datasource.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:208) at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:195) at org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:127) at org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:173) at org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:150) at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:74) at org.ofbiz.base.start.Start.initStartLoaders(Start.java:257) at org.ofbiz.base.start.Start.init(Start.java:96) at org.ofbiz.base.start.Start.main(Start.java:412) The last few lines in the log are: 11390 (main) [ DatabaseUtil.java:816:INFO ] - group by not in select [true] 11390 (main) [ DatabaseUtil.java:817:INFO ] - column aliasing [true] 11390 (main) [ DatabaseUtil.java:818:INFO ] - order by not in select [false] 11390 (main) [ DatabaseUtil.java:820:INFO ] - alter table add column [true]* 11390 (main) [ DatabaseUtil.java:821:INFO ] - non-nullable column [true]* 11406 (main) [ DatabaseUtil.java:858:INFO ] Getting Table Info >From Database 11484 (main) [ DatabaseUtil.java:993:INFO ] Getting Column Info >From Database _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz
database is created using innoDB as well. As far as I know, 5 only has added very advanced stuff like clustering, stored procedures, triggers, etc, none of which is used by ofbiz. Or is there anything else that is new in 5 that would fix my problem? Thanks, MARK David Welton wrote: >> Next, I wanted to use my MySQL database (4.1.19). > > As an aside, IMO, you should really consider something else - either > Postgresql, or at least a recent (5) Mysql with InnoDB. > > -- > David N. Welton > - http://www.dedasys.com/davidw/ > > Linux, Open Source Consulting > - http://www.dedasys.com/ > > > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Try 5.0. It is really much better.
Mark wrote: MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz database is created using innoDB as well. As far as I know, 5 only has added very advanced stuff like clustering, stored procedures, triggers, etc, none of which is used by ofbiz. Or is there anything else that is new in 5 that would fix my problem? Thanks, MARK David Welton wrote:Next, I wanted to use my MySQL database (4.1.19).As an aside, IMO, you should really consider something else - either Postgresql, or at least a recent (5) Mysql with InnoDB. -- David N. Welton - http://www.dedasys.com/davidw/ Linux, Open Source Consulting - http://www.dedasys.com/_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Administrator
|
In reply to this post by Mark-60
From: "Mark" <[hidden email]> > MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz > database is created using innoDB as well. > As far as I know, 5 only has added very advanced stuff like clustering, > stored procedures, triggers, etc, none of which is used by ofbiz. > Or is there anything else that is new in 5 that would fix my problem? > > Thanks, > > MARK Why not use Postgresql ? Jacques > David Welton wrote: > >> Next, I wanted to use my MySQL database (4.1.19). > > > > As an aside, IMO, you should really consider something else - either > > Postgresql, or at least a recent (5) Mysql with InnoDB. > > > > -- > > David N. Welton > > - http://www.dedasys.com/davidw/ > > > > Linux, Open Source Consulting > > - http://www.dedasys.com/ > > > > > > > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
So if this is really the reason for my problems, I have no problem changing to whatever else works, but a) is MySQL 4.1 the problem? b) What is the best bet to fix it? PostGreSQL? MySQL 5? Maybe I'll try MySQL 5 tonight, just because I'll only have to spend time on downloading and installing it, but not on learning to configure, secure and maintain it (which I would have to if I switched to PostGreSQL) Thanks, MARK From: "Mark" [hidden email]MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz database is created using innoDB as well. As far as I know, 5 only has added very advanced stuff like clustering, stored procedures, triggers, etc, none of which is used by ofbiz. Or is there anything else that is new in 5 that would fix my problem? Thanks, MARKWhy not use Postgresql ? JacquesDavid Welton wrote:Next, I wanted to use my MySQL database (4.1.19).As an aside, IMO, you should really consider something else - either Postgresql, or at least a recent (5) Mysql with InnoDB. -- David N. Welton - http://www.dedasys.com/davidw/ Linux, Open Source Consulting - http://www.dedasys.com/_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Administrator
|
You may also try HSQL : very fast. Not really
recommended for exploitation but faster for test.
Jacques
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
In reply to this post by Si Chen-2
OK, I just installed MySQL 5.0 and tried it again:
1. %JAVA_HOME%/bin/java -jar ofbiz.jar install -readers=seed > install.txt 2. startofbiz.bat Caused same exception: java.lang.NullPointerException at java.util.TreeMap.compare(Unknown Source) at java.util.TreeMap.getEntry(Unknown Source) at java.util.TreeMap.containsKey(Unknown Source) at java.util.TreeSet.contains(Unknown Source) at org.ofbiz.entity.jdbc.DatabaseUtil.getColumnInfo(DatabaseUtil.java:1041) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:154) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:130) at org.ofbiz.entity.datasource.GenericDAO.checkDb(GenericDAO.java:1108) at org.ofbiz.entity.datasource.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:208) at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:195) at org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:127) at org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:173) at org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:150) at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:74) at org.ofbiz.base.start.Start.initStartLoaders(Start.java:257) at org.ofbiz.base.start.Start.init(Start.java:96) at org.ofbiz.base.start.Start.main(Start.java:412) What can I do? Is there any other step (or parmeter) I need to take? I gave full permissions to that MySQL user ID for the database that is used - no global permissions, however. The install log file does not seem to have any errors. Does the log entry "Admin socket not configured; set to port 0" mean anything? Thanks, MARK Si Chen wrote: Try 5.0. It is really much better. _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
did you update the jbdc driver?
the way to separate the ofbiz problems and outside influences, is to run ofbiz under the derby. if ofbiz works under that, then change to your db. Mark sent the following on 5/8/06 10:28 PM: > OK, I just installed MySQL 5.0 and tried it again: > > 1. %JAVA_HOME%/bin/java -jar ofbiz.jar install -readers=seed > install.txt > > 2. startofbiz.bat > > Caused same exception: > > java.lang.NullPointerException > at java.util.TreeMap.compare(Unknown Source) > at java.util.TreeMap.getEntry(Unknown Source) > at java.util.TreeMap.containsKey(Unknown Source) > at java.util.TreeSet.contains(Unknown Source) > at org.ofbiz.entity.jdbc.DatabaseUtil.getColumnInfo(DatabaseUtil.java:1041) > at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:154) > at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:130) > at org.ofbiz.entity.datasource.GenericDAO.checkDb(GenericDAO.java:1108) > at > org.ofbiz.entity.datasource.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:208) > at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:195) > at > org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:127) > at > org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:173) > at > org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:150) > at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:74) > at org.ofbiz.base.start.Start.initStartLoaders(Start.java:257) > at org.ofbiz.base.start.Start.init(Start.java:96) > at org.ofbiz.base.start.Start.main(Start.java:412) > > What can I do? > > Is there any other step (or parmeter) I need to take? I gave full permissions to > that MySQL user ID for the database that is used - no global permissions, however. > The install log file does not seem to have any errors. Does the log entry "Admin > socket not configured; set to port 0" mean anything? > > Thanks, > > MARK > > > > Si Chen wrote: > >> Try 5.0. It is really much better. >> >> Mark wrote: >> >>>MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz >>>database is created using innoDB as well. >>>As far as I know, 5 only has added very advanced stuff like clustering, >>>stored procedures, triggers, etc, none of which is used by ofbiz. >>>Or is there anything else that is new in 5 that would fix my problem? >>> >>>Thanks, >>> >>>MARK >>> >>>David Welton wrote: >>> >>> >>>>> Next, I wanted to use my MySQL database (4.1.19). >>>>> >>>>> >>>>As an aside, IMO, you should really consider something else - either >>>>Postgresql, or at least a recent (5) Mysql with InnoDB. >>>> >>>>-- >>>>David N. Welton >>>>- http://www.dedasys.com/davidw/ >>>> >>>>Linux, Open Source Consulting >>>>- http://www.dedasys.com/ >>>> >>>> >>>> >>>> >>>> >>> >>> >>>_______________________________________________ >>>Users mailing list >>>[hidden email] >>>http://lists.ofbiz.org/mailman/listinfo/users >>> >>> >>> >>> >>-------------------------------------------------------------------------------- >> >> >>_______________________________________________ >>Users mailing list >>[hidden email] >>http://lists.ofbiz.org/mailman/listinfo/users >> > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Well, the main difference as far as I can see is that the derby DB did
not have to go through the seeding process, so I am not sure what data
is in there vs what data would be in it if I went through the seeding
process with Derby the same way I did it with mysql.
Since there is no error message at all, I am wondering if it maybe has to do with the seeding process - maybe something is wrong there and things are left out or created wrong.I tried both "seed" reader only and "all" readers, but ended up with the same problem... MARK BJ Freeman wrote: did you update the jbdc driver? the way to separate the ofbiz problems and outside influences, is to run ofbiz under the derby. if ofbiz works under that, then change to your db. Mark sent the following on 5/8/06 10:28 PM:OK, I just installed MySQL 5.0 and tried it again: 1. %JAVA_HOME%/bin/java -jar ofbiz.jar install -readers=seed > install.txt 2. startofbiz.bat Caused same exception: java.lang.NullPointerException at java.util.TreeMap.compare(Unknown Source) at java.util.TreeMap.getEntry(Unknown Source) at java.util.TreeMap.containsKey(Unknown Source) at java.util.TreeSet.contains(Unknown Source) at org.ofbiz.entity.jdbc.DatabaseUtil.getColumnInfo(DatabaseUtil.java:1041) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:154) at org.ofbiz.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:130) at org.ofbiz.entity.datasource.GenericDAO.checkDb(GenericDAO.java:1108) at org.ofbiz.entity.datasource.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:208) at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:195) at org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:127) at org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:173) at org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:150) at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:74) at org.ofbiz.base.start.Start.initStartLoaders(Start.java:257) at org.ofbiz.base.start.Start.init(Start.java:96) at org.ofbiz.base.start.Start.main(Start.java:412) What can I do? Is there any other step (or parmeter) I need to take? I gave full permissions to that MySQL user ID for the database that is used - no global permissions, however. The install log file does not seem to have any errors. Does the log entry "Admin socket not configured; set to port 0" mean anything? Thanks, MARK Si Chen wrote:Try 5.0. It is really much better. Mark wrote:MySQL had InnoDB since 4.0 - my 4.1.19 is running innoDB, the ofbiz database is created using innoDB as well. As far as I know, 5 only has added very advanced stuff like clustering, stored procedures, triggers, etc, none of which is used by ofbiz. Or is there anything else that is new in 5 that would fix my problem? Thanks, MARK David Welton wrote:Next, I wanted to use my MySQL database (4.1.19).As an aside, IMO, you should really consider something else - either Postgresql, or at least a recent (5) Mysql with InnoDB. -- David N. Welton - http://www.dedasys.com/davidw/ Linux, Open Source Consulting - http://www.dedasys.com/_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users-------------------------------------------------------------------------------- _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users------------------------------------------------------------------------ _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |