Grails .slcache is not getting recreated on a new build - grails

I'm running a Grails build. For some reason, the .war file created sometimes does not get the appropriate .jar files loaded into the WEB-INF/lib folder. A subsequent Tomcat deployment fails. A co-worker that encountered this issue said to get rid of the .slcache in the user home folder on my windows server. I deleted the folder under c:/Users/myuser/.grails/.slcache. I re-ran a build and the .slcache is not getting recreated and I am still missing the .jar files.
Any idea what is happening and how to resolve?

Did you try changing the spark plugs (or at a minimum cleaning and re-gapping them) in your car? That'll be about as helpful.
The .slcache directory is created by spring-loaded, which Grails uses for class reloading when running the app with grails run-app. It has absolutely nothing to do with creating war files.

Related

Grails remote control - unable to resolve class

I'm encountering the following error .../plugins/remote-control-1.5/src/groovy/grails/plugin/remotecontrol/RemoteControlServlet.groovy: 21: unable to resolve class org.codehaus.groovy.grails.commons.ApplicationHolder when running grails test-app functional:
The strange part is that it runs with no problem on one machine but encounters this problem on another machine. I'm using grails V2.4.3 and groovy V2.3.6 and the code is cloned from the same repo onto the two different machines (Mac OS). I've tried clean but the problem still persists.
Why is there a discrepancy between machines? Are there some resident files? How do I do a real "clean" so that all dependencies are downloaded again? Thanks.
I have no idea about your real problem. But to do a "real" clean, I used to delete ~/.m2, ~/.ivy folders. And also the target folder of the project.

Cannot load angular.dart

During the reproduction of this example, something strange happend: https://github.com/dart-lang/dart_by_example/tree/master/example/angular/basics/conditionally_switch_between_dom_elements
So created a plain Dart project in WebStorm, added angular.dart, copied the example. Everything works well, if the files are "web" directory.
BUT, after I moved the three files into a switch subdirectory, I have the following problem:
An error occurred loading file: package:angular/angular.dart
Do you have any idea? What did I missed.
If you added the subdirectory after you ran pub get then it may not have the packages symlink folder. Try running pub get (from your apps root directory) again which should generate any missing packages in subdirectories that may have been added, without re-downloading any dependencies.

Quartz versioning issue with jboss

I m having quartz 1.7.3 in .grails/plugins folder in development environment
where in grails/web-inf/lib i have quartz-1.8.4.jar version
It works properly in development sts 3.1.0 IDE version
When i moved the same to production environment by creating war directory in the war folder it includes both 1.7.3 and quartz-1.8.4.jar files at .war/web-inf/lib/
where in jboss/server/default/lib contains quartz.jar (i.e. 1.5.2 comes with by default jboss)
now i m facing issue in invoking quartz jobs on start up and afterwards
same thing is working without changing anything in other server only i m facing the compatibility after putting logs in config.groovy i came to know the error.
I tried to put one jar from 1.7 or 1.8 in web-inf/lib still didn't worked
I did put the 1.5.2 version in web-inf/lib folder still i m facing compatibility issue
Any idea/suggestions
If i remember,
You need to check the quatz tables in the db, may in the other server ther not exist in the db or somting like that..
Tables are starting QURTZ_?
There is somting like 5-7 tables in the db.
There was versioning issue as more than one jar of diff versions were getting conflicting came to know after switching to logging in the system. As there were one more jar included in jboss-web-deplyer/lib directory after removing that jar the problem got resolved.
Thanks for the help.

how to access grails application on Tomcat

I'm trying to deploy a simple grails application on my test-server which is tomcat. I've built the WAR with grails war command so I've got a war file named: simplgrailsapp-0.1.war
When I deploy this to tomcat I'm getting a lot of errors which I'm going to resolve one-by-one. But the URL for the app from tomcat manager (mytestserver:8080/manager) is http://mytestserver:8080/simplegrailsapp-0.1/ which doesn't seem correct. Because when I run the app locally the url is: localhost:8080/simplegrailsapp
I've also tried to access the app by http://mytestserver:8080/simplegrailsapp but that doesn't work either.
How can I fix this?
By default, when you deploy a WAR to tomcat it will fall under the context of the name of the WAR file. So in your case, the context becomes simplegrailsapp-0.1. You can:
rename your war file to whatever you want the context to be before you deploy it
define a Context for the application in Tomcat
If you go with defining a context this can be added to the WAR file by creating a META-INF folder in the web-app folder of your project and creating the context.xml file there.

Any way to get Intellij IDEA to add *GrailsPlugin.groovy to class path?

When managing a grails plugin in Intellij Idea (I'm using version 10.5.2 on OSX, if it matters), I can't get it to add the *GrailsPlugin.groovy file to the classpath in a way that it can be recognized by unit tests run from the IDE. The tests run fine from the command line using grails test-app; I just want IDEA to be able to run them too.
The problem is that the *GrailsPlugin.groovy file is at the top level directory in the plugin, which is not marked as a source directory in IDEA. I definitely don't want to make it a source folder, since that will screw up lots of things such as the package path to all of my regular source files (amongst many other issues).
I've tried adding *GrailsPlugin.groovy to my Settings->Compiler Resource Patterns, but to no avail. Since the file isn't in a source folder, it's ignored.
I tried creating a source folder that has a symlink to the *GrailsPlugin.groovy file, but that introduces all kinds of synchronization issues.
Anyone have any ideas?

Resources