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

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

Forum - Forum
English discussion - English discussion

active  Topic # 157

24/03/2019 05:52
by 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.

 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(
    at storybook.exim.importer.Importer.openXml(
    at storybook.exim.importer.ImportDlg.loadLists(
    at storybook.exim.importer.ImportDlg.btFileAction(
    at storybook.exim.importer.ImportDlg.lambda$initUi$1(
    at java.awt.event.InvocationEvent.dispatch(
    at java.awt.EventQueue.dispatchEventImpl(
    at java.awt.EventQueue.access$500(
    at java.awt.EventQueue$
    at java.awt.EventQueue$
    at Method)
    at java.awt.EventQueue.dispatchEvent(
    at java.awt.EventDispatchThread.pumpOneEventForFilters(
    at java.awt.EventDispatchThread.pumpEventsForFilter(
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(
    at java.awt.EventDispatchThread.pumpEvents(
    at java.awt.EventDispatchThread.pumpEvents(
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


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


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


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 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
Post an answer Top  
Answer n° 4
24/03/2019 22:32
by 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  
Forum Topic  Forum 

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

Connect again :
Your user name :
Your password