vahidhedayati / grails-modaldx-test

grails modaldynamix plugin tester for resources based apps grails < 2.4 apps
0 stars 3 forks source link

Not working on grails 2.4.4 #1

Open bpavie opened 10 years ago

bpavie commented 10 years ago

I tried to run the code using grails 2.4.4 by update BuildConfig.groovy and applicationContext.xml wihout any success. Here is the diff:

diff --git a/application.properties b/application.properties
index 857ab56..f08f787 100644
--- a/application.properties
+++ b/application.properties
@@ -1,5 +1,5 @@
 #Grails Metadata file
-#Thu Mar 13 21:29:10 GMT 2014
-app.grails.version=2.3.4
+#Tue Nov 04 13:58:15 CET 2014
+app.grails.version=2.4.4
 app.name=grails-modaldx-test
 app.version=0.1
diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy
index 14a881e..da2b895 100644
--- a/grails-app/conf/BuildConfig.groovy
+++ b/grails-app/conf/BuildConfig.groovy
@@ -53,18 +53,23 @@ grails.project.dependency.resolution = {

     plugins {
         // plugins for the build system only
-        build ":tomcat:7.0.47"
+       build ':tomcat:7.0.55'
+        //build ":tomcat:7.0.47"

         // plugins for the compile step
-        compile ":scaffolding:2.0.1"
-        compile ':cache:1.1.1'
+       compile ':cache:1.1.8'
+       compile ':scaffolding:2.1.2'
+        //compile ":scaffolding:2.1.2"
+        //compile ':cache:1.1.1'

         // plugins needed at runtime but not for compilation
-        runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.6"
-        runtime ":database-migration:1.3.8"
+        runtime ":hibernate:3.6.10.18" // or ":hibernate4:4.1.11.6"
+        //runtime ":database-migration:1.3.8"
         //runtime ":jquery:1.10.2.2"
-               runtime ":jquery:1.11.0.1"
-        runtime ":resources:1.2.1"
+       runtime ":jquery:1.11.1"
+//             runtime ":jquery:1.11.0.1"
+//        runtime ":resources:1.2.1"
+       runtime ":resources:1.2.13"
         // Uncomment these (or add new ones) to enable additional resources capabilities
         //runtime ":zipped-resources:1.0.1"
         //runtime ":cached-resources:1.1"
diff --git a/web-app/WEB-INF/applicationContext.xml b/web-app/WEB-INF/applicationContext.xml
index a48dec0..d4cae8f 100644
--- a/web-app/WEB-INF/applicationContext.xml
+++ b/web-app/WEB-INF/applicationContext.xml
@@ -6,7 +6,9 @@
        <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
                <description>Grails application factory bean</description>
                <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+<!--
                <property name="grailsResourceLoader" ref="grailsResourceLoader" />
+-->
        </bean>

        <bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
@@ -21,8 +23,9 @@
                </constructor-arg>
                <property name="pluginManager" ref="pluginManager" />
        </bean>
-
+<!--
        <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />
+-->

        <bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
                <property name="encoding">
@@ -31,4 +34,4 @@
        </bean>

        <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
-</beans>
\ No newline at end of file
+</beans>

But when I am running it, I still have some issues:

| Running Grails application
| Error 2014-11-04 14:39:10,847 [localhost-startStop-1] ERROR resource.ResourceProcessor  - Unable to load resources
Message: No signature of method: groovy.util.ConfigObject.getGrailsPlugin() is applicable for argument types: (java.lang.String) values: [jquery-ui]
    Line | Method
->>    4 | run                   in JqueryUiPluginResources
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     46 | doCall                in org.grails.plugin.resource.module.ModuleDeclarationsFactory$_getModuleDeclarations_closure2
|     41 | getModuleDeclarations in org.grails.plugin.resource.module.ModuleDeclarationsFactory
|    837 | loadModules           in org.grails.plugin.resource.ResourceProcessor
|   1135 | reloadAll . . . . . . in     ''
|    166 | doCall                in ResourcesGrailsPlugin$_closure3
|    266 | run . . . . . . . . . in java.util.concurrent.FutureTask
|   1142 | runWorker             in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run                   in java.lang.Thread
| Server running. Browse to http://localhost:8080/grails-modaldx-test
| Error 2014-11-04 14:39:33,275 [http-bio-8080-exec-4] ERROR [/grails-modaldx-test].[gsp]  - Servlet.service() for servlet [gsp] in context with path [/grails-modaldx-test] threw exception
Message: Error mapping onto view [/index]: Error applying layout : main
    Line | Method
->> 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    617 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run . . . in java.lang.Thread
Caused by GroovyPagesException: Error applying layout : main
->> 1142 | runWorker in /home/xxxxxx/Documents/Code/grails-modaldx-test/grails-app/views/layouts/main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    617 | run       in     ''
^    745 | run . . . in     ''
Caused by GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:javascript>: No module found with name [application]
->>  527 | runWorker in /home/xxxxxx/Documents/Code/grails-modaldx-test/grails-app/views/layouts/main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Caused by GrailsTagException: Error executing tag <g:javascript>: No module found with name [application]
->>   18 | doCall    in /home/xxxxxx/Documents/Code/grails-modaldx-test/grails-app/views/layouts/main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Caused by IllegalArgumentException: No module found with name [application]
->> 1188 | getAllModuleNamesRequired in org.grails.plugin.resource.ResourceProcessor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1221 | addModuleDispositionsToRequest in     ''
|    125 | declareModuleRequiredByPage in org.grails.plugin.resource.ResourceTagLib
|    310 | doCall    in org.grails.plugin.resource.ResourceTagLib$_closure5_closure18
|    306 | doCall .  in org.grails.plugin.resource.ResourceTagLib$_closure5
|     43 | doCall    in home_xxxxxx_Documents_Code_grails_modaldx_test_grails_app_views_layouts_main_gsp$_run_closure1
|     54 | run . . . in home_xxxxxx_Documents_Code_grails_modaldx_test_grails_app_views_layouts_main_gsp
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
vahidhedayati commented 10 years ago

Hi Ben

Wondering why you are using grails-modaldx-test for grails 2.4 assets app ?

I have put in the description: grails modaldynamix plugin tester for resources based apps grails < 2.4 apps

Anyways there is another test project which I downloaded and upgraded from 2.4.0 to 2.4.4

https://github.com/vahidhedayati/testmodaldynamix

I have tested this

The changes required to a vanilla 2.4.4 install are:

https://github.com/vahidhedayati/testmodaldynamix/blob/master/grails-app/conf/BuildConfig.groovy

compile ":jquery-ui:1.10.3"
compile ":modaldynamix:0.12" 

https://github.com/vahidhedayati/testmodaldynamix/blob/master/grails-app/views/layouts/main.gsp

<!-- Vahid load in bootstrap - if app has no bootstrap -->
<g:loadbootstrap/>

https://github.com/vahidhedayati/testmodaldynamix/blob/master/grails-app/assets/javascripts/application.js

//= require jquery
//= require jquery-ui/js/jquery-ui-1.10.3.custom.min

I think that was all