newbie question: trying to run simple example: failed to initialize a CacheManager (ActiveJDBC + sqlite)

141 views
Skip to first unread message

torped...@gmail.com

unread,
Apr 1, 2015, 3:41:13 PM4/1/15
to activejd...@googlegroups.com
I have setup an eclipse project without maven & ant for testing purposes (might be stupid, but I am working on a legacy old application).

We want to use:
- sqlite (3.0)
- activejdbc (1.4.10)

The instrumentation batch builder rocks thanks to javalite site explanations:
C:\Program Files\Eclipse\eclipse>java -classpath C:\Users\Pierrick\Documents\Workspaces\uracer40\TestActiveJDBC\bin;C:\Users\Pierrick\Documents\Workspaces\uracer40\TestActiveJDBC;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\activejdbc-1.4.10.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\javalite-common-1.4.6.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\ehcache-core-2.7.1.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\sqlite-jdbc-3.8.7.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\slf4j-api-1.7.12.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\slf4j-simple-1.7.12.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\activejdbc-instrumentation-1.4.10.jar;C:\Users\Pierrick\Documents\Workspaces\uracer40\Test\lib\javassist-3.18.1-GA.jar -DoutputDirectory=C:\Users\Pierrick\Documents\Workspaces\uracer40\TestActiveJDBC\bin org.javalite.instrumentation.Main
**************************** START INSTRUMENTATION ****************************
Directory: C:\Users\Pierrick\Documents\Workspaces\uracer40\TestActiveJDBC\bin
Instrumented class: /C:/Users/Pierrick/Documents/Workspaces/uracer40/TestActiveJDBC/bin/Employee.class
**************************** END INSTRUMENTATION ****************************

Base.open("org.sqlite.JDBC", cnt, "root", "p@ssw0rd");
works like a charm.

But then following example triggers an exception:
 e.set("first_name", "John");

Exception:
// Compiled from Configuration.java (version 1.6 : 50.0, super bit)
public class org.javalite.activejdbc.Configuration {

bla bla bla

    311  athrow
    312  aload_0 [this]
    313  getfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
    316  ldc <String "cache.manager"> [45]
    318  invokevirtual java.util.Properties.getProperty(java.lang.String) : java.lang.String [46]
    321  astore_1 [cacheManagerClass]
    322  aload_1 [cacheManagerClass]
    323  ifnull 356
    326  aload_1 [cacheManagerClass]
    327  invokestatic java.lang.Class.forName(java.lang.String) : java.lang.Class [47]
    330  astore_2 [cmc]
    331  aload_2 [cmc]
    332  invokevirtual java.lang.Class.newInstance() : java.lang.Object [48]
    335  checkcast org.javalite.activejdbc.cache.CacheManager [49]
    338  putstatic org.javalite.activejdbc.Configuration.cacheManager : org.javalite.activejdbc.cache.CacheManager [50]
    341  goto 356
    344  astore_2 [e]
    345  new org.javalite.activejdbc.InitException [37]
    348  dup
    349  ldc <String "failed to initialize a CacheManager. Please, ensure that the property 'cache.manager' points to correct class which extends 'activejdbc.cache.CacheManager' class and provides a default constructor."> [52]
    351  aload_2 [e]

So I read the source code:
Configuration.java -> constructor
        } catch (IOException e) {
            throw new InitException(e);
        }

line #81 (..)

A properties file is missing...

Read the doc again: the cacheManager extends class is missing. Cool. So I try following settings in activejdbc.properties in the bin folder (with all instrumented classes, including activejdbc_models.properties)

####################################################################################################
# cache.manager provides a class name of a class that extends org.javalite.activejdbc.cache.CacheManager class.
# this property will override all @Cached annotations. If this property exists
# then ActiveJDBC will obey annotations and will enable caching for those models that
# have the @Cached annotations. If this property does not exist, then no caching will be
# performed across runtime, regardless of @Cached annotations. Think of this as a global switch.
#####################################################################################################

cache.manager=org.javalite.activejdbc.cache.OSCacheManager
cache.enabled=true

I tried following libraries:
ehcache-core-2.7.1 => recommended.
oscache-2.4.1

with the enabled flag combinaisons true or false, test it or without activejdbc.properties.

Still the same issue. I feel compelled to tell you mates I am stucked after 2 days of site surfing & post reading!

