db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6233) XMLBindingTest fails on latest JDK 8 EA
Date Thu, 30 May 2013 10:07:20 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-6233:
--------------------------------------

    Attachment: derby-6233-01-a.diff

The test passes on JDK 8 when it's run with the system property javax.xml.accessExternalDTD=file,
which loosens the restrictions added by JEP 185 and allows the XML parser to read the DTD.

The attached patch derby-6233-01-a.diff decorates the test with a SystemPropertyTestSetup
that sets that property. The patch also adds convenience methods in SystemPropertyTestSetup
for setting a single property, similar to existing convenience methods in DatabasePropertyTestSetup.
                
> XMLBindingTest fails on latest JDK 8 EA
> ---------------------------------------
>
>                 Key: DERBY-6233
>                 URL: https://issues.apache.org/jira/browse/DERBY-6233
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.11.0.0
>         Environment: java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b91)
> Java HotSpot(TM) 64-Bit Server VM (build 25.0-b33, mixed mode)
>            Reporter: Knut Anders Hatlen
>         Attachments: derby-6233-01-a.diff
>
>
> java.sql.SQLDataException: Invalid XML Document: External DTD: Failed to read external
DTD 'personal.dtd', because 'file' access is not allowed.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:79)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:148)
> 	at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:349)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2396)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:85)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1438)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1695)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1379)
> 	at org.apache.derbyTesting.junit.XML.insertDocWithDTD(XML.java:240)
> 	at org.apache.derbyTesting.functionTests.tests.lang.XMLBindingTest$XBindTestSetup.setUp(XMLBindingTest.java:301)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:22)
> 	at junit.extensions.TestSetup.run(TestSetup.java:27)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
> 	at junit.extensions.TestSetup.run(TestSetup.java:27)
> Caused by: java.sql.SQLException: Invalid XML Document: External DTD: Failed to read
external DTD 'personal.dtd', because 'file' access is not allowed.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:126)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
> Caused by: java.sql.SQLException: Java exception: 'External DTD: Failed to read external
DTD 'personal.dtd', because 'file' access is not allowed.: org.xml.sax.SAXException'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:126)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:148)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:370)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:436)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:432)
> Caused by: org.xml.sax.SAXException: External DTD: Failed to read external DTD 'personal.dtd',
because 'file' access is not allowed.
> org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 119; External DTD: Failed
to read external DTD 'personal.dtd', because 'file' access is not allowed.
> 	at org.apache.derby.iapi.types.SqlXmlUtil$XMLErrorHandler.fatalError(SqlXmlUtil.java:767)
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:180)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
> 	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1158)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
> 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:509)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:858)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:787)
> 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> 	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237)
> 	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:329)
> 	at org.apache.derby.iapi.types.SqlXmlUtil$1.run(SqlXmlUtil.java:320)
> 	at org.apache.derby.iapi.types.SqlXmlUtil$1.run(SqlXmlUtil.java:317)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.derby.iapi.types.SqlXmlUtil.serializeToString(SqlXmlUtil.java:315)
> 	at org.apache.derby.iapi.types.XML.XMLParse(XML.java:632)
> 	at org.apache.derby.exe.acbfcc1aadx013exeff7x4f4fx000077cfc4780.e0(Unknown Source)
> 	at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGeneratedClass.java:101)
> 	at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(RowResultSet.java:148)
> 	at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java:185)
> 	at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java:128)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:520)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:453)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:334)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1346)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 119; External
DTD: Failed to read external DTD 'personal.dtd', because 'file' access is not allowed.
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message