Re: Wicket on GAE
Josh, I asked a very similar question a few weeks ago and I've got almost no replays and no pointers to a real applications using both. Regards, Ernesto 1-http://apache-wicket.1842946.n4.nabble.com/production-quality-wicket-applications-running-on-GAE-td2289729.html On Thu, Sep 23, 2010 at 7:46 AM, Josh Kamau joshnet2...@gmail.com wrote: Is there anyone running a significantly large application on GAE? I would like to know if a database driven wicket application is working on GAE and how much resources it consumes. I need this information to decide on whether GAE is a deployment option, or i need a servlet hosting service. Regards. Josh - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket on GAE
Is there anyone running a significantly large application on GAE? I would like to know if a database driven wicket application is working on GAE and how much resources it consumes. I need this information to decide on whether GAE is a deployment option, or i need a servlet hosting service. Regards. Josh
Re: Wicket And GAE
On Tue, Apr 13, 2010 at 6:12 PM, marc fawzi marc.fa...@gmail.com wrote: Is there an IRC channel for Wicket users or is this the best place for newbies like me to post questions and get help? Both. ##wicket on freenode.net is the official wicket IRC channel, and you're welcome to ask and answer here :) Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And GAE
Per #1, the GAE people highly discourage pinging to keep the instance alive. Also, I tried it for a bit anyways, and it didn't help. I get instance restarts in the MIDDLE of page loads (hint hint: I could use help on my other post!). The thing to realize with GAE is that you need to keep everything out of your Application init(). It takes some effort, but you can get pretty good Wicket apps running on GAE. It's certainly a lot harder, though, than running it on your own. Jake marc fawzi wrote: Hey guys I'm new to Wicket I've made two discoveries with respect to GAE and Wicket: 1. I figured out how to keep my GAE app instance hot at all times (well, at least for 99.9% of the time.. the GAE still produces transient errors every now and then) -- It's really simple: just have a script that launches a new task every 12 seconds and set the task url to a url that is routed to/handled by the script itself then when the script runs again (in this way) it will do two things: 1) urlfetch a url that is handled by the app you wish to keep hot (which is on another *.appspot.com url) and 2) starts schedule another task in 12 seconds. Infinite task loop. Google does kill the task loop eventually so then you need a cron job to run every 1 hour to restart the script :) and that's it. 2. Someone (srfarley) is working on a version of Wicket for GAE: This project provides a template to help you get started with building a Wicket http://wicket.apache.org/ application for Google App Enginehttp://code.google.com/appengine/. It is a re-implementation of the Guestbook application described by the App Engine tutorial http://code.google.com/appengine/docs/java/gettingstarted/. Whereas the tutorial uses raw servlets and JSP to demonstrate a some of the basic features of App Engine, this project uses Wicket as the web framework. In addition, the project defines classes for handing persistence using JDOhttp://code.google.com/appengine/docs/java/datastore/, and uses Google Guice http://code.google.com/p/google-guice/ to inject instances of these classes into the Wicket pages for interacting with the App Engine datastore. For unit testing, the project contains base classes that set up the App Engine development environment so you can write tests against the full stack, including those that interact directly with the Wicket pages. The testing framework is TestNG http://testng.org/doc/index.html, but it is possible to convert them to JUnit tests with some work. http://code.google.com/p/wicket-gae-template/ Given that I've never used Wicket (I looked at a couple examples so far) I'm hoping that we can help each other as we attempt to get good outcome for our Wicket+GAE implementations To make things more challenging, I'm using Scala, which I've never run on GAE before and I'm also new to it :) Is there an IRC channel for Wicket users or is this the best place for newbies like me to post questions and get help? Thanks, Marc On Tue, Apr 13, 2010 at 6:20 AM, jbrookover jbrooko...@cast.org wrote: I'm pretty committed to a project using Wicket on GAE. I haven't encountered any deserialization issues that people have been bringing up, which makes me worry a bit since I've encountered (and dealt with) a slew of other issues :) Regarding the HttpSessionStore, I discovered a bad coding practice of mine when every single session entry in the datastore was 500KB+. Once I resolved that issue, using more transient fields and detachable models, I'm relatively happy with the results. GAE, by default, uses the MemCache to implement this feature so it should be relatively speedy. It's no different from any other application storing data in the javax.servlet.http.HttpSession. My only lingering problem (another thread here) is that GAE can trash your application instance at any point. If you are relying on SharedResources, those can go away - even in the middle of an active page load, potentially breaking some links. Currently looking for a way around that :) Jake Richard Nichols-3 wrote: Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most
Re: Wicket And GAE
Per #1, the GAE people highly discourage pinging to keep the instance alive. Also, I tried it for a bit anyways, and it didn't help. I get instance restarts in the MIDDLE of page loads (hint hint: I could use help on my other post!). The thing to realize with GAE is that you need to keep everything out of your Application init(). It works perfectly for me. It's not so much pinging since you're not pinging a port. It's actually getting the servlets to stay loaded and the trick is to generate *enough cpu usage* not just *enough traffic* (my JVM stays hot for about 2% of the cpu daily quota). For example, loading a very simple page once every 10 seconds may not keep your JVM hot. Loading a more complex page once every 10 seconds will keep it hot. Also, you need to give the GAE some time to adjust to the new cpu load before it stops unloading your servlets. I've got the graphs to prove it :) Anyway, I don't really care what the GAE people say. They have a problem to solve, especially for the heavier frameworks like Grails. On Wed, Apr 14, 2010 at 6:07 AM, jbrookover jbrooko...@cast.org wrote: Per #1, the GAE people highly discourage pinging to keep the instance alive. Also, I tried it for a bit anyways, and it didn't help. I get instance restarts in the MIDDLE of page loads (hint hint: I could use help on my other post!). The thing to realize with GAE is that you need to keep everything out of your Application init(). It takes some effort, but you can get pretty good Wicket apps running on GAE. It's certainly a lot harder, though, than running it on your own. Jake marc fawzi wrote: Hey guys I'm new to Wicket I've made two discoveries with respect to GAE and Wicket: 1. I figured out how to keep my GAE app instance hot at all times (well, at least for 99.9% of the time.. the GAE still produces transient errors every now and then) -- It's really simple: just have a script that launches a new task every 12 seconds and set the task url to a url that is routed to/handled by the script itself then when the script runs again (in this way) it will do two things: 1) urlfetch a url that is handled by the app you wish to keep hot (which is on another *.appspot.com url) and 2) starts schedule another task in 12 seconds. Infinite task loop. Google does kill the task loop eventually so then you need a cron job to run every 1 hour to restart the script :) and that's it. 2. Someone (srfarley) is working on a version of Wicket for GAE: This project provides a template to help you get started with building a Wicket http://wicket.apache.org/ application for Google App Enginehttp://code.google.com/appengine/. It is a re-implementation of the Guestbook application described by the App Engine tutorial http://code.google.com/appengine/docs/java/gettingstarted/. Whereas the tutorial uses raw servlets and JSP to demonstrate a some of the basic features of App Engine, this project uses Wicket as the web framework. In addition, the project defines classes for handing persistence using JDOhttp://code.google.com/appengine/docs/java/datastore/, and uses Google Guice http://code.google.com/p/google-guice/ to inject instances of these classes into the Wicket pages for interacting with the App Engine datastore. For unit testing, the project contains base classes that set up the App Engine development environment so you can write tests against the full stack, including those that interact directly with the Wicket pages. The testing framework is TestNG http://testng.org/doc/index.html, but it is possible to convert them to JUnit tests with some work. http://code.google.com/p/wicket-gae-template/ Given that I've never used Wicket (I looked at a couple examples so far) I'm hoping that we can help each other as we attempt to get good outcome for our Wicket+GAE implementations To make things more challenging, I'm using Scala, which I've never run on GAE before and I'm also new to it :) Is there an IRC channel for Wicket users or is this the best place for newbies like me to post questions and get help? Thanks, Marc On Tue, Apr 13, 2010 at 6:20 AM, jbrookover jbrooko...@cast.org wrote: I'm pretty committed to a project using Wicket on GAE. I haven't encountered any deserialization issues that people have been bringing up, which makes me worry a bit since I've encountered (and dealt with) a slew of other issues :) Regarding the HttpSessionStore, I discovered a bad coding practice of mine when every single session entry in the datastore was 500KB+. Once I resolved that issue, using more transient fields and detachable models, I'm relatively happy with the results. GAE, by default, uses the MemCache to implement this feature so it should be relatively speedy. It's no different from any other application storing data
Re: Wicket And GAE
Thanks so much Rich for that information .I kept getting the Deserialization errors . Am a using Guice and JPA alongside wicket. I have since given up on using GAE and am shopping for a VPS or servlet hosting. Regards. Josh On Tue, Apr 13, 2010 at 4:51 AM, Richard Nichols r...@richardnichols.netwrote: Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most frameworks it's not a big deal as you don't store large Objects in the HttpSession. I had planned to deploy the site I'm currently working on http://www.onmydoorstep.com.au/ on GAE but after a few weeks of running the prototypes on GAE, I found the performance to be too poor and the infrastructure too flakey for a production site. NB - It's certainly possible to create high-performance/reliable sites using GAE/J, but Wicket is not a suitable framework due to the Serialization data store write problem. Even if the performance were better and the deserialization issue was fixed, you would blow through your data store quota in no-time due to the amount of data store in the session. If anyone has solutions or further experience with these issues - I'm all ears! :) cheers, Rich On 8 April 2010 17:00, Josh Kamau joshnet2...@gmail.com wrote: What are the main issues with wicket and Google app engine -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And GAE
I'm pretty committed to a project using Wicket on GAE. I haven't encountered any deserialization issues that people have been bringing up, which makes me worry a bit since I've encountered (and dealt with) a slew of other issues :) Regarding the HttpSessionStore, I discovered a bad coding practice of mine when every single session entry in the datastore was 500KB+. Once I resolved that issue, using more transient fields and detachable models, I'm relatively happy with the results. GAE, by default, uses the MemCache to implement this feature so it should be relatively speedy. It's no different from any other application storing data in the javax.servlet.http.HttpSession. My only lingering problem (another thread here) is that GAE can trash your application instance at any point. If you are relying on SharedResources, those can go away - even in the middle of an active page load, potentially breaking some links. Currently looking for a way around that :) Jake Richard Nichols-3 wrote: Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most frameworks it's not a big deal as you don't store large Objects in the HttpSession. I had planned to deploy the site I'm currently working on http://www.onmydoorstep.com.au/ on GAE but after a few weeks of running the prototypes on GAE, I found the performance to be too poor and the infrastructure too flakey for a production site. NB - It's certainly possible to create high-performance/reliable sites using GAE/J, but Wicket is not a suitable framework due to the Serialization data store write problem. Even if the performance were better and the deserialization issue was fixed, you would blow through your data store quota in no-time due to the amount of data store in the session. If anyone has solutions or further experience with these issues - I'm all ears! :) cheers, Rich On 8 April 2010 17:00, Josh Kamau joshnet2...@gmail.com wrote: What are the main issues with wicket and Google app engine -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-And-GAE-tp28174925p28229863.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And GAE
Hey guys I'm new to Wicket I've made two discoveries with respect to GAE and Wicket: 1. I figured out how to keep my GAE app instance hot at all times (well, at least for 99.9% of the time.. the GAE still produces transient errors every now and then) -- It's really simple: just have a script that launches a new task every 12 seconds and set the task url to a url that is routed to/handled by the script itself then when the script runs again (in this way) it will do two things: 1) urlfetch a url that is handled by the app you wish to keep hot (which is on another *.appspot.com url) and 2) starts schedule another task in 12 seconds. Infinite task loop. Google does kill the task loop eventually so then you need a cron job to run every 1 hour to restart the script :) and that's it. 2. Someone (srfarley) is working on a version of Wicket for GAE: This project provides a template to help you get started with building a Wicket http://wicket.apache.org/ application for Google App Enginehttp://code.google.com/appengine/. It is a re-implementation of the Guestbook application described by the App Engine tutorial http://code.google.com/appengine/docs/java/gettingstarted/. Whereas the tutorial uses raw servlets and JSP to demonstrate a some of the basic features of App Engine, this project uses Wicket as the web framework. In addition, the project defines classes for handing persistence using JDOhttp://code.google.com/appengine/docs/java/datastore/, and uses Google Guice http://code.google.com/p/google-guice/ to inject instances of these classes into the Wicket pages for interacting with the App Engine datastore. For unit testing, the project contains base classes that set up the App Engine development environment so you can write tests against the full stack, including those that interact directly with the Wicket pages. The testing framework is TestNG http://testng.org/doc/index.html, but it is possible to convert them to JUnit tests with some work. http://code.google.com/p/wicket-gae-template/ Given that I've never used Wicket (I looked at a couple examples so far) I'm hoping that we can help each other as we attempt to get good outcome for our Wicket+GAE implementations To make things more challenging, I'm using Scala, which I've never run on GAE before and I'm also new to it :) Is there an IRC channel for Wicket users or is this the best place for newbies like me to post questions and get help? Thanks, Marc On Tue, Apr 13, 2010 at 6:20 AM, jbrookover jbrooko...@cast.org wrote: I'm pretty committed to a project using Wicket on GAE. I haven't encountered any deserialization issues that people have been bringing up, which makes me worry a bit since I've encountered (and dealt with) a slew of other issues :) Regarding the HttpSessionStore, I discovered a bad coding practice of mine when every single session entry in the datastore was 500KB+. Once I resolved that issue, using more transient fields and detachable models, I'm relatively happy with the results. GAE, by default, uses the MemCache to implement this feature so it should be relatively speedy. It's no different from any other application storing data in the javax.servlet.http.HttpSession. My only lingering problem (another thread here) is that GAE can trash your application instance at any point. If you are relying on SharedResources, those can go away - even in the middle of an active page load, potentially breaking some links. Currently looking for a way around that :) Jake Richard Nichols-3 wrote: Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most frameworks it's not a big deal as you don't store large Objects in the HttpSession. I had planned to deploy the site I'm currently working on http://www.onmydoorstep.com.au/ on GAE but after a few weeks of running the prototypes on GAE, I found the performance to be too poor and the infrastructure too flakey for a production site. NB - It's certainly possible to create high-performance/reliable sites using GAE/J, but Wicket is not a suitable framework due to the Serialization data store write problem. Even if the performance were better
Re: Wicket And GAE
Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most frameworks it's not a big deal as you don't store large Objects in the HttpSession. I had planned to deploy the site I'm currently working on http://www.onmydoorstep.com.au/ on GAE but after a few weeks of running the prototypes on GAE, I found the performance to be too poor and the infrastructure too flakey for a production site. NB - It's certainly possible to create high-performance/reliable sites using GAE/J, but Wicket is not a suitable framework due to the Serialization data store write problem. Even if the performance were better and the deserialization issue was fixed, you would blow through your data store quota in no-time due to the amount of data store in the session. If anyone has solutions or further experience with these issues - I'm all ears! :) cheers, Rich On 8 April 2010 17:00, Josh Kamau joshnet2...@gmail.com wrote: What are the main issues with wicket and Google app engine -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And GAE
public SetIModifiable getEntries() { return listeners.keySet(); } @Override public IModifiable remove(IModifiable modifiable) { listeners.remove(modifiable); return modifiable; } @Override public void start(Duration duration) { // ignored } } On Thu, Apr 8, 2010 at 12:43 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: ery describing mail. But AFAIK, and my knowledge are rather limited you need to switch the session store. And then GAE has a couple of restrictions for java that you need to comply with. It's not so much Wicket and GAE, but JAVA and GAE that have issues.. Other than that search with google for Wicket and GAE, theres a couple of tutorials out there. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket And GAE
What are the main issues with wicket and Google app engine
Re: Wicket And GAE
Hi Not a very describing mail. But AFAIK, and my knowledge are rather limited you need to switch the session store. And then GAE has a couple of restrictions for java that you need to comply with. It's not so much Wicket and GAE, but JAVA and GAE that have issues.. Other than that search with google for Wicket and GAE, theres a couple of tutorials out there. regards Nino 2010/4/8 Josh Kamau joshnet2...@gmail.com: What are the main issues with wicket and Google app engine - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket on GAE with Facebook Connect - doesnt work after deploying / HTTP 500 error
Hi everyone, I'm trying to run a simple Wicket Application with Facebook Connect on Google App Engine. So far it runs local, but when I deploy to Google Facebook Connect wont work. I cant find any examples for using wicket with gae and facebook on the web. Is anyone here who successfully made it? Here is the output from ajax debug window: --- INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=wicket-9:36:fbconnectpanel::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6834228196057528 INFO: Invoking pre-call handler(s)... ERROR: Received Ajax response with code: 500 ERROR: 500 error had text: htmlhead meta http-equiv=content-type content=text/html;charset=utf-8 title500 Server Error/title /head body text=#00 bgcolor=#ff h1Error: Server Error/h1 h2The server encountered an error and could not complete your request.pIf the problem persists, please A HREF=http://code.google.com/appengine/community.html;report/A your problem and mention this error message and the query that caused it./h2 h2/h2 /body/html INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... --- FacebookConnectPanel.java - took the most from http://cwiki.apache.org/WICKET/adding-facebook-connect.html --- package polizeiwache.sites.auth.facebookconnect; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.wicket.Page; import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.protocol.http.WebResponse; import org.apache.wicket.protocol.http.servlet.ServletWebRequest; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.GrantedAuthorityImpl; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextImpl; import pojos.FacebookUser; //import com.facebook.api.FacebookException; //import com.facebook.api.FacebookJsonRestClient; //import com.facebook.api.FacebookWebappHelper; //import com.facebook.api.ProfileField; import com.google.code.facebookapi.FacebookException; import com.google.code.facebookapi.FacebookJsonRestClient; import com.google.code.facebookapi.FacebookWebappHelper; import com.google.code.facebookapi.ProfileField; //import com.google.appengine.repackaged.org.apache.commons.logging.impl.LogFactoryImpl; /** * @see http://cwiki.apache.org/WICKET/adding-facebook-connect.html * @author christoph * */ @SuppressWarnings(deprecation) public class FacebookConnectPanel extends Panel { /** * */ private static final long serialVersionUID = -5912681574741410118L; //private static final com.google.appengine.repackaged.org.apache.commons.logging.Log log = LogFactoryImpl.getLog(FacebookConnectPanel.class); private WebMarkupContainer fbloginDiv; private Label fblogin; /** * * @param id */ public FacebookConnectPanel(String id) { super(id); } /** * This method will the panel */ public void createPanel() { fbloginDiv = new WebMarkupContainer(fbloginDiv); fbloginDiv.setOutputMarkupId(true).setMarkupId(fbloginDiv); fblogin = new Label(fblogin, fb:login-button onlogin='callWicket();'/fb:login-button); fblogin.setEscapeModelStrings(false); fblogin.setOutputMarkupId(true); if (isAuthenticated()) { fbloginDiv.add(new SimpleAttributeModifier(style, display:none;)); } fbloginDiv.add(fblogin); addOrReplace(fbloginDiv); /** * This will only be called after they're logged in via facebook */ final AbstractDefaultAjaxBehavior behave = new AbstractDefaultAjaxBehavior() { /** * */ private static final long serialVersionUID = -486358491644699655L; protected void respond(final AjaxRequestTarget target) { // deal with facebook try { handleFacebookCallback(target.getPage()); } catch
Re: Wicket on GAE with Facebook Connect - doesnt work after deploying / HTTP 500 error
you are aware of this? http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/ 2010/3/26 christoph glass mail.kaffeeser...@googlemail.com Hi everyone, I'm trying to run a simple Wicket Application with Facebook Connect on Google App Engine. So far it runs local, but when I deploy to Google Facebook Connect wont work. I cant find any examples for using wicket with gae and facebook on the web. Is anyone here who successfully made it? Here is the output from ajax debug window: --- INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=wicket-9:36:fbconnectpanel::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6834228196057528 INFO: Invoking pre-call handler(s)... ERROR: Received Ajax response with code: 500 ERROR: 500 error had text: htmlhead meta http-equiv=content-type content=text/html;charset=utf-8 title500 Server Error/title /head body text=#00 bgcolor=#ff h1Error: Server Error/h1 h2The server encountered an error and could not complete your request.pIf the problem persists, please A HREF= http://code.google.com/appengine/community.html;report/A your problem and mention this error message and the query that caused it./h2 h2/h2 /body/html INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... --- FacebookConnectPanel.java - took the most from http://cwiki.apache.org/WICKET/adding-facebook-connect.html --- package polizeiwache.sites.auth.facebookconnect; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.wicket.Page; import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.protocol.http.WebResponse; import org.apache.wicket.protocol.http.servlet.ServletWebRequest; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.GrantedAuthorityImpl; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextImpl; import pojos.FacebookUser; //import com.facebook.api.FacebookException; //import com.facebook.api.FacebookJsonRestClient; //import com.facebook.api.FacebookWebappHelper; //import com.facebook.api.ProfileField; import com.google.code.facebookapi.FacebookException; import com.google.code.facebookapi.FacebookJsonRestClient; import com.google.code.facebookapi.FacebookWebappHelper; import com.google.code.facebookapi.ProfileField; //import com.google.appengine.repackaged.org.apache.commons.logging.impl.LogFactoryImpl; /** * @see http://cwiki.apache.org/WICKET/adding-facebook-connect.html * @author christoph * */ @SuppressWarnings(deprecation) public class FacebookConnectPanel extends Panel { /** * */ private static final long serialVersionUID = -5912681574741410118L; //private static final com.google.appengine.repackaged.org.apache.commons.logging.Log log = LogFactoryImpl.getLog(FacebookConnectPanel.class); private WebMarkupContainer fbloginDiv; private Label fblogin; /** * * @param id */ public FacebookConnectPanel(String id) { super(id); } /** * This method will the panel */ public void createPanel() { fbloginDiv = new WebMarkupContainer(fbloginDiv); fbloginDiv.setOutputMarkupId(true).setMarkupId(fbloginDiv); fblogin = new Label(fblogin, fb:login-button onlogin='callWicket();'/fb:login-button); fblogin.setEscapeModelStrings(false); fblogin.setOutputMarkupId(true); if (isAuthenticated()) { fbloginDiv.add(new SimpleAttributeModifier(style, display:none;)); } fbloginDiv.add(fblogin); addOrReplace(fbloginDiv); /** * This will only be called after they're logged in via facebook */ final AbstractDefaultAjaxBehavior behave = new AbstractDefaultAjaxBehavior() { /** * */ private static final long serialVersionUID = -486358491644699655L; protected void respond(final AjaxRequestTarget target
Re: Wicket on GAE with Facebook Connect - doesnt work after deploying / HTTP 500 error
You solved it :) I configured my project some days ago with the instructions from your link. Now I checked everything carefully again, and noticed that I forgott the following line in WicketApplication.java --- super.init(); --- Now it seems to work. Thank you very much! Best regards Christoph On Fri, 2010-03-26 at 14:32 +0100, Martin Funk wrote: you are aware of this? http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/ 2010/3/26 christoph glass mail.kaffeeser...@googlemail.com Hi everyone, I'm trying to run a simple Wicket Application with Facebook Connect on Google App Engine. So far it runs local, but when I deploy to Google Facebook Connect wont work. I cant find any examples for using wicket with gae and facebook on the web. Is anyone here who successfully made it? Here is the output from ajax debug window: --- INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=wicket-9:36:fbconnectpanel::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6834228196057528 INFO: Invoking pre-call handler(s)... ERROR: Received Ajax response with code: 500 ERROR: 500 error had text: htmlhead meta http-equiv=content-type content=text/html;charset=utf-8 title500 Server Error/title /head body text=#00 bgcolor=#ff h1Error: Server Error/h1 h2The server encountered an error and could not complete your request.pIf the problem persists, please A HREF= http://code.google.com/appengine/community.html;report/A your problem and mention this error message and the query that caused it./h2 h2/h2 /body/html INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... --- FacebookConnectPanel.java - took the most from http://cwiki.apache.org/WICKET/adding-facebook-connect.html --- package polizeiwache.sites.auth.facebookconnect; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.wicket.Page; import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.protocol.http.WebResponse; import org.apache.wicket.protocol.http.servlet.ServletWebRequest; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.GrantedAuthorityImpl; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextImpl; import pojos.FacebookUser; //import com.facebook.api.FacebookException; //import com.facebook.api.FacebookJsonRestClient; //import com.facebook.api.FacebookWebappHelper; //import com.facebook.api.ProfileField; import com.google.code.facebookapi.FacebookException; import com.google.code.facebookapi.FacebookJsonRestClient; import com.google.code.facebookapi.FacebookWebappHelper; import com.google.code.facebookapi.ProfileField; //import com.google.appengine.repackaged.org.apache.commons.logging.impl.LogFactoryImpl; /** * @see http://cwiki.apache.org/WICKET/adding-facebook-connect.html * @author christoph * */ @SuppressWarnings(deprecation) public class FacebookConnectPanel extends Panel { /** * */ private static final long serialVersionUID = -5912681574741410118L; //private static final com.google.appengine.repackaged.org.apache.commons.logging.Log log = LogFactoryImpl.getLog(FacebookConnectPanel.class); private WebMarkupContainer fbloginDiv; private Label fblogin; /** * * @param id */ public FacebookConnectPanel(String id) { super(id); } /** * This method will the panel */ public void createPanel() { fbloginDiv = new WebMarkupContainer(fbloginDiv); fbloginDiv.setOutputMarkupId(true).setMarkupId(fbloginDiv); fblogin = new Label(fblogin, fb:login-button onlogin='callWicket();'/fb:login-button); fblogin.setEscapeModelStrings(false); fblogin.setOutputMarkupId(true); if (isAuthenticated()) { fbloginDiv.add(new SimpleAttributeModifier(style, display:none