title: Model instrumentation for inherited classes - ActiveWeb
body: <p>I have inherited model classes:</p>
  
  <pre><code>public class AbstractUser extends Model
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public class User extends AbstractUser
  </code></pre>
  
  <p>I'm attempting to extend from a base project into several children project.  The Users in each project will have many similar base attributes, but only one or two custom attributes.  I'm hoping I can extend in such a way, so when bugs/updates come in regarding base classes, I only have to make updates to the base class. Alternatively, I'll have to have duplicated code across several projects.  I'm planning on extending this to other classes as well.  No prob doing this with the app.controllers.  </p>
  
  <p>My base class of course fires up just fine.  In my extended classes, I'm executing:</p>
  
  <pre><code>mvn org.javalite:activejdbc-instrumentation:1.4.12:instrument
  </code></pre>
  
  <p>... then moving the exploded WAR into my Jetty webapp.  Whenever I hit the extended model, I get the following stack trace:</p>
  
  <pre><code>org.javalite.activejdbc.InitException: failed to determine Model class name, are you sure models have been instrumented?
  at org.javalite.activejdbc.Model.modelClass(Model.java:2726)
  at org.javalite.activejdbc.Model.findAll(Model.java:2349)
  at com.nearstar.model.ApplicationProperties.getInstance(ApplicationProperties.java:41)
  at app.controllers.LoginController.login(LoginController.java:56)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.javalite.activeweb.ControllerRunner.executeAction(ControllerRunner.java:289)
  at org.javalite.activeweb.ControllerRunner.run(ControllerRunner.java:65)
  at org.javalite.activeweb.RequestDispatcher.doFilter(RequestDispatcher.java:202)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
  at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
  at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
  at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
  at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
  at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
  at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
  at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
  at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
  at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
  at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
  at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
  at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
  at org.eclipse.jetty.server.Server.handle(Server.java:524)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
  at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>Is it possible to extend instrumented models in this manner? </p>