无法从网址

时间:2016-09-05 04:07:25

标签: jhipster

我创建了一个带有数据源mongodb的微服务,并尝试在我的本地运行它。我的mongodb正在码头上运行。我可以从我当地访问mongodb。我得到了以下错误。有什么建议吗?

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)

1 个答案:

答案 0 :(得分:7)

可能会迟到但我得到了同样的问题并通过解决了 检查在类DatabaseConfiguration

中声明的包扫描更改日志
maven-resources-plugin

这里的示例包是&#34; com.jhipster.web.config.dbmigrations&#34;。转到该包并创建一个这样的类:

// package to scan for migrations 
mongobee.setChangeLogsScanPackage("com.jhipster.web.config.dbmigrations");

然后警告/错误就会消失。