使用Eclipse Jetty插件(http://marketplace.eclipse.org/content/eclipse-jetty?mpc=true&mpc_state=)时,我开始收到以下错误:
An internal error occurred during: "Launching myProject".
Unknown scope: test,provided
这开始发生在Windows和MacOs X系统上的两个独立项目中。请注意,常规Jetty部署以及Jetty runner Maven插件的工作方式就像魅力一样,问题似乎只与Eclipse插件有关。将插件升级到最新版本后问题仍然存在。改变Jetty版本也无济于事。
编辑:感谢您的提示到目前为止。问题是这个问题的根源可能是什么,以及如何摆脱它。相关日志信息如下:
!ENTRY org.eclipse.core.jobs 4 2 2016-04-27 09:01:40.914
!MESSAGE在“启动myProject”期间发生内部错误。
!堆栈0 java.lang.IllegalArgumentException:未知范围:test,提供
at net.sourceforge.eclipsejetty.util.MavenScope.to(MavenScope.java:109)
at net.sourceforge.eclipsejetty.util.MavenDependencyInfo.create(MavenDependencyInfo.java:98)
at net.sourceforge.eclipsejetty.util.MavenDependencyInfoMap.resolve(MavenDependencyInfoMap.java:141)
at net.sourceforge.eclipsejetty.util.Dependency.create(Dependency.java:39)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.getOriginalClasspathEntries(JettyLaunchConfigurationDelegate.java:340)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.createJettyConfigurationFile(JettyLaunchConfigurationDelegate.java:791)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.getVMArguments(JettyLaunchConfigurationDelegate.java:217)
在org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:64)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.launch(JettyLaunchConfigurationDelegate.java:192)
在org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
在org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
在org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
在org.eclipse.debug.internal.ui.DebugUIPlugin $ 8.run(DebugUIPlugin.java:1256)
在org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
答案 0 :(得分:0)
尝试使用控制台和调试信息运行Eclipse以查看是否有更多错误详细信息:将@Bean
public MappingCouchbaseConverter mappingCouchbaseConverter() throws Exception {
return new MyMappingCouchbaseConverter(couchbaseMappingContext());
}
private class MyMappingCouchbaseConverter extends MappingCouchbaseConverter {
MyMappingCouchbaseConverter(MappingContext<? extends CouchbasePersistentEntity<?>, CouchbasePersistentProperty> mappingContext) {
super(mappingContext);
}
@Override
@SuppressWarnings("unchecked")
protected <R> R read(final TypeInformation<R> type, final CouchbaseDocument source, final Object parent) {
if (Object.class == typeMapper.readType(source, type).getType()) {
return (R) source.export();
} else {
return super.read(type, source, parent);
}
}
}
,-console
和-consoleLog
添加到-debug
以实现此目的。
答案 1 :(得分:-1)
尝试使用Run Jetty Run插件而不是Maven Jetty插件