<bean
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="mappedHandlers">
<set>
<ref bean="exceptionController" />
</set>
</property>
<property name="defaultErrorView" value="tiles/content/error" />
</bean>
I'm trying to send exceptions to a contro...
I am using ActiveMq 5.32 with Spring 2.5.5. I use pretty generic configuration, as long as I include the
jmsTransactionManager in DefaultMessageListenerContainer, Spring throw an error on start up:
"Error creating bean with name 'org.springframework.jms.listener.DefaultMessageListenerContainer#0'"
Without the transactionManager attrib...
Hello, I am trying to save a SystemUser entity in JPA. I also want to save certain things like who created the SystemUser and who last modified the system User as well.
@ManyToOne(targetEntity = SystemUser.class)
@JoinColumn
private SystemUser userWhoCreated;
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(iso=ISO.DATE_TIME)
private ...
Can anybody suggest simple CMS to manage existed project on JAVA (Spring+Hibernate). I need simple CRUD operations for Hibernate Mapping objects (annotations based mapping).
...
Hi, I have a block of gsp I'd like to reuse and make into a little gsp snippet:
<sec:ifLoggedIn>
<g:link controller="user" action="showProfile">My Profile</g:link> |
<g:link controller="privateMessage" action="list">Inbox</g:link> |
<g:link controller="user" action="showPreferences">Preferences</g:link> |
<g:link control...
Hi guys,
I'm having a bit of a problem defining my aspects. I've got a bunch of entities that I'd like to profile the get-methods in, so I've written the following pointcut and method
@Pointcut("execution(* tld.myproject.data.entities.*.get*()")
public void getEntityProperty() {}
@Around("getEntityProperty()")
public Object profileGet...
Hi all,
I used Spring framework and oracle weblogic 10.3 as a container.
I used workmanager for manage my thread, I already made one thread that managed by workmanager. Fortunately spring provide the delegation class for using workmanager, so I just need to put it on applicationContext.xml.
But when I put the "while" and TimeUnit for sl...
I found out really strange behavior on relatively simple use case, probably I can't understand it because of not deep knowledges of spring @Transactional nature, but this is quite interesting.
I have simple User dao that extends spring JpaDaoSupport class and contains standard save method:
@Transactional
public User save(User user) {
...
In Spring MVC 2.5 with Jetty - probably with any servlet container -, I want to redirect to an external site using RedirectView via the magic "redirect:" prefix for the view name in ModelAndView.
Unfortunately, RedirectView uses response.encodeRedirectURL(), so my (otherwiese wanted) session id is appended to the URL. It is not only a ...
Hola guys!
im currently struggling to integrate a REST Service based on Jersey and Spring. I'm using Spring 3.0.2-RELEASE and jersey-spring 1.2.
But jersey-spring adds a dependency to Spring 2.5.6 to my project which of cause conflicts with the 3.0.2-RELEASE to give me thefollwing error:
11:58:25,409 ERROR org.springframework.web.cont...
Hello,
So I have an MVC project that exposes my services in JSON format.
What would be the ideal method of (unit?) testing whether or not my methods return correct content (in terms of JSON syntax as well)?
Thank you,
Sammy
...
When using the FreemarkerServlet, it is possible to include JSP pages alongside Freemarker content. However, I'm using Freemarker as a view resolver in my Spring MVC application and so don't use the FreemarkerServlet. Is there any way I can still use @include_page in my Freemarker templates when I'm not using the FreemarkerServlet?
Than...
Hi.
I have two JUnit tests.
Separately,under Eclipse,they ran OK.
In case they were ran by mvn clean install command separately (one of the test was disabled),that all were OK also.
When both tests are enabled, that mvn clean install failed with stack:
18:37:40,964 ERROR main TestContextManager:258 - Caught exception while allowing...
I am testing my Hibernate DAOs with Spring and JUnit.
I would like each test method to start with a pre-populated DB, i.e. the Java objects have been saved in the DB, in a Hibernate transaction that has already been committed. How can I do this?
With @After and @Before, methods execute in the same Hibernate transaction as the methods d...
I have just started studying Spring framework. My current goal is to access database from my bean through JPA (TopLink** provider) on Geronimo server. But I can't overcome the problem of getting entityManagerFactory.
The exception I get:
java.lang.IllegalStateException:
ClassLoader
[org.apache.geronimo.kernel.config.MultiParent...
I can't get spring annotations to work at all, I'm just trying to get the simplest thing to work...
.../mycontext/something -> invokes method:
@RequestMapping(value = "/something")
@ResponseBody
public String helloWorld() {
System.out.println("hello world");
return "Hello World";
}
My main problem is no matter how hard I try,...
Hi, I'm relatively new with hibernate so please be gentle. I'm having an issue with a long running method (~2 min long) and changing the value of a status field on an object stored in the DB. The pseudo-code below should help explain my issue.
public foo(thing) {
if (thing.getStatus() == "ready") {
thing.setStatus("finishe...
Hi there,
I've got a webapp which uses spring+hibernate for my data layer. I'm using 2nd level caching with ehcache as provider. Everything seems to work so far but sometimes we encounter a problem which I can't really figure out atm.
One of my tables is used for labels within the application - every user who logs access this table wit...
How can I represent new JndiTemplate(properties).lookup(name), where name is a string variable, in the Spring application context file? Can I express it in a way similar to the following, where the application provides name when it retrieves the bean ID?
<util:properties id="applicationProperties"
location="classpath:application.pr...
Hi,
I'm finding that even though I have code wrapped by Spring transactions, and it commits/rolls back when I would expect, in order to make use of JDBC batching when using Ibatis and Spring I need to use explicit SqlMapClient transaction methods.
I.e. this does batching as I'd expect:
dao.getSqlMapClient().startTransaction();
dao.ge...