Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 397316 | Differences between
and this patch

Collapse All | Expand All

(-)a/jpa/eclipselink.jpa.test/resource/eclipselinkorm/eclipselink-xml-extended-model/advanced-tpt-multitenant-entity-mappings.xml (-1 / +1 lines)
Lines 96-103 Link Here
96
                </join-table>
96
                </join-table>
97
            </many-to-many>
97
            </many-to-many>
98
            <element-collection name="honors">
98
            <element-collection name="honors">
99
                <collection-table name="XML_CANDIDATE_HONORS"/>
100
                <column name="HONOR"/>
99
                <column name="HONOR"/>
100
                <collection-table name="XML_CANDIDATE_HONORS"/>
101
            </element-collection>
101
            </element-collection>
102
        </attributes>
102
        </attributes>
103
    </entity>
103
    </entity>
(-)a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/xml/XMLEntityMappingsReader.java (-1 / +23 lines)
Lines 36-49 import javax.xml.validation.Schema; Link Here
36
import javax.xml.validation.SchemaFactory;
36
import javax.xml.validation.SchemaFactory;
37
37
38
import org.eclipse.persistence.config.PersistenceUnitProperties;
38
import org.eclipse.persistence.config.PersistenceUnitProperties;
39
import org.eclipse.persistence.exceptions.EclipseLinkException;
39
import org.eclipse.persistence.exceptions.ValidationException;
40
import org.eclipse.persistence.exceptions.ValidationException;
40
import org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider;
41
import org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider;
41
42
42
import org.eclipse.persistence.oxm.XMLConstants;
43
import org.eclipse.persistence.oxm.XMLConstants;
43
import org.eclipse.persistence.oxm.XMLContext;
44
import org.eclipse.persistence.oxm.XMLContext;
44
import org.eclipse.persistence.oxm.XMLUnmarshaller;
45
import org.eclipse.persistence.oxm.XMLUnmarshaller;
46
import org.xml.sax.ErrorHandler;
45
import org.xml.sax.InputSource;
47
import org.xml.sax.InputSource;
46
import org.xml.sax.SAXException;
48
import org.xml.sax.SAXException;
49
import org.xml.sax.SAXParseException;
47
import org.xml.sax.XMLReader;
50
import org.xml.sax.XMLReader;
48
51
49
/**
52
/**
Lines 214-219 public class XMLEntityMappingsReader { Link Here
214
     */
217
     */
215
    private static void useLocalSchemaForUnmarshaller(XMLUnmarshaller unmarshaller, Schema schema) {
218
    private static void useLocalSchemaForUnmarshaller(XMLUnmarshaller unmarshaller, Schema schema) {
216
        try {
219
        try {
220
221
            unmarshaller.setErrorHandler(new ErrorHandler() {
222
                @Override
223
                public void error(SAXParseException exception) throws SAXException {
224
                    throw exception;
225
                }
226
227
                @Override
228
                public void fatalError(SAXParseException exception) throws SAXException {
229
                    throw exception;
230
                }
231
232
                @Override
233
                public void warning(SAXParseException exception) throws SAXException {
234
                    if (exception.getException() instanceof EclipseLinkException) {
235
                        throw (EclipseLinkException) exception.getCause();
236
                    }
237
                }
238
            });
239
            
217
            unmarshaller.setSchema(schema);
240
            unmarshaller.setSchema(schema);
218
        } catch (UnsupportedOperationException ex) {
241
        } catch (UnsupportedOperationException ex) {
219
            // Some parsers do not support setSchema.  In that case, setup validation another way.
242
            // Some parsers do not support setSchema.  In that case, setup validation another way.
220
- 

Return to bug 397316