1 2 Previous Next 16 Replies Latest reply on Nov 12, 2009 6:53 PM by prati Go to original post
      • 15. Re: Unable to query database - QuerySyntaxException: (object) is not mapped
        waltc

        Hi Jan,
            I have another question, actually two. The first is likely simpler. I could have sworn I had this working. Here goes, I have an action I created in it, during construction it must read an xml file to build a list of things to do. In one version that didn't work but worked better than what I am doing now I pointed to the xml file to open as relative to src/foo.xml. This, as I recall, worked. However, I don't think that was working under Eclipse. Under Eclipse it has the current working directory as the bin directory under jboss. Clearly that is wrong. So my question is this, is there, to your knowledge, a solid way to programatically tell where the current 'context' is. Perhaps a better clarification follows, which is my second question.


        The problem I am trying to solve is to use JMX to query the health of some database searches, through their multiplexer. Originally I decided to have the web query refresh every 60 seconds but that puts the burden on a web browser to always be running a given query. That isn't such a good solution I think. I then decided to write a small servlet that in its init() I created a scheduling thread pool and schedule runnable tasks to run every 60 seconds, do the JMX magic and build a row in the results table. The web app then only needs to look at the table to build the ongoing trend. However I found I could not inject either the log or the entityManager.I thought perhaps it needed to be a Seam component so I gave it an @Name but that did not work either.


        Any thoughts?


        Thanks,


        Walt

        • 16. Re: Unable to query database - QuerySyntaxException: (object) is not mapped
          prati

          Hi,


          Using fully qualified name worked for me.
          But is there any other better way rathar than writing full package name.



          Please Help


          1 2 Previous Next