Grails webdriver installation error - grails

I'm trying to install webdriver to for integration testing on Grails 2.0 but I always get this error and the installation is incomplete.
java.lang.NoClassDefFoundError: org/codehaus/groovy/ast/expr/RegexExpression

This problem is caused, because Groovy 1.8 deprecated the RegexExpression class.
What you can do is download the GMetrics library:
http://sourceforge.net/projects/gmetrics/files/gmetrics-0.4/
I had the same problem, and with that library (GMetrics-0.4.jar) added to the project fixed the problem.

Related

Error creating Grails project in NetBeans

The error I have is the following:
Warning |
Unrecognized flag: non-interactive.
Resolving dependencies..
Error |
Specify an application name or use --inplace to create an application in the current directory
I'm following the steps that come on the NetBeans page.
I have installed:
Grails 3.3.8.
Groovy 2.4.15.
NetBeans 8.2.
From console create a project using grails create-app hello world and in this case it seems that there were no problems.
NetBeans doesn't currently support Grails 3.x as far as I know, however you might be able to import it as a Gradle project. I know that Netbeans is working on updating there Groovy support soon, maybe that will help...
The best IDE for Grails is Intellij Ultimate, which costs money, however you can use the community version, you just won't get GSP support.

Issues with upgrade to Grails 2.2.0 using GGTS

