JUnit not accessing user defined classes of digester

A

apka

Hi,

I am using Digester 1.7 and JUnit 3.8.

The parsing is done properly using Digester and JUnit when the return
type of Digester is java classes like ArrayList.

But when the return type is user defined classes then I get the
following error:

Although this works fine within my project.


java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2919)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2945)
at org.apache.commons.digester.Digester.endElement(Digester.java:1133)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.commons.digester.Digester.parse(Digester.java:1685)
at
com.hewitt.cat.csd.client.util.DigesterUtil.load(DigesterUtil.java:108)
at
com.hewitt.cat.csd.client.connectivity.CsdWebConnectivityService.run(CsdWebConnectivityService.java:230)
at
com.hewitt.cat.csd.client.connectivity.CsdWebConnectivityService.run(CsdWebConnectivityService.java:259)
at
com.hewitt.cat.csd.client.siebel.connectivity.SiebelService.getData(SiebelService.java:515)
at
com.hewitt.cat.csd.client.siebel.connectivity.SiebelService.getMyActivities(SiebelService.java:116)
at
com.hewitt.cat.csd.junit.HrProTest.testGetMyActivities(HrProTest.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top