Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Classpath issues when calling ejb services (from a custom task)

Classpath issues when calling ejb services (from a custom task)

2004-01-14       - By Andy Redhead
Reply:     1     2  

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@(protected)]
> 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@(protected)
> For additional commands, e-mail: user-help@(protected)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.