christian-schlichtherle / truelicense

An open source engine for license management on the Java Virtual Machine.
https://truelicense.namespace.global
Apache License 2.0
335 stars 68 forks source link

de.schlichtherle.xml.PersistenceServiceException: java.lang.StackOverflowError: [no exception stack trace available because exception is thrown from code that must be allocation free] #39

Open 115305411 opened 3 months ago

115305411 commented 3 months ago

env: graavm 17 springboot 3.3.2 truelicense-core 1.33

de.schlichtherle.xml.PersistenceServiceException: java.lang.StackOverflowError: [no exception stack trace available because exception is thrown from code that must be allocation free] at de.schlichtherle.xml.PersistenceService.store(PersistenceService.java:222) ~[na:na] at de.schlichtherle.xml.PersistenceService.store2ByteArray(PersistenceService.java:315) ~[na:na] at de.schlichtherle.xml.GenericCertificate.sign(GenericCertificate.java:281) ~[na:na] at de.schlichtherle.license.LicenseNotary.sign(LicenseNotary.java:205) ~[na:na] at de.schlichtherle.license.LicenseNotary.sign(LicenseNotary.java:170) ~[na:na] at de.schlichtherle.license.LicenseManager.create(LicenseManager.java:360) ~[na:na] at de.schlichtherle.license.LicenseManager.store(LicenseManager.java:303) ~[na:na] at de.schlichtherle.license.LicenseManager.store(LicenseManager.java:272) ~[na:na]

christian-schlichtherle commented 2 months ago

I don't see a loop here, so it may be that the stack is simply just too small for your application. Try increasing it, e.g. java -Xss1m MyApp

115305411 commented 2 days ago

I'm sorry I only saw the question you answered now. I have tried adjusting the Xss properties. There is no such problem in jar mode, I think it's because I used native image to compile jar files into binary files, which caused the bug