Thanks,
Way i did it was that i created .csv files of each table from H2 and
inserted them into to mySQL.
What do u think is this approach fine.
Or will i loose the relationships this way.

Seems you option of batch mode is better but have to research on this one
know.

On Thu, Aug 16, 2012 at 5:42 PM, Robin <[email protected]> wrote:

> Hi Tariq,
>
> from my point of view, if everything works fine now, you shouldn't care
> about the error any more ;).
>
> What I was trying to point out:
> If you are migrating your data, it is important to insert at first the
> tables without any foreign keys. Then while(tables  left){ insert all
> tables that have only already created foreign tables). And if this
> algorithm ends up in an endless loop, you should try a batch insert mode
> (probably batch insert will be allways better?).
>
> Greets Robin
>
>
> On Thursday, August 16, 2012 6:34:12 PM UTC+2, Tariq Mehmood wrote:
>
>> Hi, Robin;
>>
>> Thanks for the reply, i finally got rid of this error by reinitializing
>> the gerrit server.
>> I donot see this error.
>> Now i am trying to verify the data i imported from H2.
>> Is there any easy way to verify that all the data was inserted correctly.
>>
>> BR Tariq
>>
>> and thanks again for looking into it.
>>
>> On Thu, Aug 16, 2012 at 5:23 PM, Robin <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> probably you are inserting your Data in a wrong order? Like you want to
>>> create data with a foreign key, but the linked data doesn't exist?
>>>
>>> So you should start with all Tables, that don't have any dependencies.
>>> If this is not possible for you, I think there is a so called batch mode or
>>> something (Do a research if you need it), with this mode you can insert
>>> your data and the dependencies will be checked after the whole batch is
>>> finished.
>>>
>>> With best Regards
>>>
>>>
>>> On Wednesday, August 15, 2012 3:33:36 PM UTC+2, Tariq Mehmood wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I recently did a data transfer from H2 to mySql.
>>>>
>>>>    1. I copied all the tables from H2 using a bash script
>>>>    2. Converted them into .csc files(each table has a .csv file)
>>>>    3. Ran mysqlimport command to dump these .csv files
>>>>    into MySQL database(data transfer to MySQL was successful, it is 
>>>> skipping
>>>>    some records in some of the tables, which i believe because of
>>>>    relationships)
>>>>    4. Gerrit is starting OK
>>>>    5. First user was created in MySQL table and
>>>>    given administrative rights.
>>>>
>>>> I cannot see all the repos in Gerrit.
>>>> Error log is as follows:Thanks for the reply,
>>>> the error log looks like this in my case:
>>>>
>>>> [2012-08-15 11:46:33,637] WARN  / : Error in allQueryNext
>>>> java.lang.**IllegalStateExceptio**n: Missing project All-Projects
>>>>     at com.google.gerrit.server.**proje**ct.ProjectCacheImpl.**
>>>> getAllProj**ects(**ProjectCacheImpl.java:90)
>>>>     at com.google.gerrit.server.**accou**nt.CapabilityControl.<**init>(
>>>> **CapabilityControl.java:**55)
>>>>     at 
>>>> sun.reflect.**NativeConstructorA**ccessorImpl.**newInstance0(**Native
>>>> Method)
>>>>     at sun.reflect.**NativeConstructorA**ccessorImpl.**newInstance(**
>>>> Native**ConstructorAccessorImpl.**java:**39)
>>>>     at sun.reflect.**DelegatingConstruc**torAccessorI**mpl.newInstance(
>>>> **De**legatingConstructorAccessorI**mp**l.java:27)
>>>>     at java.lang.reflect.Constructor.****newInstance(Constructor.java:*
>>>> *5**13)
>>>>     at com.google.inject.internal.**Def**aultConstructionProxyFactor**
>>>> y$**2.newInstance(**DefaultConstruct**ionProxyFactor**y.java:85)
>>>>     at com.google.inject.internal.**Con**structorInjector.construct(**
>>>> Con**structorInjector.java:85)
>>>>     at com.google.inject.internal.**Con**structorBindingImpl$**Factory.
>>>> **get(**ConstructorBindingImpl.**java:**254)
>>>>     at com.google.inject.internal.**Inj**ectorImpl$4$1.call(**
>>>> InjectorImp**l.java:978)
>>>>     at com.google.inject.internal.**Inj**ectorImpl.callInContext(**
>>>> Inject**orImpl.java:1024)
>>>>     at com.google.inject.internal.**Inj**ectorImpl$4.get(**
>>>> InjectorImpl.**java:974)
>>>>     at com.google.inject.**assistedinje**ct.**FactoryProvider2.invoke(*
>>>> *Fac**toryProvider2.java:632)
>>>>     at $Proxy35.create(Unknown Source)
>>>>
>>>> Any thoughts/pointer are welcome and Thanks in advance for your help.
>>>>
>>>> Althought iam getting Application error in the browser but it is
>>>> authenticating the user which was created when i hit continue.
>>>>
>>>> Tariq
>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "H2 Database" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/h2-database/-/mtwTHdLmshkJ<https://groups.google.com/d/msg/h2-database/-/mtwTHdLmshkJ>
>>> **.
>>>
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to h2-database...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/NP5KEZdNaOMJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to