I'm implementing stateless session bean ejb3 in glassfish server using netbeans. First time, it is working properly. Later, I'm getting the exception as follows:
LDR5012: Jndi name conflict found in
[SampleEjb3]. Jndi name
[Lulu.HellostatelessRemote] for bean
[HellostatelessBean] is already in
use. LDR5013: Naming exception while
creating EJB container:
javax.naming.NameAlreadyBoundException:
Use rebind to override
at com.sun.enterprise.naming.TransientContext.doBindOrRebind(TransientContext.java:292)
at com.sun.enterprise.naming.TransientContext.bind(TransientContext.java:232)
at com.sun.enterprise.naming.SerialContextProviderImpl.bind(SerialContextProviderImpl.java:111)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:90)
at com.sun.enterprise.naming.SerialContext.bind(SerialContext.java:461)
at com.sun.enterprise.naming.SerialContext.bind(SerialContext.java:476)
at javax.naming.InitialContext.bind(InitialContext.java:404)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManagerImpl.java:237)
at com.sun.enterprise.naming.NamingManagerImpl.publishObject(NamingManagerImpl.java:190)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1015)
at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:232)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:654)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:536)
at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:188)
at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126)
at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244)
at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:225)
at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:217)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)
at com.sun.enterprise.server.PEMain.run(PEMain.java:411)
at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Then, I'll remove the ejb module from the glassfish server and I'll restart the server. It will work then. So, how to overcome this problem..
Try restart server. Weblogic 11g has this bug.