Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.naming.NameAlreadyBoundException when org.osjava.sj.delimiter is set in jndi.properties #17

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Add org.osjava.sj.delimiter=/ to jndi properties
2. Execute initialContext = new InitialContext(); and it throws the exception

What is the expected output? What do you see instead?

This call works when I remove the line, but then I'm stuck with period as the 
delimiter

What version of the product are you using? On what operating system?

simple-jndi-0.11.4.1 on WIndows 7 x64

Please provide any additional information below.

jndi.properties is 

java.naming.factory.initial=org.osjava.sj.SimpleContextFactory
org.osjava.sj.root=file:///c:/JdbcExtras/DataSources
org.osjava.sj.delimiter=/

The stack trace is

javax.naming.NameAlreadyBoundException: Name java.naming.factory.initial 
already bound.  Use rebind() to override
    at org.osjava.sj.jndi.AbstractContext.bind(AbstractContext.java:330)
    at org.osjava.sj.jndi.AbstractContext.bind(AbstractContext.java:345)
    at org.osjava.sj.loader.JndiLoader.jndiPut(JndiLoader.java:321)
    at org.osjava.sj.loader.JndiLoader.load(JndiLoader.java:266)
    at org.osjava.sj.loader.JndiLoader.loadDirectory(JndiLoader.java:156)
    at org.osjava.sj.loader.JndiLoader.loadDirectory(JndiLoader.java:104)
    at org.osjava.sj.SimpleContext.<init>(SimpleContext.java:98)
    at org.osjava.sj.SimpleContextFactory.getInitialContext(SimpleContextFactory.java:69)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
...

Original issue reported on code.google.com by chris_t_...@yahoo.co.uk on 12 Jun 2012 at 8:24

@GoogleCodeExporter
Copy link
Author

This happens to me as well.
Any resolution on this, please let us know.

Original comment by gsiva...@gmail.com on 24 Sep 2014 at 6:12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant