ebics-java / ebics-java-client

Java open source EBICS client - Support for French, German and Swiss banks
GNU Lesser General Public License v2.1
36 stars 35 forks source link

ExceptionInitializerError #24

Open cyrilfr opened 2 years ago

cyrilfr commented 2 years ago

An exception is thrown when I try to fetch files:

Uncaught error from thread [application-akka.actor.default-dispatcher-3]: null, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[application] java.lang.ExceptionInInitializerError at org.kopi.ebics.xml.InitializationResponseElement.build(InitializationResponseElement.java:58) at org.kopi.ebics.xml.DownloadInitializationResponseElement.build(DownloadInitializationResponseElement.java:62) at org.kopi.ebics.client.FileTransfer.fetchFile(FileTransfer.java:211) at org.kopi.ebics.client.EbicsClient.fetchFile(EbicsClient.java:419) at org.kopi.ebics.client.EbicsClient.fetchFile(EbicsClient.java:431) at services.payment.EbicsClient.fetchCamt054(EbicsClient.java:100) at modules.UserChecker.fetchCamt054(UserCheckerModule.java:177) at modules.UserChecker.checkRefills(UserCheckerModule.java:124) at akka.actor.LightArrayRevolverScheduler$$anon$2$$anon$1.run(LightArrayRevolverScheduler.scala:102) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: java.lang.RuntimeException: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 091115 at org.kopi.ebics.messages.Messages.getString(Messages.java:71) at org.kopi.ebics.exception.ReturnCode.create(ReturnCode.java:193) at org.kopi.ebics.exception.ReturnCode.(ReturnCode.java:186) ... 15 more Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 091115 at java.util.ResourceBundle.getObject(ResourceBundle.java:450) at java.util.ResourceBundle.getString(ResourceBundle.java:407) at org.kopi.ebics.messages.Messages.getString(Messages.java:69) ... 17 more 2021-10-04 18:15:02,650 [ERROR] from a.a.ActorSystemImpl - Uncaught error from thread [application-akka.actor.default-dispatcher-3]: null, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application] java.lang.ExceptionInInitializerError: null

String fileName = "ebics-"
        + configuration.getString("provider.coordinates.name")
        + "-"
        + LocalDateTime.now()
        + ".camt.054.zip";
File c54Zip = new File(C54_DIR, fileName);

EbicsClient client = EbicsClient
        .createEbicsClient("ebics", "file.camt);
client.loadDefaultUser();
client.fetchFile(c54Zip, OrderType.C54, null, null);

I'm using the JitPack maven with the last build. It used to work with commit https://github.com/ebics-java/ebics-java-client/commit/41fbb381559ea2bab0a60d0e23aa06eb4997d59c

cyrilfr commented 2 years ago

It seems that the server returns an error code 091115. It's not clear in the Exception output. It means that the orderId created has already been used before. In fact, if the orderId is not sent (which is the case for DownloadInitializationRequestElement.java if request type is not FDL line 132):

  //FIXME Some banks cannot handle OrderID element in download process. Add parameter in configuration!!!
  orderDetails = EbicsXmlFactory.createStaticHeaderOrderDetailsType(null,//session.getUser().getPartner().nextOrderId(),
                                                                OrderAttributeType.DZHNN,
                                                                orderType,
                                                                standardOrderParamsType);

Thus, the client is not synchronized, leading in this situation... I perform the request to Credit Suisse.

cyrilfr commented 1 year ago

Any fix for this issue? This makes the EBICS Java Client unusable basically...

Here is the exception in command line mode for a HPB request:

java.lang.ExceptionInInitializerError
    at org.kopi.ebics.xml.KeyManagementResponseElement.build (KeyManagementResponseElement.java:75)
    at org.kopi.ebics.client.KeyManagement.sendHPB (KeyManagement.java:145)
    at org.kopi.ebics.client.EbicsClient.sendHPBRequest (EbicsClient.java:353)
    at org.kopi.ebics.client.EbicsClient.main (EbicsClient.java:650)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.lang.RuntimeException: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 091115
    at org.kopi.ebics.messages.Messages.getString (Messages.java:71)
    at org.kopi.ebics.exception.ReturnCode.create (ReturnCode.java:193)
    at org.kopi.ebics.exception.ReturnCode.<clinit> (ReturnCode.java:186)
    at org.kopi.ebics.xml.KeyManagementResponseElement.build (KeyManagementResponseElement.java:75)
    at org.kopi.ebics.client.KeyManagement.sendHPB (KeyManagement.java:145)
    at org.kopi.ebics.client.EbicsClient.sendHPBRequest (EbicsClient.java:353)
    at org.kopi.ebics.client.EbicsClient.main (EbicsClient.java:650)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 091115
    at java.util.ResourceBundle.getObject (ResourceBundle.java:564)
    at java.util.ResourceBundle.getString (ResourceBundle.java:521)
    at org.kopi.ebics.messages.Messages.getString (Messages.java:69)
    at org.kopi.ebics.exception.ReturnCode.create (ReturnCode.java:193)
    at org.kopi.ebics.exception.ReturnCode.<clinit> (ReturnCode.java:186)
    at org.kopi.ebics.xml.KeyManagementResponseElement.build (KeyManagementResponseElement.java:75)
    at org.kopi.ebics.client.KeyManagement.sendHPB (KeyManagement.java:145)
    at org.kopi.ebics.client.EbicsClient.sendHPBRequest (EbicsClient.java:353)
    at org.kopi.ebics.client.EbicsClient.main (EbicsClient.java:650)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:829)