title: Error with OpenJPA and processing a class
body: <p>This is the error shown:</p>
  
  <pre><code>exception
  
  &lt;openjpa-2.3.0-r422266:1540826 fatal user error&gt; org.apache.openjpa.persistence.ArgumentException: An error occurred while processing registered class "class no.avexis.fjellkam.Models.Cabin".
      org.apache.openjpa.meta.MetaDataRepository.processRegisteredClasses(MetaDataRepository.java:1684)
      org.apache.openjpa.meta.ClassMetaData.getPCSubclasses(ClassMetaData.java:376)
      org.apache.openjpa.jdbc.meta.MappingRepository.findBaseClassMapping(MappingRepository.java:1539)
      org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:402)
      org.apache.openjpa.meta.MetaDataRepository.preMapping(MetaDataRepository.java:769)
      org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:658)
      org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:418)
      org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
      org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:227)
      org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:182)
      org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:312)
      org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:236)
      org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
      org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
      no.avexis.fjellkam.DAO.AdminDAO.getEvents(AdminDAO.java:161)
      no.avexis.fjellkam.Controllers.Common.ArticleServlet.doGet(ArticleServlet.java:33)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  root cause
  
  java.lang.IllegalStateException: Can't overwrite cause with java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.openjpa.util.IntId]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
      java.lang.Throwable.initCause(Throwable.java:457)
      org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1324)
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1203)
      java.lang.ClassLoader.loadClass(ClassLoader.java:411)
      java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      org.apache.openjpa.enhance.no$avexis$fjellkam$Models$Cabin$pcsubclass.pcNewObjectIdInstance(Unknown Source)
      org.apache.openjpa.enhance.PCRegistry.newObjectId(PCRegistry.java:140)
      org.apache.openjpa.meta.MetaDataRepository.processRegisteredClass(MetaDataRepository.java:1731)
      org.apache.openjpa.meta.MetaDataRepository.processRegisteredClasses(MetaDataRepository.java:1681)
      org.apache.openjpa.meta.ClassMetaData.getPCSubclasses(ClassMetaData.java:376)
      org.apache.openjpa.jdbc.meta.MappingRepository.findBaseClassMapping(MappingRepository.java:1539)
      org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:402)
      org.apache.openjpa.meta.MetaDataRepository.preMapping(MetaDataRepository.java:769)
      org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:658)
      org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:418)
      org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
      org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:227)
      org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:182)
      org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:312)
      org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:236)
      org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
      org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
      no.avexis.fjellkam.DAO.AdminDAO.getEvents(AdminDAO.java:161)
      no.avexis.fjellkam.Controllers.Common.ArticleServlet.doGet(ArticleServlet.java:33)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  root cause
  
  java.lang.ClassNotFoundException
      org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1323)
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1203)
      java.lang.ClassLoader.loadClass(ClassLoader.java:411)
      java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      org.apache.openjpa.enhance.no$avexis$fjellkam$Models$Cabin$pcsubclass.pcNewObjectIdInstance(Unknown Source)
      org.apache.openjpa.enhance.PCRegistry.newObjectId(PCRegistry.java:140)
      org.apache.openjpa.meta.MetaDataRepository.processRegisteredClass(MetaDataRepository.java:1731)
      org.apache.openjpa.meta.MetaDataRepository.processRegisteredClasses(MetaDataRepository.java:1681)
      org.apache.openjpa.meta.ClassMetaData.getPCSubclasses(ClassMetaData.java:376)
      org.apache.openjpa.jdbc.meta.MappingRepository.findBaseClassMapping(MappingRepository.java:1539)
      org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:402)
      org.apache.openjpa.meta.MetaDataRepository.preMapping(MetaDataRepository.java:769)
      org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:658)
      org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:418)
      org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
      org.apache.openjpa.enhance.ManagedClassSubclasser.configureMetaData(ManagedClassSubclasser.java:227)
      org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:182)
      org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:312)
      org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:236)
      org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
      org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153)
      org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
      no.avexis.fjellkam.DAO.AdminDAO.getEvents(AdminDAO.java:161)
      no.avexis.fjellkam.Controllers.Common.ArticleServlet.doGet(ArticleServlet.java:33)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p>Here is how I have class file looks like:</p>
  
  <pre><code>package no.avexis.fjellkam.Models;
  
  import java.io.Serializable;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Entity
  @Table(name = "CABIN")
  public class Cabin implements Serializable {
  
      private static final long serialVersionUID = -9160490433220569097L;
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer cabinID;
  
      private String cabin;
      private String title;
      private String description;
  
      public Cabin() {
          this.cabin = "";
          this.title = "";
          this.description = "";
      }
  
      public Cabin(String cabin, String title, String description) {
          this.cabin = cabin;
          this.title = title;
          this.description = description;
      }
  
      public String getCabin() {
          return cabin;
      }
  
      public void setCabin(String cabin) {
          this.cabin = cabin;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public Integer getCabinID() {
          return cabinID;
      }
  
  }
  </code></pre>
  
  <p>I keep getting this error for all my classes, and I either must be overlooking something, or I've done something very wrong.
  It would seem as though there is an error while parsing the class, or locating the class?</p>