Page 1 of 1
Saving into xDB from Oxygen XML Editor
Posted: Fri Jun 24, 2011 3:34 am
by cdavisafc
I am running Oxygen XML Editor 12.2, build 2011053115, EMC xDB 10.1.
I am able to access my XML Database in the Data Source Explorer and open files for reading but when I try to save changes to a file, back into the database, I receive the following error:
"Cannot save the file. DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory."
If I attempt the same thing from within Eclipse, using the Oxygen plugins it works, saving the changes back into the database.
Thank you,
Cornelia
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jun 24, 2011 4:21 pm
by adrian
Hello,
Oxygen doesn't perform differently in Eclipse versus stand-alone regarding databases.
Could you please check the following:
Are the data source(driver) and connection configured the same in both(especially the driver)?
Are you running the same version and build number of Oxygen in Eclipse(Window -> Preferences -> oXygen) versus stand-alone(Help -> About)?
Regards,
Adrian
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jul 01, 2011 7:39 am
by cdavisafc
Yes, I am running the same version of oXygen in both places and the data sources and connections are configured exactly the same.
Googling the error message leads me to believe an incorrect version of xerces is being used. And in fact, the latest version of xDB requires xerces 2.11.0 and I believe the xerces that ships with oXygen is 2.9.1. Somehow when running in Eclipse the right version of xerces must be used but when running the native oXygen client it tries to use the jar that ships with Oxygen.
I did try including the xercesImpl.jar that ships with xDB in the Data Source configuration with no change - same error message when I try to save.
How can I ensure that the right version of xerces is used when connecting to xDB?
Thanks,
Cornelia
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jul 01, 2011 5:05 pm
by sorin_ristache
cdavisafc wrote:I did try including the xercesImpl.jar that ships with xDB in the Data Source configuration with no change - same error message when I try to save.
Please include the
xercesImpl.jar file from the
[Oxygen-install-folder]/lib folder
on the first position in the list of jar files of the xDB data source that you create in Preferences -> Data Sources. It seems there is a conflict between the jar files of the xDB data source and the Xerces version from Oxygen and this is a way of avoiding it.
Regards,
Sorin
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jul 01, 2011 8:32 pm
by cdavisafc
No joy.
The driver files I have listed are:
file:/usr/local/Oxygen%20XML%20Editor%2012/lib/xrciesImpl.jar
file:/usr/local/xDB/lib/xhive.jar
file:/usr/local/xDB/lib/core/antlr-runtime.jar
file:/usr/local/xDB/lib/core/aspectjrt.jar
file:/usr/local/xDB/lib/google-collect.jar
file:/usr/local/xDB/lib/icu4j.jar
I have tried restarting the editor and also deleting and recreating the connection.
Same error message.
Cornelia
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jul 01, 2011 8:34 pm
by cdavisafc
Sorry, typo in the previous - the first entry is
file:/usr/local/Oxygen%20XML%20Editor%2012/lib/xercesImpl.jar
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Jul 01, 2011 10:34 pm
by adrian
Cornelia,
Get Xerces2 Java 2.11 from here:
http://xerces.apache.org/mirrors.cgi
and add the v2.11 xercesImpl.jar from the downloaded archive at the top of the driver list instead of the one from the Oxygen lib folder.
Regards,
Adrian
Re: Saving into xDB from Oxygen XML Editor
Posted: Wed Jul 06, 2011 7:42 am
by cdavisafc
Sorry, still no go. Tried this and got the same error.
Re: Saving into xDB from Oxygen XML Editor
Posted: Fri Sep 09, 2011 11:07 pm
by CurtisFleming
Experiencing the same error on file import.
Another dead end is copying xercesImpl.jar from the xDB lib directory into oXygen lib directory. oXgyen notices the version difference but file import experiences the same error.
Re: Saving into xDB from Oxygen XML Editor
Posted: Thu Sep 15, 2011 12:32 pm
by adrian
Hi,
Do
NOT replace the xercesImpl.jar from the Oxygen lib directory. Oxygen applies a number of patches to Xerces and they all depend on that specific version of the jar. Using a different version of the jar will cause serious problems.
If you want to help us investigate this, you can enable logging in Oxygen by creating a file named
log4j.properties in the Oxygen installation directory with this content:
Code: Select all
log4j.rootCategory= debug, R2
log4j.appender.R2=org.apache.log4j.RollingFileAppender
log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
log4j.appender.R2.MaxFileSize=12000KB
log4j.appender.R2.MaxBackupIndex=20
log4j.appender.R2.layout=org.apache.log4j.PatternLayout
log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
Restart Oxygen, reproduce the problem and quit Oxygen. You will find a directory named 'oxygenLog' on your Desktop and inside it the generated log files(oxygen.log.*). Please zip those files and send them to
support@oxygenxml.com
Note that the debug/logging mode triggered by 'log4j.properties' decreases the application performance severely. At the end of the procedure please do not forget to remove this file from the Oxygen installation directory.
Regards,
Adrian
Re: Saving into xDB from Oxygen XML Editor
Posted: Thu Sep 22, 2011 1:05 pm
by adrian
Hello,
In case anyone else encounters this issue...
We have found the cause of the problem.
xhive.jar contains a MANIFEST.MF with a classpath:
Code: Select all
Class-Path: core/antlr-runtime.jar core/aspectjrt.jar core/fastutil-shrinked.jar core/google-collect.jar core/icu4j.jar core/lucene-regex.jar core/lucene.jar core/serializer.jar core/xalan.jar core/xercesImpl.jar
Because the driver was configured to use xhive.jar directly from the xDB installation(where a lot of other jars are located), core/xercesImpl.jar from the xDB installation directory is loaded even though it's not specified in the list of jars from the data source driver configuration(it's in the classpath from xhive.jar's MANIFEST.MF).
A simple workaround for this issue is to copy
ONLY the jar files used in the driver configuration() to a separate folder and configure the data source driver to use them from there.
Regards,
Adrian