Toivo,

The Errors about cvc-complex-type.2.4.a stuff is because the flow no longer 
adheres to the schema, as you are suggesting.

It doesn't hurt anything but does produce some annoying log messages. The NPE 
is of course much more concerning. It looks like
it is also the result of the flow being out of date, though. Looks like it's 
missing a ScheduleState element. My guess is that this
is why the unit test was ignored :)

It's awesome that you're looking into these unit tests, though. They should be 
updated for sure. Probably a good place to understand
how NiFi is really working under the hood, too.

Thanks
-Mark

----------------------------------------
> Date: Thu, 25 Jun 2015 07:10:19 -0700
> From: [email protected]
> To: [email protected]
> Subject: RE: Test fails: java.lang.ClassNotFoundException: 
> org.apache.nifi.provenance.VolatileProvenanceRepository
>
> Right, after adding
> <dependency>
> <groupId>org.apache.nifi</groupId>
> <artifactId>nifi-volatile-provenance-repository</artifactId>
> <scope>test</scope>
> </dependency>
>
> to pom, ClassNotFoundException disappeared.
>
> I also changed nifi.properties
> nifi.remote.input.secure=false
> to avoid error
> java.lang.IllegalStateException: NiFi Configured to allow Secure
> Site-to-Site communications but the Keystore/Truststore properties are not
> configured.
>
> Now I get errors
> [Error] :22:16: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comment}' is expected.
> [Error] :28:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{styles}' is expected.
> [Error] :46:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{styles}' is expected.
> [Error] :69:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comments}' is expected.
> [Error] :75:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comments}' is expected.
> [Error] :80:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{size}' is expected.
> [Error] :87:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comment}' is expected.
> [Error] :93:24: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{styles}' is expected.
> [Error] :112:24: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comments}' is expected.
> [Error] :118:24: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comments}' is expected.
> [Error] :126:25: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{sourceId}' is expected.
> [Error] :142:20: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{comment}' is expected.
> [Error] :152:21: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{sourceId}' is expected.
> [Error] :169:21: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{sourceId}' is expected.
> [Error] :186:21: cvc-complex-type.2.4.a: Invalid content was found starting
> with element 'style'. One of '{sourceId}' is expected.
>
> And finally public void testLoadExistingFlow() test fails:
>
> org.apache.nifi.controller.FlowSynchronizationException:
> java.lang.NullPointerException: Name is null
> at
> org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:317)
> at
> org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1154)
> at
> org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:72)
> at
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:608)
> at
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:458)
> at
> org.apache.nifi.controller.StandardFlowServiceTest.testLoadExistingFlow(StandardFlowServiceTest.java:98)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.NullPointerException: Name is null
> at java.lang.Enum.valueOf(Enum.java:235)
> at org.apache.nifi.controller.ScheduledState.valueOf(ScheduledState.java:1)
> at
> org.apache.nifi.controller.FlowFromDOMFactory.getScheduledState(FlowFromDOMFactory.java:444)
> at
> org.apache.nifi.controller.FlowFromDOMFactory.getProcessor(FlowFromDOMFactory.java:356)
> at
> org.apache.nifi.controller.FlowFromDOMFactory.getProcessGroup(FlowFromDOMFactory.java:147)
> at
> org.apache.nifi.controller.StandardFlowSynchronizer.addProcessGroup(StandardFlowSynchronizer.java:758)
> at
> org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:271)
> ... 30 more
>
>
> I will investigate why so.
>
> Possibly flow files used for testing
> "/conf/all-flow.xml"
> "/conf/all-flow-inheritable.xml"
> are outdated and does not correspond to FlowConfiguration.xsd anymore.
>
>
>
> Thanks
> Toivo
>
>
>
>
> --
> View this message in context: 
> http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Test-fails-java-lang-ClassNotFoundException-org-apache-nifi-provenance-VolatileProvenanceRepository-tp2011p2016.html
> Sent from the Apache NiFi (incubating) Developer List mailing list archive at 
> Nabble.com.
                                          

Reply via email to