Here's the code from MyFaces...
http://svn.apache.org/repos/asf/myfaces/core/trunk/api/src/main/java/javax/faces/FactoryFinder.java

                // check, if class is of expected interface type
                if (!interfaceClass.isAssignableFrom(implClass))
                {
                    throw new IllegalArgumentException("Class " + implClassName 
+ " is no " + interfaceClass.getName());
                }

Now let's find out why class.isAssignableFrom(class) returns false...
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html

OK it is because it doesn't think that the SeamApplicationFactoryClass passed 
in is a subclass of the ApplicationFactory that was passed in.

You've been at this a couple days.  This may sound nuts, but you could try to 
write a class that loads the SeamApplicationFactory and the MyFaces one and 
call isAssignableFrom.  Put the code in a main method.  

When you execute the class you'll also know exactly the classpath is set up 
because you will have set it up on the command line (-cp switch).  

If it works in your little harness, then you know there is a weird classloader 
issue in JBoss.  If it doesn't work in your harness, you'll also be able to 
swap out MyFaces jars easily and see which version works.

This may seem like a lot of work, but as I said, you've been at it two days 
already, and sometimes these exercises uncover... shall we say... "user 
errors."   You know, the kind that you'll be embarrassed to tell me :)

Good luck.  I'll be out the rest of the day.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070115#4070115

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070115
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to