Unspecified Error in NetPublish


Working on a custom site and have recently gotten an unspecified error in NetPublish message. Looking through the server logs an unspecified exception is thrown during the HTML Generation.

This affects all sites on the server, including those whose code hasn’t been touched.

Any idea on a fix to this or what may have caused this? Thanks.


Check your code changes. We’ve seen some coding errors take down Netpublish server in the past. It might help to enable debug logging in Netpublish Server.

To do that:

Go to your Portfolio Netpublish Server/webroot/app folder, and open the server.properties file in a text editor.
Locate the line that reads: general.logging = info
Change the last word from info to debug, then save the text file and close it.
Restart Netpublish Server

Logs will start showing up in the same folder. The next time NP Server crashes, review the most recent log file for clues.


When this has happened to me in the past (unspecified severe errors) it’s usually been a typo or even occasionally an unclosed code line. NP’s server-side JS seems to require a semi-colon code line end which is optional in client-side JS. The take-away from this is it’s a good idea to run your NP-JS code through a linter like JS lint which can help flag otherwise easily overlooked but significant code errors. Another upside is that if - as occasionally happens - an edge case in custom code does hit a bona fide bug you’ll have much cleaner JS code to pass in to the engineers for test.