spring

GWT with spring security not working on app engine live server.

I configured gwt with spring and spring security that works fine on local development server on google app engine. I deployed to the appspot but there it shows critical error when i see on the log. and on the browser side shows 500 server error. log error Uncaught exception from servlet javax.servlet.UnavailableException: Initializ...

em.persist seems doesn't persist data on postgreSQL db

I've got a simple java main which must write bean data on a PostgreSQL database. I use Entity manager to persist or update object. I use hibernate and toplink driver connection which are specified in persistence.xml file. When I call em.persist(obj), nothing is saved on database, I don't know why. here is my simple code: private static...

How to perform Spring validation in MultiActionController?

How to perform Spring validation in MultiActionController? ...

Spring 3: task namespace: How to find out time of next execution?

I have a bean that has a method executed on a schedule using <task:scheduled> in the context configuration. Is there a way for me to find the time of the next scheduled run during execution of that method? The same method is also executed manually, and the mechanism for receiving scheduler information may not break executions from outs...

Spring Web MVC: Use same request mapping for request parameter and path variable

Good people: is there a way to express that my Spring Web MVC controller method should be matched either by a request handing in a ID as part of the URI path ... @RequestMapping(method=RequestMethod.GET, value="campaigns/{id}") public String getCampaignDetails(Model model, @PathVariable("id") Long id) { ... or if the client sends in ...

FlashBuilder4 RIA on GAE

I want to build a highly scalable "facebook for business" and after much testing am pretty set on FlashBuilder4 (Flex) with Google App Engine (GAE). What are your thoughts on the need/advisability of also using Spring/Cairngorm/etc frameworks? Frankly I don't have extensive experience coding, however feel the "MVC utopia" universally a...

How to get error text in controller from BindingResult

I have an controller that returns JSON. It takes a form, which validates itself via spring annotations. I can get FieldError list from BindingResult, but they don't contain the text that a JSP would display in the tag. How can I get the error text to send back in JSON? @RequestMapping(method = RequestMethod.POST) public @ResponseBody...

Map enum in JPA with fixed values ?

I'm looking for the different ways to map an enum using JPA. I especially want to set the integer value of each enum entry and to save only the integer value. @Entity @Table(name = "AUTHORITY_") public class Authority implements Serializable { public enum Right { READ(100), WRITE(200), EDITOR (300); private int value; ...

JavaEE Application Server or Lightweight Container?

Let me preface this by saying this is not an actual situation of mine but I'm asking this question more for my own knowledge and to get other people's inputs here. I've used both Spring and EJB3/JBoss, and for the smaller types of applications I've built, Spring (+Tomcat when needed) has been much simpler to use. However, when scaling u...

Performance tuning of a Hibernate+Spring+MySQL project operation that stores images uploaded by user

Hi I am working on a web project that is Spring+Hibernate+MySQL based. I am stuck at a point where I have to store images uploaded by a user into the database. Although I have written some code that works well for now, but I believe that things will mess up when the project would go live. Here's my domain class that carries the image b...

java.lang.ClassNotFoundException: org.springframework.ui.ModelMap

I create a simple webapp using tomcat 6, spring 2.5.6 and maven. The problem is when I boot up tomcat, I am getting the following errors: SEVERE: StandardWrapper.Throwable java.lang.NoClassDefFoundError: org/springframework/ui/ModelMap ... Caused by: java.lang.ClassNotFoundException: org.springframework.ui.ModelMap The ModelMap class...

Share java object between two forms using Spring IoC

I want to share java object between two forms using Spring IoC. It should acts like Registry: Registry.set("key", new Object()); // ... Object o = Registry.get("key"); // ... Registry.set("key", new AnotherObject()); // rewrite old object I tried this code to register bean at runtime: applicationContext.getBeanFactory().registerSingl...

Question about spring transaction propagation

Hi guys, I have a question about spring transaction propagation. If I use @Transactional(propagation = Propagation.REQUIRED) to annotate a method m1. When execution logic enter m1, if there is already a transaction, m1 will use that one. When after m1, what about the transaction? It ends or still open?(if I call m1 in another method, an...

Is there a maven 2 archetype for spring 3 MVC applications?

I'm experimenting with the spring 3 MVC framework. Since i use maven 2 to manage my project, i'm searching for a archetype to create a spring 3 MVC application. ...

PropertyPlaceholderConfigurer vs Filters -- Spring Beans

Hi there. I've got a question regarding the difference between PropertyPlaceholderConfigurer (org.springframework.beans.factory.config.PropertyPlaceholderConfigurer) and normal filters defined in my pom.xml. I've been looking at examples, and it seems that even though filters are defined and marked to be active by default in the pom.xm...

Is there any difference between Spring and Spring.net?

Hello, I've been using Spring with Java and I've seen that there is a version called Spring.NET. I wonder if there is any significant difference between them (apart from that one is for Java and the other is for .NET). Is it just a "language translation" of the framework or are they different project with just a similar purpose? Thanks...

Spring 3.0 REST implementation or Jersey?

Hi, SO! I'm currently trying to figure out which implementation of JSR-311 I'm going to recommend further up the food chain. I've pretty much narrowed it down to two options - Spring 3.0 with it's native support for REST - or use Sun's own Jersey (Restlets might also be an option). To me it doesn't seem to be much of a difference in th...

How to override TOMCAT Oracle ojdbc14 driver in the application?

The TOMCAT server is using an Oracle 9G ojdbc14 driver to its jndi connections in the /common/lib folder. My web application uses Maven + Spring and I'm getting the dataSource using Spring jndi features. I'm trying to bypass TOMCAT old ojdbc14 driver with a newer one (ojdbc14 10.2.0.4.0). I've tried putting the jars in the WEB-INF/lib ...

Controlling new features in Spring/Apache tomcat

Is there a good way to manage roll out of new software in Spring/Tomcat configuration. The problem I am trying to address is being able to rollback newly deployed software provided there are no hard dependencies on other moving pieces. For example changed the guts of an algorithm and now want to deploy the new software with the new chang...

Injecting values for static constants in Spring

In one of my classes there is a public static String member and I need set this value in the applicationContext.xml! That is, is it possible for us to inject a value for this static property? ...