A better way to getting someone to help is by posting all relevant details including the snippets of the configuration files and the entire exception stacktrace and the relevant snippet of code.
Like I suspected, you are doing the lookup of java:comp namespace from a random thread. That won't work. The java:comp (like some other namespaces) is a special namespace of the managed component. It is accessible only from the component to which it belongs. For example, if you are configuring the java:comp of a web module, then the servlets within that web module can access it.