Re: Anyone successfully using VDP Playground with Java 11?

sbyrd_eeft
Regular Visitor

Anyone successfully using VDP Playground with Java 11?

Trying to launch the VDP Playground.  I'm getting the same error I've noticed several others received:

Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException

 

The "solution" always seemed to point to making sure you were at least at Java 8.  But no mention if higher versions were acceptable.

 

Sam

8 REPLIES 8
sbyrd_eeft
Regular Visitor

Re: Anyone successfully using VDP Playground with Java 11?

Well, I'm not running it in my ide, I'm running it from the command line like their instructions give.

 

java -jar vdpplayground.jar

The "missing" class is in a jar within the jar so it should be in the classpath

 

I've also tried java -classpath vdpplayground.jar -jar vdpplayground.jar

And have even tried "cracking" the jar to put the jar in question explicitly on the classpath

 

I agree that java 8+ "should" work, but I know some older things don't play nice with Java 11 so I figured I'd ask.

jenn_kh
Community Moderator

Re: Anyone successfully using VDP Playground with Java 11?

Hi @sbyrd_eeftThank you for reaching out. An agent is looking into this and will get back to you soon. Until then, if any community member knows a solution, please respond to this thread.

Joshuacarol
Regular Visitor

Re: Anyone successfully using VDP Playground with Java 11?

The VDP Playground appears to have compatibility requirements that specify using Java 1.8 or above. However, issues have been noted when using Java 11, which may require additional configuration or dependencies not present by default in the Java 11 environment

API_Products
Visa Developer Support Specialist

Re: Anyone successfully using VDP Playground with Java 11?

Hi @sbyrd_eeft,

 

When you download the VDP Playground testing tool you'll also receive a text file that outlines its requirements for use. Please refer to that. Please let us know if the error persists, I'll be happy to help. 




Thanks,

Diana H.



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

Vito
Regular Visitor

Re: Anyone successfully using VDP Playground with Java 11?

I have the same issue:

 

PS D:\vdpplayground\vdpplayground> D:\openjdk-18+36_windows-x64_bin\jdk-18\bin\java.exe -jar .\vdpplayground.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:488)
at java.base/java.lang.Class.forName(Class.java:467)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more

 

As far as I can tell by googling and from stackoverflow answers, I appear to be missing a library https://github.com/stleary/JSON-java 

Vito
Regular Visitor

Re: Anyone successfully using VDP Playground with Java 11?

Nevermind, I grabbed the explicit Java 1.8 SDK (example: https://www.openlogic.com/openjdk-downloads?field_java_parent_version_target_id=416&field_operating_...) and that solved it.

sbyrd_eeft
Regular Visitor

Re: Anyone successfully using VDP Playground with Java 11?

That was my solution too, I have another utility that requires 1.8 so I keep an old copy around, but was hoping to be able to not have to jump through hoops.

API_Products
Visa Developer Support Specialist

Re: Anyone successfully using VDP Playground with Java 11?

Hey @Vito & @sbyrd_eeft,

 

Excellent news! Thanks for letting us know how you both solved the problem. 




Thanks,

Diana H.



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.