我的代码有问题。代码适用于其他计算机,但不适用于我的。 我读过关于解决这个问题的解决方案,但解决方案是将jdk更改为http://jdk8.java.net/lambda/但仍然无效。有什么想法吗?
Caused by: java.lang.reflect.GenericSignatureFormatError: Signature Parse error: expected ')'
sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:124) ~[na:1.8.0-ea]
at sun.reflect.generics.parser.SignatureParser.parseFormalParameters(SignatureParser.java:586) ~[na:1.8.0-ea]
at sun.reflect.generics.parser.SignatureParser.parseMethodTypeSignature(SignatureParser.java:576) ~[na:1.8.0-ea]
at sun.reflect.generics.parser.SignatureParser.parseMethodSig(SignatureParser.java:171) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:55) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:43) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:74) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:48) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.ConstructorRepository.<init>(ConstructorRepository.java:51) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.MethodRepository.<init>(MethodRepository.java:46) ~[na:1.8.0-ea]
at sun.reflect.generics.repository.MethodRepository.make(MethodRepository.java:59) ~[na:1.8.0-ea]
at java.lang.reflect.Method.getGenericInfo(Method.java:101) ~[na:1.8.0-ea]
at java.lang.reflect.Method.getGenericReturnType(Method.java:249) ~[na:1.8.0-ea]
at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredMethodProperties(JavaXClass.java:113) ~[hibernate-commons-annotations-4.0.5.Final.jar:4.0.5.Final]
at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredProperties(JavaXClass.java:129) ~[hibernate-commons-annotations-4.0.5.Final.jar:4.0.5.Final]
at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredProperties(JavaXClass.java:121) ~[hibernate-commons-annotations-4.0.5.Final.jar:4.0.5.Final]
at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:263) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:224) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:775) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3845) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3799) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1412) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857) ~[hibernate-entitymanager-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) ~[hibernate-entitymanager-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425) ~[hibernate-core-4.3.10.Final.jar:4.3.10.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849) ~[hibernate-entitymanager-4.3.10.Final.jar:4.3.10.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343) ~[spring-orm-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318) ~[spring-orm-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 60 common frames omitted
答案 0 :(得分:0)
在极少数情况下,来自反射的签名与JVM内部的正确签名不匹配(反射方法在方法签名中添加其他“;”)。解决方案之一是采用代表签名的String,手动对其进行更改,然后再将其传递(这不是最佳方法,但是有时没有其他选择)。