I'm currently building the server component of Beer Radar using Google App Engine and Spring Framework 3.0.
I've encountered these problems below and posting their corresponding solutions.
Problem:
Google App Engine cannot read JSTL and Spring Expression on JSPs
Solution:
Google App Engine has isELIgnored="true" by default.
Just add the isELIgnored="false" on the <%@page section in the JSP.
Problem:
org.springframework.web.servlet.tags.RequestContextAwareTag doStartTag: access denied (java.lang.RuntimePermission getClassLoader)
Solution:
Add the following on your Controller
For Annotated controllers use
@InitBinder
public void initLogin(WebDataBinder binder) {
System.out.println("initLogin");
binder.registerCustomEditor(String.class, new StringTrimmerEditor
(false));
}
For sub-classed controllers
Override the InitBinder method and register string trimmed editor in the binder
binder.registerCustomEditor(String.class, new StringTrimmerEditor
(false));
Problem:
org.springframework.web.HttpSessionRequiredException: Session attribute '' required - not found in session
and/or
Uncaught exception from servlet
java.lang.RuntimeException: java.io.NotSerializableException:
Solution :
implements Serializable {
private static final long serialVersionUID = <generated value>L
The unserialized Session object will work on development but, it will throw a java.io.NotSerializableException on the appspot server.
Problem :
Attempt was made to manually set the id component of a Key primary key. If you want to control the value of the primary key, set the name component instead.
Solution :
This happens when I update a child object. The solution for this, is to re-attach the parent object first, by
Parent attached = pm.getObjectById(Parent.class, detachedParent.getId());
then
Modify the child
attached.getChild().setName("new value");
then
pm.makePersistent(attachedDrunkard);
This solved the problem for me. Here's a link of a couple of alternative solutions.
Java Programming Blog where I can post my interest, problems that I had solved in the past for my personal reference.
Tuesday, July 21, 2009
Subscribe to:
Post Comments (Atom)
Find Properties for Sale or Rent in the Philippines on your Android Phone
Tutorial List
- GWT : Creating a File Hosting App using Google App Engine
- Stock Market Tutorial
- Android Application : Beer Radar
- Android Application : Beer Radar Server Component
- Android Camera Tutorial
- Android Custom Database List Adapters
- Android GPS Tutorial
- Android Hello World Tutorial
- Android Map Tutorial
- Android Networking Tutorial
- Android Parsing JSON Tutorial
- Android SQLite AutoIncrement
- Android SQLite Tutorial
- AppEngine: Generating JSON
- Beer Radar Web Application
- Google App Engine - Spring Integration Issues
java.padawan@androidph.com
1 comment:
thanks !!
Post a Comment