[ http://issues.apache.org/jira/browse/AXIS-1990?page=comments#action_66536 ] Rene wortelboer commented on AXIS-1990: ---------------------------------------
Has nobody an answer to my problem ?? > ClassLoader ClassCastException > ------------------------------ > > Key: AXIS-1990 > URL: http://issues.apache.org/jira/browse/AXIS-1990 > Project: Axis > Type: Bug > Versions: 1.2RC3 > Environment: Axis 1.2RC3 with j2SDK1.4.2_06, working on windows > Reporter: Rene wortelboer > > Hello, > I have problems with the classLoader. When i wanna load a class with > classLoader it`s working on windows without axis. But when my program runs > with axis i get a ClassCastException. > here are my files which can run on windows with a main method.. but when an > axis service has to do it, it goos wrong ! > the following files are working when i run it ! > ------------ > public class Globus2Wrapper implements Wrapper { > public String middlewaretype; > public boolean keeprunning; > public boolean keepwaiting; > public Globus2Wrapper() { > middlewaretype = "Globus2"; > keeprunning = true; > keepwaiting = true; > System.out.println("I GET THIS MESSAGE"); > } > public String getMiddlewareType() { > return middlewaretype; > } > } > ---------------- > public interface Wrapper { > public String getMiddlewareType(); > } > ------------------ > import java.net.URLClassLoader; > import java.net.URL; > public class WrapperLoader { > public static void main(String[] args) { > System.out.println("Loading Wrapper Plug-In"); > > try { > URL[] url = {new URL("file:/d:/wrappers/")}; > URLClassLoader loader = new URLClassLoader(url); > > Class wrapper = Class.forName("Globus2Wrapper", true, > loader); > Wrapper wrapperInstance = > (Wrapper)wrapper.newInstance(); > System.out.println(wrapperInstance.getMiddlewareType() > + " plugin loaded succesfully!"); > } > catch (Exception e) { > System.out.println(e.getMessage() + " Exception while > loading Plug-in"); > } > > } > } > ------------- > How can i make a axis service which can run other files? The constructor of > Globus2Wrapper is loaded because i get the system.out ! > Can somebody help me with this?? i don`t think i am the only one with this > problem. > Greets Rene -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira