[SOLVED] Dashboard giving Error 500 after editing dashboard.cfg

Hello,

Because the url for the Fronttail page on the Dashboard is wrong, I decided to edit this file and change it to the correct one.
Unfortunatly after this the dashboard isn’t loading anymore.
The Paper UI, Basic UI and other pages still work though.

The error I get:

HTTP ERROR 500
Problem accessing /start/index. Reason:

    Server Error
Caused by:
java.lang.NullPointerException
	at java.util.regex.Matcher.quoteReplacement(Matcher.java:701)
	at org.openhab.ui.dashboard.internal.DashboardServlet.lambda$1(DashboardServlet.java:208)
	at org.openhab.ui.dashboard.internal.DashboardServlet.replaceKeysWithFunction(DashboardServlet.java:217)
	at org.openhab.ui.dashboard.internal.DashboardServlet.replaceKeysFromMap(DashboardServlet.java:207)
	at org.openhab.ui.dashboard.internal.DashboardServlet.serveDashboard(DashboardServlet.java:96)
	at org.openhab.ui.dashboard.internal.DashboardServlet.doGet(DashboardServlet.java:80)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:534)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)

Does someone know how to restore this or is a new installation needed?

Thank you.

Regards,
Edwin

Tell us what kind of edits you did

I had the same issue lately. Maybe refer here.
There is a copy of the .cfg somewhere that needs to be restored.

Hi Andi,

Thanks! It’s working again.

I removed the dashboard.config file in the folder: /var/lib/openhab2/config/org/openhab/

Restarted openhab and everything is working again.