saw303 / grails-ic-alender

iCalender Plugin for Grails
http://grails.org/plugin/ic-alendar
Other
8 stars 11 forks source link

Dependencies of ical4j:2.0.0 kill application with Spring security #21

Closed demon101 closed 6 years ago

demon101 commented 7 years ago

New version (0.6.1) dependancies

+--- org.grails.plugins:iCalendar:0.6.1 | --- org.mnode.ical4j:ical4j:2.0.0 | +--- org.slf4j:slf4j-api:1.7.10 -> 1.7.21 | +--- org.apache.commons:commons-collections4:4.0 | +--- org.codehaus.groovy:groovy-all:2.3.2 -> 2.4.7 | +--- biz.aQute.bnd:bndlib:2.3.0 | | --- org.osgi:org.osgi.core:4.3.1 | +--- org.apache.commons:commons-lang3:3.3.2 | --- commons-codec:commons-codec:1.9

10Mb of new dependencies =)

Previous (0.6.0)

org.grails.plugins:iCalendar:0.6.0 | --- org.mnode.ical4j:ical4j:1.0.7 | +--- commons-logging:commons-logging:1.1.3 -> 1.2 | +--- commons-codec:commons-codec:1.8 -> 1.9 | +--- commons-lang:commons-lang:2.6 | --- backport-util-concurrent:backport-util-concurrent:3.1

Grails 3.1.15 The problem reproducible only on tomcat

Now I'm trying to exclude dependencies, without success.

compile ('org.grails.plugins:iCalendar:0.6.1'){ exclude group:'org.slf4j' exclude group:'biz.aQute.bnd' exclude group:'org.codehaus.groovy' exclude group:'commons-codec' }

Is it possible rollback dependencies ?

demon101 commented 7 years ago

java.lang.NullPointerException: null at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.findActionRoles(AnnotationFilterInvocationDefinition.groovy:458) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.findAnnotations(AnnotationFilterInvocationDefinition.groovy:425) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.findAnnotations(AnnotationFilterInvocationDefinition.groovy) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.findControllerAnnotations(AnnotationFilterInvocationDefinition.groovy:382) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.initialize(AnnotationFilterInvocationDefinition.groovy:223) at grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition$initialize.call(Unknown Source)

saw303 commented 7 years ago

Use https://bintray.com/saw303/plugins/org.grails.plugins%3AiCalendar/0.6.2

demon101 commented 7 years ago

@saw303 Funny, same results. Application context corrupted =) Will check on Monday

demon101 commented 7 years ago

org.mnode.ical4j:ical4j:1.0.7 | +--- commons-logging:commons-logging:1.1.3 -> 1.2 | +--- commons-codec:commons-codec:1.8 -> 1.9 | +--- commons-lang:commons-lang:2.6 | --- backport-util-concurrent:backport-util-concurrent:3.1

demon101 commented 7 years ago

@saw303 In new versions (0.6.1 & 0.6.2) jars /grails/plugins/ic/alendar/ApplicationLoader.class presented. It looks like a reason for failing of spring context

content:

package grails.plugins.ic.alendar;

import grails.plugins.ic.alendar.Application;
import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
import org.codehaus.groovy.runtime.callsite.CallSite;
import org.grails.boot.context.web.GrailsAppServletInitializer;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.web.WebApplicationInitializer;

public class ApplicationLoader extends GrailsAppServletInitializer implements WebApplicationInitializer {
    public ApplicationLoader() {
        CallSite[] var1 = $getCallSiteArray();
    }

    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        CallSite[] var2 = $getCallSiteArray();
        return (SpringApplicationBuilder)ScriptBytecodeAdapter.castToType(var2[0].call(application, Application.class), SpringApplicationBuilder.class);
    }
}

How you build and publish plugin?

saw303 commented 7 years ago

use gradlew clean build publishToMavenLocal

demon101 commented 7 years ago

@saw303 Have you changed gradle version?

I can't find ApplicationLoader class at any plugins. Looks like a reason for app fail

demon101 commented 7 years ago

Hi @saw303, have a look at comment https://github.com/grails/grails-core/issues/10569#issuecomment-315376018

Problem with the new version of your plugin caused by ApplicationLoader class. I don't know, why it presented in the plugin, but it produces problems.

Guito commented 6 years ago

Is there any reason this was closed? I'm having the same issue and I have had to go back to 0.6.0

saw303 commented 6 years ago

It has been closed since plugin version 0.6.2 does not use iCal4J version 2.x. See https://bintray.com/saw303/plugins/download_file?file_path=org%2Fgrails%2Fplugins%2FiCalendar%2F0.6.2%2FiCalendar-0.6.2.pom

demon101 commented 6 years ago

It still has problem with application.groovy plugin loading order. I think, plugin built with grails 3.3 and fails for grails 3.2. I hope on grails 3.3 app it works

чт, 19 апр. 2018 г., 15:06 Silvio Wangler notifications@github.com:

It has been closed since plugin version 0.6.2 does not use iCal4J version 2.x. See https://bintray.com/saw303/plugins/download_file?file_path=org%2Fgrails%2Fplugins%2FiCalendar%2F0.6.2%2FiCalendar-0.6.2.pom

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saw303/grails-ic-alender/issues/21#issuecomment-382727421, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTL6HgpxTo588W0HKJafPAcK5xHDhlMks5tqIvkgaJpZM4MLJzY .

Guito commented 6 years ago

So, is there any solution?

saw303 commented 6 years ago

Currently no. Any contributions are welcome

Guito commented 6 years ago

Ok, to be honest I have no idea on how to fix it and it would take me a lot of time to understand everything, so for the moment I'll keep 0.6.0. If I need to update I will try to fix it.

demon101 commented 6 years ago

The app stops failing after removing application.groovy from plugin The bug was fixed in the issue: https://github.com/grails/grails-core/issues/10569#issuecomment-315376018

But the version 3.2.12 not released

saw303 commented 6 years ago

Please try version 0.6.3

demon101 commented 6 years ago

works for me! Thx!

saw303 commented 6 years ago

@demon101 I'm glad it works. Thank you for your input and patience.

@Guito you might wanna give 0.6.3 a try?

Guito commented 6 years ago

@saw303 I confirm it works! Thank you very much for your effort.