axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rene wortelboer (JIRA)" <>
Subject [jira] Created: (AXIS-1990) ClassLoader ClassCastException
Date Thu, 12 May 2005 11:27:06 GMT
ClassLoader ClassCastException

         Key: AXIS-1990
     Project: Axis
        Type: Bug
    Versions: 1.2RC3    
 Environment: Axis 1.2RC3 with j2SDK1.4.2_06, working on windows
    Reporter: Rene wortelboer

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();

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:
For more information on JIRA, see:

View raw message