How can I make this work in unit tests using Hibernate 3.3.1ga and HSQLDB:
@Entity
@Table(name="CATEGORY", schema="TEST")
public static class Category { ... }
The problem is that Hibernate expects the schema to exist. The second problem is that Hibernate issues the CREATE TABLE TEST.CATEGORY before any of my code runs (this happens de...
hey guys,
I am trying to display some nepali langauage charcaters in my spring MVC webapp with freemarker,
i did everything like i have character encoding filter in my web.xml
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
...
I'm getting LazyInitializationException with session scoped bean in my service layer. If I load the same bean using a regular dao in my method, I can access it's lazy collections without problems. But if I inject it in my service bean, and then try to access one of its lazy collection, I have a LazyInitializationException.
I'm using J...
Hello,
I am developing Web Base Application using Spring, Struts2, Hibernate.
Now i am in the reporting phase of my system.
But i am little bit confused that which tool to use & which not.
I had tried Jasper report with struts2 plugin, but facing lots of problem in jrxml file.
Now can anyone suggest which reporting tool will be bett...
I'm new to Spring, so this question may look like so obvious.
I'm trying to implement Spring security and my requirement is to authenticate the user name/password against a LDAP server and once the user is authenticated, I need to retrieve the user roles from a relational database.
is it possible to do this in Spring security?
...
I am trying to get Spring to inject EasyMock mocks in my unit tests.
In my applicationContext.xml, I have this:
<bean id="mockService" class="org.easymock.EasyMock" factory-method="createMock" name="MockService">
<constructor-arg index="0" value="my.project.Service"/>
</bean>
In my unit test I have this:
@Autowired
@Qualifier(...
I'm developing a Spring MVC application using ibatis for the database interaction layer. I'd like to be able to set the name of the database via a properties file in my classpath (or via the spring xml configuration) so I can change the database on the fly for a certain application and can be changed by setting the parameter and redeploy...
i have a bean in xml like below
<bean id="theCustomAuthenticationProvider" class="test.custom.CustomAuthenticationProvider">
<security:custom-authentication-provider />
a.may i know what does security:custom-authentication-provider means when i put it in my bean like above?
b. do i need to create
<bean id="authenticationManag...
i have configured a Spring-AOP on a bean. When i access this bean it returns me a spring proxy class instead of the actual bean. Is there any way i can get the actual bean.
ApplicationContext.xml
bean id = "abc" class = "abc.java"
some.java
abc a = (abc)applicationContext.getBean("abc")
this throws:
java.lang.ClassCastException: $Pr...
my service look like below
@Controller
@GwtRpcEndPoint
public class ServerServiceImpl implements
ServerService {
@org.springframework.security.annotation.Secured("ROLE_ADMIN")public String runGwtSprMvcHibJpaDemo(String s) {
System.out.println("SecurityContextHolder.getContext()="+SecurityContextHolder.getContext());
Sys...
Have a table and a sproc setup in Sybase as follows:
create table testtab (f float)
create proc insert_testtab @f float as insert testtab values(@f)
And a java object that holds a Double
class TestObj { Double getF() { return 12.34; } }
Using SimpleJdbcCall & BeanPropertySqlParameterSource:
SqlParameterSource params = new BeanPrope...
I'm trying to make a simple forum just to get the hang of the Spring Security and MVC frameworks.
For simplicity's sake, let's I have a JSP to view a forum post, which looks like the following:
<body>
...
Title: ${forumPost.title} <br>
Author: ${forumPost.author.name} <br>
Message: {forumPost.message} <br>
<securi...
hi everyone,
i am using spring from scala and i am facing a problem when trying to inject a service with a trait/superclass.
This is my code:
trait MyServiceHolder{
var myService:MyService = null
@Autowired
def setMyService(ms:MyService) = myService = ms
}
@RunWith(classOf[SpringJUnit4ClassRunner])
@ContextConfiguration(Array("...
I want to use Jersey 1.1 with spring 2.5. The exact thing that i need to do is write a interface which would be exposed as the service and implementation in a class that extends the interface.
I cannot do it in applicationContext.xml, maybe because the XSD has changed.
Could some one provide with a sample code/snippet/file where they h...
I am an avid fan of the Spring framework for Java (by Rod Johnson).
I am learning Python and was excited to find about Spring for Python.
I would be interested in hearing the community's views on the comparison of
these two flavours of Spring. How well does it fit Python's paradigms etc.
...
My web application is using Java, Hibernate's JPA implementation (EntityManager) and Spring. What are my logger choices and what would you recommend. Ideally the configuration would be simple (one config file for Hibernate, Spring and my code).
...
may i know is there any tutorials/guideliness on spring security integrate with facebook connect
...
I have the following XML configuration:
<bean id="bean1" class="Simple"/>
<bean id="bean2" class="Simple"/>
<bean id="tasks" class="java.util.ArrayList">
<constructor-arg>
<list>
<ref bean="bean1" />
<ref bean="bean2" />
</list>
</constructor-arg>
</bean>
<bean id="list" ...
Hi,
I am implementing jsr 186 portlets, with some servlets to the mix to implement some ajax. The problem is if I only make AJAX calls for some time, I lose the session. Strangely, keeping alive the servlet session does not prevent the portlet session from timing out.
Is there a way I can keep the session alive from within my servlets,...
For a relatively simple application, can Webflow be employed to reduce the need to create form controllers? Well, certainly it can, but I guess what I'm asking is: can and should I write an entire application using Webflow for all of the controller / view logic if my goal for doing so is to reduce the amount of code that I write?
I'm s...