Bug 22 : ResourceManager could not find directory [WEB-INF]
Priority 
Medium
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
0.9.3
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
22/07/2007
Updated 
22/07/2007
Type 
Bug
 
Attachments 
No attachments

INFO: DataSourcePool [mysql] autoCommit[false] transIsolation[READ_COMMITTED] min[1] max[25]
INFO: DataSourcePool [mysql] grow pool; busy[0] size[0] max[25]
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.avaje.ebean.server.plugin.FileHelper.getDictionaryDirectory(FileHelper.java:79)
at com.avaje.ebean.server.plugin.FileHelper.getDictionaryFile(FileHelper.java:49)
at com.avaje.ebean.server.plugin.PluginDbConfig.createDictionaryInfo(PluginDbConfig.java:255)
at com.avaje.ebean.server.plugin.PluginDbConfig. init (PluginDbConfig.java:86)
at com.avaje.ebean.server.plugin.MySqlPlugin. init (MySqlPlugin.java:39)
at com.avaje.ebean.server.plugin.PluginDbConfigFactory.byDatabaseName(PluginDbConfigFactory.java:64)
at com.avaje.ebean.server.plugin.PluginDbConfigFactory.byDataSource(PluginDbConfigFactory.java:85)
at com.avaje.ebean.server.plugin.PluginDbConfigFactory.create(PluginDbConfigFactory.java:37)
at com.avaje.ebean.server.plugin.PluginFactory.createDbConfig(PluginFactory.java:58)
at com.avaje.ebean.server.plugin.PluginFactory.create(PluginFactory.java:43)
at com.avaje.ebean.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:112)
at com.avaje.ebean.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:1)
at com.avaje.ebean.Ebean$ServerManager.getWithCreate(Ebean.java:188)
at com.avaje.ebean.Ebean$ServerManager.get(Ebean.java:175)
at com.avaje.ebean.Ebean$ServerManager.access$1(Ebean.java:165)
at com.avaje.ebean.Ebean. clinit (Ebean.java:107)
at TestMain.main(TestMain.java:14)
Caused by: com.avaje.lib.util.NotFoundException: ResourceManager could not find directory [WEB-INF]
at com.avaje.lib.resource.ResourceManager.initFileSource(ResourceManager.java:130)
at com.avaje.lib.resource.ResourceManager. clinit (ResourceManager.java:96)
... 17 more

 
Rob 22 Jul 04:42
What this means...

In short, if you try to use Ebean v0.9.2 it will look for a WEB-INF directory... in the process of finding a location to put a file (serialisation of the database dictionary).

If you are using Ebean as a normal (non webapp) application you do NOT have a WEB-INF directory (probably) and will get the error above.

Rob 22 Jul 04:50
Workaround: Explicitly specify a directory where Ebean can write the dictionary file to

In avaje.properties explicitly specify a directory. Note that Ebean actually creates a subdirectory under that to put the dictionary file into (and also reads .sql files from it for the Ebean.getSql(filename) method.

# use the current working directory
resource.directory=.

Rob 22 Jul 10:22
Fixed in 0.9.3

This is fixed in 0.9.3

woResponse

Upload a file