[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: danibeni
Forum Index » Profile for danibeni » Messages posted by danibeni
Author Message
Hello,

I have been using Mango M2M for a time to control some Modbus devices, and it is working quite good. The version I have installed is 1.9 in a Windows 2008 Server with a MySQL database.

I think it is time to upgrade the Mango M2M version to the latest one (1.12.4, I think). I have followed the upgrade installation instructions:stop the Tomcat instance,delete the work directory, copy the upgrade files to the actual mango installation directory and start the tomcat instance again. Unfortunately, when I try to load the mango application into the web browser, the HTTP 404 error arises, telling that the resource is unavailable.

The tomcat log file indicates something related to the upgrade of the mango database. I attach this part of the log file (Sorry, part of it is in spanish):


13-may-2011 8:17:06 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase com.serotonin.mango.MangoContextListener
com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [alter table pointValueAnnotations drop foreign key pointValueAnnotationsFk1; ]; SQL state [HY000]; error code [1025]; Error on rename of '.\mangodb\pointvalueannotations' to '.\mangodb\#sql2-56c-12f9' (errno: 152); nested exception is java.sql.SQLException: Error on rename of '.\mangodb\pointvalueannotations' to '.\mangodb\#sql2-56c-12f9' (errno: 152)
at com.serotonin.mango.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:90)
at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:150)
at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:255)
at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:94)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [alter table pointValueAnnotations drop foreign key pointValueAnnotationsFk1; ]; SQL state [HY000]; error code [1025]; Error on rename of '.\mangodb\pointvalueannotations' to '.\mangodb\#sql2-56c-12f9' (errno: 152); nested exception is java.sql.SQLException: Error on rename of '.\mangodb\pointvalueannotations' to '.\mangodb\#sql2-56c-12f9' (errno: 152)
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:42
at com.serotonin.mango.db.BasePooledAccess.runScript(BasePooledAccess.java:89)
at com.serotonin.mango.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:110)
at com.serotonin.mango.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:11
at com.serotonin.mango.db.upgrade.Upgrade1_9_0.upgrade(Upgrade1_9_0.java:45)
at com.serotonin.mango.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:85)
... 27 more
Caused by: java.sql.SQLException: Error on rename of '.\mangodb\pointvalueannotations' to '.\mangodb\#sql2-56c-12f9' (errno: 152)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:254
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:266)
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)
... 33 more

I do not know if there is a step that I have forgotten, but it seems that the problem is related to the database upgrade from 1.9.0 to 1.12.4.

I would really appreciate any advice that points me to the right direction to solve this problem.

Thanks,
 
Forum Index » Profile for danibeni » Messages posted by danibeni
Go to:   
Powered by JForum 2.1.9 © JForum Team