Issue Details (XML | Word | Printable)

Key: NUCENHANCER-80
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Ravi Prakash
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Enhancer (ARCHIVED)

NullPointerException in org.datanucleus.metadata.PackageMetaData.<init>

Created: 07/Nov/11 05:36 AM   Updated: 18/Jun/12 10:08 AM   Resolved: 03/Apr/12 01:03 PM
Component/s: ASM Enhancer
Affects Version/s: 3.0.1
Fix Version/s: None

Environment: Fedora Linux + Eclipse Helios + Datanucleus eclipse plugin


 Description  « Hide
When the package is default for the class to be persisted, building the package throws a NullPointerException in org.datanucleus.metadata.PackageMetaData.<init> . Refactoring the class to be in a defined package like com.ravi fixes the issue

Here's the complete stack log:


DataNucleus Enhancer (version 3.0.1) : Enhancement of classes
Error reading the Meta-Data input "null
java.lang.NullPointerException
at org.datanucleus.metadata.PackageMetaData.<init>(PackageMetaData.java:65)
at org.datanucleus.metadata.FileMetaData.newPackageMetadata(FileMetaData.java:273)
at org.datanucleus.api.jdo.metadata.JDOMetaDataHandler.startElement(JDOMetaDataHandler.java:285)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:272)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataURL(MetaDataParser.java:131)
at org.datanucleus.api.jdo.metadata.JDOMetaDataManager.parseFile(JDOMetaDataManager.java:217)
at org.datanucleus.metadata.MetaDataManager.loadFiles(MetaDataManager.java:1050)
at org.datanucleus.metadata.MetaDataManager.loadMetadataFiles(MetaDataManager.java:396)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:814)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:590)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1390)
"
org.datanucleus.exceptions.NucleusException: Error reading the Meta-Data input "null
java.lang.NullPointerException
at org.datanucleus.metadata.PackageMetaData.<init>(PackageMetaData.java:65)
at org.datanucleus.metadata.FileMetaData.newPackageMetadata(FileMetaData.java:273)
at org.datanucleus.api.jdo.metadata.JDOMetaDataHandler.startElement(JDOMetaDataHandler.java:285)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:272)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataURL(MetaDataParser.java:131)
at org.datanucleus.api.jdo.metadata.JDOMetaDataManager.parseFile(JDOMetaDataManager.java:217)
at org.datanucleus.metadata.MetaDataManager.loadFiles(MetaDataManager.java:1050)
at org.datanucleus.metadata.MetaDataManager.loadMetadataFiles(MetaDataManager.java:396)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:814)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:590)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1390)
"
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:299)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataURL(MetaDataParser.java:131)
at org.datanucleus.api.jdo.metadata.JDOMetaDataManager.parseFile(JDOMetaDataManager.java:217)
at org.datanucleus.metadata.MetaDataManager.loadFiles(MetaDataManager.java:1050)
at org.datanucleus.metadata.MetaDataManager.loadMetadataFiles(MetaDataManager.java:396)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:814)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:590)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1390)
Caused by: java.lang.NullPointerException
at org.datanucleus.metadata.PackageMetaData.<init>(PackageMetaData.java:65)
at org.datanucleus.metadata.FileMetaData.newPackageMetadata(FileMetaData.java:273)
at org.datanucleus.api.jdo.metadata.JDOMetaDataHandler.startElement(JDOMetaDataHandler.java:285)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:272)
... 7 more
Nested Throwables StackTrace:
java.lang.NullPointerException
at org.datanucleus.metadata.PackageMetaData.<init>(PackageMetaData.java:65)
at org.datanucleus.metadata.FileMetaData.newPackageMetadata(FileMetaData.java:273)
at org.datanucleus.api.jdo.metadata.JDOMetaDataHandler.startElement(JDOMetaDataHandler.java:285)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataStream(MetaDataParser.java:272)
at org.datanucleus.metadata.xml.MetaDataParser.parseMetaDataURL(MetaDataParser.java:131)
at org.datanucleus.api.jdo.metadata.JDOMetaDataManager.parseFile(JDOMetaDataManager.java:217)
at org.datanucleus.metadata.MetaDataManager.loadFiles(MetaDataManager.java:1050)
at org.datanucleus.metadata.MetaDataManager.loadMetadataFiles(MetaDataManager.java:396)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:814)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:590)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1390)
Errors were encountered when loading the specified MetaData files and classes. See the nested exceptions for details
DataNucleus Enhancer completed with an error. Please review the enhancer log for full details. Some classes may have been enhanced but some caused errors


Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 07/Nov/11 08:12 AM
All docs, front page of JIRA etc say provide a testcase so an issue is demonstratable. All docs define that testcase format. Nothing is looked at without it

Andy Jefferson added a comment - 03/Apr/12 01:03 PM
No testcase provided, so closing. Attach a testcase for this to be reopened.