I already tried that it gives Null pointer exception. I created an empty 
database Ofbiz with ofbiz/ofbiz as credentials and used the normal localmysql 
that came in original file, it still gives NullPointer Exception. For some 
reason at startup the DBUTIL is not getting the connnectionURL paparmeter read 
from the entity-engine-xml file and hence it gives NullPounter on this paramter.

Is this somehting that is fixed in other release. I tried this on 10.4 as well 
and got same NullpointerException and in debug the connection URL is not 
getting read from the xml file. What else could be wrong? Any other 
suggestions. I am willing to try everything to get this working. Worst Case I 
would be hardcoding but then it would create problem with localderby as it 
needs to be read. Can localderby be copied to mysql?


Kapil Garg
 




> Date: Sat, 30 Oct 2010 06:27:18 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: Issues Creating Entities in Ofbiz from existing Schema
> 
> I would suggest you return the entityengine.xml back to its original 
> configuration, add your mysql datasource as the only modification to the 
> file and try it again.
> 
> 
> 
> 
> =========================
> BJ Freeman
> Strategic Power Office with Supplier Automation  
> <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> Specialtymarket.com  <http://www.specialtymarket.com/>
> Systems Integrator-- Glad to Assist
> 
> Chat  Y! messenger: bjfr33man
> Kapil garg sent the following on 10/30/2010 4:30 AM:
> 
> >
> > Hello Santosh
> > The IllegalArgument exception went away after I put in a tenatant group 
> > name for localderby as show below. However Now I am getting Null Pointer 
> > Exception
> > GenericDAO.induceModelFromDB() calls DatabaseUtil.induceModelFromDB(). In 
> > DatabaseUtil.induceModelFromDB() method, there is a line of code 
> > this.getTableNames() which is comming out tobe null? ANy idea why?Also the 
> > DBUTIL class is getting NULL value for connectionURL paramter and the 
> > dirveName parameter is also coming out to be null.
> > Why is that? Hence th Nullpointer. I would imagine that this is read from 
> > the helperName=localMysql which is howing correctly in debug variable list. 
> > AM I missing anything here?
> >
> > Coudl you advise further as you seem to know about this?
> >
> >
> > Kapil Garg
> >
> >
> >
> >
> >
> >> Date: Sat, 30 Oct 2010 09:51:54 +0530
> >> Subject: Re: Issues Creating Entities in Ofbiz from existing Schema
> >> From: [email protected]
> >> To: [email protected]
> >>
> >> *Hello  Kapil,
> >> *Update your code, you are having two entries of same name it must look 
> >> like
> >>        <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="mysql"/>
> >>             <group-map group-name="org.ofbiz.olap"
> >> datasource-name="localderbyolap"/>
> >>             <group-map group-name="org.ofbiz.tenant"
> >> datasource-name="ocalderbytenant"/>
> >>         </delegator>
> >> now create database and execute commands for "clean-all" and "run-install"
> >> Its done now.
> >> *
> >> Yours,
> >>
> >> Santosh Singh.*
> >>
> >>
> >>
> >> On Sat, Oct 30, 2010 at 1:52 AM, BJ Freeman<[email protected]>  wrote:
> >>
> >>> just declare the datasource for you db.
> >>>
> >>>
> >>>
> >>> =========================
> >>> BJ Freeman
> >>> Strategic Power Office with Supplier Automation<
> >>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >>> Specialtymarket.com<http://www.specialtymarket.com/>
> >>> Systems Integrator-- Glad to Assist
> >>>
> >>> Chat  Y! messenger: bjfr33man
> >>>
> >>>
> >>> Kapil garg sent the following on 10/29/2010 1:01 PM:
> >>>
> >>>
> >>>> Does that mean that I dont need to associate a datsource I create with a
> >>>> delagator ? As in the datasource entry need  not have a group associated
> >>>> with it? or a delagator associated with it?
> >>>>
> >>>>
> >>>> Kapil Garg
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>   Date: Fri, 29 Oct 2010 12:54:13 -0700
> >>>>> From: [email protected]
> >>>>> To: [email protected]
> >>>>> Subject: Re: Issues Creating Entities in Ofbiz from existing Schema
> >>>>>
> >>>>> you did add more than the datasource
> >>>>> you make it default delegator.
> >>>>> this will cause the database to be updated with ofbiz schema
> >>>>>
> >>>>>
> >>>>> =========================
> >>>>>
> >>>>> BJ Freeman
> >>>>> Strategic Power Office with Supplier Automation<
> >>>>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >>>>> Specialtymarket.com<http://www.specialtymarket.com/>
> >>>>> Systems Integrator-- Glad to Assist
> >>>>>
> >>>>> Chat  Y! messenger: bjfr33man
> >>>>>
> >>>>>
> >>>>> Kapil garg sent the following on 10/29/2010 12:45 PM:
> >>>>>
> >>>>>>
> >>>>>> Yes I created only the datasource by putting an entry in the
> >>>>>> entity-engine.xml file. I did not create anything else and 
> >>>>>> intentionally put
> >>>>>> it in default delegator. Still I am not ale to Induce. IT says 
> >>>>>> unrecognised
> >>>>>> datasource. I also get Null Pointer exception for localmysql datasource
> >>>>>> whose entry is already in there. DO I need to do anything else?
> >>>>>>
> >>>>>> Do I need to do ant run-install, restart before hitting induce?
> >>>>>>
> >>>>>>
> >>>>>> Kapil Garg
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>   Date: Fri, 29 Oct 2010 12:41:59 -0700
> >>>>>>> From: [email protected]
> >>>>>>> To: [email protected]
> >>>>>>> Subject: Re: Issues Creating Entities in Ofbiz from existing Schema
> >>>>>>>
> >>>>>>> only create a datasource. nothing else
> >>>>>>> the mysql one you created you use the name.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> =========================
> >>>>>>> BJ Freeman
> >>>>>>> Strategic Power Office with Supplier Automation<
> >>>>>>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
> >>>>>>> Systems Integrator-- Glad to Assist
> >>>>>>>
> >>>>>>> Chat  Y! messenger: bjfr33man
> >>>>>>>
> >>>>>>>
> >>>>>>> Kapil garg sent the following on 10/29/2010 12:29 PM:
> >>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> I actually did use mysql as the datasource and tried using the link
> >>>>>>>> below by putting in the datasource name in the text box and clicking 
> >>>>>>>> on
> >>>>>>>> Induce. For existing datasources name such as localmysql or 
> >>>>>>>> localderby, I
> >>>>>>>> got a NullPointer Exception.
> >>>>>>>> For the one that I had an new entry witin the default delegator, I 
> >>>>>>>> got
> >>>>>>>> " unrecognized datasource" name sort of message. Do I need to create 
> >>>>>>>> a new
> >>>>>>>> entity-group.xml file  for the datasource mysql I created below even 
> >>>>>>>> if I am
> >>>>>>>> using a default delagator similar to the data-source localmysql? 
> >>>>>>>> Does it
> >>>>>>>> need to be having group name org.ofbiz or something else within the
> >>>>>>>> delegator tag?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>   Date: Fri, 29 Oct 2010 12:23:37 -0700
> >>>>>>>>> From: [email protected]
> >>>>>>>>> To: [email protected]
> >>>>>>>>> Subject: Re: Issues Creating Entities in Ofbiz from existing Schema
> >>>>>>>>>
> >>>>>>>>> use mysql as the datasource
> >>>>>>>>> https://localhost:8443/webtools/control/view/ModelInduceFromDb
> >>>>>>>>>
> >>>>>>>>> =========================
> >>>>>>>>> BJ Freeman
> >>>>>>>>> Strategic Power Office with Supplier Automation<
> >>>>>>>>> http://www.businessesnetwork.com/automation/viewforum.php?f=52>
> >>>>>>>>> Specialtymarket.com<http://www.specialtymarket.com/>
> >>>>>>>>> Systems Integrator-- Glad to Assist
> >>>>>>>>>
> >>>>>>>>> Chat  Y! messenger: bjfr33man
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Kapil garg sent the following on 10/29/2010 12:09 PM:
> >>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> I am trying to create a entities within OFbiz out of an existing
> >>>>>>>>>> schema in production. Not sure if this is the best way to create 
> >>>>>>>>>> entties out
> >>>>>>>>>> of an existing schema. Suggestions are welcomed!!
> >>>>>>>>>>
> >>>>>>>>>> I tried to add a datasource tag in default delegator in
> >>>>>>>>>> entity-engine.xml
> >>>>>>>>>> Followed the instructions on
> >>>>>>>>>>
> >>>>>>>>>> https://cwiki.apache.org/confluence/display/OFBIZ/Handling+of+External+data
> >>>>>>>>>> Would like to know where I am going wrong. On restart, I realised
> >>>>>>>>>> that ofbiz does not finish to the point that I can get webtools or 
> >>>>>>>>>> even
> >>>>>>>>>> login for ecommerce. IT has just stuck at soem point saying
> >>>>>>>>>>   ServiceDispatcher.java 584 INFO Sync service..
> >>>>>>>>>> There is no exception or anything but OFbiz does not go further 
> >>>>>>>>>> with
> >>>>>>>>>> complete laoding. Anything I am doing wrong?
> >>>>>>>>>> Being a default delegaotr, there was no special entity-group.xml
> >>>>>>>>>> file in the ofbiz 9_04 code base. Hence I did not bother to create 
> >>>>>>>>>> an
> >>>>>>>>>> entity-group.xml file
> >>>>>>>>>> My schema name is lronline, following are the entries I had in
> >>>>>>>>>> entity-engine.xml
> >>>>>>>>>>      <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.ofbiz.olap"
> >>>>>>>>>> datasource-name="localderbyolap"/>
> >>>>>>>>>>             <group-map group-name="org.ofbiz"
> >>>>>>>>>> datasource-name="mysql"/>
> >>>>>>>>>>         </delegator>
> >>>>>>>>>>
> >>>>>>>>>> <datasource name="mysql"
> >>>>>>>>>>
> >>>>>>>>>>   helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
> >>>>>>>>>>                 field-type-name="mysql"
> >>>>>>>>>>                 check-on-start="true"
> >>>>>>>>>>                 add-missing-on-start="true"
> >>>>>>>>>>                 check-pks-on-start="false"
> >>>>>>>>>>                 use-foreign-keys="true"
> >>>>>>>>>>                 join-style="ansi-no-parenthesis"
> >>>>>>>>>>                 alias-view-columns="false"
> >>>>>>>>>>                 drop-fk-use-foreign-key-keyword="true"
> >>>>>>>>>>                 table-type="InnoDB"
> >>>>>>>>>>                 character-set="latin1"
> >>>>>>>>>>                 collate="latin1_general_cs">
> >>>>>>>>>>             <read-data reader-name="seed"/>
> >>>>>>>>>>             <read-data reader-name="seed-initial"/>
> >>>>>>>>>>             <read-data reader-name="demo"/>
> >>>>>>>>>>             <read-data reader-name="ext"/>
> >>>>>>>>>>             <inline-jdbc
> >>>>>>>>>>                     jdbc-driver="com.mysql.jdbc.Driver"
> >>>>>>>>>>                     jdbc-uri="jdbc:mysql://
> >>>>>>>>>> 127.0.0.1/lronlineonedb?autoReconnect=true"
> >>>>>>>>>>                     jdbc-username="root"
> >>>>>>>>>>                     jdbc-password=""
> >>>>>>>>>>                     isolation-level="ReadCommitted"
> >>>>>>>>>>                     pool-minsize="2"
> >>>>>>>>>>                     pool-maxsize="250"/>
> >>>>>>>>>>             <!--<jndi-jdbc jndi-server-name="localjndi"
> >>>>>>>>>> jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> 
> >>>>>>>>>>      -->
> >>>>>>>>>>         </datasource>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Kapil Garg
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >                                     
                                          

Reply via email to