I created a microservice with data source mongodb and tried run it on my local. My mongodb is running on docker. I can access mongodb from my local. I got below error. Any suggestion?
2016-09-04 20:56:50.029 WARN 46100 --- [ 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<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> 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.<init>(Reflections.java:128)
at org.reflections.Reflections.<init>(Reflections.java:169)
at org.reflections.Reflections.<init>(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)
It may be late but I got the same issue and solved it by checking package scan change logs declared in class DatabaseConfiguration
// package to scan for migrations
mongobee.setChangeLogsScanPackage("com.jhipster.web.config.dbmigrations");
Example here package is "com.jhipster.web.config.dbmigrations". Go to that package and create a class like this:
package com.jhipster.web.config.dbmigrations;
import com.github.mongobee.changeset.ChangeLog;
@ChangeLog
public class DatabaseChangelog {
}
Then the warning/error will gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With