Non-Web Java application

Viewpoint

Non-Web Java application

Dear Viewpoint community,

I am still new to Viewpoint, together with its bundle of design patterns. So I wonder is there anyway we can develop a non-web Spring Java application that can still utilize the DAOs provided by Viewpoint PDK? Just want to print out some values for testing without the need to deploy to the web server. I always get a no sqlMapClient exception when I try to write a separate class for this purpose.

A step-by-step explanation or any source references would be greatly appreciated!

Many thanks,
3 REPLIES
Teradata Employee

Re: Non-Web Java application

Yes, you can definitely develop a Spring Java application outside of a web environment that utilizes the Viewpoint PDK DAOs. The DAO layer is simply a data access layer of the framework and does not have any dependencies on web technologies or components. The no SqlMapClient exception is due to an incorrect wiring of the DAO in your Spring application context file. Please refer to the dependency injection page of the PDK for an example of how to create the SqlMapClient bean and wire it into the DAO: http://developer.teradata.com/viewpoint/reference/viewpoint-pdk-reference/dependency-injection.

Steve

Re: Non-Web Java application

Hi Steve,

Thanks for your reply. But can you show me how to compile and run a non-web java app? What sort of files do we need to put in and how about the structure of the directory?

A related question is how to utilize the testing capability that comes with the portletGenerator? I execute "ant test" after getting all the steps as in the viewpoint testing guideline and run into the same error message when I try to create a DAO object and execute any particular method of it.

I am sorry but still learning it ...

Warmest regards,

Re: Non-Web Java application

Hi all,

Have been doing a lot of reading on Spring framework, and am able to get the problem solved :D

I find this link particularly useful, in case anyone in the future has the same problem as I just did:

http://www.techfaq360.com/tutorial/spring/springsetup.jsp

Cheers,