Iā€™m trying to upgrade Grails to version 2.2.0. I used gvm and installed Grails 2.2.0. After this I changed my project in GGTS to use Grails version 2.2.0 and Groovy version 2.0.0. But when I finally tried to run the project, I got the following error:
Error occurred during initialization of VMError opening zip file or JAR manifest
missing : null
agent library failed to init: instrument
What is the problem?
We had the same problem.
This is due to eclipse saving old run configuration for the previous grails version.
Just remove old launch configuration and retry.
To remove old launch configuration :
go to Run\RunConfiguration\Grails
select all nodes and remove them.
I had the same problem when I started using Grails 2.2.0 - The solution Ian mentioned works, here is the link to the issue and resolution that occurred in my project
Grails 2.2.0 error
Added on 1/15/2013 Other suggestions based on 2.2.0/ivy cache issues
I am running on windows, a couple of things to try.
Based on your error message seems like the issue might be related to the Ivy cached, I would suggest cleaning that out using the clean command.
I would also go ahead and delete the Icy cache folders on your machine at \ivy-cache(after backing it up just in case)
Read grails documentation at http://grails.org/doc/2.0.0/guide/gettingStarted.html, refer to section 2.3 regarding Ivy cache ā€“ there might be issues running 2.x and 1.x grails projects side by side.
When install, I do not have to install groovy explicitly - I just install grails and that take care of the groovy code implicitly. Is that possible for you to do? To rule out dependency issues?
On my version of grails I have the groovy version showing up as 2.0.5 ā€“ I assume you meant grails 2.2.0 ā€“ can you ensure that you have a groovy version installed with is compatible with grails 2.2.0?
If possible try your code on a fresh device where grails has not been installed before. This is to rule out interference due to other existing issues
It's a known issue to do with the fact that the version of the springloaded reloading agent used by 2.2 (and 2.1.3) has a different name from that used by previous versions of Grails. There's a workaround in the bug report, or you can upgrade to a nightly build of GGTS which knows about the new name (as described in this bug report).
I am using GGTS 3.2 with Groovy compiler 2.1.1 on Windows XP.
Had imported a project from GGTS 3.1, upgraded compiler to 2.1.1 and got in mess, so
deleted the project and removed it from .grails cache, then re-created project from scratch. When it came to running the project I got the ivy error.
Removing the old launch configuration via Run->RunConfiguration...Grails fixed problem without switching to a night build of GGTS.
(BTW Deleting ivy-cache didn't help at all)

How to implement form builder plugin in grails

What steps will reproduce the problem?
1.create grails project on STS: 2.9.2
2.Open plugin manager, install form builder plugin.
1.Create grails project on NetBeans IDE 7.0
2.Open Grails Plugins. install form builder plugin.
1.Create grails application using command grails create-app test
2.install form builder plugin.
What is the expected output? What do you see instead?
Each time i was expecting plugin should install and i can run application, but getting several dependencies. I tried with/without changes made in BuildConfig.groovy.
What version of the product are you using? On what operating system?
I am working on
Java: 1.6.0_29; Java HotSpot(TM) Client VM 20.4-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
with grails 2.0.4
I have installed STS 2.9.2, STS 2.5.1, Netbeans 7.0 with grails plugin
Please provide any additional information below.
Each time i tried to install plugin it is showing me some run-time dependencies for jquery, jquery ui and others, I tried to install all plugins before installing form builder plugin. Now it is showing me some class missing
net.sf.json-lib:json-lib:2.4.
some time it is showing me error about
C:\Documents and Settings\jitendrakarma.grails\2.0.4\projects\FormTest\plugins\form-builder-0.1\grails-app\controllers\org\grails\formbuilder\FormController.groovy: 18: unable to resolve class freemarker.template.Template
# line 18, column 1.
import freemarker.template.Template
Please let me know what is wrong with the process i am following.
You are doing everything totally right. The plugin itself does not manage its dependencies correctly. Also it is belonging to some classes that doesn't exists any more in Grails >= 2.x.x
If you add all missing external dependencies and add the following entries to the plugin closure of grails-app/conf/BuildConfig.groovy
compile ":form-builder:0.1"
compile ":jquery-ui:1.8.6"
compile ":dynamic-domain-class:0.2.1"
compile ":jquery-json:2.2"
compile ":freemarker-tags:0.5.8"
compile ":uni-form:1.5"
compile ":jquery-datatables:1.7.5"
compile ":jquery-validation-ui:1.2"
compile ":lang-selector:0.3"
compile ":quartz:0.4.2"
compile ":jquery-form-builder:0.1"
and add the following entry to the dependencies section of the same file
compile 'org.freemarker:freemarker:2.3.19'
you will still get four compile errors.
One of them is: "unable to resolve class org.codehaus.groovy.grails.web.metaclass.TagLibDynamicMethods"
If you look up this class in the grails api documentation you will see it inside the grails 1.3.7 version but it is missing in the 2.0.4 version.
So the best thing I could recommend you is to search for another plugin or doing some code by your own.
Validation for example could be done with a Command on the grails side and the JQuery Validation Plugin on the client side. The form itself can be created with the help of scaffolding. Even if you don't need a domain you could create one run scaffolding to get the resulting form and throw away the domain.

Error setting up STS for Grails

I'm trying to install STS 2.9.1 Grails support and Groovy Eclipse extension but I'm getting a notification:
The following connectors are not available: Grails Support
Proceed with the isntallation anyways?
What's up with this?
I dont know if its relevant but I have java 1.7u4 and I've manualy installed Grails 1.3.7. I have Windows 7 64bit and installing STS 64bit.
I've tried tried installing just Groovy Eclipse extension ignoring the message but installation broke. So I've cleaned all files, reinstalled the STS, installed again just Groovy Eclipse extension. And then tried to install Grails support. The process started but it broke and this is the error I've got:
An error occurred while collecting items to be installed session
context was:(profile=com.springsource.sts.ide,
phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
action=). Unable to read repository at
http://download.eclipse.org/tools/ajdt/37/milestone/plugins/org.aspectj.ajde_1.7.0.20120309122400.jar.
Read timed out Unable to read repository at
http://download.eclipse.org/tools/ajdt/37/milestone/plugins/org.eclipse.ajdt.core.source_2.2.0.e37x-20120314-1100.jar.
Read timed out
Thanks.

Can't compile grails Tomcat plugin

I'm using Netbeans to build a Grails app, while I have used this fine before on this new computer I can not get even the basic project to compile and run. I am getting errors around compiling the Tomcat plugin. If I uninstall the plugin it and use Jetty instead it will compile but the project isn't set up for Jetty and is missing files.
Below is the error I'm getting I'm thinking it is some issue with my classpath but I just don't know where to start any help would be much appreciated.
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Tomcat$ExistingStandardWrapper
Update I have tried grails clean, and used both grails 1.2.0 and 1.3.1
Update The project I've tried with tomcat is the base project generated by grails.
When you say "but the project isn't set up for Jetty and is missing files." what do you have in there that maybe clashing with Tomcat? It sounds like you must be using some specific tomcat functionality.

Resources