I am trying to use the Grails Riak plugin but I don't succeed.
Maybe I didn't get it, but I expect that the plugin let's me store my domain objects in a riak database: http://springsource.github.com/grails-data-mapping/riak/manual/guide/3.%20Object%20Mapping.html
But it seems since there is still a datasource defined, Grails just maps the object to the normal SQL database.
What am I doing wrong? How do I get the plugin to work?
Update:
uninstalling the Hibernate plugin seems not to work for Grails 2.0.x. After uninstalling, it seems to be automatically reinstalled.
For Grails 1.3.8, it works, but
grails install-plugin riak
will result in an error while downloading and installing it works:
grails install-plugin grails-riak-1.0.0.M4.zip
I've now configured my riak to listen on port 8091 (http://localhost:8091/buckets?buckets=true) and when I connect through a browser, I get a reply. But my Grails App complains java.net.ConnectException: Connection Refused
Update 2:
It seems that the riak plugin ignores my configuration - if a riak instance is configured for port 9098, the plugin manages to connect and works!
If you install the Riak plugin you have to uninstall the Hibernate plugin. Otherwise it will get confused as to which datastore you actually want to store data in.
Related
Currently I am using Grails v1.1.1. I need to connect multiple databases.
So I need to know if it's possible to connect to multiple DB's in Grails v1.1.1.
What is the procedure to connect multiple DB's?
Are there any plugins required?
If so, please share the link.
Try installing the datasources plugin.
grails install-plugin datasources
UPDATE
Datasources plugin is no longer available.
I am trying to run-app my project with other wars/wars also running. So for example we have a war/ear that has legacy web services that I would like to access. My goal is to deploy those existing wars/ears with my run-app. I can deploy both separately, as grails run-app on port 8081 and jboss on port 8080. The problem was when I tried to do a ajax POST, DELETE, or PUT I get a cross-domain error because each app is on its own port. Is there a way to use run-app so that my grails project is at localhost:8080/grails and the webservices are at localhost:8080/webservices
Env: Grails 2.1.1
Server: Jboss (perfered) or vFabric tc Server (by dropping in existing war/war)
I don't believe that you can "run-app" both projects on the same port because you're running an embedded container. However, what you can do is check out the Grails CORS plugin which will allow other domains to access your grails app during run-app or otherwise.
http://grails.org/plugin/cors
I have this project having MSSQL 2008 R2 as its database server. The connection between the Services view of IReport and the database is established and running. The problem here is that the project cannot connect to the database server when running it.
These is the error showned on grails console prior to start-up completion:
ERROR hbm2ddl.SchemaUpdate - could not complete schema update
I've seen similar case but the way to resolve it is having the driver sqljdbc4.jar put inside the [Project Name]\classpath\Grails Dependencies (project explorer heirarchy) where the driver is located in the [Project Name]\lib. But the do how has gone missing.
I've also tried to manually install the dependency following the commmand below but grails return that the driver is not found.
grials> install-dependency sqljdbc4
The question is how can I include the driver into the Grails Dependencies?
Assuming you are running Grails 2+, this article should help you. I also had to restart Eclipse before everything actually showed up correctly.
The Grails RabbitMQ plugin is great, but I can't seem to find any information about what to do when processing a message fails. I would prefer not to send an Ack back to RabbitMQ, but I can't seem to find any information on how to do this using the plugin.
Is it possible to control this with the RabbitMQ plugin for grails, or am I stuck not using the plugin?
The current version of Grails RabbitMQ plugin (0.3.3) do not support manual acknowledge mode.
Under the hood Grails RabbitMQ plugin use Spring AMQP libraries, so you can always declare your custom SimpleMessageListenerContainer in resources.groovy and implement a listener with manual acks. Check out http://static.springsource.org/spring-amqp/reference/html/#d0e377
after updating my grails app's security plugins, i get the following error when deploying to tomcat:
2012-01-17 09:13:04,970 [pool-2-thread-1] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static org.example.SecRole.findByAuthority() is applicable for argument types: (java.lang.String) values: [ROLE_USER]
the app works fine when being tested via run-app.
the SecRole class has been automatically generated by the spring security plugin.
i had previously deployed the app on the same server without a problem when using an older version of the spring security plugin.
have been knocking my head against this for hours. ideas much appreciated.
This is a bug in v1.2.7 of the plugin. I released v1.2.7.1 to fix it; you can also downgrade to v1.2.6.
Are you using your own Spring Security's User and Role class?
Did you tried to create a fresh grails project and install it with vacation request sample app to test it out?
Lastly, may I know which Grails version and OS you use?
Cheers,
Chee Kin
My prod Env: Tomcat 7, Fedora, Grails 1.3.7, activiti-spring-security 0.4.6, spring-security-core 1.2.7 activiti 5.8.2
Dev Env: Mac OS 10.6, Grails 1.3.7, activiti-spring-security 0.4.6, spring-security-core 1.2.7, activiti 5.8.2
I have installed vacation request app on fresh grails project and that works fine when I run using grails run-app (both in dev and prod mode).
As per Peter's comment above, upgrading to Grails 2.0 solved the problem I described above. However, I had subsequently run into a host of upgrade issues with the app.