-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests not passing after #210 #213
Comments
@Arflayd I guess Confirmation needs @XmlRootElement annotation. Also I first had to add jakarta.xml.bind to even get this far: javax.xml.bind.JAXBException
https://mkyong.com/java/java-lang-classnotfoundexception-com-sun-xml-bind-v2-contextfactory/ am I missing something there? |
@emilm That is also a problem when using higher versions of Java, but when sticking to Java 8 it doesn't occur and no extra dependencies are needed. I have tried Xml related annotation on the Confirmation class, but the problem still occurs. Also - in my app which uses this library and Spring, there also seems to be a problem with serialization of the Confirmations when attempting to save them in a database, so it's a bigger problem than just with the tests :/ |
@Arflayd I use Java 11 and I have no idea how to correctly reproduce . Do I have to get java 8 as well? |
For Java 11 I added |
Hm I have no idea where to add that into the maven project. I use Maven. I added <dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.4.0</version>
</dependency> But same error. I use intellij too |
I reproduced the problem and fixed it by adding @XmlTransient. @XmlRootElement is not necessary: public abstract class Confirmation implements Validatable {
private transient ConfirmationCompletedHandler completedHandler;
@XmlTransient
public ConfirmationCompletedHandler getCompletedHandler() {
return completedHandler;
}
public void setCompletedHandler(ConfirmationCompletedHandler completedHandler) {
this.completedHandler = completedHandler;
}
} |
Great, it does work. I never worked with this serialization and only tried this annotation on the field, not the getter. Thank you for getting to the bottom of it! |
Cool! |
@emilm yeah that would work. |
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:@emilm Did you also encounter this issue?
The text was updated successfully, but these errors were encountered: