question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tests not passing after #210

See original GitHub issue

Hi, after #210 all of the tests in ocpp-v1_6-test/src/test/groovy/eu/chargetime/ocpp/test/profiles/core/soap are failing for me. They were passing before this PR. All other tests are passing.

It seems that there is a problem with parsing the Confirmation after the new changes.

Here’s a log from SOAPAuthorizeSpec test, they are all very similar:

21:04:12.318 [Test worker] DEBUG eu.chargetime.ocpp.Queue - Queue size: 1, store time: 21.80 ?s
21:04:12.513 [pool-41-thread-1] DEBUG eu.chargetime.ocpp.Server - Session created: 4a1c9ac1-4102-4307-b087-ee9333d633ea
21:04:12.537 [pool-41-thread-1] WARN eu.chargetime.ocpp.SOAPCommunicator - packPayload() failed
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
	at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:445)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:277)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:124)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1123)
	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:147)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:247)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:462)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
	at eu.chargetime.ocpp.SOAPCommunicator.packPayload(SOAPCommunicator.java:81)
	at eu.chargetime.ocpp.Communicator.sendCallResult(Communicator.java:206)
	at eu.chargetime.ocpp.ConfirmationHandler.accept(ConfirmationHandler.java:60)
	at eu.chargetime.ocpp.ConfirmationHandler.accept(ConfirmationHandler.java:32)
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
	at java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:792)
	at java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2153)
	at eu.chargetime.ocpp.Session$CommunicatorEventHandler.onCall(Session.java:203)
	at eu.chargetime.ocpp.Communicator$EventHandler.receivedMessage(Communicator.java:301)
	at eu.chargetime.ocpp.WebServiceReceiver.forwardMessage(WebServiceReceiver.java:84)
	at eu.chargetime.ocpp.SOAPSyncHelper.relay(SOAPSyncHelper.java:69)
	at eu.chargetime.ocpp.WebServiceListener$WSHttpEventHandler.incomingRequest(WebServiceListener.java:148)
	at eu.chargetime.ocpp.WSHttpHandler.handle(WSHttpHandler.java:55)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
	at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:705)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:677)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
21:04:12.541 [pool-41-thread-1] WARN eu.chargetime.ocpp.SOAPCommunicator - createMessage() failed
java.lang.NullPointerException: null
	at eu.chargetime.ocpp.SOAPCommunicator.setNamespace(SOAPCommunicator.java:94)
	at eu.chargetime.ocpp.SOAPCommunicator.createMessage(SOAPCommunicator.java:177)
	at eu.chargetime.ocpp.SOAPCommunicator.makeCallResult(SOAPCommunicator.java:123)
	at eu.chargetime.ocpp.Communicator.sendCallResult(Communicator.java:206)
	at eu.chargetime.ocpp.ConfirmationHandler.accept(ConfirmationHandler.java:60)
	at eu.chargetime.ocpp.ConfirmationHandler.accept(ConfirmationHandler.java:32)
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
	at java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:792)
	at java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2153)
	at eu.chargetime.ocpp.Session$CommunicatorEventHandler.onCall(Session.java:203)
	at eu.chargetime.ocpp.Communicator$EventHandler.receivedMessage(Communicator.java:301)
	at eu.chargetime.ocpp.WebServiceReceiver.forwardMessage(WebServiceReceiver.java:84)
	at eu.chargetime.ocpp.SOAPSyncHelper.relay(SOAPSyncHelper.java:69)
	at eu.chargetime.ocpp.WebServiceListener$WSHttpEventHandler.incomingRequest(WebServiceListener.java:148)
	at eu.chargetime.ocpp.WSHttpHandler.handle(WSHttpHandler.java:55)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
	at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:705)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:677)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
wrz 22, 2022 9:04:12 PM com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl extractContentAsDocument
SEVERE: SAAJ0250: Cannot extract Document from body
21:04:12.559 [Thread-186] WARN eu.chargetime.ocpp.SOAPCommunicator - parseMessage() failed
javax.xml.soap.SOAPException: Cannot extract Document from body
	at com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl.extractContentAsDocument(BodyImpl.java:296)
	at eu.chargetime.ocpp.SOAPCommunicator$SOAPParser.parseMessage(SOAPCommunicator.java:292)
	at eu.chargetime.ocpp.SOAPCommunicator.parse(SOAPCommunicator.java:253)
	at eu.chargetime.ocpp.Communicator$EventHandler.receivedMessage(Communicator.java:283)
	at eu.chargetime.ocpp.WebServiceTransmitter$1.run(WebServiceTransmitter.java:90)
	at java.lang.Thread.run(Thread.java:750)
21:04:12.559 [Thread-186] DEBUG eu.chargetime.ocpp.Queue - Queue size: 0, store time: 6.900 ?s
21:04:12.560 [Thread-186] WARN eu.chargetime.ocpp.Session - Unable to process action
java.lang.NullPointerException: null
	at eu.chargetime.ocpp.SOAPCommunicator.setNamespace(SOAPCommunicator.java:94)
	at eu.chargetime.ocpp.SOAPCommunicator.unpackPayload(SOAPCommunicator.java:67)
	at eu.chargetime.ocpp.Session$CommunicatorEventHandler.onCallResult(Session.java:168)
	at eu.chargetime.ocpp.Communicator$EventHandler.receivedMessage(Communicator.java:293)
	at eu.chargetime.ocpp.WebServiceTransmitter$1.run(WebServiceTransmitter.java:90)
	at java.lang.Thread.run(Thread.java:750)
21:04:12.560 [Thread-186] ERROR eu.chargetime.ocpp.Communicator - An error occurred. Sending this information: uniqueId 71df58de-b7a4-4eec-b355-ab3640f00767: action: AuthorizeResponse, errorCore: FormationViolation, errorDescription: Unable to process action
21:04:12.584 [pool-41-thread-1] DEBUG eu.chargetime.ocpp.Server - Promise not found for error Unable to process action

Condition not satisfied after 1,00 seconds and 11 attempts
Condition not satisfied after 1,00 seconds and 11 attempts
	at spock.util.concurrent.PollingConditions.within(PollingConditions.java:164)
	at spock.util.concurrent.PollingConditions.eventually(PollingConditions.java:134)
	at eu.chargetime.ocpp.test.profiles.core.soap.SOAPAuthorizeSpec.Charge point sends Authorize request and receives a response(SOAPAuthorizeSpec.groovy:20)
Caused by: Condition not satisfied:

chargePoint.hasReceivedAuthorizeConfirmation("Accepted")
|           |
|           false
eu.chargetime.ocpp.test.FakeChargePoint@f75077a

	at eu.chargetime.ocpp.test.profiles.core.soap.SOAPAuthorizeSpec.Charge point sends Authorize request and receives a response_closure2(SOAPAuthorizeSpec.groovy:21)
	at eu.chargetime.ocpp.test.profiles.core.soap.SOAPAuthorizeSpec.Charge point sends Authorize request and receives a response_closure2(SOAPAuthorizeSpec.groovy)
	at groovy.lang.Closure.call(Closure.java:414)
	at spock.util.concurrent.PollingConditions.within(PollingConditions.java:158)
	... 2 more

@emilm Did you also encounter this issue?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
TVoldencommented, Sep 23, 2022

@emilm yeah that would work.

0reactions
emilmcommented, Sep 22, 2022

Cool! @TVolden not sure how to add this fix, another PR ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing Diabetes: glucose tolerance test and blood ...
Diagnosing diabetes entails two main tests: fasting blood glucose level and the oral glucose tolerance test. See why these tests vital in diagnosing ......
Read more >
Understanding Your Scores: GACE - ETS
Content Assessments. A passing score for any GACE content assessment can fall into one of two categories: 220–249 — passing at the induction...
Read more >
Glucose Tolerance Test - StatPearls - NCBI Bookshelf - NIH
The oral glucose tolerance test (OGTT) is one method of evaluating an individual's apparent insulin sensitivity and insulin resistance.
Read more >
Better way to disable console inside unit tests - Stack Overflow
For particular spec file, Andreas's is good enough. Below setup will suppress console.log statements for all test suites, jest --silent.
Read more >
What to Know About 24-Hour Urine Protein Tests - WebMD
What Happens After a 24-Hour Urine Protein Test? There are no special care instructions after a 24-hour urine test. Depending on your symptoms ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found