Techspace

IT happens only in IT

Running grails at some specific port

By default, jetty will run the application at port 8080, but if you want to run the application at some specific port, for example 8085 you should use


grails -Dserver.port=8085 run-app

July 7, 2009 Posted by Paras | Grails | | No Comments Yet

Grails : No domain class found for name domain-class-name . Please try again and enter a valid domain class name

Sometimes, even if you create domain objects in grails you get the error that No domain class found.
I am not sure why this happens because I am new to Grails and still learning. But the following steps work for me

i) Stop all the running grails app ctrl+C
ii) grails clean
iii) Now try grails generate-all domain-class-name

This generally works for me. I will update this post if I find the root cause of the problemSom

June 23, 2009 Posted by Paras | Grails, Groovy | , | No Comments Yet

Building Web Apps with Spring 3.0 – Meeting notes

This presentation and notes are from the May 2009 Java User group meeting in Twin Cities. You can view the details and download the code from http://www.intertech.com/UserGroups/JUGPresentation.aspx?TopicID=135 It was an excellent presentation. Bob has discussed about new cool features in Spring 3 and how it simplifies the Spring MVC development. These presentation slides are created by him and all rights lies with him.

  • DispatcherServlet is the central servlet handling requests
  • See slide 7. The request handling takes place in the following order
    1. HTTP Request is first handled by Dispatcher Servlet
    2. DispatcherServlet refers HandlerMapping find the controller which will handle the request
    3. DispatcherServlet sends the request to the Controller. Controller returns view and/or model.
    4. DispatcherServlet refers to ViewResolver to determine the view page based on logical view name
    5. View is rendered
  • Controller hierarchy is deprecated in Spring 3.Just annotation is enough. No need to implement life-cycle methods
  • Flexible method arguments. Flexible return types.
  • Annotations like
    @RequestParam
    @ModelAttribute
    @RequestMapping
    @SessionAttribute
    @InitBinder
    and WebBindingInitializer
  • Convention verses configuration
  • ControllerClassNameHandlerMapping
  • Model and ModelMap
  • Rest Support

    Stateless, cacheable, scalable, communication protocol
    HTTP Methods – GET, POST, PUT(Idempotent), DELETE(Idempotent), HEAD, OPTIONS

  • Spring 3.0 has REST support

June 3, 2009 Posted by Paras | Spring, Uncategorized | , | No Comments Yet

GWT exception : Deferred binding result type should not be abstract Or Rebind result must be a class

In GWT, when you get this error in hosted mode
Deferred binding result type should not be abstract
or
The following error while compiling
Rebind result must be a class

most likely you have forgot to extend your business interface from RemoteService. Therefore GWT engine is trying to instantiate the interface itself. That is , instead of


@RemoteServiceRelativePath("relativeServicePath")
    public interface BusinessInterface extends RemoteService

you have written


@RemoteServiceRelativePath("relativeServicePath")
    public interface BusinessInterface

May 19, 2009 Posted by Paras | GWT | , , | 2 Comments

Beginning Groovy and Grails

In the last session on April 13, 2009 on Jazz and Rational Team Concert at TCJUG , I have won the book Beginning Groovy and Grails: From Novice to Professional (Beginning from Novice to Professional) in the lucky draw.

Beginning Groovy and Grails

This is happening second time in the row that I have attended JUG meeting with Groovy message. In my last meeting the topic of discussion itself was groovy and this time around, it is the book. The message is loud and clear. Looks like everyone has started taking Groovy seriously. People consider it as gen-next Java language. After all, Groovy is not something which poises itself to compete with Java language. In fact it builds itself over the Java language. You run groovy programs on JVM. While relieving developers of many of the pains which comes with java, groovy provides many powerful features, missing and long sought in Java.
Having said that, I am still a doubtful thomas, when it comes to new technology. To build a secure, scalable, robust application, I would not put my bets on Grails. At least for now.

By the way the presentation slides for Jazz are not there yet on TCJUG website. Check http://jazz.net/ for more details.
Jazz is also a wonderful framework address the concerns of the entire life-cycle of project development. From requirement analysis to design and development; from testing to maintenance; from project management to project change management; it is built on the vision to provide one -stop- shop for all the needs.
Rational Team Concert is the product built on Jazz framework. The speaker has demonstrated many cool features of RTC. It integrates IDE, testing environment, team collaboration, version and cofiguration management, quality management in the other words absolutely every tool we use daily during the software lifecycle. It integrates all these tools at one place. PM will have the clear and accurate picture what is going on with the status and updates of each and every developer, tester will now what fixes developers are working on etc etc. Worth checking out. As far as I remember, the speaker said that this product is relatively new but it has achieved record sales in its category in IBM.

May 1, 2009 Posted by Paras | Grails, Groovy, Uncategorized | , , , | No Comments Yet

Rules within an Enterprise and their management with a BRMS, focus on JRules

I have attended a very nice session at TCJUG back in November 2008( I know I am very late in reporting that).

The speaker DJ Des Jardins made a very strong case for JRules. While there are many open source rule engines available in the market like Drools, JRules stands apart from all those because of its capabilities. If you see the presentation available at the site you can judge by yourself that JRules is simply superior compared to other rule engines when it comes to customization, options and flexibility. Check that out.

However, the slides are not very elaborate. To appreciate the full capabilities of JRules you may want to try it once.

May 1, 2009 Posted by Paras | JRules | , | No Comments Yet

Groovy – Hype or Hope?

groovy
Last week I have attended a Java User Group meeting in Bloomington, MN. The speaker Mark Rausch made a solid case for Groovy as the gen-next application.
He talked about how Java Scripting recognizes the “pain points” of the Java Developer community.
Learning Groovy and using is not difficult at all. Unlike other languages which force you to learn new syntax or think Class and objects differently, Groovy is Java. In fact, you have been writing Groovy all along. If you rename .java file to .groovy, it is a compilable groovy program.
Learning it and using it is very easy because of the smooth learning curve. It is worth trying. I will soon write (Really Simple) steps to write your first groovy program.

April 13, 2009 Posted by Paras | Groovy | | No Comments Yet

(Really) Simple Steps to write GWT app

April 12, 2009 Posted by Paras | GWT | | No Comments Yet

(Really) Simple Steps to use myfaces and facelets in JSF based app

Coming soon

April 12, 2009 Posted by Paras | Facelets, JSF, Tomahawk, myfaces | | No Comments Yet

(Really) Simple Steps to create Ajax app using DWR and Spring

Coming soon.

April 12, 2009 Posted by Paras | Ajax using DWR, DWR, Spring | | No Comments Yet