2 Replies Latest reply on Sep 8, 2009 7:44 PM by gdfgd eqwe

    Using GraphicImageStore in custom Servlet (Problem with Classloader?)

    manuel kallenbach Newbie

      I'm trying access the GraphicImageStore in a custom servlet:


      GraphicImageStore store=(GraphicImageStore) Component.getInstance(GraphicImageStore.class);


      This line throws the following exception:


      java.lang.ClassCastException: org.jboss.seam.ui.graphicImage.GraphicImageStore cannot be cast to org.jboss.seam.ui.graphicImage.GraphicImageStore


      I guess the problem is, that I have the jboss-seam-ui.jar both in testapp.ear/lib and testapp.ear/testapp.war/WEB-INF/lib.


      I do need it in testapp.ear/lib, because otherwise the classloader cannot find the class when I try to access it in my servlet.


      What's the correct way to do that?