@PerceptionがスキーマのURIについて私に言ったことを実行しましたが、今は別の例外があります。誰かが問題が何であるか知っていますか?どうもありがとう。
xsdテンプレートを使用してファイルをアンマーシャルするメソッドGit60Manager.doImportMod1GtFileから次のコードがあります。
String schema = "///META-INF/templates/git60_data_mod1_def.xsd";
isr = new InputStreamReader(GIT60FileMod1.class.getResourceAsStream(schema));
Unmarshaller unmarshaller = new Unmarshaller(isr, main);
これはxsdファイルです:
<xs:annotation>
<xs:documentation xml:lang="en">
GIT60 schema Mod 1 (Data)
</xs:documentation>
</xs:annotation>
<xs:include id="git60_mod1_def.xsd" schemaLocation="./git60_mod1_def.xsd" />
<xs:element name="mainData" type="GIT60FileMod1Data" jrb:length="100" />
<xs:complexType name="GIT60FileMod1Data">
<xs:sequence>
<xs:element name="git60Tax" type="GIT60FileTaxMod1" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
そして、これは、java.net.MalformedURLExceptionを取得する前に、アプリケーションを実行したときの例外です。
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
at com.samelan.gitim.core.service.io.account.impl.GIT60Manager.doImportMod1GtFile(GIT60Manager.java:1256)
at com.samelan.gitim.core.service.managers.GtFileProcessorManagerTest.testProcFilesNewTemplateGit60(GtFileProcessorManagerTest.java:717)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)