ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Redhead" <alger...@btopenworld.com>
Subject RE: Classpath issues when calling ejb services (from a custom task)
Date Wed, 14 Jan 2004 15:37:27 GMT
Ok, I admit defeat... 

if I change the class loader used in my custom task I get class cast
exceptions when I try to narrow remote object references - which I guess is
because things are going across multiple class loaders.

Everything works if I use a load of -lib statements on the command line that
starts ant and I don't use classpath or classpathref elements within my
build script.

I would be interested to know if anyone else manages to find a way of using
classpath elements in a custom task that calls remote ejb services.

Cheers

Andy

> -----Original Message-----
> From: Andy Redhead [mailto:algernol@btopenworld.com]
> Sent: 14 January 2004 11:53
> To: 'Ant Users List'
> Subject: RE: Classpath issues when calling ejb services (from a custom
> task)
> 
> Hi,
> Thanks for replying :)
> 
> I'm not actually using the xdoclet task - I am trying to make a "custom"
> task of my own, which needs to call some functions on a remote stateless
> ejb.
> 
> I've made some progress by setting a new classloader inside my task,
> however
> I've now got a class cast exception when I narrow the remote object back
> to
> the ejb interface... which is odd because the same calls made from a junit
> test run from ant works fine.
> 
> I'll keep persevering for a bit yet.
> 
> Cheers
> 
> Andy
> 
> > -----Original Message-----
> > From: Harkness, David [mailto:DHarkness@sonypictures.com]
> > Sent: 14 January 2004 06:56
> > To: Ant Users List
> > Subject: RE: Classpath issues when calling ejb services
> >
> > Andy Redhead wrote:
> > > I'm trying to build an ant task for ant 1.6 that uses a service
> > > provided by an ejb.
> > >
> > > [...snip...]
> >
> > Can you provide a trimmed-down example build.xml? My only experience
> > with this is making sure the XDoclet JARs are available when defining
> > the <ejbdoclet> task with <taskdef>. Are you doing something similar?
> > Here's the ejbdoclet taskdef from my build file.
> >
> >     <!-- XDoclet class path to pull in XDoclet for ejbdoclet target -->
> >     <path id="xdoclet.class.path.id">
> >         <pathelement
> > location="${lib.dir}/xdoclet/commons-collections-2.0.jar"/>
> >         <pathelement location="${lib.dir}/xdoclet/commons-logging.jar"/>
> >         <pathelement location="${lib.dir}/xdoclet/xdoclet-1.2b2.jar"/>
> >         <pathelement
> > location="${lib.dir}/xdoclet/xdoclet-bea-module-1.2b2.jar"/>
> >         <pathelement
> > location="${lib.dir}/xdoclet/xdoclet-ejb-module-1.2b2.jar"/>
> >         <pathelement
> > location="${lib.dir}/xdoclet/xdoclet-web-module-1.2b2.jar"/>
> >         <pathelement
> > location="${lib.dir}/xdoclet/xdoclet-xdoclet-module-1.2b2.jar"/>
> >         <pathelement
> > location="${lib.dir}/xdoclet/xdoclet-xjavadoc-uc-1.2b2.jar"/>
> >         <pathelement location="${lib.dir}/utility/j2ee131min.jar"/>
> >     </path>
> >
> >     <!-- EJBDoclet task (XDoclet) -->
> >     <taskdef name="ejbdoclet"
> >              classname="xdoclet.modules.ejb.EjbDocletTask"
> >              classpathref="xdoclet.class.path.id"
> >     />
> >
> > I haven't written my own tasks, so I'm not much more help. Post a
> > snippet and the others will be able to better help you. Good luck!
> >
> > David Harkness
> > Sr. Software Engineer
> > Sony Pictures Digital Networks
> > (310) 482-4756
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message