You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by Jeremy Hughes <hu...@apache.org> on 2007/01/05 12:35:56 UTC
fresh checkout and test gives ClassCastException - solved
Hi, I checked out a fresh working copy of Woden and installed Ant
1.7.0. I did ant buildAll and got test errors like this:
<testcase classname="org.apache.woden.WSDLFactoryTest"
name="testCreateReader" time="0.016">
<error message="org.apache.tools.ant.AntClassLoader incompatible
with java.net.URLClassLoader" type="java.lang.ClassCastException"> at
org.apache.woden.internal.resolver.SimpleURIResolver.<init>(SimpleURIResolver.java:111)
at org.apache.woden.internal.BaseWSDLReader.<init>(BaseWSDLReader.java:113)
at org.apache.woden.internal.DOMWSDLReader.<init>(DOMWSDLReader.java:84)
at org.apache.woden.internal.DOMWSDLFactory.newWSDLReader(DOMWSDLFactory.java:34)
at org.apache.woden.WSDLFactoryTest.testCreateReader(WSDLFactoryTest.java:50)
</error>
</testcase>
The problem with the cast done by SimpleURIResolver at line 111. It
assumes it has been loaded by a URLClassLoader when it has been loaded
by an AntClassLoader instead. I've changed the SimpleURIResolver to
use the ClassLoader superclass on line 111 and fixed a few resulting
compile problems. This fixes the problem for me. I'll check in the
change.
Cheers,
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: fresh checkout and test gives ClassCastException - solved
Posted by Jeremy Hughes <hu...@apache.org>.
Thanks, glad I got it right!
On 05/01/07, Graham Turrell <GT...@uk.ibm.com> wrote:
> Jeremy,
>
> I plead guilty! This bug affected only the system catalog and your fix to
> SimpleURIResolver is exactly right. A URLClassloader is not needed in this
> case, and where it is needed elsewhere, one it is new-ed up explicitly.
>
> Thanks for spotting it and fixing.
>
>
> Kind Regards,
>
> Graham (with sackcloth and ashes :))
> _____________________________________________
> Graham C Turrell CEng, MBCS
> Chartered IT Practitioner
>
> WebSphere ESB Foundation Technologies
> DE3F16 / MP 211
> IBM Labs
> Hursley Park
> Winchester, Hampshire
> England. SO21 2JN
>
> Tel +44-(0)1962-815018
> email: gturrell@uk.ibm.com
>
> "No army can withstand the force of an idea whose time
> has come.". -Victor Hugo
>
>
>
> "Jeremy Hughes"
> <hughesj@apache.o
> rg> To
> Sent by: woden-dev@ws.apache.org
> jpjhughes@gmail.c cc
> om
> Subject
> fresh checkout and test gives
> 05/01/2007 11:35 ClassCastException - solved
>
>
> Please respond to
> woden-dev@ws.apac
> he.org
>
>
>
>
>
>
> Hi, I checked out a fresh working copy of Woden and installed Ant
> 1.7.0. I did ant buildAll and got test errors like this:
>
> <testcase classname="org.apache.woden.WSDLFactoryTest"
> name="testCreateReader" time="0.016">
> <error message="org.apache.tools.ant.AntClassLoader incompatible
> with java.net.URLClassLoader" type="java.lang.ClassCastException">
> at
> org.apache.woden.internal.resolver.SimpleURIResolver.<init>(SimpleURIResolver.java:111)
>
> at
> org.apache.woden.internal.BaseWSDLReader.<init>(BaseWSDLReader.java:113)
>
> at
> org.apache.woden.internal.DOMWSDLReader.<init>(DOMWSDLReader.java:84)
> at
> org.apache.woden.internal.DOMWSDLFactory.newWSDLReader(DOMWSDLFactory.java:34)
>
> at
> org.apache.woden.WSDLFactoryTest.testCreateReader(WSDLFactoryTest.java:50)
>
> </error>
> </testcase>
>
> The problem with the cast done by SimpleURIResolver at line 111. It
> assumes it has been loaded by a URLClassLoader when it has been loaded
> by an AntClassLoader instead. I've changed the SimpleURIResolver to
> use the ClassLoader superclass on line 111 and fixed a few resulting
> compile problems. This fixes the problem for me. I'll check in the
> change.
>
> Cheers,
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: woden-dev-help@ws.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: woden-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: fresh checkout and test gives ClassCastException - solved
Posted by Graham Turrell <GT...@uk.ibm.com>.
Jeremy,
I plead guilty! This bug affected only the system catalog and your fix to
SimpleURIResolver is exactly right. A URLClassloader is not needed in this
case, and where it is needed elsewhere, one it is new-ed up explicitly.
Thanks for spotting it and fixing.
Kind Regards,
Graham (with sackcloth and ashes :))
_____________________________________________
Graham C Turrell CEng, MBCS
Chartered IT Practitioner
WebSphere ESB Foundation Technologies
DE3F16 / MP 211
IBM Labs
Hursley Park
Winchester, Hampshire
England. SO21 2JN
Tel +44-(0)1962-815018
email: gturrell@uk.ibm.com
"No army can withstand the force of an idea whose time
has come.". -Victor Hugo
"Jeremy Hughes"
<hughesj@apache.o
rg> To
Sent by: woden-dev@ws.apache.org
jpjhughes@gmail.c cc
om
Subject
fresh checkout and test gives
05/01/2007 11:35 ClassCastException - solved
Please respond to
woden-dev@ws.apac
he.org
Hi, I checked out a fresh working copy of Woden and installed Ant
1.7.0. I did ant buildAll and got test errors like this:
<testcase classname="org.apache.woden.WSDLFactoryTest"
name="testCreateReader" time="0.016">
<error message="org.apache.tools.ant.AntClassLoader incompatible
with java.net.URLClassLoader" type="java.lang.ClassCastException">
at
org.apache.woden.internal.resolver.SimpleURIResolver.<init>(SimpleURIResolver.java:111)
at
org.apache.woden.internal.BaseWSDLReader.<init>(BaseWSDLReader.java:113)
at
org.apache.woden.internal.DOMWSDLReader.<init>(DOMWSDLReader.java:84)
at
org.apache.woden.internal.DOMWSDLFactory.newWSDLReader(DOMWSDLFactory.java:34)
at
org.apache.woden.WSDLFactoryTest.testCreateReader(WSDLFactoryTest.java:50)
</error>
</testcase>
The problem with the cast done by SimpleURIResolver at line 111. It
assumes it has been loaded by a URLClassLoader when it has been loaded
by an AntClassLoader instead. I've changed the SimpleURIResolver to
use the ClassLoader superclass on line 111 and fixed a few resulting
compile problems. This fixes the problem for me. I'll check in the
change.
Cheers,
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org