我真的很喜欢这里。 Anylogic现在有几天给我数据库连接问题,直到现在支持才能帮助我
我在这里得到的是一个运行最新Win10和Anylogic 7.3专业版的Windows mashine
我的Anylogic模型是完全本地的,并且在我尝试添加数据库表之前运行完美。如上所述,Anylogic每次尝试插入表时都会要求我重新连接数据库。按“连接”按钮不执行任何操作,但会再次显示相同的窗口。按取消会显示以下错误消息:
与Anylogic支持一起,我已经尝试禁用防病毒,发送日志等。到目前为止没有任何帮助。我已经尝试重新安装整个程序,包括thourough clean(所有.Anylogic文件夹,文件......)。
我现在还不知道还有什么可做的。我希望你们中的任何一个人都可以提供帮助。
!ENTRY org.eclipse.ui 4 0 2016-12-21 13:48:02.168
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: java.sql.SQLException: Connection timed out
at com.anylogic.objectmodel.commands.database.AbstractDatabaseCommand.execute(Unknown Source)
at com.anylogic.objectmodel.commands.CompoundCommand.execute(Unknown Source)
at com.anylogic.objectmodel.commands.BasicCommandStack.execute(Unknown Source)
at com.anylogic.objectmodel.commands.CommandStack.execute(Unknown Source)
at com.anylogic.properties.widget.WidgetBuilder$86.n(Unknown Source)
at com.anylogic.properties.widget.WidgetBuilder$86.onAdd(Unknown Source)
at com.anylogic.properties.widget.base.list.ListWidget.j(Unknown Source)
at com.anylogic.components.button.ButtonDecorator.a(Unknown Source)
at com.anylogic.components.button.ButtonDecorator.a(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.anylogic.application.AnyLogicApplication.start(Unknown Source)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
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:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.sql.SQLException: Connection timed out
at com.anylogic.database.DatabaseManager.getConnection(Unknown Source)
at com.anylogic.database.DatabaseManager.getConnection(Unknown Source)
at com.anylogic.database.DatabaseManager.a(Unknown Source)
at com.anylogic.database.DatabaseManager.createColumn(Unknown Source)
at com.anylogic.database.DatabaseManager.createColumn(Unknown Source)
at com.anylogic.objectmodel.commands.database.CreateColumnCommand.doExecute(Unknown Source)
... 35 more
答案 0 :(得分:1)
我遇到了同样的问题。我不知道为什么会发生,但是存储模型时出错了。但是我设法通过以下过程重新连接:
在该文件中,您会找到类似的内容:
*************************************************
AnyLogic Project File
*************************************************
-->
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.5.1.201910011746" AlpVersion="8.4.9">
<Model>
<Id>1570541727194</Id>
<Name><![CDATA[20191030-02-SBB-DAT]]></Name>
<EngineVersion>6</EngineVersion>
<JavaPackageName><![CDATA[_20191008_02_sbb_dat]]></JavaPackageName>
<ModelTimeUnit><![CDATA[Minute]]></ModelTimeUnit>
<ActiveObjectClasses>
<!-- ========= Active Object Class ======== -->
在我的情况下,现在找到该文件中的所有字符串等于packageName:
_20191008_02_sbb_dat
,并将其替换为您的.alp文件的名称,在mycase中:
sbb_dat。
它应该像这样:
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.5.1.201910011746" AlpVersion="8.4.9">
<Model>
<Id>1570541727194</Id>
<Name><![CDATA[SBB-DAT]]></Name>
<EngineVersion>6</EngineVersion>
<JavaPackageName><![CDATA[sbb_dat]]></JavaPackageName>
<ModelTimeUnit><![CDATA[Minute]]></ModelTimeUnit>
<ActiveObjectClasses>
<!-- ========= Active Object Class ======== -->
在该存储之后,关闭文件并使用AnyLogic打开它。就我而言,这很有帮助。
答案 1 :(得分:1)
我也遇到了这个问题。如果进入模型的数据库文件夹并删除锁定文件和以前的数据库文件夹,它将打开而不会引发该错误。
答案 2 :(得分:-1)
尝试删除所有与Anylogic相关的规则。这应该可以解决问题。
答案 3 :(得分:-1)
根据监听localhost 9001的结果,有些东西阻止了AnyLogic和Server DB之间的连接。删除为Anylogic定义的所有规则(尽管所有规则都是“许可”)都有帮助。