changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Errors during the configuration of wro4j in spring context #477

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure ConfigureWro4jViaSpring and set the properties in 
applicationContext.xml
2. Start the webapp and call the page which includes wro resources
3. An Exception occurs because of a reflection issue 
(pupulateMapWithExtensionsProcessors) which should be populate... in 
clazz.getMethod("...",Map.class);
4. Even if I override the class in my project and use the right method name, 
the extensions are loaded but css files aren't minified anylonger and js are 
output with 0 bytes

What is the expected output? What do you see instead?
1. The extensions should be loaded as expected
2. The js / css minify should work
3. js files should not be 0 bytes

What version of the product are you using? On what operating system?
wro4j 1.4.6 (but the issue is also in 1.4.2)

Please provide any additional information below.

ro.isdc.wro.http.ConfigurableWroFilter

Original issue reported on code.google.com by noctur...@googlemail.com on 29 Jun 2012 at 9:16

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 9:18

GoogleCodeExporter commented 9 years ago
Could you checkout the project from github (branch 1.4.x) which contains the 
1.4.7 (that will be released this week) and confirm that everything works?

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 9:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Not the master branch. Clone the 1.4.x branch. This is the one containing the 
main dev changes.

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 9:30

GoogleCodeExporter commented 9 years ago
Doh! I just deleted my previous comment to write that Im going to clone it from 
1.4.x branch like you wrote - sorry for that.

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 9:31

GoogleCodeExporter commented 9 years ago
I hook in the two maven projects core / extension into my maven project but 
there is a compilation error in 
ro.isdc.wro.extensions.model.factory.GroovyModelFactory - the GroovyModelParser 
could not be resolved. 

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 9:53

GoogleCodeExporter commented 9 years ago
just use mvn compile or mvn clean install. The missing class should be 
generated after a build.

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 9:55

GoogleCodeExporter commented 9 years ago
Ok, fiiinnally I did it :) - Everything is working fine with 1.4.7 so we can 
close this bug. Extensions, CSS are minified and JS files are loaded in full 
size.

Thanks

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 10:54

GoogleCodeExporter commented 9 years ago
Hey by the way - you also fixed a bug that causes the browser not to cache the 
js file on client side. Great! Ty for that too :)

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 11:24

GoogleCodeExporter commented 9 years ago
What issue are you talking about?

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 11:26

GoogleCodeExporter commented 9 years ago
Currently I'm testing wro4j with Firebug and YSlow to get the best caching 
results in the client and to check if I can disable the caching behaviour on 
client side by modifying the server settings.

For other resources then js / css I use ehcache and if I want to debug I 
replace the filter in the applicationContext.xml with a filter that clears all 
headers and replaces them so that the client is going to load the files again.

What I noticed from version 1.4.2 to 1.4.7 is that firebug also says Not 
Modified if the js file which is generated by wro was not modified. In the old 
version on each reqquest the js file seems to be loaded again.

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 11:51

Attachments:

GoogleCodeExporter commented 9 years ago
Is there a way in wro to clear the client side caching for developing propose? 
The server side cache and model can be disabled and updated on each request. 
But I didn't found it for client side (via headers)

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 11:54

GoogleCodeExporter commented 9 years ago
There were plenty of changes between 1.4.2 and 1.4.7: 
http://code.google.com/p/wro4j/wiki/ReleaseNotes.

You can disable caching using the following property.
disableCache=false

This one should also change the headers (no caching on the client side).

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 11:56

GoogleCodeExporter commented 9 years ago
O I noticed that wro is detecting it intelligent by the change time of the file 
on server side. So everything is working like a charm now. 

This is the best web resource framework I've ever seen!

Original comment by noctur...@googlemail.com on 29 Jun 2012 at 11:57

GoogleCodeExporter commented 9 years ago
The above should be:
disableCache=true

Thanks :).. Glad you find it useful.

Original comment by alex.obj...@gmail.com on 29 Jun 2012 at 11:59