java - Eclipselink Modelgen processor and Spring Security -
i trying use spring security in project use eclipselink modelgen processor generate static meta model. when try strange compilation errors like:
> java.lang.runtimeexception: com.sun.tools.javac.code.symbol$completionfailure: class file org.springframework.security.ldap.defaultspringsecuritycontextsource not found
even though not use ldap. if add jars other errors missing sl4j, missing openid, etc etc. if exchange used modelgen processor hibernate implementation compiles without problems.
i found minimal project reproduce problem:
myenity.java
@entity public class myentity { private string name; private long id; public string getname() { return name; } public void setname(string name) { this.name = name; } public long getid() { return id; } public void setid(long id) { this.id = id; } }
securityconfig.java
public class securityconfig extends websecurityconfigureradapter { }
build.gradle
apply plugin: 'war' apply plugin: 'maven' group = 'com.demo' version = 'alpha' sourcecompatibility = 1.8 targetcompatibility = 1.8 [compilejava, compiletestjava]*.options*.encoding = 'utf-8' repositories { maven { url "http://repo.maven.apache.org/maven2" } maven { url "http://download.eclipse.org/rt/eclipselink/maven.repo/" } } dependencies { compile 'org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:2.6.0'//latest stable @06.07.2015 compile "org.springframework:spring-beans:4.1.6.release" compile "org.springframework:spring-core:4.1.6.release" compile "org.springframework:spring-web:4.1.6.release" compile "org.springframework:spring-context:4.1.6.release" compile 'org.springframework:spring-jdbc:4.1.6.release' compile 'org.springframework.security:spring-security-core:4.0.2.release' compile 'org.springframework.security:spring-security-web:4.0.2.release' compile 'org.springframework.security:spring-security-config:4.0.2.release' providedcompile 'javax:javaee-api:7.0@jar' }
as remove
a) @entity myentity
or
b) extends websecurityconfigureradapter security config
or
c) use compile 'org.hibernate:hibernate-jpamodelgen:4.3.10.final'
instead of compile 'org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:2.6.0'
everything compiles without problems.
so why use of eclipselink modelgen processor cause compilation errors?
Comments
Post a Comment