1 Reply Latest reply on May 15, 2009 3:25 AM by Max Tomlinson

    Unknown context variable name with an included jar

    Max Tomlinson Newbie

      Unknown context variable name with referenced jar

      I am building a seam app (app B) in eclipse that uses a jar created by another seam project (app A). This jar is essentially the jar out of app A’s build minus some components I don’t need. It has the empty seam.properties in it (so the seam deployer should see that is has components).

      I put appA.jar in the App B’s earContent folder and reference it in what I believe are all the correct places, including application.xml. Right now I’m using eclipse to build App B.

      When I start up my server in eclipse I see the components of the appA.jar in App B are loaded  (‘Component’ msgs for each item with a name annotation) and I see the application scope classes in the appA.jar getting initialized as well (‘Context Starting Up’ msgs). I’ve put breakpoints in the start up classes and see them getting instantiated, making db connections etc. All looks good so far. But these components do not get injected in my app B classes. My valdiator warnings also flags them as ‘Unknown context variables’. I’ve tried declaring them explicitly in components.xml but the loader flags them as dupe names (so it knows they are there). They seem to be missing in the context. Any ideas?

      Many thanks

        • 1. Re: Unknown context variable name with an included jar
          Max Tomlinson Newbie

          an update on this:
          I restructured the project (basically used seam-gen rather than the eclipse seam tool) so that I now no longer get 'unknown context variable' but my components are NOT injected in ejbs:
          1, components are injected fine in the authenticator class (NOT my ejb 'tho).
          2, my included jar contains a base class which is extended by the ejb (if that makes a difference)
          any ideas would be greatly appreciated