[SJN-80] strange behavior if property file is named "default.properties" | |
| Status: | Open |
| Project: | Simple-JNDI |
| Component/s: | |
| Affects Version/s: | 0.11.2 |
| Fix Version/s: | 0.12 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Carsten Graef | Assignee: | Unassigned |
| Resolution: | Unresolved | ||
| Environment: | |||
| Description |
| It seems like you cannot call your property file "default.properties" (yields to NullPointerException). Maybe this is a wellknown issue in the context of JNDI (as
you have to have additional files for this to work properly), but it should be documented in the FAQ. Here's the stacktrace I got: ENTRY org.eclipse.osgi 4 0 2008-03-21 12:16:50.437 !MESSAGE An unexpected runtime error has occurred. !STACK 0 java.lang.NullPointerException at org.osjava.sj.loader.JndiLoader.jndiPut(JndiLoader.java:314) at org.osjava.sj.loader.JndiLoader.load(JndiLoader.java:277) 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:96) 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) at de.evandor.easyc.server.db.ConnectionManager.getDataSource(ConnectionManager.java:152) at de.evandor.easyc.server.repository.internal.EasyCBundleRegistry.runInstallDDL(EasyCBundleRegistry.java:133) at de.evandor.easyc.server.repository.internal.EasyCBundleRegistry.bundleChanged(EasyCBundleRegistry.java:72) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1210) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297) |
| Comment by bayard [ Sun, 6 Apr 2008 00:33:08 -0700 (PDT) ] |
| You should be able to call your file default.properties - however the 'default' does not become a part of the name. It's the equivalent of index.html for a webpage.
Ideally - including default in the name should be possible - the same way you can goto foo/index.html in a url, and you can goto foo/. Making this issue an improvement for that feature. |