You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Patrice Duroux <pa...@gmail.com> on 2021/03/15 18:21:24 UTC

please help with untime trouble while loading XML (org.xml.sax.SAXException)

Hi,

For the past few weeks, OpenJPA has not been able to systematically
iniitialize loading the persistence.xml file or to perform the classes
enhancement due to problem accessing the .xsd files on the Oracle server.
Is there a way to avoid that? Embedding the required .xsd files as Java
resources?
Inactivating this SAX validation using a property?

Many thanks,
Patrice



--
Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Users-f208411.html

Re: please help with untime trouble while loading XML (org.xml.sax.SAXException)

Posted by Patrice Duroux <pa...@gmail.com>.
Hi,

This XML validation problem is very disturbing these weeks.
But I think I can get rid of it with this:

diff
openjpa-parent-3.1.2/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
openjpa-parent-3.1.2p1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
794c794
<             setValidating(true);
---
>             setValidating(false);

diff
openjpa-parent-3.1.2/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
openjpa-parent-3.1.2p1/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
315c315
<         setValidating(true);
---
>         setValidating(false);

Thanks,
Patrice




--
Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Users-f208411.html

Re: please help with untime trouble while loading XML (org.xml.sax.SAXException)

Posted by Patrice Duroux <pa...@gmail.com>.
Hi,

Could OpenJPA (3.1.2) work without any ORM files and persistence.xml while
an implementation does not use the annotation feature at all?

More over after a (very) quick investigation on my trouble and looking at:

https://github.com/apache/openjpa/blob/master/openjpa-lib/src/main/java/org/apache/openjpa/lib/xml/XMLFactory.java

and

https://github.com/apache/openjpa/blob/master/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java

Line 91:
    private boolean _validating = true;

Line 383:
        boolean validating = _validating && (getDocType() != null
            || schemaSource != null);

Line 408:
                parser = XMLFactory.getSAXParser(validating, true);

May be I am on the wrong way...

Still got the trouble for a while today :-(

Thanks!





--
Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Users-f208411.html

Re: please help with untime trouble while loading XML (org.xml.sax.SAXException)

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
Hi! Does it help if you remove it for now? Should not go grab some xsd from remote somewhere tbh.
If we do, then it's a bug!

LieGrue,
strub

> Am 15.03.2021 um 19:21 schrieb Patrice Duroux <pa...@gmail.com>:
> 
> 
> Hi,
> 
> For the past few weeks, OpenJPA has not been able to systematically
> iniitialize loading the persistence.xml file or to perform the classes
> enhancement due to problem accessing the .xsd files on the Oracle server.
> Is there a way to avoid that? Embedding the required .xsd files as Java
> resources?
> Inactivating this SAX validation using a property?
> 
> Many thanks,
> Patrice
> 
> 
> 
> --
> Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Users-f208411.html