We want to use ActiveJDBC as it fits exactly our design and technical requirements: lite & simple ;) !!!

I feel we are missing some newbie setup as such issue should have already happen (arrrg!)

Any help is welcome!
-> suitable url, post, and so on

ps: we tried to call our last hope Obiwan Kenobi, but he's booked on another business right now :(

Igor Polevoy

unread,
Apr 1, 2015, 3:53:23 PM4/1/15
to activejd...@googlegroups.com
HI, 
which example app are you trying? OSCache is dead, and not supported anymore. 
Simply delete the activejdbc.properties file from your project. 

tx 

torped...@gmail.com

unread,
Apr 1, 2015, 4:17:31 PM4/1/15
to activejd...@googlegroups.com

Base.open("org.sqlite.JDBC", cnt, "root", "p@ssw0rd");
            logger.info    ("test {}", cnt);
           
            Employee e = new Employee();

            e.set("first_name", "John");
            e.set("last_name", "Doe");
            e.saveIt();
           
            Base.close();

/../Simply delete the activejdbc.properties file from your project.
-> till the same issue (the one we got first)

Modified to run in an eclipe (luna)  java project

torped...@gmail.com

unread,
Apr 2, 2015, 4:00:03 AM4/2/15
to activejd...@googlegroups.com
Igor, let me know if you want me a simple sample workspace to support your project (and if it makes sense).

I donate to keep the project alive ;)

torped...@gmail.com

unread,
Apr 2, 2015, 4:11:45 AM4/2/15
to activejd...@googlegroups.com
it is not line #81, but #95:
String cacheManagerClass = properties.getProperty("cache.manager");
        if(cacheManagerClass != null){

            try{
                Class cmc = Class.forName(cacheManagerClass);
                cacheManager = (CacheManager)cmc.newInstance();
            }catch(Exception e){
                throw new InitException("failed to initialize a CacheManager. Please, ensure that the property " +
                        "'cache.manager' points to correct class which extends 'activejdbc.cache.CacheManager' class and provides a default constructor.", e);

            }

        }

On Wednesday, April 1, 2015 at 9:41:13 PM UTC+2, torped...@gmail.com wrote:

Igor Polevoy

unread,
Apr 2, 2015, 11:24:51 AM4/2/15
to activejd...@googlegroups.com
help is always welcome!
What is a "simple sample workspace" ? 

Igor Polevoy

unread,
Apr 2, 2015, 11:25:29 AM4/2/15
to activejd...@googlegroups.com
you do not need a cache manager. Remove activejdbc.properties file from your project 

torped...@gmail.com

unread,
Apr 2, 2015, 11:51:25 AM4/2/15
to activejd...@googlegroups.com
just a zip of a workspace with project inside, that's it.

I deleted all activejdbc.properties files!!!!

Still crashing. I read the code, no clue why the registry successes to load an unexisting property file??? weird weird weird...

Igor Polevoy

unread,
Apr 2, 2015, 11:57:43 AM4/2/15
to activejd...@googlegroups.com
are you trying a sample project or wrote your own? 

Also, please post the stack trace

torped...@gmail.com

unread,
Apr 2, 2015, 2:15:14 PM4/2/15
to activejd...@googlegroups.com
enclosed the example I played with (notice: update the script instrument.bat, I made a lazy initialization...)
https://drive.google.com/open?id=0B6CRgFlTAdPBbDBrbmRwT01Selk&authuser=0

