gpt4 book ai didi

jhipster - 无法从 url 创建 Vfs.Dir

转载 作者:行者123 更新时间:2023-12-04 02:36:45 25 4
gpt4 key购买 nike

我使用数据源 mongodb 创建了一个微服务,并尝试在我的本地运行它。我的 mongodb 在 docker 上运行。我可以从本地访问 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)

最佳答案

可能晚了,但我遇到了同样的问题并通过以下方式解决了它
检查在类 DatabaseConfiguration 中声明的包扫描更改日志

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

这里的示例包是“com.jhipster.web.config.dbmigrations”。转到那个包并创建一个这样的类:
package com.jhipster.web.config.dbmigrations;
import com.github.mongobee.changeset.ChangeLog;

@ChangeLog
public class DatabaseChangelog {
}

然后警告/错误将消失。

关于jhipster - 无法从 url 创建 Vfs.Dir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39323801/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com