java

Fix Issue with Spring Web Scopes in Tests

Today I’m hit with the issue that Spring whines about the exception, “No Scope registered for scope 'request',” when I try to run tests with request scoped bean. Fortunately the fix is fairly easy.

Upgrade Virgo Server's Spring Framework Version

Virgo logo

Update July 18, 2011: Virgo 3.0.0.M05 upgrades Spring Framework 3.0.5. Steps documented here are no longer necessary.

After upgrading Virgo Web Server to 3.0.0 M03, I wanted to upgrade String Framework’s version from 3.0.0 to 3.0.5. Although this upgrade is on Virgo’s roadmap to 3.0.0, it won’t land for a few more weeks.

Issues and Solutions for Cross-Domain Ajax Calls

jQuery logo

Recently I have been building a small chat room application, using jQuery for Ajax and RESTEasy for server-side RESTful services. Because Java is used for the server side, and PHP is used to render the JavaScript for the client side, I need to use cross-domain Ajax calls. Like Flash, Ajax imposes security restrictions for such remote invocations. Here, I’m documenting the problems and solutions I have.

JPA Transaction Gets Spring’ed on GlassFish

JPA Springed

One problem I have lately is with the use of Spring-managed transaction on GlassFish. The official tutorial article is helpful to a certain point, but does not answer the problem with the use of @PersistenceContenxt annotation on GlassFish.

Issue with Building JPA Web Project using Eclipse and Maven

JPA

Yesterday, I ran into a very strange issue with building a JPA web project using both Eclipse and Maven. The problem was that, if I built the project with Maven, GlassFish 3 would not recognize the project as a JPA project. If I built the project with Eclipse, everything would be fine.

Duplicated Resources Loaded With Virgo Server

MyFaces Logo

Yesterday I ran into a problem with resource loading when using MyFaces. As filed on MyFaces JIRA here, the problem is the result of duplicated resources loaded.

JSF Quirks

This is a list of JSF quirks I have found so far. There may also be solutions or workarounds.

Use Custom Functions to Render Set with h:dataTable

I have a project that uses JSF and Hibernate. Today, I was trying to use h:dataTable to render a Set. What surprised me was that h:dataTable would only support UIData, which excluded Set. Heavily influenced by Hibernate, my project uses Set quite extensively. It would therefore be very annoying to change every Set into a UIData-supported collection, such as a List.

Problem with Hibernate Proxy Creation on Virgo

Virgo logo

Yesterday I ran into a strange problem, where Hibernate could not successfully create proxy objects using Javassist. My setup had three bundles, a domain bundle with domain classes, a persistence bundle with Hibernate utilities, and a web bundle. When running on the Virgo Web Server, Hibernate would fail to create proxy objects with a strange error.

Deploying com.springsource.org.dom4j-1.6.1.jar Bundle on GlassFish 3.0.1

com.springsource.org.dom4j-1.6.1 is a bundle required by com.springsource.org.hibernate-3.3.2.GA. Satisfying only the required dependency, com.springsource.javax.xml.stream-1.0.1, as specified by SpringSource’s bundle repository, gave me the strange “Unable to resolve due to constraint violation” error message on GlassFish 3.0.1.

Syndicate content