向 PersistenceUnitInformation 注册类转换器时出错



我正在尝试在Eclipse上运行服务器应用程序。我已经导入了项目,但是当我运行它时,出现此错误:

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:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbinbinmysqld.exe, --no-defaults, --console, --skip-grant-tables, --max_allowed_packet=64M, --basedir=C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbin, --datadir=C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbdata, --port=57244] (in working directory C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbin)
14:42:49.579 [main] INFO  ch.vorburger.mariadb4j.DB - Database stopped.

然后,整个应用程序崩溃:

14:42:49.579 [main] INFO  ch.vorburger.exec.ManagedProcess - Successfully destroyed Program [C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbinbinmysqld.exe, --no-defaults, --console, --skip-grant-tables, --max_allowed_packet=64M, --basedir=C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbin, --datadir=C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbdata, --port=57244] (in working directory C:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbuilddbbin)
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.<init>(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:SourceCodeTFSDC_MicroCreditoServerDevDEVfineract-providerbinorgapachefineractinfrastructuresecurityfilterTenantAwareBasicAuthenticationFilter.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 <openjpa-2.4.1-r422266:1730418 fatal user error> 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 <openjpa-2.4.1-r422266:1730418 fatal user error> 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)

(...) 等等 (...)

我正在尝试理解此错误三天了,我已经设法看到这是关于持久性.xml文件,jpa和spring的东西,但我不明白为什么我会收到此错误。你可以帮我吗?

错误引用的持久性.xml部分:

<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">
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<properties>
<property name="openjpa.Compatibility" value="QuotedNumbersInQueries=true"/>
<property name="openjpa.jdbc.DBDictionary" value="org.apache.fineract.infrastructure.core.domain.MySQLDictionaryCustom"/>
<!--<property name="openjpa.InverseManager" value="true(Action=warn)"/> -->
<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
<property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=CASCADE"/>
</properties>
</persistence-unit>
</persistence>

提前谢谢你!

  1. 下载并安装 Apache Activemq 5.15 并运行它。

  2. 使用命令"gradlew clean tomcatrunwar"运行Fineract平台

  3. 通过 Eclipse,使用 连接到已经在运行的 Fineract 服务器 "远程调试">

http://mail-archives.apache.org/mod_mbox/fineract-dev/201711.mbox/%3CCA+cniaRyYyMgbxpfkxTJYj_JdO61LnHrSbtkQN0JfQXqUxHZSw@mail.gmail.com%3E

最新更新