Search Results

Search found 645 results on 26 pages for 'grails'.

Page 9/26 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Multiple dynamic method calls or declaring a variable in Grails

    - by user303979
    In my view, if I have a situation where I need to use a dynamic method (such as Domain.findByName("name")) in multiple places, would it be better to define a variable with and refer to that, rather than have the dynamic method in multiple places? I know this seems like an obvious answer, but I just wanted to make sure Grails doesn't cache it or something, and indeed two DB calls are being made.

    Read the article

  • "state is undetermined" when starting Grails app on CloudFoundry

    - by SeattleStephens
    I have a Grails app that has been running on CloudFoundry for months. I updated the app from Grails 2.0.4 to 2.1.0 and also updated a few plugins I have been using. Now when I push the app to CloudFoundry and do the start, I receive the error: 'appname' state is undetermined, not enough information available. The tomcat Catalina log shows the NoClassDefFoundError below. I've read about issues with the Ivy cache but have not looked into that yet. I have updated vmc to the latest version (0.3.18). SEVERE: Error deploying web application directory ROOT java.lang.NoClassDefFoundError: org/apache/tomcat/PeriodicEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.PeriodicEventListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) ... 34 more

    Read the article

  • Grails dependency inject domain classes

    - by Don
    Hi, The Grails manual shows this example of dependency injecting domain classes: class Book { def bookService def buyBook() { bookService.buyBook(this) } } However, I tried this out, and bookService is null. My guess is that the dependency injection happens when an object is loaded from the DB, so the following will always return null new Book().bookService Can someone confirm this?

    Read the article

  • new Date() timezone in grails

    - by xain
    Hi, I'm inserting a date in grails using "new Date()" and when I read the record, it's three hours ahead the O.S.'s system time. Is there a configuration to fix this ? Thanks in advance.

    Read the article

  • how do i set up a grails environment variable

    - by TripWired
    I'm uploading images in a grails app I'm developing and I want to be able to have an environment variable the determines where these images are. So if I'm working locally it can just pull from /home/MyName/images but once it's in production it will pull from http://images.site.com. How would I do that? I'm assuming i can set up my config.groovy with the variables i'm just not sure how i switch between them or use them in code.

    Read the article

  • Grails/Roo for a .Net developer

    - by Kynth
    I am currently picking up Grails and Roo to expand my skills and to have a bit of fun. The vast majority of training materials appear aimed at new developers or Java developers. Does anyone know of any guides, resources or have any tips and anecdotes for translating existing development experience with .Net (C#/ASP.Net/Asp.Net MVC)?

    Read the article

  • Grails | Deployment | Include .dll in war

    - by WaZ
    I have a sqljdbc_auth.dll file which I want to include in my war in order to enable Windows Authentication. I tried the following code: grails.war.copyToWebApp = { args -> fileset(dir:"web-app") { include(name: "jdbc/**") } } Where jdbc is the folder which contains my sqljdbc_auth.dll file. However, it doesn't work. The war doesn't include the dll. Please let me know if I am missing anything here. Thanks.

    Read the article

  • Running single integration test quickly in Grails

    - by Prakash
    Is it possible to quickly run single/all integration test in a class quickly in Grails. The test-app comes with heavy baggage of clearing of all compiled files and generating cobertura reports hence even if we run single integration test, the entire code base is compiled,instrumented and the cobertura report is getting generated. For our application this takes more than 2 minutes. If it was possible to quickly run one integration test and get a rapid feedbck, it would be immensely helpful. Thanks

    Read the article

  • External user domain in grails

    - by archer
    We're currently using Acegi 0.5.2 plugin for Grails 1.2.1. However, we're going to move our user management to external CRM. What would be the best way to link existing Person domain with external CRM entity?

    Read the article

  • Saving a grails object with a composite id

    - by Jared
    The answer to this may be obvious but how do you save an object, in grails, that has a composite id. I have an object that has a composite id including a long and a date and I am trying to save an instance of the object from the update method of another classes controller, and using (object).save() isn't working. Any tips or suggestions?

    Read the article

  • Why use <g:textField /> in Grails?

    - by knorv
    What is the reason to use g:textField in Grails if you're already familiar with standard HTML form tags? If I understand correctly the following two markup alternatives are equivalent: <input type="text" name="name" value="${params.name}" id="name" /> <g:textField name="name" value="${params.name}" /> Are there any circumstances under which using g:textField would add value? Am I missing something?

    Read the article

  • Best IDE for Grails/Groovy?

    - by fernandogarcez
    I am starting a project with Grails since I already use Eclipse, it was my first choice. But I don´t think its good enough, had some problems and the plugging is poor in functionalities. Anyone uses/tested others IDEs(NetBeans, InteliJ(not free)...)? Which one is the best? thanks.

    Read the article

  • [Grails] HibernateException: No session currently bound to execution context

    - by user289206
    I'm trying to create a very basic REST-ish web service with Grails and Postgres. I have the read() & delete() methods working, but I can't get create() to work. Hibernate just gripes, "HibernateException: No session currently bound to execution context." Here's my create method: def create = { def member = new Member(params) member.save() render(status: 201) } Any advice would be great. Thanks.

    Read the article

  • Grails problem with nullable contraint in domain class

    - by xain
    Hi, I'm having the following problem with grails' 1.2.1 domain classes: When I set a constraint attr(nullable:true) and attr is int or bool, this condition isn't reflected in the db (postgresql 8.4). However, if attr is a String, the DB is consistent with the situation. Any hints ? Thanks

    Read the article

  • Externalize quartz config in grails

    - by Mike
    Hello, I'm trying to externalize the QuartzConfig.groovy I want to be able to set autoStartup to true or false with an external file. In Config.groovy it is possible to use the grails.config.locations and set properties file that override the properties. Is there something like this in QuartzConfig.groovy ? Thank you

    Read the article

  • Groovy/Grails Using WSClient to consume .net web service

    - by ROb
    I'm pretty new to both Grails/Groovy/Web services and i'm consuming a .net web service .. I have some code connects to the service using grails WS-client plugin : WebService webService def result = { def wsdl = ApplicationHolder.application.parentContext.getResource('WEB-INF/productsSoap.wsdl') def proxy = webService.getClient(wsdl.getURL().toString()) def productTypeListResponse = proxy.ProductTypeList() } I also used soapUI to examine the data returned from the web service which gave .. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <ProductTypeListResponse xmlns="http://tempuri.org/"> <ProductTypeListResult> <xs:schema id="ProductTypeListResult" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="ProductTypeListResult" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="ProductTypeListResult"> <xs:complexType> <xs:sequence> <xs:element name="PRD_TypeId" type="xs:int" minOccurs="0"/> <xs:element name="PRD_TypeName" type="xs:string" minOccurs="0"/> <xs:element name="PRD_Type" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> <ProductTypeListResult xmlns=""> <ProductTypeListResult diffgr:id="ProductTypeListResult1" msdata:rowOrder="0"> <PRD_TypeId>2</PRD_TypeId> <PRD_TypeName>ProdType2</PRD_TypeName> <PRD_Type>S</PRD_Type> </ProductTypeListResult> <ProductTypeListResult diffgr:id="ProductTypeListResult2" msdata:rowOrder="1"> <PRD_TypeId>3</PRD_TypeId> <PRD_TypeName>ProdType3</PRD_TypeName> <PRD_Type>C</PRD_Type> </ProductTypeListResult> <ProductTypeListResult diffgr:id="ProductTypeListResult3" msdata:rowOrder="2"> <PRD_TypeId>4</PRD_TypeId> <PRD_TypeName>ProdType4</PRD_TypeName> </ProductTypeListResult> </ProductTypeListResult> </diffgr:diffgram> </ProductTypeListResult> </ProductTypeListResponse> which is a .net dataset .. So my question is how do i get at the information using my productTypeListResponse ? Can anyone give me a pointer ?

    Read the article

  • How to run tests in plugins?

    - by Daniel Engmann
    We have splitted our grails application into several inplace-plugins. Now we want to have the tests in the same plugin like the classes which they test. Is it possible to configure our application (e.g. in BuildConfig.groovy) so that the tests in the plugins are executed too when we run "test-app"?

    Read the article

  • using grails and google app engine to store image as blob and the view dynamically

    - by mswallace
    I am trying to dynamically display an image that I am storing in the google datastore as a Blob. I am not getting any errors but I am getting a broken image on the page that I view. Any help would be awesome! I have the following code in my grails app domain class has the following @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Long id @Persistent String siteName @Persistent String url @Persistent Blob img @Persistent String yourName @Persistent String yourURL @Persistent Date date static constraints = { id( visible:false) } My save method in the controller has this def save = { params.img = new Blob(params.imgfile.getBytes()) def siteInfoInstance = new SiteInfo(params) if(!siteInfoInstance.hasErrors() ) { try{ persistenceManager.makePersistent(siteInfoInstance) } finally{ flash.message = "SiteInfo ${siteInfoInstance.id} created" redirect(action:show,id:siteInfoInstance.id) } } render(view:'create',model:[siteInfoInstance:siteInfoInstance]) } My view has the following <img src="${createLink(controller:'siteInfoController', action:'showImage', id:fieldValue(bean:siteInfoInstance, field:'id'))}"></img> and the method in my controller that it is calling to display a link to the image looks like this def showImage = { def site = SiteInfo.get(params.id)// get the record response.outputStream << site.img // write the image to the outputstream response.outputStream.flush() }

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >