openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-326) NPE if a discriminator column is specified without discriminator type in orm.xml
Date Wed, 22 Aug 2007 04:14:30 GMT

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

Michael Dick updated OPENJPA-326:
---------------------------------

    Attachment: OPENJPA-326.patch.txt

Example exception: 

<openjpa-1.0.0-SNAPSHOT-r420667:568164 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
org.xml.sax.SAXException: file:/home/mikedd/workspaces/jpa/tests/target/test-classes/META-INF/orm.xml
[Location: Line: 29, C: 14]: An error was encountered while parsing element "entity".  Make
sure the metadata file is correctly formatted. [java.lang.NullPointerException]
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:250)
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:199)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:433)

Patch attached so that I don't lose track of the changes. The fix is committed in trunk and
we'll migrate to 1.0.1 when we're done with 1.0.0.

> NPE if a discriminator column is specified without discriminator type in orm.xml
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-326
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-326
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 0.9.7
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.1
>
>         Attachments: OPENJPA-326.patch.txt
>
>
> XMLPersistenceMappingParser should initialize _discType to STRING to avoid a potential
NPE. I'll provide an example shortly. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message