-
Notifications
You must be signed in to change notification settings - Fork 20
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
Twirl.settings breaks scala.collection.JavaConversions.mapAsScalaMap in Spring Application Context #19
Comments
I cannot think of something in twirl that would have this effect. What you can try to do to debug the issue you can run the server with the |
You can look at https://github.com/spray/twirl/blob/master/sbt-twirl/src/main/scala/twirl/sbt/TwirlPlugin.scala to see which setting twirl adds. I'd say the most likely issue would be that the additional |
It fails with the same class not found error if I add in just the following lines without Twirl.settings:
So in order to get the class load order, I added the following:
And in this state... Twirl.settings works fine! I can see java conversions in both class loader outputs as well. Standard: http://penguindreams.org/files/classes_standard.txt Looks like I might need to pass options to the sbt JVM to see if it's influencing how these classes are loaded. Forking the run process works for me though, so I'll just do that for now |
Strange, maybe it's some interference between classloader stuff that spring is doing vs. running inside of the sbt process that is (just coincidentally?) triggered by adding the twirl-api reference. In any case thanks for posting the workaround. |
I've got an old Scala app I'm slowing converting over to SBT. It still has some Spring 3 stuff in it (yea I know, I know. I will rip it out soon) and I have one thing in my application context that looks like so:
The trouble is, when I add Twirl.settings to the bottom of my build.sbt, my entire application breaks. I see this in my logs coming from Spring:
I've narrowed it down to the Twirl.settings. If I comment it out, I can't use templates of course, but I no longer see this exception from calling the same set of beans. I'm on sbt 0.13.0 and Scala 2.10.3. My sbt-twirl plugin in 0.7.0.
Does the twirl plugin do something weird that makes JavaConversions inaccessible? I'd really like to use the Play2 template engine to replace my old JSPs.
Here is the source code: https://github.com/sumdog/BigSense/ (Revision 7431e80 and the one right before it on the reengineering branch)
The text was updated successfully, but these errors were encountered: