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

class loader issue with type checking extensions #107

Closed
kgeis opened this Issue Mar 31, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@kgeis
Contributor

kgeis commented Mar 31, 2017

I am using http-building-ng-core 0.14.1 in a Grails 3.2.8 application. The application works fine when I run it from command line. When I build a WAR file and deploy it to Tomcat 7.0.75, I run into problems.

...
Caused by: java.lang.ExceptionInInitializerError: null
at groovyx.net.http.HttpObjectConfigImpl.(HttpObjectConfigImpl.java:34)
at groovyx.net.http.HttpBuilder.configure(HttpBuilder.java:161)
at groovyx.net.http.HttpBuilder.configure(HttpBuilder.java:137)
at groovyx.net.http.HttpBuilder$configure.call(Unknown Source)
...
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: Static type checking extension 'typecheckhttpconfig.groovy' was not found on the class
path.

I can work around this by extracting typecheckhttpconfig.groovy from the JAR file and placing it in WEB-INF/classes.

@cjstehno

This comment has been minimized.

Collaborator

cjstehno commented Apr 2, 2017

Interesting. I know it works with Ratpack and Spring-boot... I guess I'll have to dig deep and remember how to build a war-based application to see what's going on. :-) Are you using any frameworks or does this happen in just a plain vanilla war file deployment?

(oops... just noticed that you mentioned Grails. Not sure whether that is important or not, but will need to keep that in mind).

@cjstehno cjstehno added the bug label Apr 2, 2017

@kgeis

This comment has been minimized.

Contributor

kgeis commented Apr 3, 2017

Thanks for looking into this. I will work to create a minimal example that triggers this, but I wanted to file this first in case any thoughts jumped out. As stated, the framework is Grails 3.2.8.

My long-term strategy may be to move to using Spring Boot's embedded Tomcat in production.

@kgeis

This comment has been minimized.

Contributor

kgeis commented Apr 3, 2017

I built a minimal example and tested it with various releases of Tomcat. It fails on Tomcat 7.0.75 (my current env and latest OS package available to me), and 7.0.77 (latest 7.0.x). It works in 8.0.1 (the first 8.0.x release.) It works in 8.0.43 (latest 8.0.x) and 8.5.13 (latest 8.5.x).

I'm willing to share my example if you are interested, but I will move to deploying my application with embedded Tomcat 8.5, so I'm also comfortable with you closing this issue.

@cjstehno

This comment has been minimized.

Collaborator

cjstehno commented Apr 3, 2017

Okay, we can go ahead and close this since the problem goes away with the current Tomcat releases. Come to think of it, the Spring-boot deployments I have used it on were probably using Tomcat 8 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment