2 Replies Latest reply on Sep 12, 2002 12:10 PM by Jeff Parks

    HELP!! Servlet  WAR can't read factories

    Jeff Parks Newbie

      Jboss3.0 with Tomcat 4

      I have a startup Mbean that loads a bunch of factories at startup. I also have a Servlet that I deploy as a war. Here is the problem: It seems that the Servlet cannot access the Factories. It keeps getting null values back.

      Why can't the servlet access factories that I know are there (all of my startup ojects use the factories)?

      What is the work around?

      Please help - Friday is my last day to prove to my team and managers taht JBOSS is viable against our currently working Weblogic solution (I am porting over our stuff as a proof of concept).

      Thanks so much for all of you that have have helped me so far, and advance thanks for this help!

        • 1. Re: HELP!! Servlet  WAR can't read factories
          TRK Newbie

          Check whether the factory classes are duplicated in the war and the jar file in which you have deployed your factories.

          This duplication of classes could be the problem.


          • 2. Re: HELP!! Servlet  WAR can't read factories
            Jeff Parks Newbie

            The are not deployed in both packages - here is a psuedo snippet of what I am doing :

            again - Servlet is deployed as a WAR

            Startup MBEan:

            FactoryA is packaged in stuff_classes.jar and dropped in ../default/lib

            1. create and call FactoryA's configurator FactoryAConfigurator.

            2. FactoryAConfigurator does a FactoryA.makeInstance().setArguments();

            3. FactoryA spits out a bunch of "I am alive messages"

            4. When I make a call to the servlet, it in turn makes a call to FactoryA.makeInstance().configLocation() which should return the location ("/opt/config/") but instead returns null. This value is correct in the factory (other factories use this factory - and the all succeed)

            I currently have no classpath's set - instead relying on ../default/deply and ../default/lib