spring

spring 3.0 and JSRI68 support

Hi, can anyone tell me if JSR168 is supported by Spring 3.0? I'm running into difficulties but cant find anywhere in the Spring documentation that says you have to move to Portlet2 spec thanks ...

Problems with indepth flex loading of value objects (Lazy loading at the front-end?)

Hi, I'm using a java-backend with a flex frontend. And when i want to use a labelfunction it doesn't load the indepth properties such as a value object, it's like it is lazy loaded in the flex side, I'm sure it is not comming from the backend because i've checked it overthere. I've got it also in datagrid's that it doesn't load all the...

How do you model form changes under Spring MVC?

Please bare with me as I try to abstract this problem. Say your writing a web page for fruit vendors using Spring MVC's SimpleFormController, version 2.5.6. On this page the vendor can do simple things like change their name or their address. They can also change their inventory based on a drop down list filled with present inventory se...

Db2 9 throwing InvalidDataAccessResourceUsageException instead of PermissionDeniedDataAccessException

I have a Java application which queries a database table which the current user account may or may not have access to. If an exception is returned, I would like to distinguish between AccessDenied and the database server being down/offline. I expected that db2 would throw a PermissionDeniedDataAccessException when the user does not have ...

Spring MVC + Oracle LOBs + Streaming

Hi there, I have to send a binary stream of a blob by means of a ServletOutputStream. I'm using the following technologies and software: Oracle 11, WebSphere 7, Springframework 2.5.5, Hibernate 3.3.SP1. There are two Oracle databases. The first one contains tables for description of documents I have to transfer, and the second one - ...

Get Web App root from Spring Controller

I am trying to write an uploaded multipart file to the filesystem. I have a directory called audio which sits in the root of my web application (not inside WEB-INF, but beside it, to it's publicly accessible like css and javascript). I want to write the uploaded file to that directory but I can't seem to get the path I need. I thoug...

trigger 404 in spring-mvc controller?

How do I get a spring 3.0 controller to trigger a 404? I have a controller with @RequestMapping(value = "/**", method = RequestMethod.GET) and for some urls accessing the controller I want the container to come up with a 404. ...

Use a Spring XML entity to set a property in an Annotated File?

I have a Spring MVC Controller class that needs a property set from a config.properties file. I was thinking that since I already use this config file to set some db properties, I could access it in a similar way to set this property. The difference is that my Controller class is annotated and not declared in an XML file, so I can't se...

Applying additional aspectj around advice to a spring transactional method.

I have a spring 2.5 + hibernate webapp with transaction annotations and everything works fine. I now want to add a fairly basic aspect with 'around' advice and apply it to my service layer (which is transactional). I am doing this using aspectj annotations and placed <aop:aspectj-autoproxy/> in my spring xml. Spring transactional ...

Does Spring 3.0 really support JSR-286?

Does Spring 3.0 Portlet MVC really support JSR-286 aka Porlet 2.0? I've seen anecdotal mentions of it but nothing in any documented form. If so, has anyone successfully implemented a JSR-286 plugin with Spring 3.0. If yes, on what platform? Any good reference information, or better yet, a sharable implementation? ...

Spring + Hibernate bean declaration error

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mappingResources"> <list> <value>product.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <value> hibernate.dialect=org.hibernate.dialect.HSQ...

springs authentication, does it use encrypted cookies?

Does the spring framework use (or in one of the options that it supports) encrypted cookies that store the logged in users userId in a cookie? This is how asp.net authentication works, where it encrypts a value in a cookie, which is normally the userId or username. Is that what spring does? (I realize spring let's you choose, but is th...

Spring + Hibernate JPA Question

I'm trying to use Hibernate with JPA/EntityManager to do database activities Right now I'm getting this error and I have no idea what it means. Before I had this code and it works fine. public class JdbcProductDao extends Dao implements ProductDao { /** Logger for this class and subclasses */ protected final Log logger = LogFactory.g...

EntityManager refresh problem

I'm getting this error from my EntityManager when I call the refresh function. public void saveProduct(Product product) { entityManager.refresh(product); } I heard this could be a bug with Spring/Hibernate, however I'm not sure how to get around this. Edit: the error is java.lang.IllegalArgumentException: Entity not managed or...

Spring Injected Bean property is null

I'm pretty new to the whole idea of injecting beans, so speak slowly. :) I've got a class that injects a bean, but when the property is accessed, the property is null and I get a null-pointer exception. From /project-TRUNK/war-module/src/main/webapp/WEB-INF/spring-config/spring-bean.xml <bean id="linkCheck" class="com.dogwatch.util...

Is using Spring AOP for logging a good idea?

I'm reading up on Spring at the moment and one of the examples used for a use of AOP is logging the start and end of method calls. I've also read that using AOP can impact performance. Is using Spring AOP a good idea for this type of logging? My understanding is that Spring uses Dynamic AOP would it be be better to use Static AOP (Like...

Glassfish JSP null pointer exception

I'm currently migrating a Spring application from the JBoss J2EE container to Sun's Glassfish J2EE container and although it is the same code, I am getting a confusing error during a specific point in my application. The error occurs every time my controller redirects (using the redirect keyword) to a page handled by spring web flow. I'v...

Getting FileNotFoundException in Spring

I want to create bean using BeanFactory, but I am getting an exeception: java.io.FileNotFoundException: \\WEB-INF\businesscaliber-servlet.xml. Resource res = new FileSystemResource("//WEB-INF//businesscaliber-servlet.xml"); BeanFactory factory = new XmlBeanFactory(res); if (factory != null && beanId != null) { obj = factory.getBean(...

Spring 3 Java Config: Imported @Configuration not enhanced?

I have an app that I'm trying to use the latest Spring 3 conventions with annotation-based configurations, but I also have legacy classes that use constructor-injection. Based on the Spring documentation you're supposed to just call the method that creates that dependency and pass it into the constructor that needs it. That seems to wo...

how to disable spring bean loading log

How to disable spring log. When loading bean through xml its display spring log. Is there is any way to disable spring log like this. Is there is any server specific setting i am using Jboss? [STDOUT] 13:13:55,765 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from URL [file:/C:/jboss-4.0.0/server/default/tmp/deploy/tmp271...