1

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-impl.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

0

2 Answers 2

2

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.