W3C home > Mailing lists > Public > www-validator-css@w3.org > January 2009

Re: Problems with setting up css-validator

From: Miklos Vajna <vmiklos@dsd.sztaki.hu>
Date: Tue, 20 Jan 2009 10:40:34 +0100
To: css-validator Validator ML <www-validator-css@w3.org>
Cc: Pataki Máté <Mate.Pataki@sztaki.hu>
Message-ID: <20090120094034.GN30710@genesis.frugalware.org>

On Tue, Jan 20, 2009 at 09:59:57AM +0100, Miklos Vajna <vmiklos@dsd.sztaki.hu> wrote:
> org.w3c.css.util.Messages: couldn't load properties cn
>   java.io.FileNotFoundException: /file:/home/vmiklos/w3c/css-validator/css-validator.jar!/org/w3c/css/util/Messages.properties.zh-cn (No such file or directory)
> {output=text, medium=all, warning=2, profile=css21, lang=en}
> Exception in thread "main" java.lang.NullPointerException
>         at org.w3c.css.util.Messages.getString(Messages.java:93)
>         at org.w3c.css.css.CssValidator.main(CssValidator.java:135)

I tried building from source. (I like the recent commit that introduced
the automatic download of dependencies!)

First, I got errors like:

    [javac] 23. ERROR in /home/vmiklos/w3c/scratch/css-validator/org/w3c/css/css/StyleSheetGenerator.java (at line 124)
    [javac]     HashMap<String,String> l = new HashMap<String,String>();
    [javac]     ^^^^^^^
    [javac] The type HashMap is not generic; it cannot be parameterized with arguments <String, String>
    [javac] ----------

The folowing patch solved the problem:

diff -u a/build.xml b/build.xml
--- a/build.xml
+++ b/build.xml
@@ -80,7 +80,8 @@
 			classpathref="build.class.path"
 			destdir="./build" 
 			encoding="UTF-8"
-			debug="yes">
+			debug="yes"
+			source="1.6">
 			<src path="./org/w3c"/>
 		</javac>
 		<copy todir="./build">

And now I get:

$ java -cp css-validator.jar:lib/jigsaw.jar org.w3c.css.css.CssValidator http://www.w3.org/
class org.w3c.css.properties.PropertiesLoader: Error while loading default config
java.lang.NullPointerException
        at org.w3c.css.properties.PropertiesLoader.<clinit>(PropertiesLoader.java:148)
        at org.w3c.css.css.CssValidator.<init>(CssValidator.java:61)
        at org.w3c.css.css.CssValidator.main(CssValidator.java:73)
Exception in thread "main" java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:394)
        at org.w3c.css.css.CssValidator.<init>(CssValidator.java:61)
        at org.w3c.css.css.CssValidator.main(CssValidator.java:73)

Hm...
Received on Tuesday, 20 January 2009 09:41:09 GMT

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