Hi Shevchik,

The Classloader issues you're mentioning will go away in XDoclet 2.

Cheers,
Aslak

> -----Original Message-----
> From: Шевчик Виктор Александрович [mailto:[EMAIL PROTECTED]
> Sent: 15. mars 2003 08:17
> To: '[EMAIL PROTECTED]'
> Subject: xdoclet in Eclipse
>
>
> Good day, Aslak!
> In the mail-lists there are many questions about errors in xdoclet-1.2 in
> Eclipse.
> I too had such mistake.
> When i try to execute task "ejbdoclet" (xdoclet v. 1.2b3) in
> Eclipse (v. 2.1
> rc1), i get the following error:
>
>    [ejbdoclet] BUILD FAILED:
> file:D:/ext/projects/xdoclet/samples/build.xml:121: Can't create a
> remoteinterface element under ejbdoclet. Make sure the jar file containing
> the corresponding subtask class is on the classpath specified in the
> <taskdef> that defined ejbdoclet. Also make sure you spelled the subtask
> name correctly.
>
> Executing ejbdoclet from shell or in Eclipse with xdoclet version 1.1.2 -
> all right.
>
> I have looked sources,
> In class xdoclet.loader.ModuleFinder in mehtod
>     public static void initClasspath(Class clazz)
>     {
>         if (System.getProperty("xdoclet.class.path") == null) {
>             try {
>                 classpath = ((AntClassLoader)
> clazz.getClassLoader()).getClasspath();
> <<<< In Eclipse clazz.getClassLoader() returned
> org.eclipse.ant.internal.core.AntClassLoader which extends URLClassLoader
> but not org.apache.tools.ant.AntClassLoader;
>             }
>             catch (ClassCastException e) {
>                 classpath = System.getProperty("java.class.path");
>             }
>         }
>         else {
>             classpath = System.getProperty("xdoclet.class.path");
>         }
>     }
>
> This code works but not rational of behind double transformation (URL[] ->
> classpath and classpath -> ArrayList (in private static List
> findModuleFiles()))
>
> public static void initClasspath(Class clazz){
>       if (System.getProperty("xdoclet.class.path") == null) {
>               ClassLoader cl = clazz.getClassLoader();
>               if (cl instanceof AntClassLoader){
>                       classpath = ((AntClassLoader)
> clazz.getClassLoader()).getClasspath();
>               }else if (cl instanceof URLClassLoader) {
>                       URLClassLoader ucl = (URLClassLoader) cl;
>                       URL[] urls = ucl.getURLs();
>                       classpath = "";
>                       String separator =
> System.getProperty("path.separator");
>                       for (int i = 0; i < urls.length; i++) {
>                               classpath += urls[i].getFile() + separator;
>                       }
>               }else {
>                       classpath = System.getProperty("java.class.path");
>               }
>       } else {
>               classpath = System.getProperty("xdoclet.class.path");
>       }
> }
>
> I ask you to make changes to a class xdoclet.loader.ModuleFinder in future
> versions of xdoclet  for support of work in Eclipse.
>
> Thanks,
> Viktor Shevchik
> mailto:[EMAIL PROTECTED]



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to