A long stack trace (hope you'll be more lucky than me!)

// Compiled from Configuration.java (version 1.6 : 50.0, super bit)
public class org.javalite.activejdbc.Configuration {
 
  // Field descriptor #89 Ljava/util/Map;
  // Signature: Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
  private java.util.Map modelsMap;
 
  // Field descriptor #93 Ljava/util/Properties;
  private java.util.Properties properties;
 
  // Field descriptor #95 Lorg/javalite/activejdbc/cache/CacheManager;
  private static org.javalite.activejdbc.cache.CacheManager cacheManager;
 
  // Field descriptor #97 Lorg/slf4j/Logger;
  private static final org.slf4j.Logger logger;
 
  // Field descriptor #99 Ljava/util/SortedMap;
  // Signature: Ljava/util/SortedMap<Ljava/lang/String;Lorg/javalite/activejdbc/dialects/Dialect;>;
  private java.util.SortedMap dialects;
 
  // Method descriptor #102 ()V
  // Stack: 4, Locals: 12
  protected Configuration();
      0  aload_0 [this]
      1  invokespecial java.lang.Object() [1]
      4  aload_0 [this]
      5  new java.util.HashMap [2]
      8  dup
      9  invokespecial java.util.HashMap() [3]
     12  putfield org.javalite.activejdbc.Configuration.modelsMap : java.util.Map [4]
     15  aload_0 [this]
     16  new java.util.Properties [5]
     19  dup
     20  invokespecial java.util.Properties() [6]
     23  putfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
     26  aload_0 [this]
     27  new org.javalite.activejdbc.CaseInsensitiveMap [8]
     30  dup
     31  invokespecial org.javalite.activejdbc.CaseInsensitiveMap() [9]
     34  putfield org.javalite.activejdbc.Configuration.dialects : java.util.SortedMap [10]
     37  aload_0 [this]
     38  invokevirtual java.lang.Object.getClass() : java.lang.Class [11]
     41  invokevirtual java.lang.Class.getClassLoader() : java.lang.ClassLoader [12]
     44  ldc <String "activejdbc_models.properties"> [13]
     46  invokevirtual java.lang.ClassLoader.getResources(java.lang.String) : java.util.Enumeration [14]
     49  astore_1 [resources]
     50  aload_1 [resources]
     51  invokeinterface java.util.Enumeration.hasMoreElements() : boolean [15] [nargs: 1]
     56  ifeq 243
     59  aload_1 [resources]
     60  invokeinterface java.util.Enumeration.nextElement() : java.lang.Object [16] [nargs: 1]
     65  checkcast java.net.URL [17]
     68  astore_2 [url]
     69  getstatic org.javalite.activejdbc.Configuration.logger : org.slf4j.Logger [18]
     72  ldc <String "Load models from: {}"> [19]
     74  aload_2 [url]
     75  invokevirtual java.net.URL.toExternalForm() : java.lang.String [20]
     78  invokestatic org.javalite.activejdbc.LogFilter.log(org.slf4j.Logger, java.lang.String, java.lang.Object) : void [21]
     81  aconst_null
     82  astore_3 [inputStream]
     83  aconst_null
     84  astore 4 [isreader]
     86  aconst_null
     87  astore 5 [reader]
     89  aload_2 [url]
     90  invokevirtual java.net.URL.openStream() : java.io.InputStream [22]
     93  astore_3 [inputStream]
     94  new java.io.InputStreamReader [23]
     97  dup
     98  aload_3 [inputStream]
     99  invokespecial java.io.InputStreamReader(java.io.InputStream) [24]
    102  astore 4 [isreader]
    104  new java.io.BufferedReader [25]
    107  dup
    108  aload 4 [isreader]
    110  invokespecial java.io.BufferedReader(java.io.Reader) [26]
    113  astore 5 [reader]
    115  aload 5 [reader]
    117  invokevirtual java.io.BufferedReader.readLine() : java.lang.String [27]
    120  dup
    121  astore 6 [line]
    123  ifnull 204
    126  aload 6 [line]
    128  bipush 58
    130  invokestatic org.javalite.common.Util.split(java.lang.String, char) : java.lang.String[] [28]
    133  astore 7 [parts]
    135  aload 7 [parts]
    137  iconst_0
    138  aaload
    139  astore 8 [modelName]
    141  aload 7 [parts]
    143  iconst_1
    144  aaload
    145  astore 9 [dbName]
    147  aload_0 [this]
    148  getfield org.javalite.activejdbc.Configuration.modelsMap : java.util.Map [4]
    151  aload 9 [dbName]
    153  invokeinterface java.util.Map.get(java.lang.Object) : java.lang.Object [29] [nargs: 2]
    158  checkcast java.util.List [30]
    161  astore 10 [modelNames]
    163  aload 10 [modelNames]
    165  ifnonnull 191
    168  new java.util.ArrayList [31]
    171  dup
    172  invokespecial java.util.ArrayList() [32]
    175  astore 10 [modelNames]
    177  aload_0 [this]
    178  getfield org.javalite.activejdbc.Configuration.modelsMap : java.util.Map [4]
    181  aload 9 [dbName]
    183  aload 10 [modelNames]
    185  invokeinterface java.util.Map.put(java.lang.Object, java.lang.Object) : java.lang.Object [33] [nargs: 3]
    190  pop
    191  aload 10 [modelNames]
    193  aload 8 [modelName]
    195  invokeinterface java.util.List.add(java.lang.Object) : boolean [34] [nargs: 2]
    200  pop
    201  goto 115
    204  aload 5 [reader]
    206  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    209  aload 4 [isreader]
    211  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    214  aload_3 [inputStream]
    215  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    218  goto 240
    221  astore 11
    223  aload 5 [reader]
    225  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    228  aload 4 [isreader]
    230  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    233  aload_3 [inputStream]
    234  invokestatic org.javalite.common.Util.closeQuietly(java.io.Closeable) : void [35]
    237  aload 11
    239  athrow
    240  goto 50
    243  goto 256
    246  astore_1 [e]
    247  new org.javalite.activejdbc.InitException [37]
    250  dup
    251  aload_1 [e]
    252  invokespecial org.javalite.activejdbc.InitException(java.lang.Throwable) [38]
    255  athrow
    256  aload_0 [this]
    257  getfield org.javalite.activejdbc.Configuration.modelsMap : java.util.Map [4]
    260  invokeinterface java.util.Map.isEmpty() : boolean [39] [nargs: 1]
    265  ifeq 277
    268  getstatic org.javalite.activejdbc.Configuration.logger : org.slf4j.Logger [18]
    271  ldc <String "ActiveJDBC Warning: Cannot locate any models, assuming project without models."> [40]
    273  invokestatic org.javalite.activejdbc.LogFilter.log(org.slf4j.Logger, java.lang.String) : void [41]
    276  return
    277  aload_0 [this]
    278  invokevirtual java.lang.Object.getClass() : java.lang.Class [11]
    281  ldc <String "/activejdbc.properties"> [42]
    283  invokevirtual java.lang.Class.getResourceAsStream(java.lang.String) : java.io.InputStream [43]
    286  astore_1 [in]
    287  aload_1 [in]
    288  ifnull 299
    291  aload_0 [this]
    292  getfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
    295  aload_1 [in]
    296  invokevirtual java.util.Properties.load(java.io.InputStream) : void [44]
    299  goto 312
    302  astore_1 [e]
    303  new org.javalite.activejdbc.InitException [37]
    306  dup
    307  aload_1 [e]
    308  invokespecial org.javalite.activejdbc.InitException(java.lang.Throwable) [38]

    311  athrow
    312  aload_0 [this]
    313  getfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
    316  ldc <String "cache.manager"> [45]
    318  invokevirtual java.util.Properties.getProperty(java.lang.String) : java.lang.String [46]
    321  astore_1 [cacheManagerClass]
    322  aload_1 [cacheManagerClass]
    323  ifnull 356
    326  aload_1 [cacheManagerClass]
    327  invokestatic java.lang.Class.forName(java.lang.String) : java.lang.Class [47]
    330  astore_2 [cmc]
    331  aload_2 [cmc]
    332  invokevirtual java.lang.Class.newInstance() : java.lang.Object [48]
    335  checkcast org.javalite.activejdbc.cache.CacheManager [49]
    338  putstatic org.javalite.activejdbc.Configuration.cacheManager : org.javalite.activejdbc.cache.CacheManager [50]
    341  goto 356
    344  astore_2 [e]
    345  new org.javalite.activejdbc.InitException [37]
    348  dup
    349  ldc <String "failed to initialize a CacheManager. Please, ensure that the property 'cache.manager' points to correct class which extends 'activejdbc.cache.CacheManager' class and provides a default constructor."> [52]
    351  aload_2 [e]
    352  invokespecial org.javalite.activejdbc.InitException(java.lang.String, java.lang.Throwable) [53]
    355  athrow
    356  return
      Exception Table:
        [pc: 89, pc: 204] -> 221 when : any
        [pc: 221, pc: 223] -> 221 when : any
        [pc: 37, pc: 243] -> 246 when : java.io.IOException
        [pc: 277, pc: 299] -> 302 when : java.io.IOException
        [pc: 326, pc: 341] -> 344 when : java.lang.Exception
      Line numbers:
        [pc: 0, line: 48]
        [pc: 4, line: 41]
        [pc: 15, line: 42]
        [pc: 26, line: 46]
        [pc: 37, line: 50]
        [pc: 50, line: 51]
        [pc: 59, line: 52]
        [pc: 69, line: 53]
        [pc: 81, line: 54]
        [pc: 83, line: 55]
        [pc: 86, line: 56]
        [pc: 89, line: 58]
        [pc: 94, line: 59]
        [pc: 104, line: 60]
        [pc: 115, line: 62]
        [pc: 126, line: 64]
        [pc: 135, line: 65]
        [pc: 141, line: 66]
        [pc: 147, line: 68]
        [pc: 163, line: 69]
        [pc: 168, line: 70]
        [pc: 177, line: 71]
        [pc: 191, line: 73]
        [pc: 201, line: 74]
        [pc: 204, line: 76]
        [pc: 209, line: 77]
        [pc: 214, line: 78]
        [pc: 218, line: 79]
        [pc: 221, line: 76]
        [pc: 228, line: 77]
        [pc: 233, line: 78]
        [pc: 240, line: 80]
        [pc: 243, line: 83]
        [pc: 246, line: 81]
        [pc: 247, line: 82]
        [pc: 256, line: 84]
        [pc: 268, line: 85]
        [pc: 276, line: 86]
        [pc: 277, line: 89]
        [pc: 287, line: 90]
        [pc: 299, line: 93]
        [pc: 302, line: 91]
        [pc: 303, line: 92]
        [pc: 312, line: 95]
        [pc: 322, line: 96]
        [pc: 326, line: 99]
        [pc: 331, line: 100]
        [pc: 341, line: 104]
        [pc: 344, line: 101]
        [pc: 345, line: 102]
        [pc: 356, line: 107]
      Local variable table:
        [pc: 135, pc: 201] local: parts index: 7 type: java.lang.String[]
        [pc: 141, pc: 201] local: modelName index: 8 type: java.lang.String
        [pc: 147, pc: 201] local: dbName index: 9 type: java.lang.String
        [pc: 163, pc: 201] local: modelNames index: 10 type: java.util.List
        [pc: 123, pc: 204] local: line index: 6 type: java.lang.String
        [pc: 69, pc: 240] local: url index: 2 type: java.net.URL
        [pc: 83, pc: 240] local: inputStream index: 3 type: java.io.InputStream
        [pc: 86, pc: 240] local: isreader index: 4 type: java.io.InputStreamReader
        [pc: 89, pc: 240] local: reader index: 5 type: java.io.BufferedReader
        [pc: 50, pc: 243] local: resources index: 1 type: java.util.Enumeration
        [pc: 247, pc: 256] local: e index: 1 type: java.io.IOException
        [pc: 287, pc: 299] local: in index: 1 type: java.io.InputStream
        [pc: 303, pc: 312] local: e index: 1 type: java.io.IOException
        [pc: 331, pc: 341] local: cmc index: 2 type: java.lang.Class
        [pc: 345, pc: 356] local: e index: 2 type: java.lang.Exception
        [pc: 0, pc: 357] local: this index: 0 type: org.javalite.activejdbc.Configuration
        [pc: 322, pc: 357] local: cacheManagerClass index: 1 type: java.lang.String
      Local variable type table:
        [pc: 163, pc: 201] local: modelNames index: 10 type: java.util.List<java.lang.String>
        [pc: 50, pc: 243] local: resources index: 1 type: java.util.Enumeration<java.net.URL>
      Stack map table: number of frames 15
        [pc: 50, full, stack: {}, locals: {org.javalite.activejdbc.Configuration, java.util.Enumeration}]
        [pc: 115, full, stack: {}, locals: {org.javalite.activejdbc.Configuration, java.util.Enumeration, java.net.URL, java.io.InputStream, java.io.InputStreamReader, java.io.BufferedReader}]
        [pc: 191, full, stack: {}, locals: {org.javalite.activejdbc.Configuration, java.util.Enumeration, java.net.URL, java.io.InputStream, java.io.InputStreamReader, java.io.BufferedReader, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.util.List}]
        [pc: 204, full, stack: {}, locals: {org.javalite.activejdbc.Configuration, java.util.Enumeration, java.net.URL, java.io.InputStream, java.io.InputStreamReader, java.io.BufferedReader}]
        [pc: 221, same_locals_1_stack_item, stack: {java.lang.Throwable}]
        [pc: 240, full, stack: {}, locals: {org.javalite.activejdbc.Configuration, java.util.Enumeration}]
        [pc: 243, chop 1 local(s)]
        [pc: 246, same_locals_1_stack_item, stack: {java.io.IOException}]
        [pc: 256, same]
        [pc: 277, same]
        [pc: 299, same]
        [pc: 302, same_locals_1_stack_item, stack: {java.io.IOException}]
        [pc: 312, same]
        [pc: 344, full, stack: {java.lang.Exception}, locals: {org.javalite.activejdbc.Configuration, java.lang.String}]
        [pc: 356, same]
 
  // Method descriptor #150 (Ljava/lang/String;)Ljava/util/List;
  // Signature: (Ljava/lang/String;)Ljava/util/List<Ljava/lang/String;>;
  // Stack: 2, Locals: 2
  java.util.List getModelNames(java.lang.String dbName) throws java.io.IOException;
     0  aload_0 [this]
     1  getfield org.javalite.activejdbc.Configuration.modelsMap : java.util.Map [4]
     4  aload_1 [dbName]
     5  invokeinterface java.util.Map.get(java.lang.Object) : java.lang.Object [29] [nargs: 2]
    10  checkcast java.util.List [30]
    13  areturn
      Line numbers:
        [pc: 0, line: 110]
      Local variable table:
        [pc: 0, pc: 14] local: this index: 0 type: org.javalite.activejdbc.Configuration
        [pc: 0, pc: 14] local: dbName index: 1 type: java.lang.String
 
  // Method descriptor #154 ()Z
  // Stack: 3, Locals: 1
  public boolean collectStatistics();
     0  aload_0 [this]
     1  getfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
     4  ldc <String "collectStatistics"> [54]
     6  ldc <String "false"> [55]
     8  invokevirtual java.util.Properties.getProperty(java.lang.String, java.lang.String) : java.lang.String [56]
    11  invokestatic org.javalite.common.Convert.toBoolean(java.lang.Object) : java.lang.Boolean [57]
    14  invokevirtual java.lang.Boolean.booleanValue() : boolean [58]
    17  ireturn
      Line numbers:
        [pc: 0, line: 114]
      Local variable table:
        [pc: 0, pc: 18] local: this index: 0 type: org.javalite.activejdbc.Configuration
 
  // Method descriptor #154 ()Z
  // Stack: 3, Locals: 1
  public boolean collectStatisticsOnHold();
     0  aload_0 [this]
     1  getfield org.javalite.activejdbc.Configuration.properties : java.util.Properties [7]
     4  ldc <String "collectStatisticsOnHold"> [59]
     6  ldc <String "false"> [55]
     8  invokevirtual java.util.Properties.getProperty(java.lang.String, java.lang.String) : java.lang.String [56]
    11  invokestatic org.javalite.common.Convert.toBoolean(java.lang.Object) : java.lang.Boolean [57]
    14  invokevirtual java.lang.Boolean.booleanValue() : boolean [58]
    17  ireturn
      Line numbers:
        [pc: 0, line: 118]
      Local variable table:
        [pc: 0, pc: 18] local: this index: 0 type: org.javalite.activejdbc.Configuration
 
  // Method descriptor #154 ()Z
  // Stack: 1, Locals: 1
  public boolean cacheEnabled();
     0  getstatic org.javalite.activejdbc.Configuration.cacheManager : org.javalite.activejdbc.cache.CacheManager [50]
     3  ifnull 10
     6  iconst_1
     7  goto 11
    10  iconst_0
    11  ireturn
      Line numbers:
        [pc: 0, line: 122]
      Local variable table:
        [pc: 0, pc: 12] local: this index: 0 type: org.javalite.activejdbc.Configuration
      Stack map table: number of frames 2
        [pc: 10, same]
        [pc: 11, same_locals_1_stack_item, stack: {int}]
 
  // Method descriptor #158 (Lorg/javalite/activejdbc/MetaModel;)Lorg/javalite/activejdbc/dialects/Dialect;
  // Stack: 3, Locals: 3
  org.javalite.activejdbc.dialects.Dialect getDialect(org.javalite.activejdbc.MetaModel mm);
      0  aload_0 [this]
      1  getfield org.javalite.activejdbc.Configuration.dialects : java.util.SortedMap [10]
      4  aload_1 [mm]
      5  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
      8  invokeinterface java.util.SortedMap.get(java.lang.Object) : java.lang.Object [61] [nargs: 2]
     13  checkcast org.javalite.activejdbc.dialects.Dialect [62]
     16  astore_2 [dialect]
     17  aload_2 [dialect]
     18  ifnonnull 182
     21  aload_1 [mm]
     22  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
     25  ldc <String "Oracle"> [63]
     27  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
     30  ifeq 44
     33  new org.javalite.activejdbc.dialects.OracleDialect [65]
     36  dup
     37  invokespecial org.javalite.activejdbc.dialects.OracleDialect() [66]
     40  astore_2 [dialect]
     41  goto 167
     44  aload_1 [mm]
     45  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
     48  ldc <String "MySQL"> [67]
     50  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
     53  ifeq 67
     56  new org.javalite.activejdbc.dialects.MySQLDialect [68]
     59  dup
     60  invokespecial org.javalite.activejdbc.dialects.MySQLDialect() [69]
     63  astore_2 [dialect]
     64  goto 167
     67  aload_1 [mm]
     68  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
     71  ldc <String "PostgreSQL"> [70]
     73  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
     76  ifeq 90
     79  new org.javalite.activejdbc.dialects.PostgreSQLDialect [71]
     82  dup
     83  invokespecial org.javalite.activejdbc.dialects.PostgreSQLDialect() [72]
     86  astore_2 [dialect]
     87  goto 167
     90  aload_1 [mm]
     91  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
     94  ldc <String "h2"> [73]
     96  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
     99  ifeq 113
    102  new org.javalite.activejdbc.dialects.H2Dialect [74]
    105  dup
    106  invokespecial org.javalite.activejdbc.dialects.H2Dialect() [75]
    109  astore_2 [dialect]
    110  goto 167
    113  aload_1 [mm]
    114  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
    117  ldc <String "Microsoft SQL Server"> [76]
    119  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
    122  ifeq 136
    125  new org.javalite.activejdbc.dialects.MSSQLDialect [77]
    128  dup
    129  invokespecial org.javalite.activejdbc.dialects.MSSQLDialect() [78]
    132  astore_2 [dialect]
    133  goto 167
    136  aload_1 [mm]
    137  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
    140  ldc <String "SQLite"> [79]
    142  invokevirtual java.lang.String.equalsIgnoreCase(java.lang.String) : boolean [64]
    145  ifeq 159
    148  new org.javalite.activejdbc.dialects.SQLiteDialect [80]
    151  dup
    152  invokespecial org.javalite.activejdbc.dialects.SQLiteDialect() [81]
    155  astore_2 [dialect]
    156  goto 167
    159  new org.javalite.activejdbc.dialects.DefaultDialect [82]
    162  dup
    163  invokespecial org.javalite.activejdbc.dialects.DefaultDialect() [83]
    166  astore_2 [dialect]
    167  aload_0 [this]
    168  getfield org.javalite.activejdbc.Configuration.dialects : java.util.SortedMap [10]
    171  aload_1 [mm]
    172  invokevirtual org.javalite.activejdbc.MetaModel.getDbType() : java.lang.String [60]
    175  aload_2 [dialect]
    176  invokeinterface java.util.SortedMap.put(java.lang.Object, java.lang.Object) : java.lang.Object [84] [nargs: 3]
    181  pop
    182  aload_2 [dialect]
    183  areturn
      Line numbers:
        [pc: 0, line: 126]
        [pc: 17, line: 127]
        [pc: 21, line: 128]
        [pc: 33, line: 129]
        [pc: 44, line: 131]
        [pc: 56, line: 132]
        [pc: 67, line: 134]
        [pc: 79, line: 135]
        [pc: 90, line: 137]
        [pc: 102, line: 138]
        [pc: 113, line: 140]
        [pc: 125, line: 141]
        [pc: 136, line: 143]
        [pc: 148, line: 144]
        [pc: 159, line: 146]
        [pc: 167, line: 148]
        [pc: 182, line: 150]
      Local variable table:
        [pc: 0, pc: 184] local: this index: 0 type: org.javalite.activejdbc.Configuration
        [pc: 0, pc: 184] local: mm index: 1 type: org.javalite.activejdbc.MetaModel
        [pc: 17, pc: 184] local: dialect index: 2 type: org.javalite.activejdbc.dialects.Dialect
      Stack map table: number of frames 8
        [pc: 44, append: {org.javalite.activejdbc.dialects.Dialect}]
        [pc: 67, same]
        [pc: 90, same]
        [pc: 113, same]
        [pc: 136, same]
        [pc: 159, same]
        [pc: 167, same]
        [pc: 182, same]
 
  // Method descriptor #165 ()Lorg/javalite/activejdbc/cache/CacheManager;
  // Stack: 1, Locals: 1
  public org.javalite.activejdbc.cache.CacheManager getCacheManager();
    0  getstatic org.javalite.activejdbc.Configuration.cacheManager : org.javalite.activejdbc.cache.CacheManager [50]
    3  areturn
      Line numbers:
        [pc: 0, line: 155]
      Local variable table:
        [pc: 0, pc: 4] local: this index: 0 type: org.javalite.activejdbc.Configuration
 
  // Method descriptor #102 ()V
  // Stack: 1, Locals: 0
  static {};
     0  ldc_w <Class org.javalite.activejdbc.Configuration> [85]
     3  invokestatic org.slf4j.LoggerFactory.getLogger(java.lang.Class) : org.slf4j.Logger [86]
     6  putstatic org.javalite.activejdbc.Configuration.logger : org.slf4j.Logger [18]
     9  return
      Line numbers:
        [pc: 0, line: 44]

Igor Polevoy

unread,
Apr 2, 2015, 2:24:10 PM4/2/15
to activejd...@googlegroups.com
this is not stack trace, this is more like byte code. 
Can you post an actual stack trace of the problem? 
...

torped...@gmail.com

unread,
Apr 2, 2015, 3:15:58 PM4/2/15
to activejd...@googlegroups.com
Configuration.<init>() line: 76   
Registry.<init>() line: 51   
Registry.<clinit>() line: 45   
Employee(Model).modelRegistryLocal() line: 1169   
Employee(Model).set(String, Object) line: 223   
Company.createEmployee() line: 43   
Company.main(String[]) line: 18   
...

Igor Polevoy

unread,
Apr 2, 2015, 3:37:49 PM4/2/15
to activejd...@googlegroups.com
man getting information from you is like pulling teeth! :)

where is the exception?
...

torped...@gmail.com

unread,
Apr 2, 2015, 4:28:40 PM4/2/15
to activejd...@googlegroups.com
Company [Java Application]   
    Company at localhost:54911   
        Thread [main] (Suspended (exception NoSuchMethodError))   
            Configuration.<init>() line: 76   
            Registry.<init>() line: 51   
            Registry.<clinit>() line: 45   
            Employee(Model).modelRegistryLocal() line: 1169   
            Employee(Model).set(String, Object) line: 223   
            Company.createEmployee() line: 43   
            Company.main(String[]) line: 18   
    C:\Program Files\Java\jre1.8.0_31\bin\javaw.exe (Apr 2, 2015, 9:13:39 PM)   
<terminated>instrumentation [Program]   
    <terminated, exit value: 0>C:\Users\Pierrick\Documents\Workspaces\eclipse_no_ant\Example\scripts\instrument.bat

console empty   

5 teeth already pulled out  )


On Wednesday, April 1, 2015 at 9:41:13 PM UTC+2, torped...@gmail.com wrote:

Igor Polevoy

unread,
Apr 2, 2015, 5:11:19 PM4/2/15
to activejd...@googlegroups.com
So... you have NoSuchMethodError 

Are you sure you use instrumentation plugin that is exactly the same version as the framework? 

torped...@gmail.com

unread,
Apr 3, 2015, 2:38:21 AM4/3/15
to activejd...@googlegroups.com
fixed. Thank you so much Igor, you're the best.
javalite-common-1.4.10 was in 1.4.6.
I'll continue to promote activejdbc.
I encourage all users to donate for your job, patient support and keep this awesome project alive.

On Wednesday, April 1, 2015 at 9:41:13 PM UTC+2, torped...@gmail.com wrote:

Igor Polevoy

unread,
Apr 3, 2015, 12:21:00 PM4/3/15
to activejd...@googlegroups.com
glad it is working for you!
Reply all
Reply to author
Forward
0 new messages