DataGenerator addon :java.lang.IllegalArgumentException: Could not create URL from URI: jar🫙file

Hi Team,

An exception will occurs when run UberJAR that include the DataGenerator Addon:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datagen_FakerService' defined in URL [jar:file:/Users/linfeng/code/cuba/cuba-study/build/distributions/uberJar/app.jar!/LIB-INF/app-core/WEB-INF/classes/com/haulmont/addon/datagen/service/FakerServiceBean.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.haulmont.addon.datagen.service.FakerServiceBean]: Constructor threw exception; nested exception is java.net.MalformedURLException: no !/ in spec at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:304) ~[shared/:na] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:171) ~[shared/:na] at .... Caused by: java.lang.NullPointerException: no !/ in spec at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Handler.java:171) ~[na:1.8.0_192] at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:151) ~[na:1.8.0_192] at java.net.URL.<init>(URL.java:622) ~[na:1.8.0_192] ... 68 common frames omitted 18:06:02.808 WARN o.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@6dbb137d{/app-core,jar:file:/Users/linfeng/code/cuba/cuba-study/build/distributions/uberJar/app.jar!/LIB-INF/app-core,UNAVAILABLE}

There is a project for testing : https://gitee.com/bytemind/cuba-study
The initial post is from Chinese forum: https://forum.cuba-platform.cn/t/topic/956

Please suggest.

Hi,
It seems Faker fails to initialize in uberJar due to its resource resolving issues (did not investigate yet).
I’ve just released a bugfix version 0.3.1 with temporary workaround (safe Faker initialization).