w3c / Unicorn

Unicorn - W3C's Unified Validator
https://validator.w3.org/unicorn/
Other
127 stars 59 forks source link

Locale error when running Unicorn locally #125

Closed vivienlacourba closed 8 years ago

vivienlacourba commented 8 years ago

Reported by viking on 11 Aug 2010 18:53 UTC Hi,

I followed the (somewhat sparse) instructions on installing Unicorn in order to run it locally. However, when I visit http://localhost:8080/unicorn/init, I get this error:

SEVERE: Servlet.service() for servlet Init threw exception
java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:334)
    at org.w3c.unicorn.util.Language.getContext(Language.java:131)
    at org.w3c.unicorn.action.InitAction.doGet(InitAction.java:48)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:619)

The defaultLocale appears to be null. Any tips are greatly appreciated.

TIA, Jeremy

vivienlacourba commented 8 years ago

Comment by viking@pillageandplunder.net on 11 Aug 2010 18:56 UTC I should mention that I'm using tomcat6 on Ubuntu 10.04, using the mercurial trunk (changeset 1459:d7199abe8789)

vivienlacourba commented 8 years ago

Comment by anonymous on 25 Aug 2010 10:02 UTC You might be not configure tomcat correctly or you might not have admin control on ur machine only admin control has the permission to run it

vivienlacourba commented 8 years ago

Comment by tgambet on 7 Sep 2010 17:08 UTC It happens if Unicorn is not initialzed correctly. You should check the logs under WEB-INF/logs. Most likely you'll see "Unicorn config file "unicorn.properties" could not be found in classpath.". Please referer to http://code.w3.org/unicorn/wiki/Documentation/Install to correctly build Unicorn. Anyway I fixed this exception to show a more intelligible message.