spring

add openjdk-7 to Spring Tools Suite in Mac OS X 10.5

I've successfully added Landon Fullers compile of OpenJDK 7 on Leopard PPC (64-bit G5) in "/usr/local//usr/local/openjdk7-macppc-2009-12-16-b4" and a "java-1.7.0" alias and executing "java -version" at least works fine. However, I can't add the JVM to Spring Tools Suite (which is Eclipse basically). I get the dreaded "Standard VM not s...

Simple Maven2 Classpath Issue

I have a straightforward Maven2/Spring project. Locally in Intellij all the tests run fine, however on the build server (Hudson), the application context won't start because test-context.xml can't be found on the classpath. New to this...any ideas? Assuming this is something obvious... Project dir structure: -src --java --resources -t...

What framework + application server + development environment to use for Java services?

I'm trying to write a Java service which runs 24/7, scrapes content from the web, and stores it into a database. What is the best framework to use for this given that I'd like to... 1.) Have an application server that I can deploy my code to (and have it run automatically). This application server should sit on a separate box from the m...

How do I configure my web.xml to use Spring with noelios Restlets?

There is a lot of information and examples out there for combining Spring with Restlets, and it is somewhat confusing. Can anyone provide a simple web.xml and *-servlet.xml to demonstrate how I would combine Spring with Restlets? Specifically, I want the restlets to be created by Spring, and I want to use annotations for injecting res...

Spring MVC AbstractWizardFormController Question

I am using a controller implementation that is extending the Spring MVC AbstractWizardFormController This wizard controller will consist of 4 pages. The first 2 pages are used to collect information. The third page will show results based on what information is submitted on page 1 and 2. So to be a little more specific Page 1 the us...

JPA Inheritance entitymanager.find produces ClassCastException

Hi, I have a class hierarchy like this: @Entity @Table (name="call_distribution_policies") @Inheritance (strategy=InheritanceType.JOINED) public class CallDistributionPolicy implements Serializable, Cloneable{ ---------------- } @Entity @Table(name="skill_based_call_distribution_policies") public class SkillBasedCallDistributionP...

Different behavior/content of Spring/Hibernate/SessionFactory when running Maven+Surefire vs Eclipse+jUnit

I try to be quick. In fact, one of my jUnit test is failing when running the Maven command of my project (mvn install, so with the Surefire plugin) while it's successful when I run it in Eclipse. I tried many things and the only difference I managed to see is that : - With Maven/Surefire in debug-mode, in the Hibernate-SessionFactory I...

Retrieving Session ID with Spring Security

For logging purposes, I'd like to create a logger that automatically adds the current session's ID to logged lines. For logged in users this isn't a problem: ((WebAuthenticationDetails) SecurityContextHolder.getContext().getAuthentication().getDetails()) .getSessionId() The problem is, before the user has logged in getAuthenticat...

manageable way to handle exceptions in java

I am trying to come up with a manageable way to handle exceptions in a DAO. Typically a method in my DAO looks like this: public ArrayList fetchColors (String id) { //call iBatis SqlMapClient //put results in a list //return list } If an error happens in the above code then everything is written to server.log and on the f...

please suggest about a basic example

any expert tell me where i find a basic example of Srtuts2+Spring+Hibernate ...

How to catch/correct exception in Spring ContextLoaderListener?

I'm using Spring's ContextLoaderListener to initialise a web services client, but if the wsdl document is not available during the application startup then part of my application is broken and I'm not sure how to fix it. The application starts successfully, just logging a big ol' stack trace at that point. The exception is: org.springfr...

Spring Portlet MVC - how to catch mapping exceptions

Hi, is there a way to provide my spring portlets a default state which is resolved if a unavailable expcetion occurs? I recieve this exception 10:24:53,187 ERROR [517: org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl] The portlet threw an exception javax.portlet.UnavailableException: No matching handler method found for portl...

Does IOC container makes object's when project is deployed??

How IOC container helps maintaing objects by creating once and injecting when required??? ...

spring GenericFilterBean usage

I'm using spring GenericFilterBean as a filter to display the menu of my application. A shopping cart is there part of menu. When the user adds an item to the cart the database gets updated. I can see the updated cart value in the filter. And putting the value to the HttpServletRequest from the filter. But the jsp page displays the old v...

Does spring have a validation framework module that can be used in any layer for validatons?

For instance, I am using JSF + custom framework developed in our company. Now I want to use a third party validation framework that can be used as an plug-in and it should not create any dependency what ever may be the technical stack. So my question is does spring provide any framework of that sort or if it's available how can I use...

Hibernate Cache and JdbcTemplate

Will the Hibernate caching(1st, 2nd, or Query) work when I use JdbcTemplate? I got to know that the caching is one of the advantage in using ORM instead of traditional JDBC. So, If I got to use Hibernate's JdbcTemplate, still can I enjoy the benefits of hibernate caching? ...

Spring, CXF: Loose coupling between web service client and server

I have two webapps: a web-service client and a server (both CXF-based, using the Simple Front-End approach). This is the server definition: <simple:server id="server" bindingId="http://schemas.xmlsoap.org/soap/" address="/thingy" transportId="http://schemas.xmlsoap.org/soap/" serviceName="cs:thingyService" serviceClass="com...

why autodetect option not available for me?

I am trying to use autowire="autodetect".. In eclipse code suggest does not show me autodetect as the option..But it shows other values like byname,bytype,constructor.. whats missing in my application? ...

Change file in jar

Hi people, so, i have a jar file and in this jar there is another config.js file, and in this file i want to write. I have a Resource class of this file (org.springframework.core.io.Resource), so i can get a full URL or getFile() from this Resource. URL look's like this: jar:file:/Users/admin/.m2/repository/code/1.1-SNAPSHOT/code-1.1-S...

(Question about 'final' and) How do I access the list object contents of 'myModels' from the Spring ModelMap in JSTL?

@RequestMapping(value = "/index", method = RequestMethod.GET) public final String index(final ModelMap model) { List myModels = ArrayList<MyModel>(getMyModels()); model.addAttribute("mymodel", myModels); return "index"; } In Spring I put the myModels list into the ModelMap to be passed to the "index" view. How do I t...