Challenges in setting up and running a Grails project

Posted By : Manish Kumar Narang | 30-Sep-2017

My project uses Grails framework and since we also train people in grails through our project, the project needs to be installed many times on different machines. While installing there are several issues which one encounters and if one is not familiar with the solution, the installation time may increase by at least a couple of hours. I thought I should add my two pence worth on this topic. I shall try to enumerate the common issues and their solutions here. We use grails 2.2.4, ggts-bundle 3.6.4 and JDK 1.8.31. It is better to remove java from the machine if it is not 1.8.31 and replace it with jdk1.8.31. Some java version gives compatibility issues with grails 2.2.4. 

Problem 1: Grails requires a JDK. You may get an error message like this - 

              

Solution 1: GGTS does not consult the JAVA_HOME environment variable. The issue can be resolved by using the -VM argument and manually giving the path for JVM.  Just add

-VM 
<path to jdk>/bin/java

at the beginning in the file ggts.ini . Make sure that there is no spaces before the -vm argument. The file should begin with -vm

Problem 2 : You may get the following error message while running the project - 

| Error 2017-06-18 16:54:58,702 [Thread-38] ERROR plugins.AbstractGrailsPluginManager  - Plugin [i18n:2.0.1] could not reload changes to file [/home/project/grails-app/i18n/messages.properties]: Error starting Sun's native2ascii: 
Message: Error starting Sun's native2ascii: 

Solution 2 :  1 ) cd to jdk path

                 2 ) cp lib/tools.jar jre/lib/ext/tools.jar

 

Problem : You may get an error message like this while running the project -

Mar 05, 2017 3:51:31 PM org.springsource.loaded.jvm.JVM copyMethod
SEVERE: Problems copying method. Incompatible JVM?
java.lang.reflect.InvocationTargetException

To make it work to get hold of springloaded-1.2.5.RELEASE.jar Put this into grails-2.4.4/lib/org.springframework/springloaded/jars/folder. When you install ggts inside the ggts-bundle folder is grails-2.4.4. So put the file in the above location within the ggts-bundle folder. Re-launch GGTS.

About Author

Author Image
Manish Kumar Narang

Manish is an experienced Backend Developer with several years of industry experience in the IT field. He possesses a wide range of skills, including expertise in Backend languages like Core Java, J2EE, Hibernate, Spring/Spring Boot, and Python. Manish is also proficient in relational databases such as MySQL, PostgreSQL, and Oracle. He has hands-on experience in API implementations, web services development, testing, and deployments. Manish has contributed to various internal and client projects, including PMO, Catalyst, Communication-Scaffold, Oodles-Dashboard, and Devops Support, delivering significant business value. He is known for his innovative mindset and excellent problem-solving abilities. He keeps himself updated with new technologies by reading about them. He is skilled at collaborating closely with clients to define project scope and requirements, establish project timelines and milestones, and manage expectations. Manish conducts regular project status meetings, ensuring regular updates to clients and stakeholders regarding project progress, risks, and issues. Additionally, he serves as a mentor and coach to junior developers, offering guidance on project management best practices and fostering their skills development.

Request for Proposal

Name is required

Comment is required

Sending message..