You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by nirmal_jatania <ni...@yahoo.com> on 2010/09/29 14:06:00 UTC

Shiro Plugin conflicting with Quartz framework in Grails

Hi All....

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>

So 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`
version rather than the latest one using maven.

Any help would be highly appreciated...

Thanks...

-- 
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-Plugin-conflicting-with-Quartz-framework-in-Grails-tp5583609p5583609.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro Plugin conflicting with Quartz framework in Grails

Posted by Peter Ledbrook <pe...@cacoethes.co.uk>.
> You'll want to contact the Grails mailing list to find out if there is
> a way to exclude the Shiro Grails Plugin's quartz dependency using
> exclude directives so your specific quartz .jar is used and not the
> one referenced from shiro's shiro-quartz .jar

This can be done if you use Grails 1.3+. Simply define the plugin as a
dependency in BuildConfig.groovy:

    grails.project.dependency.resolution = {
        inherits "global"
        log "warn"

        repositories {
            grailsPlugins()
            grailsHome()
        }
        plugins {
            compile ":shiro:1.1-SNAPSHOT", {
                exclude "quartz"
            }
        }
        dependencies {
            // specify dependencies here under either 'build',
'compile', 'runtime', 'test' or 'provided' scopes eg.
            // runtime 'mysql:mysql-connector-java:5.1.5'
        }
    }

I don't know whether the plugin should be depending on shiro-quartz or
not, but it seems as if Ivy is pulling in that optional dependency.

Peter

Re: Shiro Plugin conflicting with Quartz framework in Grails

Posted by Les Hazlewood <lh...@apache.org>.
Hi Nirmal,

Shiro does not use the 'latest version' of quartz - the version is
defined in the Shiro project's root pom.xml file and at the moment,
that version is 1.5.2.  But even then, the dependency is marked as
optional.

(Maven note: in Maven poms, you can define all libraries in a shared
<dependencyManagement> section in the project's root pom, and then
only reference the groupId/artifactId in children poms.  This is nice
because you don't repeat yourself across your project poms - when
upgrading from version N to N+1, you only need to change that number
in the root pom instead of going to any/all children files and
changing it there as well.  Shiro uses this technique in its own poms,
which is why you didn't see the version number in the shiro-quartz
child pom).

You'll want to contact the Grails mailing list to find out if there is
a way to exclude the Shiro Grails Plugin's quartz dependency using
exclude directives so your specific quartz .jar is used and not the
one referenced from shiro's shiro-quartz .jar

Regards,

-- 
Les Hazlewood
Founder, Katasoft, Inc.
Application Security Products & Professional Apache Shiro Support and Training:
http://www.katasoft.com

On Wed, Sep 29, 2010 at 5:06 AM, nirmal_jatania
<ni...@yahoo.com> wrote:
>
> Hi All....
>
> 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>
>
> So 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`
> version rather than the latest one using maven.
>
> Any help would be highly appreciated...
>
> Thanks...
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-Plugin-conflicting-with-Quartz-framework-in-Grails-tp5583609p5583609.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>