I see it too, the problem is that many of the jars were not included in
the 0.18 release.
On Thu Nov 15 10:28:32 2012, Alain.Desilets@nrc-cnrc.gc.ca wrote:
Show quoted text> I tried installing WWW::HtmlUnit-0.18 and it's not working. But I
> think it's because the installation didn't install all the
> necessary jars.
>
> Here's what I did exactly.
>
> - Killed the JVM,
> and erased all the _Inline directories on my C: drive.
>
> cpanp
> uninstall WWW::HtmlUnit
>
> - Then went to
> perl/site/lib/WWW/HtmlUnit and made sure to delete the jar
> directory there
>
> cpanp
> f WWW::HtmlUnit
> I 15 # Note: item 15
> corresponds to v0.18
>
> - At some point, it told me that a test had
> failed and asked me if I wanted to proceed anyway. I said yes.
> -
> After that, I went to perl/site/lib/WWW/ and saw that HtmlUnit.pm
> was indeed the version with the new fix.
>
> I then executed this
> script:
>
> ---
> use strict;
> use warnings;
> no warnings 'redefine';
> no warnings 'uninitialized';
>
> print "before use WWW::HtmlUnit\n";
> use WWW::HtmlUnit;
> print "after use WWW::HtmlUnit\n";
> ---
>
> And
> got:
>
> ---
> Set up gcc environment - 3.4.5 (mingw-vista special
> r3)
> Class com.gargoylesoftware.htmlunit.WebClient not found at
> C:/Perl/site/lib/Inline/Java.pm line 619.
> BEGIN failed--
> compilation aborted at
>
C:/Users/desiletsa/Documents/eclipse_workspace/WeBiText/Spikes/HtmlUnit/
try_HtmlUnit.pl
Show quoted text> line 7, <GEN0> line 4.
> ---
>
> I don't know in which jar the
> WebClient class is supposed to be, but here is the content of
> perl/site/lib/WWW/HtmlUnit/jar:
>
> ---
> commons-collections-
> 3.2.1.jar sac-1.3.jar xercesImpl-2.9.1.jar
> commons-
> logging-1.1.1.jar serializer-2.7.1.jar xml-apis-1.3.04.jar
> htmlunit-confirmhandler-2.8.jar xalan-2.7.1.jar
> ---
>
> This seems
> quite different from what HtmlUnit::collect_default_jars() expects:
> ---
> sub collect_default_jars {
> my $jar_path = find_jar_path();
> return join $classpath_separator, map { "$jar_path/$_" } qw(
> commons-codec-1.6.jar
> commons-collections-3.2.1.jar
> commons-io-2.2.jar
> commons-lang3-3.1.jar
> commons-logging-
> 1.1.1.jar
> cssparser-0.9.7.jar
> htmlunit-2.10.jar
> htmlunit-confirmhandler-2.8.jar
> htmlunit-core-js-2.10.jar
> httpclient-4.2.1.jar
> httpcore-4.2.1.jar
> httpmime-
> 4.2.1.jar
> nekohtml-1.9.16.jar
> sac-1.3.jar
> serializer-2.7.1.jar
> xalan-2.7.1.jar
> xercesImpl-2.9.1.jar
> xml-apis-1.3.04.jar
> );
> }
> ---
>
> Several of the jars that
> collect_default_jars() expects to find seem to be missing from my
> HtmlUnit/jar directory. In particular, htmlunit-2.10.jar, which
> is probably where the com.gargoylesoftware.htmlunit.WebClient class
> is?
>
> Is this normal? And if not, why do you think the installer
> fails to install those jars?
>
> Note that I tried installing 0.18
> on a Linux box, and it's not working there either. I get the same "
> Class com.gargoylesoftware.htmlunit.WebClient not found" error
> there too.
>
> Here is the content of my WWW/HtmlUnit/jar directory
> on the linux box:
>
> ---
> commons-collections-3.2.1.jar
> htmlunit-core-js-2.9.jar serializer-2.7.1.jar
> commons-io-
> 2.0.1.jar httpclient-4.1.2.jar xalan-2.7.1.jar
> commons-lang-2.6.jar httpcore-4.1.2.jar
> xercesImpl-2.9.1.jar
> commons-logging-1.1.1.jar httpmime-
> 4.1.2.jar xml-apis-1.3.04.jar
> htmlunit-2.9.jar
> nekohtml-1.9.15.jar
> htmlunit-confirmhandler-2.8.jar sac-1.3.jar
> ---
>
> It seems to contain more jars than on my Windows
> installation, but it's still missing 2 of them, and for more than
> half of the other jars, the version numbers don't correspond:
>
> -
> commons-codec-1.6.jar (missing completely)
> - commons-io-2.2.jar
> (it has v2.0.1)
> - commons-lang3-3.1.jar (it has v2.6)
> -
> cssparser-0.9.7.jar (missing altogether)
> - htmlunit-2.10.jar (it
> has v2.9) -- THIS ONE IS PROABLY THE CAUSE OF THE ERROR MESSAGE
> -
> htmlunit-core-js-2.10.jar (it has v2.9)
> - httpclient-4.2.1.jar (it
> has v4.1.2)
> - httpcore-4.2.1.jar (it has v4.1.2)
> - httpmime-
> 4.2.1.jar (it has v4.1.2)
> - nekohtml-1.9.16.jar (it has v1.9.15)
> If I change the version numbers in collect_default_jars(), so that
> they reflect the version numbers of what's in my jar directory,
> then when I run the script, I get a different error:
>
> ---
> Exception in thread "IJST-#0" java.lang.NoClassDefFoundError:
> org/apache/commons/codec/DecoderException
> at
> java.lang.Class.forName0(Native Method)
> at
> java.lang.Class.forName(Class.java:264)
> at
>
org.perl.inline.java.InlineJavaClass.ValidateClass(InlineJavaClass.java:
76)
Show quoted text> at
>
org.perl.inline.java.InlineJavaProtocol.Report(InlineJavaProtocol.java:1
17)
Show quoted text> at
>
org.perl.inline.java.InlineJavaProtocol.Do(InlineJavaProtocol.java:56)
Show quoted text> at
>
org.perl.inline.java.InlineJavaServer.ProcessCommand(InlineJavaServer.ja
va:153)
Show quoted text> at
>
org.perl.inline.java.InlineJavaServer.ProcessCommand(InlineJavaServer.ja
va:142)
Show quoted text> at
>
org.perl.inline.java.InlineJavaServerThread.run(InlineJavaServerThread.j
ava:51)
Show quoted text> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.codec.DecoderException
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> at
> java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> ... 8 more
> Can't receive packet from JVM: at
> /usr/lib/perl5/site_perl/5.8.8/Inline/Java/Protocol.pm line 431
> BEGIN failed--compilation aborted at try_HtmlUnit.pl line 5, <GEN6>
> line 3.
> [webitext@iitm50ws1397 HtmlUnit]$
> ---
>
> So it looks like
> this was able to get passed the initial error. So it does seem like
> there is a problem with the WWW::HtmlUnit installer for v0.18.
> Is this something that can be fixed? Again, thank you for your help
> in resolving this issue.
>
> Best regards,
>
> Alain Désilets