Closed Fabo09 closed 3 years ago
Hi,
It is unclear to me where this character 'e' comes from. Did you add your own resource bundle property files? In the files which are included with this ebics client the date format is defined as
Letter.dateFormat = dd.MM.yyyy
in src/main/resources/org/kopi/ebics/letter/messages_en.properties
And what Java version do you use?
Thanks for your answer
I did not changed anything. The Date Format is still the same. The File looks as:
#
#
#
#
#
#
Letter.bank = Bank:
Letter.date = Date:
Letter.dateFormat = dd.MM.yyyy
Letter.timeFormat = HH:mm
Letter.hostId = Host ID:
Letter.partnerId = Partner ID:
Letter.signature = Signature:
Letter.time = Time:
Letter.userId = User ID:
Letter.username = User Name:
Letter.version = Version:
INILetter.title = Initialization letter for signature certificate INILetter.version = A005 Signature INILetter.certificate = Electronic signature certificate: INILetter.digest = Signature certificate hash (SHA-256): INILetter.name = A005Letter
HIALetter.x002.title = Initialization letter for authentication certificate HIALetter.x002.version = X002 Authentication HIALetter.x002.certificate = Electronic authentication certificate: HIALetter.x002.digest = Authentication certificate hash (SHA-256): HIALetter.x002.name = X002Letter
HIALetter.e002.title = Initialization letter for encryption certificate HIALetter.e002.version = E002 Encryption HIALetter.e002.certificate = Electronic encryption certificate: HIALetter.e002.digest = Encryption certificate hash (SHA-256): HIALetter.e002.name = E002Letter
I also tried and changed all the original files (src\main\resources\org\kopi\ebics ) from fr to en. But i had the same issus.
My java Version is: Version 8 Update 251 (Build 1.8.0_251-b08). It's on Win10x64
I Found the problem
In the ebics.txt, i set the language code to de. After i changed that to en (or fr) it works fine. Is there a way to change it to DE (DE-DE). And let the progamm take files as messages_de.properties? if not i'll change the en file as a workaround.
Thanks for investigating this. I can reproduce the problem now and will work on a fix.
Yes you should be able to add a file "messages_de.properties" in the correct location (where the messages_en.properties" is)
src/main/resources/org/kopi/ebics/client/messages_en.properties
You need to do this for all the property files.
You can also set the default locale to english Locale.setDefault(Locale.ENGLISH);
, then it will automatically fallback to the english strings if there is no matching german translation.
I get following error when i try to execute the create command:
C:\Ebics\ebics-java-client-master>mvn exec:java -Dexec.mainClass=org.kopi.ebics.client.EbicsClient -Dexec.args="--create" [INFO] Scanning for projects... [INFO] [INFO] ---------------------------< org.kopi:ebics >--------------------------- [INFO] Building ebics 1.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ ebics --- 2020-05-27 20:29:04,855 INFO - !!init.configuration!! 2020-05-27 20:29:04,947 INFO - !!user.create.info!! 2020-05-27 20:29:06,508 INFO - !!user.create.directories!! 2020-05-27 20:29:07,120 ERROR - !!user.create.error!! java.lang.IllegalArgumentException: Illegal pattern character 'e' at java.base/java.text.SimpleDateFormat.compile(SimpleDateFormat.java:846) at java.base/java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:654) at java.base/java.text.SimpleDateFormat.(SimpleDateFormat.java:625)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.formatDate(AbstractInitLetter.java:359)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.buildHeader(AbstractInitLetter.java:249)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.build(AbstractInitLetter.java:221)
at org.kopi.ebics.letter.AbstractInitLetter.build(AbstractInitLetter.java:89)
at org.kopi.ebics.letter.A005Letter.create(A005Letter.java:62)
at org.kopi.ebics.letter.DefaultLetterManager.createA005Letter(DefaultLetterManager.java:56)
at org.kopi.ebics.client.EbicsClient.createLetters(EbicsClient.java:224)
at org.kopi.ebics.client.EbicsClient.createUser(EbicsClient.java:205)
at org.kopi.ebics.client.EbicsClient.createUser(EbicsClient.java:533)
at org.kopi.ebics.client.EbicsClient.createDefaultUser(EbicsClient.java:578)
at org.kopi.ebics.client.EbicsClient.main(EbicsClient.java:654)
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:564)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.base/java.lang.Thread.run(Thread.java:832)
[WARNING]
java.lang.IllegalArgumentException: Illegal pattern character 'e'
at java.text.SimpleDateFormat.compile (SimpleDateFormat.java:846)
at java.text.SimpleDateFormat.initialize (SimpleDateFormat.java:654)
at java.text.SimpleDateFormat. (SimpleDateFormat.java:625)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.formatDate (AbstractInitLetter.java:359)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.buildHeader (AbstractInitLetter.java:249)
at org.kopi.ebics.letter.AbstractInitLetter$Letter.build (AbstractInitLetter.java:221)
at org.kopi.ebics.letter.AbstractInitLetter.build (AbstractInitLetter.java:89)
at org.kopi.ebics.letter.A005Letter.create (A005Letter.java:62)
at org.kopi.ebics.letter.DefaultLetterManager.createA005Letter (DefaultLetterManager.java:56)
at org.kopi.ebics.client.EbicsClient.createLetters (EbicsClient.java:224)
at org.kopi.ebics.client.EbicsClient.createUser (EbicsClient.java:205)
at org.kopi.ebics.client.EbicsClient.createUser (EbicsClient.java:533)
at org.kopi.ebics.client.EbicsClient.createDefaultUser (EbicsClient.java:578)
at org.kopi.ebics.client.EbicsClient.main (EbicsClient.java:654)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:564)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
at java.lang.Thread.run (Thread.java:832)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.127 s
[INFO] Finished at: 2020-05-27T20:29:07+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project ebics: An exception occured while executing the Java class. Illegal pattern character 'e' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C:\Ebics\ebics-java-client-master>
After that i tried to send the INI and HIA command to the Bank. This was succesfull to swiss Postfinance.
Maybe someone can give me a hint for the error above.
Thanks a lot