paymill / paymill-java

Java wrapper for Paymill API
http://paymill.github.io
MIT License
26 stars 22 forks source link

JRE version #72

Open courteous opened 4 years ago

courteous commented 4 years ago

which JRE is the code compatible with? I was not able to find the java version in the pom file. I am currently running:

java --version
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

and i am getting

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: java.lang.IllegalStateException: InjectionManagerFactory not found.
        at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:74)
        at java.base/java.util.Optional.orElseThrow(Optional.java:408)
        at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:74)
        at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:44)
        at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:412)
        at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317)
        at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:807)
        at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:262)
        at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:119)
        at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:88)
        at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:84)
        at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:75)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:421)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:327)
        at com.paymill.utils.JerseyClient.post(JerseyClient.java:59)
        at com.paymill.services.RestfulUtils.create(RestfulUtils.java:47)
        at com.paymill.services.ClientService.createWithEmailAndDescription(ClientService.java:139)
        at com.paymill.services.ClientService.createWithDescription(ClientService.java:121)
        at payMill.PayMillApplication.main(PayMillApplication.java:47)
        ... 8 more

on a simple example like. :

    PaymillContext payMillContext = new PaymillContext("_MY_KEY_HERE_");
    ClientService clientService = payMillContext.getClientService();
    Client client = clientService.createWithDescription( "Sample Client" );
    System.out.println( "Client '" + client.getId() + "' created with description:" + client.getDescription() );

shell this be runner only with version 8 and below from oracle or is this compatible with the openjdk?

courteous commented 4 years ago

fixed is here

https://stackoverflow.com/questions/44088493/jersey-stopped-working-with-injectionmanagerfactory-not-found