Apache Wicket issues on Google App Engine


2009-12-04 22:28 | Author: vytautas.racelis

@Deprecated

You should be familiar with basics of Apache Wicket on Google App Engine. There are several blog posts, introducing how to run Wicket on it:

So, startup is fine, but if you are trying to make something more complex - then you might get some troubles:

1. If you are trying to run Wicket captcha on GAE - you may get into trouble when using java.awt.* package. Why? Because it is not in The JRE Class White List.
2. Using SimpleEmail from Apache Commons Email? Forget it and use GAE The Mail Java API.
3. Are you using JPA? Having some classes with annotations @MappedSuperclass? Forget it. This annotation is not supported by GAE for now.
4.Do you use simple annotation @GeneratedValue signature for ID of your entity? You should replace it with @GeneratedValue(strategy = GenerationType.IDENTITY)
5.Do you use Spring for EntityManager and transaction handling? You should switch to custom implementation. See Using JPA with App Engine for more information.
SOLUTION:replace
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">...</bean> with
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">...</bean>
At least it works on local google app engine.
6.Hibernate is not supported.
7.If your class implements Serializable it should define variable serialVersionUID. Otherwise you might get NotSerializableException exception.
8.Not sure about this yet, but your JPA classes should be in the UI project in order to enhanced by DataNucleus Enhancer
9.Using org.apache.wicket.markup.html.list.ListView to display your information items? Better replace it with org.apache.wicket.markup.repeater.RepeatingView
10.Ajax is a little bit unpredictable. You may check the demo, running on GAE: xaloon components. DataProvider works fine on Tomcat server and GAE eclipse plugin, but on GAE deployment server.

That's it for now. Have any solutions for these items? Leave a comment and have fun while coding with Apache Wicket ;)

 
 
 
 
 
 
 
<< < > >>
 
About xaloon.org

xaloon.org provides apache wicket based components for web and business solutions.

Learn more »
Follow Us (RSS)
Help & Support

Contact us in order to get help and support.

Online contact form »
Get in touch
Online contact form »