title: An error occurred while registering a ClassTransformer with PersistenceUnitInfo
body: <p>I'm trying to run a Server application on Eclipse. I've imported the Project but, when I run it I get this error:</p>
  
  <pre><code>25  jpa-pu  WARN   [localhost-startStop-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'jpa-pu', root URL [file:/C:/SourceCodeTFS/DC_MicroCreditoServer/Dev/DEV/fineract-provider/bin]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
  36  jpa-pu  INFO   [localhost-startStop-1] openjpa.Runtime - OpenJPA dynamically loaded a validation provider.
  14:42:49.579 [main] INFO  ch.vorburger.exec.ManagedProcess - Successfully destroyed Program [C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin\bin\mysqld.exe, --no-defaults, --console, --skip-grant-tables, --max_allowed_packet=64M, --basedir=C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin, --datadir=C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\data, --port=57244] (in working directory C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin)
  14:42:49.579 [main] INFO  ch.vorburger.mariadb4j.DB - Database stopped.
  </code></pre>
  
  <p>And then, the whole application crashes:</p>
  
  <pre><code>14:42:49.579 [main] INFO  ch.vorburger.exec.ManagedProcess - Successfully destroyed Program [C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin\bin\mysqld.exe, --no-defaults, --console, --skip-grant-tables, --max_allowed_packet=64M, --basedir=C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin, --datadir=C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\data, --port=57244] (in working directory C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\build\db\bin)
  14:42:49.579 [main] INFO  ch.vorburger.mariadb4j.DB - Database stopped.
  Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:124)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
      at org.apache.fineract.ServerWithMariaDB4jApplication.main(ServerWithMariaDB4jApplication.java:56)
  Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:100)
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.&lt;init&gt;(TomcatEmbeddedServletContainer.java:74)
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:295)
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:147)
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:148)
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:121)
      ... 7 more
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.fineract.infrastructure.core.boot.WebXmlConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.fineract.infrastructure.security.filter.TenantAwareBasicAuthenticationFilter org.apache.fineract.infrastructure.core.boot.WebXmlConfiguration.basicAuthenticationProcessingFilter; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'basicAuthenticationProcessingFilter' defined in file [C:\SourceCodeTFS\DC_MicroCreditoServer\Dev\DEV\fineract-provider\bin\org\apache\fineract\infrastructure\security\filter\TenantAwareBasicAuthenticationFilter.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.security.authentication.AuthenticationManager]: : Error creating bean with name 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'customAuthenticationProvider' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customAuthenticationProvider' defined in URL [file:/C:/SourceCodeTFS/DC_MicroCreditoServer/Dev/DEV/fineract-provider/bin/META-INF/spring/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.fineract.infrastructure.security.domain.PlatformUserRepository org.apache.fineract.infrastructure.security.service.TenantAwareJpaPlatformUserDetailsService.platformUserRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository': Cannot resolve reference to bean 'jpaMapppingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMapppingContext': Invocation of init method failed; nested exception is &lt;openjpa-2.4.1-r422266:1730418 fatal user error&gt; org.apache.openjpa.util.MetaDataException: The type "class org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom" has not been enhanced.; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'customAuthenticationProvider' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customAuthenticationProvider' defined in URL [file:/C:/SourceCodeTFS/DC_MicroCreditoServer/Dev/DEV/fineract-provider/bin/META-INF/spring/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.fineract.infrastructure.security.domain.PlatformUserRepository org.apache.fineract.infrastructure.security.service.TenantAwareJpaPlatformUserDetailsService.platformUserRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository': Cannot resolve reference to bean 'jpaMapppingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMapppingContext': Invocation of init method failed; nested exception is &lt;openjpa-2.4.1-r422266:1730418 fatal user error&gt; org.apache.openjpa.util.MetaDataException: The type "class org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom" has not been enhanced.
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:301)
  </code></pre>
  
  <p>(...) and so on (...)</p>
  
  <p>I'm trying to understand this error for three days now and I've managed to see that is something about the persistence.xml file, the jpa and spring but I can't understand why I get this error. Can you help me?</p>
  
  <p>The persistence.xml part that the error refers:</p>
  
  <pre><code>&lt;persistence version="2.0"
      xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
  
      &lt;persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL"&gt;
          &lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;
      &lt;properties&gt;
          &lt;property name="openjpa.Compatibility" value="QuotedNumbersInQueries=true"/&gt;
          &lt;property name="openjpa.jdbc.DBDictionary" value="org.apache.fineract.infrastructure.core.domain.MySQLDictionaryCustom"/&gt;
          &lt;!--&lt;property name="openjpa.InverseManager" value="true(Action=warn)"/&gt; --&gt;
        &lt;property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/&gt;
         &lt;property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=CASCADE"/&gt;
      &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Thank you in advance!</p>