开发者

Java session facade not being found via InitialContext lookups

I have a project that is Java EE 5 running on Glassfish. The IDE is Netbeans 6.7.1.

We periodically have a very annoying problem with new session facades not being located via InitialContext:

javax.naming.NameNotFoundException: No object bound to name java:comp/env/GlobalConfigEntityFacadeLocal

In my class (within the same EJB container), I can use the other session facades just fine.

This sort of problem happens periodically, and a mixture of clean&build and deleting the build-im开发者_StackOverflow社区pl.xml files from nbproject sometimes resolve this.

We are not using ejb-jar.xml (stopped using that over a year ago, it is now an empty

The code that is calling this is very straight forward:

        GlobalConfigEntityFacadeLocal globalConfigEntityFacade = null;
        try {
            InitialContext ic = new InitialContext();
            globalConfigEntityFacade = (GlobalConfigEntityFacadeLocal) ic.lookup("java:comp/env/GlobalConfigEntityFacadeLocal");
            ...
        } catch ( ... ) {}

Any advice would be appreciated!!!!

Cheers


Well, it turned out to be web.xml. It's been so long since the last facade was created that we totally forgot that web.xml had to be updated.


This sort of problem happens periodically, and a mixture of clean&build and deleting the build-impl.xml files from nbproject sometimes resolve this.

I suspect a deployment problem and unless you can provide a deterministic way to reproduce it, I'm afraid it will remain a random problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