ngx-metaui / rules

One Framework to build a highly declarative and customizable UI without using templates.
Other
39 stars 8 forks source link

How to: setup ngx-metaui #38

Closed GregOnNet closed 4 years ago

GregOnNet commented 5 years ago

Hi @fkolar,

thanks for the awesome talk you gave in Munich. I struggle a bit getting MetaUI to work in my current project. Maybe you or one of your team mates can help out.

Thanks in advance Gregor

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

System

Tooling

Java

java --version
java 12.0.1 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

Angular

ng --version
Angular CLI: 8.1.1
Node: 10.15.3
OS: darwin x64
Angular: 8.1.1

Current behaviour

Expected behavior

Minimal reproduction of the problem with instructions

  WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (jar:file:/Users/gregor/workbench/scratch/angular/meta-ui-playground/node_modules/@ngx-metaui/rules/lib/resources/tools/oss/meta-ui-parser.jar!/BOOT-INF/lib/groovy-2.4.7.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-07-16 09:24:45.337 ERROR 82921 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'standardJacksonObjectMapperBuilderCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class]: Unsatisfied dependency expressed through method 'standardJacksonObjectMapperBuilderCustomizer' parameter 1: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at ariba.Application.main(Application.java:33) ~[classes!/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[meta-ui-parser.jar:na]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[meta-ui-parser.jar:na]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[meta-ui-parser.jar:na]
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) ~[meta-ui-parser.jar:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1214) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1054) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    ... 24 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
    at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:129) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
    at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:96) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
    at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:31) ~[hibernate-validator-5.2.4.Final.jar!/:5.2.4.Final]
    at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276) ~[validation-api-1.1.0.Final.jar!/:na]
    at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:248) ~[spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor$LocalValidatorFactory.run(ConfigurationPropertiesBindingPostProcessor.java:452) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.getValidator(ConfigurationPropertiesBindingPostProcessor.java:386) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.determineValidator(ConfigurationPropertiesBindingPostProcessor.java:369) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:331) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:302) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
    ... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationException
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436) ~[na:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[na:na]
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:89) ~[meta-ui-parser.jar:na]
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
    ... 48 common frames omitted

error Command failed with exit code 1.

What is the motivation / use case for changing the behavior?

fkolar commented 5 years ago

There is a new version 7.4.0, give it a try. It should be compatible with both v 1.8 and 12. I will try out later today.

There is a branch called compiler, where I started to work on bnf parser, so we can have all this in the TS and have both offline and runtime version.

Ideally we dont want to have this java thing in there at all. I would like to have the compiler above, or some kind of CLI extensions so I dont have to run it. I would like to have decorators as well so I dont need to use OSS for simple usecases. But this requires to have either:

Let' me know how it goes with your POC.

fkolar commented 5 years ago

552746d3392811f4ae7cfd9dc5618fe82f6a8a05 fixes the issue

fkolar commented 5 years ago

Reopening for Ng8..

fkolar commented 5 years ago

b547112a013f07f2ceca46c421129f3a91a6e9a7

fkolar commented 5 years ago

@GregOnNet Let's try to setup some git repo, to see if we can use this for your usecase and from this we can derive some leasson learn.

GregOnNet commented 5 years ago

Hi @fkolar,

sure lets have a call. At our project we came up with a whole different solution.

Nevertheless, I want to compare both approaches.

fkolar commented 5 years ago

@GregOnNet Usually I am available on Monday, Wed, Friday, The other have too many conf. calls and many things organize.

Soon it will be possible to stick with decorators for most of the cases and remove the java compiler. https://github.com/ngx-meta/rules/commits/compiler.

Let's jump to slack and we can setup a call. Either I can call you, I use zoom !

GregOnNet commented 5 years ago

I have zoom, too. Unfortunately, the Slack-Invitation-Link is not working for me.

Viele Grüße Gregor Woiwode Twitter https://twitter.com/GregOnNet, Medium https://medium.com/@gregor.woiwode, YouTube https://youtube.com/GregOnDevNet, GitHub https://github.com/GregOnNet.

📱 +49175 520 9316 📫 gregor.woiwode@gmail.com 🏡 Endersstr. 9, 04177 Leipzig

On Mon, 16 Sep 2019 at 23:12, Frantisek Kolar notifications@github.com wrote:

@GregOnNet https://github.com/GregOnNet Usually I am available on Monday, Wed, Friday, The other have too many conf. calls and many things organize.

Soon it will be possible to stick with decorators for most of the cases and remove the java compiler. https://github.com/ngx-meta/rules/commits/compiler.

Let's jump to slack https://join.slack.com/t/ngxmetaui/shared_invite/enQtNDcyNTUyNDE3NjIzLTVkYmVmNGNjMjVjMzMzNDNkOGMwMWVjNTRlNTE4NTA3ODdhM2U1ZjdlZDIzNjZkMmJhMTc5ODA5ZTU2MWE1Yjk and we can setup a call. Either I can call you, I use zoom !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ngx-meta/rules/issues/38?email_source=notifications&email_token=AADMO5WXRQ3SWUX6KLAFCS3QJ7ZFNA5CNFSM4ID55AIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD62RFEY#issuecomment-531960467, or mute the thread https://github.com/notifications/unsubscribe-auth/AADMO5VROPC3SY545GCMXR3QJ7ZFNANCNFSM4ID55AIA .

fkolar commented 5 years ago

It looks like the link expired:

https://join.slack.com/t/ngxmetaui/shared_invite/enQtNzYyMTkxMjIzMDQ0LTcyYTM0ZTI5M2Y2NzQzMzk0ZGI5Mzg2OTUxNmFlZjgzZTc0Mzk0NTliMWU0ZmQwMmI4MTA0NDg1OWJkMjQzN2E

GregOnNet commented 4 years ago

Closing this, since getting started technically works now. 👍