Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy version conflicts when running farmStart with a war file. #93

Closed
rszewczyk opened this issue Oct 6, 2014 · 7 comments
Closed

Groovy version conflicts when running farmStart with a war file. #93

rszewczyk opened this issue Oct 6, 2014 · 7 comments
Assignees
Labels

Comments

@rszewczyk
Copy link

@rszewczyk rszewczyk commented Oct 6, 2014

I'm using gretty (v1.1.3) with a war file from a Grails application that uses groovy 2.1.9. The application fails to start when running farmStart with the error: groovy-all is loaded in version 2.1.9 and you are trying to load version 2.3.6. My current workaround is to delete the groovy-all jar from the exploded war file. Is there a way to have Gretty not put its version of groovy on the classpath when using a war file?

@akhikhl
Copy link
Owner

@akhikhl akhikhl commented Oct 6, 2014

It's difficult to remove groovy from webapps classpath, because webapp must get parent classloader from server, otherwise Servlet API would not work.
I faced a similar problem in September and settled for a different solution: forcibly upgrade groovy version in the webapp to the one used in the server.
Could you, please, try whether my solution would work for you? You'll need to apply Gretty 1.1.4-SNAPSHOT:

buildscript {
  repositories {
    // ...
    maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
  }
  dependencies {
    classpath 'org.akhikhl.gretty:gretty:1.1.4-SNAPSHOT'
  }
}

apply plugin: 'org.akhikhl.gretty'

repositories {
  // ...
  maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
@rszewczyk
Copy link
Author

@rszewczyk rszewczyk commented Oct 6, 2014

Yes - it works. It seems a little bit backwards to force the webapp to use a different version of groovy - however for my current use case (a convenient way to run functional tests) it should be fine.

Thank you for the quick reply. This is a really great plugin.

@akhikhl
Copy link
Owner

@akhikhl akhikhl commented Oct 6, 2014

I'll meditate on classpath riddle and maybe I'll find a solution with better isolation between server and webapp.
The release 1.1.4 is coming today late evening or tomorrow morning. I'm currently documenting a lot of new features and fixes 😄

@akhikhl
Copy link
Owner

@akhikhl akhikhl commented Oct 7, 2014

Gretty release 1.1.4 is out, with abovementioned groovy version fix. Please use it instead of snapshot.

@akhikhl akhikhl added the bug label Oct 9, 2014
@akhikhl akhikhl self-assigned this Oct 9, 2014
akhikhl added a commit that referenced this issue Oct 9, 2014
…rt with a war file.". Now fixed groovy version conflicts when running spring-boot products.
@akhikhl
Copy link
Owner

@akhikhl akhikhl commented Oct 9, 2014

I just fixed related bug on Gretty 1.1.5-SNAPSHOT:
There's groovy version conflict, when running spring-boot product with groovy version different from 2.3.7.
I hope I "covered all bases" regarding groovy version conflict. Now it should be back to "just works" mode.

@akhikhl akhikhl added the resolved label Oct 9, 2014
@akhikhl
Copy link
Owner

@akhikhl akhikhl commented Oct 15, 2014

@rszewczyk , can you confirm that the problem is solved in 1.1.4?

@rszewczyk
Copy link
Author

@rszewczyk rszewczyk commented Oct 16, 2014

Sorry for the delayed response. Yes - it works in the 1.1.4 release. Thanks!

@akhikhl akhikhl closed this May 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.