我试图在Eclipse上运行Server应用程序。我已经导入了Project,但是当我运行它时,我收到了这个错误:
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.
然后,整个应用程序崩溃了:
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.<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:\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 <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)
(...)等等(...)
我试图在三天内理解这个错误,并且我已经设法看到这是关于persistence.xml文件,jpa和spring的内容,但我无法理解为什么我得到这个错误。你能救我吗?
错误引用的persistence.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>
提前谢谢!
答案 0 :(得分:0)
下载并安装Apache Activemq 5.15并运行它。
使用命令“ gradlew clean tomcatrunwar”运行Fineract平台
通过Eclipse,使用以下命令连接到已经运行的Fineract服务器 “远程调试”