ClassNotFoundException: groovy.lang.GroovyShell

305 views
Skip to first unread message

Bernhard Döbler

unread,
Aug 15, 2014, 5:18:11 PM8/15/14
to wr...@googlegroups.com
Hi,

after I found wro4j-runner-1.7.6.jar on your google drive I set it up and called my ant script
I got:
        [exec] Exception in thread "main" java.lang.NoClassDefFoundError: groovy/lang/GroovyShell
        [exec]     at ro.isdc.wro.extensions.model.factory.GroovyModelFactory.create(GroovyModelFactory.java:64)
        [exec]     at ro.isdc.wro.extensions.model.factory.GroovyModelFactory.create(GroovyModelFactory.java:42)
        [exec]     at ro.isdc.wro.model.factory.LazyWroModelFactoryDecorator.create(LazyWroModelFactoryDecorator.java:28)
        [exec]     at ro.isdc.wro.model.factory.LazyWroModelFactoryDecorator.create(LazyWroModelFactoryDecorator.java:16)
        [exec]     at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:194)
        [exec]     at ro.isdc.wro.extensions.model.factory.SmartWroModelFactory.create(SmartWroModelFactory.java:38)
        [exec]     at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
        [exec]     at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:48)
        [exec]     at ro.isdc.wro.model.factory.FallbackAwareWroModelFactory.create(FallbackAwareWroModelFactory.java:22)
        [exec]     at ro.isdc.wro.model.factory.WroModelFactoryDecorator.create(WroModelFactoryDecorator.java:27)
        [exec]     at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:55)
        [exec]     at ro.isdc.wro.model.factory.ModelTransformerFactory.create(ModelTransformerFactory.java:27)
        [exec]     at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator$1.initialize(DefaultWroModelFactoryDecorator.java:60)
        [exec]     at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator$1.initialize(DefaultWroModelFactoryDecorator.java:50)
        [exec]     at ro.isdc.wro.util.LazyInitializer.get(LazyInitializer.java:33)
        [exec]     at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:114)
        [exec]     at ro.isdc.wro.model.factory.DefaultWroModelFactoryDecorator.create(DefaultWroModelFactoryDecorator.java:35)
        [exec]     at ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:71)
        [exec]     at ro.isdc.wro.cache.support.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:101)
        [exec]     at ro.isdc.wro.cache.support.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:35)
        [exec]     at ro.isdc.wro.cache.support.AbstractSynchronizedCacheStrategyDecorator.get(AbstractSynchronizedCacheStrategyDecorator.java:55)
        [exec]     at ro.isdc.wro.manager.ResourceBundleProcessor.serveProcessedBundle(ResourceBundleProcessor.java:63)
        [exec]     at ro.isdc.wro.manager.WroManager.process(WroManager.java:159)
        [exec]     at ro.isdc.wro.runner.Wro4jCommandLineRunner.doProcess(Wro4jCommandLineRunner.java:278)
        [exec]     at ro.isdc.wro.runner.Wro4jCommandLineRunner.processGroup(Wro4jCommandLineRunner.java:220)
        [exec]     at ro.isdc.wro.runner.Wro4jCommandLineRunner.process(Wro4jCommandLineRunner.java:187)
        [exec]     at ro.isdc.wro.runner.Wro4jCommandLineRunner.doMain(Wro4jCommandLineRunner.java:152)
        [exec]     at ro.isdc.wro.runner.Wro4jCommandLineRunner.main(Wro4jCommandLineRunner.java:104)
        [exec] Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyShell
        [exec]     at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        [exec]     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        [exec]     at java.security.AccessController.doPrivileged(Native Method)
        [exec]     at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        [exec]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        [exec]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        [exec]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        [exec]     ... 28 more

Where does the dependency to GroovyShell come from? How do I get rid of it?

Best,
Bernhard

Alex Objelean

unread,
Aug 15, 2014, 6:07:35 PM8/15/14
to wr...@googlegroups.com

The groovy dependency was removed from wro4j-runner, to make it smaller.

The reason why you get rhis error is probably because the wro.xml could not be found, and the default implementation tries to load wro.groovy model. This is indeed a problem and should be addressed. Could you open an issue?

Thanks,
Alex

--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j.
For more options, visit https://groups.google.com/d/optout.

Bernhard Döbler

unread,
Aug 16, 2014, 8:57:15 AM8/16/14
to wr...@googlegroups.com
It indeed works, when the wro.xml file exists.
I created an issue over at github: https://github.com/wro4j/wro4j-runner/issues/1

Best,
Bernhard
Reply all
Reply to author
Forward
0 new messages