W3C home > Mailing lists > Public > www-validator-css@w3.org > November 2008

RE: css-validator.jar build problem

From: Andrei Doicin <Andrei.Doicin@redbeemedia.com>
Date: Wed, 12 Nov 2008 17:10:51 -0000
Message-ID: <E2900B612AA36C4D9C6005C0CBAB481E03E82818@RBMXCU1015.redbeemedia.net>
To: <www-validator-css@w3.org>

Well it was nice job finally building the css-validator.jar [and btw I
had to throw apache-commons-lang.jar into the prereq mix also], but the
thing still doesn't work.

In fact, it gives exactly the same result when you use the binary
css-validator.jar (I tried that a few days ago too ;) download linked on
the install page, as when you use the jar you build with ant.

From the command line: 

[root@io-dev23 opt]# java -jar css-validator.jar http://www.w3.org/
Exception in thread "main" java.lang.NoClassDefFoundError:
org/w3c/tools/resources/ProtocolException
Caused by: java.lang.ClassNotFoundException:
org.w3c.tools.resources.ProtocolException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: org.w3c.css.css.CssValidator. Program
will exit.

... and from a browser, the initial display is fine (I renamed
validator.html.en to index.htm, which should not cause a problem), but
you  get a 500 error from the validator.uri?xxxxx, with the following
helpful [?] stuff in the tomcat log:

12-Nov-2008 16:56:23 org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet validator threw exception
java.lang.NullPointerException
        at
org.w3c.css.util.ApplContext.setContentEncoding(ApplContext.java:227)
        at org.w3c.css.servlet.CssValidator.doGet(CssValidator.java:228)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568
)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
86)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
===============================================================

Does any of the above ring any bells with anyone? Shall I try building
again with netbeans or more/other jars also, or specify stuff in the
build.xml like Damien said?

Thanks for your comments,

AD.

______________________________________________________________________
This email may contain confidential information. If you receive it in error please immediately advise the sender and delete it from your system without copying, distributing or taking any action in reliance upon it. Red Bee Media Limited has taken precautions in respect of its email communications to preserve confidentiality and to ensure that any attachment has been checked for viruses. However, we cannot accept liability for any damage sustained as a result of interceptions and software viruses and you should take your own precautions before responding to us by email and carry out your own virus checks before opening any attachment.

Red Bee Media Limited 
Registered No: 04257461 England 
Registered Office: BC2 A1 Broadcast Centre, 201 Wood Lane, London W12 7TP

____________________________________________________________________
Received on Wednesday, 12 November 2008 17:11:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:21 GMT