开发者

Shiro Plugin conflicting with Quartz framework in Grails

开发者 https://www.devze.com 2023-01-18 14:13 出处:网络
I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3. Now I need to install the shiro plugin to my project. So, whenever I am installing shiro plugin to my proje

I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3.

Now I need to install the shiro plugin to my project. So, whenever I am installing shiro plugin to my project its getting installed successfully..

But again whenever I am running my project again it's giving compilation error as follows :

  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] Compile error during compilation with javac.
  [groovyc] ....scheduler\quartz\framework\CustomJDBCDelegate.java:46: com.securonix.application.scheduler.quartz.framework.CustomJDBCDelegate is not abstract and does not override abstract method updateSchedulerState(java.sql.Connection,java.lang.String,long,java.lang.String) in org.quartz.impl.jdbcjobstore.DriverDelegate
  [groovyc] public class CustomJDBCDelegate implements DriverDelegate, StdJDBCConstants {
  [groovyc]        ^

So after long look on shiro plugin I have found that it has some dependencies with plugins. In that one of the dependency is shiro-quartz-1.0.0-incubating.jar. So, now inside it's pom.xml file I have seen following line code :

<dependency>
     <groupId>quartz</groupId>
     <artifactId>quartz</artifactId>
</dependency>

As per our line in pom.xml, there is no tag of version with quartz dependency, that means whenever shiro getting installed in my project, simultaneously it's extracting latest library of quartz i.e. 1.8.3 with maven.

And inside that quartz 1.8.3 the method updateSchedulerState of class CustomJDBCDelegate has been changed from version quarts 1.7.3.

So now problem is I cannot change quartz-all-1.7.3 in my existing project, and wanted to use Shiro plugin too in my project.

So there should be some resolution so that shiro should get quartz-1.7.3 ve开发者_开发问答rsion rather than the latest one using maven.

Any help would be highly appreciated...

Thanks...


Maybe I'm getting this wrong, do you mean something like this?:

    <dependency>
        <groupId>org.apache.shiro</groupId>
        <artifactId>shiro-quartz</artifactId>
        <version>1.0.0-incubating</version>
        <exclusions>
            <exclusion>
                <groupId>quartz</groupId>
                <artifactId>quartz</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>1.7.3</version>
    </dependency>

then $ mvn dependency:tree

[...]

[INFO] +- org.apache.shiro:shiro-quartz:jar:1.0.0-incubating:compile
[INFO] |  \- org.apache.shiro:shiro-core:jar:1.0.0-incubating:compile
[INFO] |     +- org.slf4j:slf4j-api:jar:1.5.6:compile
[INFO] |     \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] \- org.quartz-scheduler:quartz:jar:1.7.3:compile
[INFO]    \- commons-logging:commons-logging:jar:1.1:compile
[INFO]       +- log4j:log4j:jar:1.2.12:compile
[INFO]       +- logkit:logkit:jar:1.0.1:compile
[INFO]       \- avalon-framework:avalon-framework:jar:4.1.3:compile
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号