无法在Eclipse Neon中添加云系统

2020-09-19 07:00发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)你好 ...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好

我正在尝试在我的云平台子帐户中连接数据库。 我正在尝试使用pyhdb和eclipse通过python连接。 无法连接到数据库。 在python代码中是

连接= pyhdb.connect(
     host =" us2.hana.ondemand.com",
     端口= 30115,
     user =" I86 ****",
     密码=" * as ** o ** d"
 )

 cursor = connection.cursor()

错误:

" TimeoutError:[WinError 10060]连接尝试失败,因为一段时间后连接方未正确响应,或者由于连接的主机未能响应而建立连接失败"

在Eclipse

错误:

!ENTRY com.sap.cloud.tools.eclipse.hana.tunnel 4 0 2018-05-31 11:16:14.709!MESSAGE无法填充架构UI。 !STACK 0 com上org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:993)上org.eclipse.jface.operation.ModalContext.run(ModalContext.java:398)处的org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:993)处的java.lang.reflect.InvocationTargetException .sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionSchemasWizardPage.fetchSchemasAndDbs(CloudSystemConnectionSchemasWizardPage.java:261)位于com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionWizard.nextPressed(CloudSystemConnectionWizard。 197)com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionHandler $ 1.nextPressed(CloudSystemConnectionHandler.java:26)org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:419) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)上的org.eclipse.jface.dialogs.Dialog $ 2.widgetSelected(Dialog.java:618)在org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:84)在org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)在org.eclipse.swt.widgets.Widget.sendEvent(Wid get.java:1079)位于org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)位于org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)位于org.eclipse.jface org.eclipse.jface.window.Window.open(Window.java:794)上的.window.Window.runEventLoop(Window.java:818)在com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionHandler org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)上的.execute(CloudSystemConnectionHandler.java:31)org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90) ),位于org.eclipse.e4.core.internal的java.lang.reflect.Method.invoke(未知源)的sun.reflect.DelegatingMethodAccessorImpl.invoke(未知源)的sun.reflect.GeneratedMethodAccessor50.invoke(未知源)。 org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)的di.MethodRequestor.execute(MethodRequestor.java:55)在org.eclipse.e4.core.internal.di.InjectorImpl。 在或处调用(InjectorImpl.java:264) g.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)在org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)在org.eclipse.core。 org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)处的command.Command.executeWithChecks(Command.java:494)org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl。 org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)处的org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem。 java:454)位于org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem $ 3.handleEvent(AbstractContributionItem.java:482)位于org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Widget.se上的org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)的org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)的ndEvent(Widget.java:1079) .e4.ui.internal.workbench.swt.PartRenderingEngine $ 4.run(PartRenderingEngine.java:1121)在org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)在org.eclipse.e4。 org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)的ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)在org.eclipse.ui.internal。 在org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)在org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)上的Workbench $ 5.run(Workbench.java:693) ),位于org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)的org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)的org.eclipse.ui.createAndRunWorkbench(PlatformUI.java:148)处。 app.EclipseAppHandle.run(EclipseAppHandle.java:1 96)在org.org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)在org.org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)在org 位于org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)的.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)位于sun.reflect.NativeMethodAccessorImpl.invoke0(Native org.eclipse.equinox.launcher.Main处java.lang.reflect.Method.invoke处sun.reflect.DelegatingMethodAccessorImpl.invoke(未知源)处的sun.reflect.NativeMethodAccessorImpl.invoke(未知源)处的方法(未知源) org.eclipse.equinox.launcher上的.invokeFramework(Main.java:673).org.eclipse.equinox.launcher.Main.run(Main.java:1519)上的Main.basicRun(Main.java:610) java.lang.RuntimeException:与主机" us2.hana.ondemand.com"的连接失败。 在com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionSchemasWizardPage $ 5.run(CloudSystemConnectionSchemasWizardPage.java:304)在org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:119) 创建人:com.sap.core.utils.infrastructure.validation.AuthenticationException:错误的凭据。 输入正确的用户名和密码。 请注意,您的用户将在连续5次失败的身份验证尝试后被锁定。 com.sap.core.utils.infrastructure.validation.LandscapeHostValidator.validateHttpResponseStatus(LandscapeHostValidator.java:430)处com.sap.core.utils.infrastructure.validation.HttpResponseValidator.process(HttpResponseValidator.java:36)处 org.apache上的.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:139)。org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector)上的HTTPProcess.Http.Protocol.HttpRequestExecutor.postProcess(HttpRequestExecutor.java:308) .java:495)(位于org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)(位于org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82))。 org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)上的apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)在com.sap.core.tunnelcommands.framework处。 executor.CommandTunnelRequestExecutor.executeRequest(CommandTunnelRequestExecutor.java:6 0)位于com.sap.core.persistence.commands.schema.api.ListSchemaAndDbmsHandler.listSchemas(ListSchemaAndDbmsHandler.java:134)处的com.sap.core.tunnelcommands.framework.executor.CommandTunnelRequestExecutor.executeRequest(CommandTunnelRequestExecutor.java:39) 在com.sap.core.persistence.commands.schema.api.ListAllTunnelEndpointsHandler.listAllTunnelEndpoints(ListAllTunnelEndpointsHandler.com.sap.core.persistence.commands.schema.api.ListSchemaAndDbmsHandler.listSharedSchemas(ListSchemaAndDbmsHandler.java:94) com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemHelper.fetchDb(CloudSystemHelper.java:219)com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionSchemasWizardPage $ 5.run(CloudSystemConnectionSchemasWizardPage .java:267)...还有1个根异常:java.lang.RuntimeException:与主机" us2.hana.ondemand.com"的连接失败。 在com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionSchemasWizardPage $ 5.run(CloudSystemConnectionSchemasWizardPage.java:304)在org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:119) 创建人:com.sap.core.utils.infrastructure.validation.AuthenticationException:错误的凭据。 输入正确的用户名和密码。 请注意,您的用户将在连续5次失败的身份验证尝试后被锁定。 com.sap.core.utils.infrastructure.validation.LandscapeHostValidator.validateHttpResponseStatus(LandscapeHostValidator.java:430)处com.sap.core.utils.infrastructure.validation.HttpResponseValidator.process(HttpResponseValidator.java:36)处 org.apache上的.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:139)。org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector)上的HTTPProcess.Http.Protocol.HttpRequestExecutor.postProcess(HttpRequestExecutor.java:308) .java:495)(位于org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)(位于org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82))。 org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)上的apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)在com.sap.core.tunnelcommands.framework处。 executor.CommandTunnelRequestExecutor.executeRequest(CommandTunnelRequestExecutor.java:6 0)位于com.sap.core.persistence.commands.schema.api.ListSchemaAndDbmsHandler.listSchemas(ListSchemaAndDbmsHandler.java:134)处的com.sap.core.tunnelcommands.framework.executor.CommandTunnelRequestExecutor.executeRequest(CommandTunnelRequestExecutor.java:39) 在com.sap.core.persistence.commands.schema.api.ListAllTunnelEndpointsHandler.listAllTunnelEndpoints(ListAllTunnelEndpointsHandler.com.sap.core.persistence.commands.schema.api.ListSchemaAndDbmsHandler.listSharedSchemas(ListSchemaAndDbmsHandler.java:94) com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemHelper.fetchDb(CloudSystemHelper.java:219)com.sap.cloud.tools.eclipse.hana.tunnel.ui.CloudSystemConnectionSchemasWizardPage $ 5.run(CloudSystemConnectionSchemasWizardPage .java:267)...还有1个

我能够从SAP HANA基于Web的开发工作台访问数据库。 请帮助我连接到hana数据库。

感谢与问候

Shreesha

(238.3 kB)
6条回答
悻福寶寶
2020-09-19 07:05

Hi Florain,

非常感谢您的精确解释。 关于Eclipse,您是对的。 我正在混淆信息。 现在,我可以添加一个云系统。 问题是我正在子帐户名称字段中输入子帐户的显示名称。

在python中,我现在可以连接到数据库。 我可以从SELECT查询中正确获得结果,即使UPDATE表查询也可以正确执行,但是在基于Web的工作台或Eclipse中我看不到表中的那些值。

用于连接数据库的python代码是

#到SAP HANA实例的云连接器

 连接= pyhdb.connect(
host =" localhost",
port = 30015,
user =" I86 ****",
password =" mypassword")

游标= connection.cursor() #####下面的语句执行无错误。 但看不到DB ######中的行 cursor.execute(" UPDATE TESTDB.URLLINKS SET linkurl ='www.link.com'WHERE si = 1") #####但是我可以使用选择查询来获取数据################################

connection.commit()

如果我在这里做错了任何事情,请告诉我。

还有什么方法可以将eclipse中的Java应用程序直接连接到Hana DB,以便我们可以轻松地调试东西?

我正在使用下面的Java代码现在连接到数据库

 DbUtil.ds =(数据源)(新的InitialContext())。lookup(" java:comp/env/jdbc/DefaultDB"); 

非常感谢。

此致

Shreesha

 

一周热门 更多>