I've added the jboss-web.xml file to WEB-INF per http://www.grails.org/FAQand i'm still getting this error:
2010-09-02 12:31:57,920 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable.
2010-09-02 12:31:57,920 ERROR [STDERR] log4j:ERROR The ...
i've added a plugin called Image tool plugin for image resizeing... but when i called an instance of it
def imageTool = new ImageTool()
it gives me compilation error cause it can't resolve ImageTool class . i've tried to put import
import org.grails.plugins.imagetools.ImageTool
as a suggestion from a site .. but it didn't work .. so ...
In the example below (Taken from the Book of Geb), we're clicking on a button that takes us to another page.
class GoogleHomePage extends Page {
static url = "http://google.com"
static at = {
title == "Google"
}
static content = {
searchField { $("input[name=q]") }
searchButton(to: GoogleResult...
We are beginning to build out a webapp which will probably see a lot of traffic. We dont have a lot of money, so we want to reduce hardware cost.
More or less, I think that means we will try to be as stateless as possible (as the Wicket way suggests - have bookmarkable URLs, etc. etc.)
The other problem is that we are gonna be hiring co...
I would like to know if it's possible to set the size of VARCHAR column if database is MS SQL 2005. Here's my domain:
class UpdateTable {
static mapping = {
table 'UpdateTable'
id column: 'UpdateFileId', generator: 'increment'
version false
fileName column: 'FileName', size: 50
}
String file...
I need to display image that is in file system not in project directory in grails..
i used
< img src="${createLinkTo(dir: '/Users/ME/ddImages/reg/', file: '${userInstance.fileName}.jpg')}" alt="User Photo"/>
but that doesn't seem to work
so any help?
...
The documentation created by running grails doc is not completely satisfactory in my eyes. For example, actions in controllers appear as properties in the documentation, though I would wish the have an extra section to separate actions from actual properties (Strings etc.).
Are there any tools that operate on JavaDoc-like comments and g...
Hello,
How do i find all the controllers running in an application ?
I am trying to create a menu using YUI where only registered controllers will have a menu shown. A controller class will create a static list with various properties detailing name, action, etc. (much like grails-nav plugin).
I want to create a taglib that can find a...
Bootstrap executes fine during run-app (database is seeded). But it doesn't appear to get invoked when Tomcat deploys the war (nothing in the database).
Does the Bootstrap get run during war deployment? If not, is there a way to make it run?
Specifically I am wanting my sample data to seed the database.
...
Hi
I have several tomcat instances running in physically independent machines.
I want to configure the tomcat to share sessions between this instances.
I have tried to configure org.apache.catalina.session.PersistentManager from http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html. But I only see the session file when I shutdow...
Hibernate exposes many internal metrics via the Statistics API. Is there an easy-to-use GUI that I can use to visualize these statistics? Bonus if there is a Grails plug-in for this.
...
Hi,
is it possible to use the Grails "g:sortableColumn" tag to sort by a domain class "hasMany" property count?
class Book { hasMany = [authors: User]}
I want to sort all Books by the number of authors with a "g:sortableColumn" tag in my view, but how? Realy not possible?
Thanks and best regards...
...
I have a Contact Domain class that can be associated with multiple Organizations, which are also domain classes. I want to use a multiple selection box to allow the user to select the organizations that are associated with the current contact. The selection box is populated with the available organizations. How do I assign the selected i...
i have a new problem in image magick that look strange ..
i'm using mac osx snow leopard and i've installed image magick on it and it's working fine on command ..
but when i call it from the grails class like the following snippet it gives me
"Cannot run program "convert": error=2, No such file or directory"
the code is :-
public s...
Hi all, I'm grails newbie.i want to mapping primary key with VARCHAR2 and generate primary key using my method to generated its.how to solve this problem?
...
Hi,
in my domain model, I have a method that does something with my data.
e.g.
class Person {
String lastname
String firstname
String bigname() {
return lastname.toUpperCase()
}
static namedQueries = {
withBigname { name ->
eq(this.bigname(), name)
}
}
}
I want to use t...
Hi,
I'm trying to write a simple integration test, but having some trouble with Domain Objects. I've read on unit testing but can't figure it out.
This is my simple test:
User user = User.get(1)
controller.params.userid = "1"
controller.session.user = user
controller.save();
The error message is:
groovy.lang.Mis...
Hi
I run some test to keep track of response time of a grails app.
I use the layout-view framework of grails in this way:
In a controller I determine what view and layout to use
Then I render a genericView with a code like this:
So this genericView do all the magic.
I create a Performance filter that track how much time takes b...
As I've been using Grails more and more, I find myself writing code in multiple controllers that really seems like it should be part of a domain class. Sometimes, this domain code contains a call to a service class. For example, I recently wrote a domain method that looked something like this:
class Purchase {
// Injected
def p...
Using Grails i'm trying a dynamic finder like this one
Policy.findAllByResourceAndUser(resource,user)
But When i call this, grails raise this exception
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: object references
an unsaved transient instance - save the transient instance before flushing: gmedia.User;
nest...