spring

Problem with SQL Connection

Hi all, I am working on a project which uses Java,Spring and Hibernate. I just came across a situaition like this. bean 1 : <bean id="cat" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="proxyInterfaces"> <list> <value>cat</value> </list> </property> ...

Spring Web Services Issue When Using IBM's Java

Hi, We're having a weird issue with Spring Web Services/SOAP when switching from Sun's Java to IBM's Java. We're using the Spring Web Services example code from here (6.2.2.): http://static.springsource.org/spring-ws/sites/1.5/reference/html/client.html It works perfectly from our localhost which uses Sun's Java. But when switching t...

Error creating bean with name PropertyName: No property found

I create beens with Spring in ApplicationContext.xml like below: <bean id="myClass" class="com.classes.MyClass"> <property name="Url" value="https://localhost"&gt;&lt;/property&gt; <property name="Name" value="admin"></property> <property name="Password" value="admin"></property> </bean> package com.classes public class MyClass {...

How to assign java.util.logging.Level to a bean?

I created an application and want to config its logging.Level thorugh bean <bean id="loggingLevel" class="java.util.logging.Level"> <constructor-arg> <value>INFO</value> </constructor-arg> </bean> but it failed. Here is the error message: Unsatisfied dependency expressed through constructor argument with index 1 of type [int]:...

reference data is lost when form fails validation in spring3 annotation based controller

I'm doing the spring 3 annotation based controller thing. Problem is, when it fails validation, the reference data is lost, namely the countryDivisions stuff. I didn't put it in the form because its not user editable data, and the orthodoxy here is that only user-editable data goes in the form. Do I have any other choice? @Controller pu...

How do I run the test cases in a non-web-project I have imported into my Spring web project?

This package has a class - HowToUseGeocell.java - with test cases defined. I have imported this entire project into a larger Java web project (Spring 3) in Eclipse controlled by a Maven task (gae:run). But I don't know how to run these test cases from inside the larger project. Could someone point me in the right direction please? Tha...

Multiple Entity Manager issue in Spring when using more than one datasource

I have two entity managers in my applicationContext.xml which corresponds to two different databases. I can easily query database1 with entityManager1, but when I try to access database2 with entityManager2, I am not getting any results. I am using Spring+Hibernate+JPA. Here is my ApplicationContext.xml <?xml version="1.0" encoding...

Error creating bean with name '_filterChainProxy': Initialization of bean failed; nested exception is java.lang.NullPointerException

applicationContext.xml <bean id="defaultEntryPoint" class="com.spsetia.companyapp.company.services.CustomAuthenticationEntryPoint"> <property name="securityConfiguration" ref="securityConfiguration" /> <!-- Default filter chain proxy --> <property name="proxy" ref="_filterChainProxy" /> </bean> inside web.xml <context-par...

Effect of declaring a singleton Spring bean static?

If you have private static MyDAO myDAO; And declared in applicationContext as <bean id="myDAO" scope="singleton" class="my.MyDAO" /> Is there any effect declaring myDAO w/ the static modifier when it is already a singleton? Thanks in advance! ...

How to add Spring Beans automatically to a TaskExecutor

I'm looking for a way to have spring beans registering themselves to a job processor bean who in turn will execute the registered beans on a schedule. I'm hoping that the bean would just have to implement an interface and by some spring mechanism get registered to the job processor bean. Or alternatively inject the job processor bean in...

spring security form-login

when ntlmprocessingfilter fail (entered wrong username and password), it is forwarded to form-login page. but i cannot get value from j_username in protected UserDetails retrieveUser(String username any idea what i miss out? i found out it work in firefox. but not working in internet explorer ...

Spring MVC: What happens if I start a thread in a controller action?

Hi, in a Spring MVC Controller I would like to start a thread that continues work while my controller sends the response. Will this work with spring-mvc ? Best Reagrds, Heinrich ...

how do you inject a bean into a @Controller class

I'm somewhat new to Spring (using 3.0), so I'm hoping there is a simple answer. If I have a controller that is annotated with @Controller and @RequestMapping and I want to set a property via dependency injection, how do I go about doing that? The controller class doesn't have to appear in the Spring configuration file because it gets p...

spring embeded jetty+cxf

I'm running embedded jetty inside of a spring ioc container. The spring ioc contains also an embedded hsqldb which makes the whole configuration a nice and complete web application development environment (on a single JVM). Now I'm trying to add apache CXF to this environment to make the jetty host not only servlets but also web services...

Horizontal scalaibility in a Spring based messaging application.

Hi Techies, I work on Spring based messaging application. We are undergoing a scalable tests for our product. However the application is not scalable horizontally after a certain limit. We are finding out the code points to be modified but would like to get an expert comment/pointers in order to make changes in the application. Can th...

How to test protected method with Spring dependency

I have the following interface and implementation classes:- public interface MyService { void method1(); } public interface MyServiceImpl implements MyService { public void method1() { // ... } /*protected*/ void method2() { // ... } } MyServiceImpl has some Spring wirings, in another word, both m...

aop.xml name and location?

Is there a way to specify the name of the aop.xml file with LTW? or define another name and location? I have several software modules that I use and that all use META-INF/aop.xml with different settings. I include these modules in a web application and then it all dependens how it's deployed/unpacked, which aop.xml file is used .. So I d...

how to access a ModelAndView object within the jsp page

Hi I have a code like this in my controller. ModelAndView result = new ModelAndView("person/sometrends"); result.addObject("data", data); // data -> Map In my JSP page I have written some Java code that is dependent on the data object. How can I get that data object within the JSP code? I tried something like this (pseudo code). ...

How to construct a bean using nested properties in applicationContext.xml?

I have Java classes like this: public class Config { public Config1 getConfigOpt1(); public Config2 getConfigOpt2(); } public class SomeBean { public Config getEntireConfig(); } public class BeanToConstruct { public static BeanToConstruct createAndStart( Config1 config1, Config2 config2 ) } Given SomeBean, I would c...

Once spring mvc boilerplate project is setup, is python/RoR much faster to develop?

I'm starting a new project, and wondering if I should try out python or ruby. I am pretty new to java/hibernate myself actually (I' into .net, or was!). It has taken a while to setup this IDEA spring mvc application with all the dependancies, logging, artifacts/modules etc etc. But the bulk seems to be done now! Now do you think goin...