Help! Save button is BLINKING, I can't create Data Point
-
Hi guys,
I use Modbus PLC Simulator which acts as PLC.
I created a Modbus IP "Data Source".
In "Data Source" tab I can read and write data.
When I create a "Data Point" and click to SAVE button, I see some SQL commands and the the SAVE button starts to BLINK... I can't save the "Data Point"... Any idea?
Thanks... -
Hi fahrettine,
It sounds like some sort of error is occurring. Can you provide the text for the error from either the /logging_console.shtm page in Mango or from the Mango/logs/ma.log file?
-
@phildunlap It looks like there is a problem with DB. I get this error: org.h2.jdbc.JdbcSQLException: Table "DATAPOİNTTAGS" not found; SQL statement:
insert into DATAPOİNTTAGS (DATAPOİNTID, TAGKEY, TAGVALUE) values (cast(? as int), cast(? as varchar), cast(? as varchar)) [42102-196] -
In the LOG file there is a very long error starting like this: FATAL 2018-02-05T22:29:44,962 (com.serotonin.m2m2.db.AbstractDatabaseProxy.initialize:164) - Exception initializing database proxy: StatementCallback; bad SQL grammar
-
Hmm. You can share the whole error, it can be helpful sometimes!
Here, it looks like your database didn't upgrade properly, which probably shouldn't have allowed you to boot. Did you restore your H2 database recently?
You cannot restore a previous database schema into a running Mango. You need to restore the H2 database using the command line tool in that circumstance, and then let Mango upgrade the database as it normally would when starting Mango.
In the Mango/ directory, run (with your paths/credentials corrected to your Mango directory/OS):
java -cp C:\Mango\lib\h2-1.4.196.jar org.h2.tools.RunScript -url "jdbc:h2:C:\Mango\databases\mah2;MV_STORE=FALSE;MVCC=FALSE" -user "" -password "" -script C:\Mango\backup\core-database-H2-Mar-10-2017_000500.zip -options compression zip
Taken from this thread: https://forum.infiniteautomation.com/topic/2748/how-to-restore-a-database-backup/3
If you haven't done a restore and this is a new Mango, then I would suggest moving your Mango/databases/mah2.h2.db file while Mango is off, then starting Mango on a fresh database.
-
The log file looks like this:
ERROR 2018-02-08T17:26:35,715 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter:38) - DWR invocation exception org.jooq.exception.DataAccessException: SQL [insert into DATAPOİNTTAGS (DATAPOİNTID, TAGKEY, TAGVALUE) values (cast(? as int), cast(? as varchar), cast(? as varchar))]; Table "DATAPOİNTTAGS" not found; SQL statement: insert into DATAPOİNTTAGS (DATAPOİNTID, TAGKEY, TAGVALUE) values (cast(? as int), cast(? as varchar), cast(? as varchar)) [42102-196] at org.jooq_3.10.1.H2.debug(Unknown Source) ~[?:?] at org.jooq.impl.Tools.translate(Tools.java:2199) ~[jooq-3.10.1.jar:?] at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:701) ~[jooq-3.10.1.jar:?] at org.jooq.impl.BatchSingle.executePrepared(BatchSingle.java:253) ~[jooq-3.10.1.jar:?] at org.jooq.impl.BatchSingle.execute(BatchSingle.java:176) ~[jooq-3.10.1.jar:?] at com.serotonin.m2m2.db.dao.DataPointTagsDao.insertTagsForDataPoint(DataPointTagsDao.java:118) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.db.dao.DataPointDao.saveRelationalData(DataPointDao.java:1198) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.db.dao.DataPointDao.insertDataPoint(DataPointDao.java:380) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.db.dao.DataPointDao$1.doInTransactionWithoutResult(DataPointDao.java:330) ~[mango-3.3.0.jar:?] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) ~[spring-tx-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.3.13.RELEASE.jar:4.3.13.RELEASE] at com.serotonin.m2m2.db.dao.DataPointDao.saveDataPoint(DataPointDao.java:325) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.rt.RuntimeManagerImpl.saveDataPoint(RuntimeManagerImpl.java:490) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.web.dwr.DataSourceEditDwr.validatePoint(DataSourceEditDwr.java:234) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.web.dwr.DataSourceEditDwr.validatePoint(DataSourceEditDwr.java:173) ~[mango-3.3.0.jar:?] at com.serotonin.m2m2.modbus.dwr.ModbusEditDwr.saveModbusPointLocator(ModbusEditDwr.java:78) ~[modbus-ds-3.3.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161] at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) ~[dwr-2.0.11.jar:?] at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) ~[dwr-2.0.11.jar:?] at com.serotonin.m2m2.web.dwr.util.TranslationsFilter.doFilter(TranslationsFilter.java:37) ~[mango-3.3.0.jar:?] at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) ~[dwr-2.0.11.jar:?] at com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter(ExceptionDetectionFilter.java:26) [mango-3.3.0.jar:?] at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) [dwr-2.0.11.jar:?] at com.serotonin.m2m2.web.dwr.util.DwrPermissionFilter.doFilter(DwrPermissionFilter.java:46) [mango-3.3.0.jar:?] at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) [dwr-2.0.11.jar:?] at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) [dwr-2.0.11.jar:?] at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) [dwr-2.0.11.jar:?] at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) [dwr-2.0.11.jar:?] at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) [dwr-2.0.11.jar:?] at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) [dwr-2.0.11.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:110) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at com.serotonin.m2m2.web.filter.MangoShallowEtagHeaderFilter.doFilterInternal(MangoShallowEtagHeaderFilter.java:80) [mango-3.3.0.jar:?] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at com.serotonin.m2m2.web.mvc.spring.security.PermissionExceptionFilter.doFilter(PermissionExceptionFilter.java:32) [mango-3.3.0.jar:?] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:155) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [jetty-servlet-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.Server.handle(Server.java:524) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161] Caused by: org.h2.jdbc.JdbcSQLException: Table "DATAPOİNTTAGS" not found; SQL statement: insert into DATAPOİNTTAGS (DATAPOİNTID, TAGKEY, TAGVALUE) values (cast(? as int), cast(? as varchar), cast(? as varchar)) [42102-196] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) ~[h2-1.4.196.jar:1.4.196] at org.h2.message.DbException.get(DbException.java:179) ~[h2-1.4.196.jar:1.4.196] at org.h2.message.DbException.get(DbException.java:155) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.readTableOrView(Parser.java:5552) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.readTableOrView(Parser.java:5529) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.parseInsert(Parser.java:1062) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.parsePrepared(Parser.java:417) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.parse(Parser.java:321) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.parse(Parser.java:293) ~[h2-1.4.196.jar:1.4.196] at org.h2.command.Parser.prepareCommand(Parser.java:258) ~[h2-1.4.196.jar:1.4.196] at org.h2.engine.Session.prepareLocal(Session.java:578) ~[h2-1.4.196.jar:1.4.196] at org.h2.engine.Session.prepareCommand(Session.java:519) ~[h2-1.4.196.jar:1.4.196] at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) ~[h2-1.4.196.jar:1.4.196] at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73) ~[h2-1.4.196.jar:1.4.196] at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) ~[h2-1.4.196.jar:1.4.196] at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:106) ~[jooq-3.10.1.jar:?] at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:70) ~[jooq-3.10.1.jar:?] at org.jooq.impl.BatchSingle.executePrepared(BatchSingle.java:213) ~[jooq-3.10.1.jar:?] ... 99 more INFO 2018-02-08T17:27:26,087 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopDataSourceShutdown:450) - Data source 'plcSim' stopped
-
Hi fahrettine,
It still looks like the upgrade isn't occurring. Are you doing a database restore?
What's your database schema version? Run
select settingvalue from systemSettings where settingname='databaseSchemaVersion';
in your /sqlConsole.shtm -
The error can be seen in the table name,
DATAPOİNTTAGS
capitalized incorrectly due to a bug in the JOOQ library. In your other thread I provided instructions on how to set your language to English in the mean time to avoid this issue. In case someone finds it here,For the moment, you could try putting a file like this into Mango/bin/ext-enabled/
BAT if you're on Windows:
set-language.bat
if "%1" == "init" ( rem Startup with the default language set to English set JAVAOPTS=%JAVAOPTS% -Duser.language=en )
SH otherwise:
set-language.sh
#!/bin/bash case "$1" in init) # Startup with the default language set to English JAVAOPTS="$JAVAOPTS -Duser.language=en" ;; esac
Then stop Mango, and start it again.