Skip to content
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

java.lang.ClassCastException occurred. #88

Open
freest4r opened this issue Apr 14, 2022 · 0 comments
Open

java.lang.ClassCastException occurred. #88

freest4r opened this issue Apr 14, 2022 · 0 comments

Comments

@freest4r
Copy link

RISE_SECC_log.txt
ChargeParameterDiscoveryReq.txt

Recently I'm working on testing ISO 15118-2.
Thanks to RISE, I can do my research well. thank you.

To test rise-v2g-secc-1.2.6.jar, I implement EVCC that transmits unexpected XMLs.
In this process, I found several errors and today I would like to report the one of the errors.

In "ChargeParameterDiscoveryReq" step,
if "DepartureTime" of "AC_EVChargeParameter" is empty (ns3:DepartureTime</ns3:DepartureTime>),
RuntimeException is occurred in rise-v2g-secc-1.2.6.jar.
but it's OK because rise-v2g-secc-1.2.6.jar send "FAILED_SequenceError" to EVCC.

At this time,
If EVCC connect to rise-v2g-secc-1.2.6.jar and send normal SupportedAppProtocolReq,
then "java.lang.ClassCastException" is occurred.

The exception message is like below:

java.lang.ClassCastException: class com.v2gclarity.risev2g.shared.v2gMessages.appProtocol.AppProtocolType cannot be cast to class javax.xml.bind.JAXBElement (com.v2gclarity.risev2g.shared.v2gMessages.appProtocol.AppProtocolType and javax.xml.bind.JAXBElement are in unnamed module of loader 'app')

Then, rise-v2g-secc-1.2.6.jar send "Failed_NoNegotiation" to the EVCC.
Even though the SupportedAppProtocolReq message was normal.

I'm not sure why it happens,
but I attached logs and ChargeParameterDiscoveryReq.xml files.

In summary, the reproduce process is as follows:

  1. run rise-v2g-secc-1.2.6.jar
  2. EVCC connect to the rise-v2g-secc-1.2.6.jar and continues the process normally until the ChargeParameterDiscoveryReq step.
  3. At ChargeParameterDiscoveryReq step, send attached ChargeParameterDiscoveryReq.xml file to rise-v2g-secc-1.2.6.jar.
  4. java.lang.RuntimeException occurred -> FAILED_SequenceError -> Connection closed
  5. EVCC connect to the rise-v2g-secc-1.2.6.jar again and send normal SupportedAppProtocolReq message.
  6. java.lang.ClassCastException occurred -> Failed_NoNegotiation -> connection closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant