I've encountered a strange problem in a Grails webapp running under Grails:
java.io.UnsupportedEncodingException is thrown quite frequently due to various unknown encoding strings (such as "ISO8859_10", "ISO-8859-10"), and the strange thing is that this is done entirely within the Resin and Grails code. That is - no custom code is invol...
Hello,
i got this situation:
- class user with hasMany Roles and belongsTo Roles
- class Role with hasMans User
how can i get the roles belongs to a user, object user is given,
how can i get objects in a many-to-many szanario?
findByX doesn't work, it's affect just one table, but i need a "find" or something else to find Object overal...
I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regard...
I'm doing a groovy/grails form file-upload operation, as is described here
http://www.grails.org/File+Upload
I'd like to get the name of the file that the user is uploading. Is there any way to do that? I've dumped out the params and request dictionaries and don't see them in there.
...
Hi everyone (my first post!),
I have an HQL question (in Groovy/Grails) I was hoping someone could help me with.
I have a simple Asset object with a one-to-many Tags collection.
class Asset {
Set tags
static hasMany = [tags:Tag]
}
class Tag {
String name
}
What I'm trying to do in HQL:
A user passes in some tags in params...
I'm bit vague about how to start using the shiro plugin, after reading few documents. I decided against Nimble, as it comes with few tables and UI plugins.
I setup shiro plugin with wildcard realm, with my own tables. I may use permission based (rather tan role based) access control as it scales well. Now, the steps for it.
assign th...
Ok, I have a very simple app created in Grails.
I have a generated domain class (Person) and its generated controller, using the automatic Grails scaffold:
package contacts
class PersonController {
def scaffold = Person
}
Now I'd like to get a JSON representation of a Person object.
Do I have to change the view or the controll...
Rather than reading;
A user name and password are being requested by http://localhost:8080. The site says: "Spring Security Application"
I want to change the prompt, or at least change what the "site says". Does anyone know how to do this via resources.xml?
In my Grails App Spring configuration, my current version is as follows;
<?xm...
When I run my grails application using embedded jetty server(tomcat for grails 1.2), I can make changes to my controllers, services and other java files on-the-fly at runtime without restarting the application. How can I achieve the same functionality on my application deployed on Tomcat(or any server) for that matter. I have observed th...
I'm trying to determine how to find/retrieve/load objects efficiently in terms of a.) minimizing calls to database and b.) keeping the code as elegant/simple as possible (i.e. not writing hql etc.).
Assume you have two objects:
public class Foo {
Bar bar
String badge
}
public class Bar {
String name
}
Each Foo has a bar...
When I run grails install-dependency, I get this.
java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for
a different type with name "org/xml/sax/SAXParseException"
What's wrong? I've not used grails dependency management before, and this is rather cryptic.
reposi...
Using GORM embedded can we add data for both the classes at once? Can the scafolding be done for these ? grails Embedded
...
I tried following this reference and this is now my domain's code:
class SnbrActVector {
long nid
String term
double weight
static mapping = {
version false
nid index:'Nid_Idx'
}
static constraints = {
term(blank:false)
}
}
What I want is to do is to add an index key for 'nid' col...
Hi (it is propably stupid question)
how can acquire Domain class from database in test?
class PollServiceTests extends GrailsUnitTestCase {
Integer id = 1
void testSomething() {
Teacher teacher1 = Teacher.get(id)
assert teacher1 != null
}
}
I always get null or
No signature of method:
cz.jak.Teacher....
Any dynamics in the community that would let you chose Grails or Rails?
...
While running grails app in 'dev' mode using 'grails run-app', where is the default Tomcat log file located written out by the embedded Tomcat come with Grails (1.2.2) installation?
...
Is there a "best practice" or defacto standard with how much of the GORM functionality one should test in the unit/functional tests?
My take is that one should probably do most of the domain testing as functional tests so that you get the full grails environment. But what do you test? Inserts, updates, deletes? Do you test constraints e...
Possibly related: http://stackoverflow.com/questions/2762439/grails-attempting-to-include-htppbuilder-linkage-error
I'm trying to include XOM in my grails project. How do I know which dependency library I need to exclude? I'm lost here.
dependencies {
build('xom:xom:1.1') {
excludes "xml-apis"
}
}
Error:
java.lang.Li...
Hello,
I'm trying to reference a class within IntelliJ IDEA 9.0.2 in a Grails project on a Linux system. I added the dependency to BuildConfig.groovy
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
runtime 'mysql:mysql-connector-java:5.1.5'
compile 'org...
Hello, while trying to deploy a Grails application into tomcat6 I ran into some problems: I used the grails war command to build up a war, then copied it to var/lib/tomcat6/webapps and tried to restart the container.
I had to change default Tomcat policy to skip security exceptions, since I couldn't access environment variable (like gra...