Pessoal, Bom dia!
Tenho uma aplicação desenvolvida com a implementação eclipseLink estou tentando migrar para spring boot, porem to com algumas dificuldades, será que alguem consegue me ajudar.
Classe main
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
Application.yml
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
tomcat:
max-wait: 20000
max-active: 50
max-idle: 20
min-idle: 15
url: jdbc:mysql://localhost:3306/base?useSSL=false
username: root
password: root
jpa:
show-sql: true
server:
port: 8085
Classe de configuração do eclipse link
@Configuration
public class EclipseLinkJpaConfiguration extends JpaBaseConfiguration {
protected EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers);
}
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
return new EclipseLinkJpaVendorAdapter();
}
@Override
protected Map<String, Object> getVendorProperties() {
HashMap<String, Object> map = new HashMap<>();
map.put(PersistenceUnitProperties.WEAVING, "false");
return map;
}
// private String detectWeavingMode() {
// return InstrumentationLoadTimeWeaver.isInstrumentationAvailable() ? "true" : "static";
// }
}
Erro
Caused by: java.lang.SecurityException: class "javax.persistence.PersistenceContext"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898) ~[na:1.8.0_131]
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668) ~[na:1.8.0_131]
at java.lang.ClassLoader.defineClass(ClassLoader.java:761) ~[na:1.8.0_131]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_131]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_131]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_131]
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_131]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_131]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_131]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.<clinit>(PersistenceAnnotationBeanPostProcessor.java:172) ~[spring-orm-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 24 common frames omitted