You are here :   Home » Forum » Import error
 
Forum - Import error

Count of members 163 members
Connected : (nobody)
Snif !!!
 

Forum - Forum
unknown - unknown

active  Topic # 157

24/03/2019 05:52
by DonEdwards

DonEdwards



I think I have a corrupted database (based on stuff I add not being there if I close and reopen the project), so I exported it to xml and tried to import it into a new database.

Result:
 Quotation : error_windowException Message:
An error occurs when parsing document.

Stack Trace:
java.lang.Exception: An error occurs when parsing document.
    at storybook.exim.importer.Importer.readDom(Importer.java:137)
    at storybook.exim.importer.Importer.openXml(Importer.java:117)
    at storybook.exim.importer.Importer.open(Importer.java:77)
    at storybook.exim.importer.ImportDlg.loadLists(ImportDlg.java:220)
    at storybook.exim.importer.ImportDlg.btFileAction(ImportDlg.java:158)
    at storybook.exim.importer.ImportDlg.lambda$initUi$1(ImportDlg.java:135)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Please report this exception to the development team.

Web site DonEdwards
Post an answer Top  

Answer n° 1
--------
24/03/2019 06:27
by DonEdwards

DonEdwards



Addendum: my web browser has trouble with the xml file too, but gives more useful error messages.
* A location name has an & in it, which was not escaped to & - should check for this sort of thing on all fields.
* The XML for parts has the "<part >" tag itself ending with /> and then being followed by a "</part>" closing tag later. The latter gets an error, but in this case the actual error is the /> closing.
* Above problem also happens for chapters.

After fixing those, the web browser likes it...

The import process isn't immediately aborting with an error message, but it's hard to tell if it's doing anything...

It's a bit odd that the title of the window for selecting what to import is "Export".

After some experimentation, I've decided that the Import operation isn't actually doing anything. But it isn't giving an error message either. When the "Import" button is clicked it is highlighted for a few seconds and then goes back to normal - but that's it.

oStorybook 5.04.03 on Linux Mint 18.1.

Does it matter that the file I'm trying to get stuff out of was created with a name ending with "h2.db" but the newly created, empty file ends with "mv.db"?
Web site DonEdwards
Post an answer Top  
Answer n° 2
--------
24/03/2019 06:55
by DonEdwards

DonEdwards



Addendum 2: apparently I was right that the database is corrupted. Scenes I had added - repeatedly - but weren't showing up at all in oStorybook, occurred multiple times in the XML file.

But cutting them down to once each had no apparent effect on the non-functionality of the input process.
Web site DonEdwards
Post an answer Top  
Answer n° 3
--------
24/03/2019 15:28
by favdb

favdb



In the case of an anomaly in the database file, it is best to go through the SQL export and then re-import the file via the database tools of the database manager. These basic tools are contained in the h2-1.4.189.jar library of the "lib" directory of the installation.

The XML export is only an approximation of the XML format, mainly because there is no official format that meets the objectives of oStorybook. For version 6 under development there will also be a final version 5 that will allow XML export according to the specifications of the new file format.

If you need more information on the basic tools of h2database see the official website www.h2database.com or ask me.

In any case, there is still the possibility to send me the file concerned so that I can correct it, or even better that I make a corrective version of oStorybook.

Translated with www.DeepL.com/Translator
Post an answer Top  
Answer n° 4
--------
24/03/2019 22:32
by DonEdwards

DonEdwards



I exported the SQL and used database tools to re-import it into a new database.

The scenes that I added (repeatedly) but don't show up in oStorybook in the original database, don't show up in the new one either. Exporting *that* and comparing it to the original database shows that they are in fact present in the data.

However, I can add a new scene, close the project and reopen it, and the new scene actually shows up! This is a big improvement. I'm just leery about having the "bad" scenes... wait a minute...

That scene I just added successfully, I changed it to the chapter a new scene would be in, closed and reopened, and it disappeared!

**It's a bad chapter! (or maybe a bad strand, I can't tell yet)

So (fortunately I speak fluent SQL) I cleaned out the new part, chapter, and strand, all associated scenes with their scene_person and scene_location links...

Nope. I rebuild the stuff I deleted, and scenes disappear again.

Time for manual rebuild, scene by scene and character by character.

I've been looking for an email address to send the original database to, but haven't found one. It's probably right out in plain sight...
Web site DonEdwards
Post an answer Top  
active topic active   closed topic closed   Important! Important!   New New message
Correct Correct message   Close Close topic   Make sticky Make sticky  



You are here :   Home » Forum » Import error
 
 
 
Webmaster - Infos
Preferences

Connect again :
Your user name :
Your password