Install/Configure Ebean

1. Classpath

Put in your classpath


Also put in the classpath...

// if you use JTA Transactions

// if you use jug for UUID Generation

// if you use Lucene Text Indexing

If you are going to use the Entity Bean Code Generator to generate Annotated Entity Beans also put in the classpath...


3. Locate

Determine the appropriate location to put the file.

4. Edit

Edit file taking special note of configuring the DataSource and location of logs.

5. Create a Class with a main method that contains Ebean.getServer(null);

You can use code below. Run the Class.

package test;

import com.avaje.ebean.Ebean;

public class Test {

        public static void main(String[] args) {

6. Running the class you should see something along the lines of...

 INFO: Ebean Version[0.9.0-061028] Java Version[1.5.0_03]
 INFO: DataSourcePool [ora10] autoCommit[false] transIsolation[READ_COMMITTED] min[1] max[25]
 INFO: DataSourcePool [ora10] grow pool;  busy[0] size[0] max[25]
 INFO: IoRepository initialised dirs[C:/devjava/project/appzsite/webapp/WEB-INF/data] zips[]
 INFO: Plugin[][com.avaje.ebean.server.plugin.Oracle10Plugin]
 INFO: Stopping []
 INFO: ThreadPool [TransactionManager] Shutting down; threadCount[1] busyCount[0]
 INFO: DataSourcePool [ora10] shutdown
 INFO: Closing Connection[ora10.1] psReuse[0] psCreate[0] psSize[0]

7. Take special note of the Plugin being used.

For databases not yet tested against the Plugin will be com.avaje.ebean.server.plugin.BasePlugin.

If you use BasePlugin then you need to additionally set some database specific configuration such as quoted identifiers, supportsGetGenerated keys etc.

Refer to baseplugin_readme.txt

9. Goto Getting Started (or README.2.txt)


Nothing in Console

If you only get DONE appearing in the Console (System.out) then check the file to make sure "log.toconsole=true"

If Ebean can not find the file you will get something like

Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.avaje.ebean.Ebean.(
        at unitext.ex.Test.main(
Caused by: java.lang.RuntimeException: Can not find file 
-[C:\devjava\project\appZsite\] to load properties
        at com.avaje.lib.SystemProperties.loadProperties(
        at com.avaje.lib.SystemProperties.defaultInit(
        at com.avaje.lib.SystemProperties.getProperty(
        at com.avaje.lib.SystemProperties.getProperty(
        at com.avaje.lib.Log.create(
        at com.avaje.lib.Log.(
        ... 2 more

If Ebean can not find the 'logs' directory

FATAL ERROR: init of FileLogger: 
Can't get log directory [logs] from [C:\devjava\project\appZsite]
FATAL ERROR: init of FileLogger: 
Can't get log directory [logs] from [C:\devjava\project\appZsite]
Can't get log directory [logs] from [C:\devjava\project\appZsite]
        at com.avaje.lib.SimpleLogger.getFilePath(
        at com.avaje.lib.SimpleLogger.init(

Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements