db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sashi Maddali" <Sashikan...@warnerpacific.com>
Subject RE: Exception while inserting data back
Date Wed, 10 Feb 2010 00:06:26 GMT
Any help in solving our problem is highly appreciated. Is there anyway to
avoid circular dependency across rows? How to solve "missing referened rows"
problem?

As data grows in my database the number of unwritten rows are getting
increased. Do I need to drop foreign key references before running and
re-create after running data insertions?

 

From: Sashi Maddali [mailto:Sashikanthm@warnerpacific.com] 
Sent: Thursday, January 28, 2010 4:47 PM
To: 'ddlutils-dev@db.apache.org'
Subject: RE: Exception while inserting data back

 

Hi Tom

 

Do you have any hint on below issue? This is a show stopper for us to
continue. Our approach is like this. There will be one centralized database.
Every developer will have their local copy. We use ANT scripts to copy
schema and data into two different xml files, eg: schema.xml and data.xml.
To create these files we take help from ddlutils.jar. Whenever a change in
either schema or data in local copy that file will be checkedin into
repository. Users will check out that and again with the help of ANT scripts
and ddlutils they re-create their database. We use MS SQL Server 2005 as db
in everywhere. This model with ddlutils worked fine so far, but giving us
below errors in recent days. This issue is a show stopper. I investigated
against the data and found no discrepancies. Would you please suggest us if
there is anything that I'm missing? A small note from you helps us in
solving our issue. 

 

Thanks

Sashi K Maddali

 

From: Sashikanth Maddali [mailto:Sashikanthm@warnerpacific.com] 
Sent: Tuesday, January 26, 2010 10:57 AM
To: 'ddlutils-dev@db.apache.org'
Cc: 'ddlutils-user@db.apache.org'
Subject: Exception while inserting data back

 

Hi 

 

I'm using ddlutils-1.0.jar (built checking out latest code from SVN, ran ANT
JAR and collected jar file from dist folder). Below are the steps I'm doing.

1.    Using MS SQL Server 2005 database

2.    With the help of ddlutils created two xml files one for DB Schema and
another for data from MS SQL Server 2005

3.    Now I have two xml files

4.    Now again with the help of ANT and ddlutils re-creating schema and
data back into the same database (MS SQL server from which these files are
created before)

5.    I'm getting below exception

 

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec4 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=7855bba3caed4543b07d92c2eac21241

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec5 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=89d2272bdd4540ad98a04ac4a29ef239

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec6 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=902769f777c248eba6a992ca4275ba35

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec7 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=98996ee1b4a54eddb57ee847698a4258

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec8 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=c40a35f55356411982f8b49bf32b0654

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21ec9 is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=d6d16dc6d8f8473b8769d079349fae24

[ddlToDatabase] Row BENEFIT_ELEMENT:ID=2c99fde5264d965501264d998dd21eca is
still not written because it depends on these yet unwritten rows

[ddlToDatabase]   BENEFIT_DESCRIPTOR:ID=f032756a426e47f1b3b57f07a2a44ebc

 

BUILD FAILED

C:\InIndividual\trunk\Utilities\Build\BuildScript\buildDatabase.xml:530: The
following error occurred while executing this line:

C:\InIndividual\trunk\Utilities\Build\BuildScript\buildDatabase.xml:105:
org.apache.ddlutils.io.DataSinkException: There are 7880 rows still not
written because of missing referenced rows

      at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper
.java:541)

      at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)

      at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)

      at org.apache.tools.ant.Task.perform(Task.java:348)

      at org.apache.tools.ant.Target.execute(Target.java:357)

      at org.apache.tools.ant.Target.performTasks(Target.java:385)

      at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)

      at org.apache.tools.ant.Project.executeTarget(Project.java:1298)

      at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:41)

      at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets
(EclipseDefaultExecutor.java:32)

      at org.apache.tools.ant.Project.executeTargets(Project.java:1181)

      at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunn
er.java:423)

      at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRun
ner.java:137)

 

I tried my best to investigate on where I'm going wrong. When I start
working on this requirement, we were using ddlutils-1.0.jar which is
downloaded from internet. Now I'm using ddlutils version 1.1 which is
checked out from SVN and build locally. I looked at generated data file
(created from SQL Server 2005 database) too. It looks good to me. Is that
because of data reading from MS SQL Server 2005 or is that because of too
many rows are waiting for other rows to be inserted and the waiting rows
increased to a stage where ddlutils cannot handle them? Any point/hint to
solve my problem is greatly appreciated. 

 

Thanks

Sashi 

		

 

Confidentiality and HIPAA/GLBA Statement:  This email, together with any attachments, is intended
only for the use of the individual or entity to which it is addressed.
It may contain information which is confidential or prohibited from any disclosure under the
HIPAA Privacy Rule, Cal-GLBA or other federal or state laws.
If you are not the intended recipient, you are hereby notified that any dissemination or copying
of this message or attachment is strictly prohibited.
If you have received this email in error, please notify the original sender and delete this
email and any attachments.  Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message