08-08-2010, 08:59 AM
выскакивает такая ошибка.
[SOURCE="plain"]Unclosed connection! Trace: sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
java.lang.RuntimeException
at ru.l2open.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:197)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyInstance.invoke(Unknown Source)
at org.python.pycode.serializable._pyx1281234675363.onAdvEvent$10(__init__.py:992)
at org.python.pycode.serializable._pyx1281234675363.call_function(__init__.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject._jcallexc(Unknown Source)
at org.python.core.PyObject._jcall(Unknown Source)
at org.python.proxies.main$Quest$485.onAdvEvent(Unknown Source)
at ru.l2open.gameserver.model.quest.Quest.notifyEvent(Quest.java:368)
at ru.l2open.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(L2PcInstance.java:1730)
at ru.l2open.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:196)
at ru.l2open.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)[/SOURCE]
вот код:
[SOURCE="python"] if event == "create" :
con=L2DatabaseFactory.getInstance().getConnection()
param = eventParam1.replace("."," ")
if param == "no_name" :
return showText(u"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f",u"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0441\u0445\u0435\u043c\u044b!","True",u"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f","main")
else :
ins = con.prepareStatement("INSERT INTO buffer_scheme_list (player_id,scheme_name) VALUES (?,?)")
ins.setString(1, str(player.getObjectId()))
ins.setString(2, param)
try :
ins.executeUpdate()
ins.close()
con.close()
except :
try : con.close()
except : pass
return rebuildMainHtml(st)[/SOURCE]
в чем ошибка?
[SOURCE="plain"]Unclosed connection! Trace: sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
java.lang.RuntimeException
at ru.l2open.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:197)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyInstance.invoke(Unknown Source)
at org.python.pycode.serializable._pyx1281234675363.onAdvEvent$10(__init__.py:992)
at org.python.pycode.serializable._pyx1281234675363.call_function(__init__.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject._jcallexc(Unknown Source)
at org.python.core.PyObject._jcall(Unknown Source)
at org.python.proxies.main$Quest$485.onAdvEvent(Unknown Source)
at ru.l2open.gameserver.model.quest.Quest.notifyEvent(Quest.java:368)
at ru.l2open.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(L2PcInstance.java:1730)
at ru.l2open.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:196)
at ru.l2open.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)[/SOURCE]
вот код:
[SOURCE="python"] if event == "create" :
con=L2DatabaseFactory.getInstance().getConnection()
param = eventParam1.replace("."," ")
if param == "no_name" :
return showText(u"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f",u"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u0441\u0445\u0435\u043c\u044b!","True",u"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f","main")
else :
ins = con.prepareStatement("INSERT INTO buffer_scheme_list (player_id,scheme_name) VALUES (?,?)")
ins.setString(1, str(player.getObjectId()))
ins.setString(2, param)
try :
ins.executeUpdate()
ins.close()
con.close()
except :
try : con.close()
except : pass
return rebuildMainHtml(st)[/SOURCE]
в чем ошибка?