jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

Missing dependency commons-vfs2/2‌​.0 with uaa #4071

Closed raywang8341 closed 8 years ago

raywang8341 commented 8 years ago

Hi, I followed this example to generate microservice. My current Jhipster version is 3.6.1. I got below error:

WARN 43029 --- [ main] org.reflections.Reflections : could not create Dir using commons_vfs2 from url file:/System/Library/Java/Extensions/libJ3DAudio.jnilib. skipping. java.lang.NoClassDefFoundError: org/apache/commons/vfs2/VFS at org.reflections.vfs.Vfs$DefaultUrlTypes$7.matches(Vfs.java:2‌​81)

After Gaël Marziou suggested on stackoverflow. I added commons-vfs2/2‌​.0 dependency in my pom file and build again. but got another error:

Stack trace ``` 2016-09-04 20:18:33.692 WARN 45494 --- [ main] org.reflections.Reflections : could not create Vfs.Dir from url. ignoring the exception and continuing org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/System/Library/Java/Extensions/libJ3DAudio.jnilib] either use fromURL(final URL url, final List urlTypes) or use the static setDefaultURLTypes(final List urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType. at org.reflections.vfs.Vfs.fromURL(Vfs.java:108) at org.reflections.vfs.Vfs.fromURL(Vfs.java:90) at org.reflections.Reflections.scan(Reflections.java:236) at org.reflections.Reflections.scan(Reflections.java:203) at org.reflections.Reflections.(Reflections.java:128) at org.reflections.Reflections.(Reflections.java:169) at org.reflections.Reflections.(Reflections.java:142) at com.github.mongobee.utils.ChangeService.fetchChangeLogs(ChangeService.java:43) at com.github.mongobee.Mongobee.execute(Mongobee.java:142) at com.github.mongobee.Mongobee.afterPropertiesSet(Mongobee.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) at com.xx.cloud.demo.ResourceApp.main(ResourceApp.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:483) at java.lang.Thread.run(Thread.java:745) ```

The example I followed is here: https://simplestepsolutions.wordpress.com/2016/07/27/jhipster-3-5-1-microservices-with-uaa/

gmarziou commented 8 years ago

I'm leaving for holiday tomorrow. The original issue on SO was about MongoDb misconfiguration on a gateway; after fixing it, it's now about missing classes with UAA, so maybe @sdoxsee can help as I haven't got into UAA yet.

I'am also wondering whether there could be a problem with generation of application-prod.yml for a Gateway using MongoDB

gmarziou commented 8 years ago

User has since created a new question on SO: https://stackoverflow.com/questions/39323801/could-not-create-vfs-dir-from-url

jdubois commented 8 years ago

Cross posting is not cool :-(

jdubois commented 8 years ago

Closing this as I don't want to have cross posts: it's either an issue, or a question, but not both. That's not nice for other people looking for answers.

raywang8341 commented 8 years ago

Sorry for misunderstanding. this issue was created for Missing dependency commons-vfs2/2‌​.0. I will close it since I have post a related thread on stackoverflow. Have a nice holiday.