我正在尝试使用Eclipse Oxygen在Gradle和Spring Boot中开发项目。我有最新的Gradle版本。我的系统在MAC 10.10.2(14C109)OS X Yosemite。
以下是有关该问题的详细信息。在创建项目时,Gradle用户主目录即将出现'未知'在最后一页我附上了它的图像:
$gradle -version
------------------------------------------------------------
Gradle 4.3.1
------------------------------------------------------------
Build time: 2017-11-08 08:59:45 UTC
Revision: e4f4804807ef7c2829da51877861ff06e07e006d
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 9.0.1 (Oracle Corporation 9.0.1+11)
OS: Mac OS X 10.10.2 x86_64
错误进入日食 以下内容将发送至:Eclipse
REPORT
anonymousId a9e8db44-ee8e-4012-9e8e-302774ee01b3
name Taushif
email
comment
eclipseBuildId 4.7.1.M20171009-0410
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 9.0.1+11
osgiWs cocoa
osgiOs MacOSX
osgiOsVersion 10.10.2
osgiArch x86_64
severity UNKNOWN
STATUS
pluginId org.eclipse.ui
pluginVersion 3.109.0.v20170411-1742
code 0
severity 4
message Unhandled event loop exception
fingerprint 2d8cf2c7a5898a92b35629394884ede6
Exception:java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'.
at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:70)
at org.gradle.api.JavaVersion.current(JavaVersion.java:80)
at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(UnsupportedJavaRuntimeException.java:29)
at org.gradle.tooling.internal.consumer.ConnectorServices.checkJavaVersion(ConnectorServices.java:57)
at org.gradle.tooling.internal.consumer.ConnectorServices.createCancellationTokenSource(ConnectorServices.java:39)
at org.gradle.tooling.GradleConnector.newCancellationTokenSource(GradleConnector.java:95)
at org.eclipse.buildship.core.util.progress.ToolingApiJob.<init>(ToolingApiJob.java:57)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.<init>(SynchronizeGradleBuildsJob.java:46)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.forSingleGradleBuild(SynchronizeGradleBuildsJob.java:122)
at org.eclipse.buildship.core.workspace.internal.DefaultGradleBuild.synchronize(DefaultGradleBuild.java:58)
at org.eclipse.buildship.ui.wizard.project.ProjectImportWizardController.performImportProject(ProjectImportWizardController.java:167)
at org.eclipse.buildship.ui.wizard.project.ProjectCreationWizard.performFinish(ProjectCreationWizard.java:180)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:778)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:417)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4257)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4081)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:390)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:151)
at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:161)
at org.eclipse.ui.actions.NewWizardDropDownAction.run(NewWizardDropDownAction.java:175)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4257)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4081)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
BUNDLES
name org.eclipse.buildship.core
version 2.1.2.v20170807-1324
name org.eclipse.buildship.ui
version 2.1.2.v20170807-1324
name org.eclipse.core.commands
version 3.9.0.v20170530-1048
name org.eclipse.core.databinding.observable
version 1.6.100.v20170515-1119
name org.eclipse.core.databinding
version 1.6.100.v20170515-1119
name org.eclipse.core.runtime
version 3.13.0.v20170207-1030
name org.eclipse.e4.core.commands
version 0.12.100.v20170513-0428
name org.eclipse.e4.core.contexts
version 1.6.0.v20170322-1144
name org.eclipse.e4.core.di
version 1.6.100.v20170421-1418
name org.eclipse.e4.ui.workbench
version 1.5.1.v20170815-1446
name org.eclipse.e4.ui.workbench.swt
version 0.14.101.v20170710-1119
name org.eclipse.equinox.app
version 1.3.400.v20150715-1528
name org.eclipse.equinox.launcher
version 1.4.0.v20161219-1356
name org.eclipse.jface
version 3.13.1.v20170810-0135
name org.eclipse.swt
version 3.106.1.v20170926-0519
name org.eclipse.ui
version 3.109.0.v20170411-1742
name org.eclipse.ui.ide.application
version 1.2.0.v20170512-1452
name org.eclipse.ui.ide
version 3.13.1.v20170822-1526
注意 不确定有什么帮助,但这一点得到了解决。我做了两件事: - 我在日食工作区从终端运行了gradle命令。 2.更新了来自eclipse ide的Buildship gradle集成。
答案 0 :(得分:0)
Buildship团队发布了一个修复此问题的里程碑2.2版本。
您可以在eclipse中安装里程碑2.2。帮助&gt;安装新软件...&gt;使用:http://download.eclipse.org/buildship/updates/e47/milestones/2.x&gt;选择最新版本&gt;完成
或者您可以等到Buildship的官方2.2版本并更新Buildship插件。
里程碑公告:https://discuss.gradle.org/t/buildship-2-2-milestone-is-now-available/24551
答案 1 :(得分:0)
您必须安装Buildship from Eclipse Marketplace并更改构建脚本(以便将具有意外行为的gradle eclipse插件修复为Java 9):
public ValueEntity getAttributeValue(String token, Long objectId, Integer attrId, Date bankDate) throws SQLException, IOException{
try{
createContext(token,true);
ocstmt.close();
ocstmt = (OracleCallableStatement) oracleConnection.prepareCall("{ ? = call package.get_val(?,?,?) }");
ocstmt.registerOutParameter(1, OracleTypes.STRUCT, "T_VAL");
setLong(2, objectId);
setInt(3, attrId);
setDate(4, bankDate);
ocstmt.setQueryTimeout(200);
ocstmt.execute();
return DBUtil.ComplexTypeMapping.getValueEntity(oracleConnection, (Struct)ocstmt.getObject(1));
}finally{
releaseAllResources(false);
}
}
public static ValueEntity getValueEntity(OracleConnection connection, Struct struct) throws SQLException, IOException{
if(struct == null) return null;
Object[] attrs = struct.getAttributes();
ValueEntity data = new ValueEntity();
data.setType(bigdecimalAsInteger((BigDecimal)attrs[0]));
data.setNum(bigdecimalAsDouble((BigDecimal)attrs[1]));
data.setStr(attrs[2] != null?String.valueOf(attrs[2]):null);
data.setDate((Date)attrs[3]);
//Clob clobAttr= (Clob)attrs[4];
//long clobLength= clobAttr.length();
//data.setClob( String.valueOf(clobLength));
data.setClob(getClobAsString((Clob)attrs[4]));
data.setNumArr(getDoubleArray((Array)attrs[5]));
data.setStrArr(getStringArray((Array)attrs[6]));
data.setDateArr(getDateArray((Array)attrs[7]));
return data;
}