Re: One Session(HTTP) for multiple GWT-Modules?
And how can i track the session id? I can store the sessionId at the client-side (for users which have cookies disabled), but if they reload the client-side the sessionId will be lost. So, what do you think: Will it be a good solution to add the sessionId into the URL to enable session tracking for users without cookies enabled? Or is there another way? Regards On 18 Mrz., 05:04, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: No. SessionId is create. 2011/3/17 Johannes Stein johannes.st...@googlemail.com Cookies are fine, but what happens if cookies are disabled? Then two sessions will be created by the server, or not? On 17 Mrz., 12:40, Uemit uemit.se...@gmail.com wrote: It depends how session management is done on the client. If you use cookies to store the session id it should make no difference as long as you communicate with the same domain (Cookies are domain specific). If you open gmail in two tabs in your browser you won't have to authenticate twice only one time right?. Both gmail instances will share the session. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: One Session(HTTP) for multiple GWT-Modules?
Any ideas? Or would you recommend to use Cookies only? On 22 Mrz., 16:12, Johannes Stein johannes.st...@googlemail.com wrote: And how can i track the session id? I can store the sessionId at the client-side (for users which have cookies disabled), but if they reload the client-side the sessionId will be lost. So, what do you think: Will it be a good solution to add the sessionId into the URL to enable session tracking for users without cookies enabled? Or is there another way? Regards On 18 Mrz., 05:04, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: No. SessionId is create. 2011/3/17 Johannes Stein johannes.st...@googlemail.com Cookies are fine, but what happens if cookies are disabled? Then two sessions will be created by the server, or not? On 17 Mrz., 12:40, Uemit uemit.se...@gmail.com wrote: It depends how session management is done on the client. If you use cookies to store the session id it should make no difference as long as you communicate with the same domain (Cookies are domain specific). If you open gmail in two tabs in your browser you won't have to authenticate twice only one time right?. Both gmail instances will share the session. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: One Session(HTTP) for multiple GWT-Modules?
But if i have two seperate modules each client will get a different sessionId from the server (rpc-call), because the servers interprets each module as a single client!? On 16 Mrz., 20:00, Johannes Stein johannes.st...@googlemail.com wrote: No ideas? On 16 Mrz., 18:58, Johannes Stein johannes.st...@googlemail.com wrote: Yes, thats right. But will it then be possible to make in each module a gwt-rpc-call which checks, if the user is logged-in? Will the Session be the same, or will each call (from different modules) deliver a different session-id? And what happens, if the users browser has cookies disabled? Is there a way to rewrite the url like in JSP or Servlets? On 16 Mrz., 18:47, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: The modules is in client side. Session is in the server side. Juan 2011/3/16 Johannes Stein johannes.st...@googlemail.com hello, im implementing a little online-game with gwt. this game contains two modules - one ui for the game itself and a seperate user-area. if a user is logged-in into the user-area he should be able to write comments etc. in the game-gui (the other module). is it possible to share a http-session between the modules? what could be a solution? thanks for any help! johannes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: One Session(HTTP) for multiple GWT-Modules?
Cookies are fine, but what happens if cookies are disabled? Then two sessions will be created by the server, or not? On 17 Mrz., 12:40, Uemit uemit.se...@gmail.com wrote: It depends how session management is done on the client. If you use cookies to store the session id it should make no difference as long as you communicate with the same domain (Cookies are domain specific). If you open gmail in two tabs in your browser you won't have to authenticate twice only one time right?. Both gmail instances will share the session. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: One Session(HTTP) for multiple GWT-Modules?
Yes, thats right. But will it then be possible to make in each module a gwt-rpc-call which checks, if the user is logged-in? Will the Session be the same, or will each call (from different modules) deliver a different session-id? And what happens, if the users browser has cookies disabled? Is there a way to rewrite the url like in JSP or Servlets? On 16 Mrz., 18:47, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: The modules is in client side. Session is in the server side. Juan 2011/3/16 Johannes Stein johannes.st...@googlemail.com hello, im implementing a little online-game with gwt. this game contains two modules - one ui for the game itself and a seperate user-area. if a user is logged-in into the user-area he should be able to write comments etc. in the game-gui (the other module). is it possible to share a http-session between the modules? what could be a solution? thanks for any help! johannes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: One Session(HTTP) for multiple GWT-Modules?
No ideas? On 16 Mrz., 18:58, Johannes Stein johannes.st...@googlemail.com wrote: Yes, thats right. But will it then be possible to make in each module a gwt-rpc-call which checks, if the user is logged-in? Will the Session be the same, or will each call (from different modules) deliver a different session-id? And what happens, if the users browser has cookies disabled? Is there a way to rewrite the url like in JSP or Servlets? On 16 Mrz., 18:47, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: The modules is in client side. Session is in the server side. Juan 2011/3/16 Johannes Stein johannes.st...@googlemail.com hello, im implementing a little online-game with gwt. this game contains two modules - one ui for the game itself and a seperate user-area. if a user is logged-in into the user-area he should be able to write comments etc. in the game-gui (the other module). is it possible to share a http-session between the modules? what could be a solution? thanks for any help! johannes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT + JSP = AdSense-Content?
Whats about the idea to load content and keywords for adSense seperately via JSP and to embed the GWT-Module into this JSP pages? So it will be possible to load content and keywords synchronously , so that Google-Bot has something to read. What do you think? Could this be an elegant solution? Or will it have huge effects to the performance? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT + JSP = AdSense-Content?
So you think this could be a possibility to get pages understand by AdSense? We need content-related ads, thats why im asking for that. Another Solution could be stop developing with gwt an use JSF instead... Hm... On 31 Jan., 18:55, Jan Mostert jan.most...@gmail.com wrote: I'm currently bootstrapping a GWT application with a JSPX page, the pages I want to have indexed are pure JSPX pages, the backend page is a JSPX page with GWT widgets being placed inside divs. It won't be much slower than a regular JSPX page, except for the GWT-javascript that needs to be loaded with each page load. On Mon, Jan 31, 2011 at 7:31 PM, Johannes Stein johannes.st...@googlemail.com wrote: Whats about the idea to load content and keywords for adSense seperately via JSP and to embed the GWT-Module into this JSP pages? So it will be possible to load content and keywords synchronously , so that Google-Bot has something to read. What do you think? Could this be an elegant solution? Or will it have huge effects to the performance? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Session Handling - user HTTP Session or own solution?
Hello, im thinking about how to handle user-sessions. As i can remember there is the possibility to use HTTPSession (Servlet). Is this recommendable? Or is it a better idea to use an own solution? Im thinking about storing the session-id in a NoSQL database named redis. The session id will be generated on the server-side and holded at the client side. For each request the session will be send to the server (rpc-call). Thats my auth-process. What do you think? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Tomcat vhost - Servlets not available
Hey, i deployed a gwt-application in tomcat 6.0.18 without any problems. I pointed a url to the ip-adress and deployed the application unter webapps/myfolder, so that the app was reachable unter http://mydomain/myfolder. It worked fine. But since im using a vhost in tomcat i got a problem. Every time when gwt tries a callback i get the message: Requested resource not found. I did not make any changes in the web.xml. I added the host like the following in the server.xml: ... !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=srv2.tudom.de appBase=tudom unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host !-- VIRTUAL HOST INJECTION POINT -- /Engine The code is deployed into the folder tudom. The .html works fine, but my callbacks dont work. A snippet from my web.xml: servlet servlet-nameStartService/servlet-name servlet-classtudom.start.server.StartServiceImpl/servlet-class /servlet servlet-mapping servlet-nameStartService/servlet-name url-pattern/tudom.start.Start/StartService/url-pattern /servlet-mapping When im changing the URL-Pattern to url-pattern/tudom.start.Start/StartService/url-pattern the Servlet gets reachable, but this doesnt interest GWT, cause it still tries to load /tudom.start.Start/StartService. Could everyone help me? Im now searching some hours and cant find anything. Hope you can help me. Greetings -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Tomcat vhost - Servlets not available
Please help me. ;) On 13 Jan., 15:55, Johannes Stein johannes.st...@googlemail.com wrote: Hey, i deployed a gwt-application in tomcat 6.0.18 without any problems. I pointed a url to the ip-adress and deployed the application unter webapps/myfolder, so that the app was reachable unterhttp://mydomain/myfolder. It worked fine. But since im using a vhost in tomcat i got a problem. Every time when gwt tries a callback i get the message: Requested resource not found. I did not make any changes in the web.xml. I added the host like the following in the server.xml: ... !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=srv2.tudom.de appBase=tudom unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host !-- VIRTUAL HOST INJECTION POINT -- /Engine The code is deployed into the folder tudom. The .html works fine, but my callbacks dont work. A snippet from my web.xml: servlet servlet-nameStartService/servlet-name servlet-classtudom.start.server.StartServiceImpl/servlet-class /servlet servlet-mapping servlet-nameStartService/servlet-name url-pattern/tudom.start.Start/StartService/url-pattern /servlet-mapping When im changing the URL-Pattern to url-pattern/tudom.start.Start/StartService/url-pattern the Servlet gets reachable, but this doesnt interest GWT, cause it still tries to load /tudom.start.Start/StartService. Could everyone help me? Im now searching some hours and cant find anything. Hope you can help me. Greetings -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Connecting GWT-Modules / Rewrite URL
hello, i am developing a little online-game with gwt. the application contains several little modules. these modules are embedded in some html files. we have one html file for a latest-news-module, one for a category-listing and for the game itself. currently we access each module by url, for ex. http://myurl/start.html , http://myurl/quiz.html and http://myurl/category.html. in case that we have a lot of games and a lot of categories we use the anchor of an url (history) for delivering parametes, for ex. http://myurl/quiz.html#playid:200. but this is not really search-engine friendly, because they ignore this. what do you recommend? is it recommendable to use instead a construct like http://myurl/quiz.html?id=id and then to rewrite the url by URLRewriteFilter (http://urlrewritefilter.googlecode.com/svn/ trunk/src/doc/manual/3.2/guide.html) and is it even recommandable to navigate like me through the modules? or is there another, much more elegant way? sorry for my english. i hope i did not make too much mistakes. johannes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Connecting GWT-Modules / Rewrite URL
But will then there be a way to rewrite the history tokens ? e.g. from http://myurl/play:12345 to http://myurl/play/quiz123 ? Could it be rewrited by URLRewriteFilter? MVP is an good idea, but not practicable for us. This would be even more search engine unfriendly. By the way, is there a possibility to convert Widgets in to a HTML reprensentation? For e.g. a fixedTable widget to html table representation? On 12 Jan., 09:32, Y2i yur...@gmail.com wrote: GWT approach to navigation within a module is to use history tokens:http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHist... If you use MVP, then take a look at activities and places (GWT integrates them with history tokens):http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd... But I'm not sure if this is search engine friendly. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Connecting GWT-Modules / Rewrite URL
No one who can give me a tip? Will GWT be able to get the current historyitem, if i rewrite for e.g. http://myurl/play:12345 to http://myurl/play/quiz123? On 12 Jan., 11:17, Johannes Stein johannes.st...@googlemail.com wrote: But will then there be a way to rewrite the history tokens ? e.g. fromhttp://myurl/play:12345tohttp://myurl/play/quiz123? Could it be rewrited by URLRewriteFilter? MVP is an good idea, but not practicable for us. This would be even more search engine unfriendly. By the way, is there a possibility to convert Widgets in to a HTML reprensentation? For e.g. a fixedTable widget to html table representation? On 12 Jan., 09:32, Y2i yur...@gmail.com wrote: GWT approach to navigation within a module is to use history tokens:http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHist... If you use MVP, then take a look at activities and places (GWT integrates them with history tokens):http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd... But I'm not sure if this is search engine friendly. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
URL rewriting (UrlRewriteFilter) = passing parameters
Hey guys, i have a rewrite rule like the following: rule from^/quiz/play/([0-9]+)$/from to/index.html?action=playid=$1/to /rule The rewriting works fine, but gwt seems not to be able to get the parameter. Im using this command: Window.Location.getParameter(id) This does not work. I always get null. Can anyone help me? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
AdSense and GWT
Hello, could anyone say me how i can intergrate adSense in my GWTApplication? The Application is fully developed in GWT and we want to show content- relevant Ads. Is there a possbility without breaking the AdSense policies? Hope you can help me. Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: AdSense and GWT
No one who could help me? On 30 Dez., 14:51, Johannes Stein johannes.st...@googlemail.com wrote: Hello, could anyone say me how i can intergrate adSense in my GWTApplication? The Application is fully developed in GWT and we want to show content- relevant Ads. Is there a possbility without breaking the AdSense policies? Hope you can help me. Regards -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Serialization Error with own class while compiling
nobody has a solution? On 1 Apr., 07:46, Johannes Stein johannes.st...@googlemail.com wrote: Hey folks, thank you for your help. I got it fixed. I missed to implement a zero-argument constructor in Kontakt... Damn... im so blind! But sometimes you need to have a night to rethink on it again. Okay, but there´s one new question. In my database (dont know why it was designed this way) the date is splitted into three integer-columns: day, month, year. Okay, for my comparison i need to transform this into a Date-Object. But this does not work, if im using the DateTimeFormat-Class of GWT. It uses GWT.Create() in his code, what´s prohibeted on server-side code, so that this error occurs: Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is only usable in client code! It cannot be called, for example, from server code. If you are running a unit test, check that your test case extends GWTTestCase and that GWT.create() is not called from within an initializer or constructor.[...] I use this Domain-Construtor for this: public Domain(String adresse, String tld, int tag, int monat, int jahr, Kontakt kontakt) { DateTimeFormat fmt = DateTimeFormat.getFormat(dd.MM.yyy); this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=fmt.parse((tag+.+monat+.+jahr)); return; } Do you may have an idea, how it could work? Thank you for your recent help! johannes p.s.: greetings from germany.I hope my English is not as bad as I think. :P On 31 Mrz., 20:46, Katharina Probst kpro...@google.com wrote: I think it's fine to have constructors with arguments (so long as you also have a zero-argument constructor), but, yes, Kontakt needs to be serializable too. kathrin On Wed, Mar 31, 2010 at 2:41 PM, Sean slough...@gmail.com wrote: Don't have a constructor with arguments, only use Set/Gets. What's a Kontakt? Is that serializable? Fix the constructor and verify Kontakt is serializable and it should work. On Mar 31, 10:43 am, Johannes Stein johannes.st...@googlemail.com wrote: Hey, ive got a problem and im searching for hours to find a solution. My problem is the following: I have a little RPC-Service which returns as a result a Domain- Object (Own custom-class). But this Domain-Object could not be serialized, though i have made this Domain-class serializable with com.google.gwt.user.client.rpc.IsSerializable. Im using GWT SDK 2.01 and getting the following compiling error: [ERROR] com.google.gwt.core.client.JavaScriptObject is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.vostokdomains.kis.client.objetcs.Domain) [ERROR] com.google.gwt.core.client.JavaScriptObject has no available instantiable subtypes. (reached via com.vostokdomains.kis.client.objetcs.Domain) I hope you can help me out!! Enclosed some code-snippets: package com.vostokdomains.kis.client.objetcs; import java.util.Date; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.user.client.rpc.IsSerializable; == Domain-Object public class Domain implements ComparableDomain, IsSerializable{ private String adresse; private String tld; private Date create; private Date next; private int laufzeit; private double preis; private Kontakt registrar; private Kontakt admin; private Kontakt tech; private Kontakt owner; private String namesever1; private String nameserver2; private String records; Domain(){ } public Domain(String adresse, String tld, int tag, int monat, int jahr, Kontakt kontakt) { DateTimeFormat fmt = DateTimeFormat.getFormat(dd.MM.yyy); this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=fmt.parse((tag+.+monat+.+jahr)); return; } public Domain(String adresse, String tld, Kontakt kontakt){ this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=new Date(); } [] = DatabaseService public class DatabaseServiceImpl extends
Serialization Error with own class while compiling
Hey, ive got a problem and im searching for hours to find a solution. My problem is the following: I have a little RPC-Service which returns as a result a Domain- Object (Own custom-class). But this Domain-Object could not be serialized, though i have made this Domain-class serializable with com.google.gwt.user.client.rpc.IsSerializable. Im using GWT SDK 2.01 and getting the following compiling error: [ERROR] com.google.gwt.core.client.JavaScriptObject is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.vostokdomains.kis.client.objetcs.Domain) [ERROR] com.google.gwt.core.client.JavaScriptObject has no available instantiable subtypes. (reached via com.vostokdomains.kis.client.objetcs.Domain) I hope you can help me out!! Enclosed some code-snippets: package com.vostokdomains.kis.client.objetcs; import java.util.Date; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.user.client.rpc.IsSerializable; == Domain-Object public class Domain implements ComparableDomain, IsSerializable{ private String adresse; private String tld; private Date create; private Date next; private int laufzeit; private double preis; private Kontakt registrar; private Kontakt admin; private Kontakt tech; private Kontakt owner; private String namesever1; private String nameserver2; private String records; Domain(){ } public Domain(String adresse, String tld, int tag, int monat, int jahr, Kontakt kontakt) { DateTimeFormat fmt = DateTimeFormat.getFormat(dd.MM.yyy); this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=fmt.parse((tag+.+monat+.+jahr)); return; } public Domain(String adresse, String tld, Kontakt kontakt){ this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=new Date(); } [] = DatabaseService public class DatabaseServiceImpl extends RemoteServiceServlet implements DatabaseService { /** * */ private static final long serialVersionUID = 1L; public Domain getDomains() { DBConnection conn = new DBConnection(); conn.connect(); Connection dbconn = conn.getConnection(); System.out.print(TEST); Domain d = null; try { ResultSet rs = null; Statement stm = dbconn.createStatement(); System.out.print(STATEMENT); stm.execute(SELECT * FROM domains); rs = stm.getResultSet(); rs.next() ; Kontakt k = new Kontakt(rs.getString(2)); d = new Domain(rs.getString(3), tld, k); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return d; } } RPC Call public class Kis implements EntryPoint { @Override public void onModuleLoad() { DatabaseServiceAsync rpc; rpc = (DatabaseServiceAsync) GWT.create(DatabaseService.class); ServiceDefTarget target = (ServiceDefTarget) rpc; String moduleRelativeURL = GWT.getModuleBaseURL() + DatabaseServiceImpl; target.setServiceEntryPoint(moduleRelativeURL); /* test.add(); RootPanel.get().add(test.vpanel);*/ rpc.getDomains(new AsyncCallbackDomain() { public void onFailure(Throwable caught) { Window.alert(Übertragung fehlgeschlagen! ); } public void onSuccess(Domain rs) { //Expiration ex = new Expiration(); //ex.create(rs,0); System.out.print(rs.getAdresse()); //RootPanel.get().add(ex.vpanel); } } ); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to
Re: Serialization Error with own class while compiling
Hey folks, thank you for your help. I got it fixed. I missed to implement a zero-argument constructor in Kontakt... Damn... im so blind! But sometimes you need to have a night to rethink on it again. Okay, but there´s one new question. In my database (dont know why it was designed this way) the date is splitted into three integer-columns: day, month, year. Okay, for my comparison i need to transform this into a Date-Object. But this does not work, if im using the DateTimeFormat-Class of GWT. It uses GWT.Create() in his code, what´s prohibeted on server-side code, so that this error occurs: Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is only usable in client code! It cannot be called, for example, from server code. If you are running a unit test, check that your test case extends GWTTestCase and that GWT.create() is not called from within an initializer or constructor.[...] I use this Domain-Construtor for this: public Domain(String adresse, String tld, int tag, int monat, int jahr, Kontakt kontakt) { DateTimeFormat fmt = DateTimeFormat.getFormat(dd.MM.yyy); this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=fmt.parse((tag+.+monat+.+jahr)); return; } Do you may have an idea, how it could work? Thank you for your recent help! johannes p.s.: greetings from germany.I hope my English is not as bad as I think. :P On 31 Mrz., 20:46, Katharina Probst kpro...@google.com wrote: I think it's fine to have constructors with arguments (so long as you also have a zero-argument constructor), but, yes, Kontakt needs to be serializable too. kathrin On Wed, Mar 31, 2010 at 2:41 PM, Sean slough...@gmail.com wrote: Don't have a constructor with arguments, only use Set/Gets. What's a Kontakt? Is that serializable? Fix the constructor and verify Kontakt is serializable and it should work. On Mar 31, 10:43 am, Johannes Stein johannes.st...@googlemail.com wrote: Hey, ive got a problem and im searching for hours to find a solution. My problem is the following: I have a little RPC-Service which returns as a result a Domain- Object (Own custom-class). But this Domain-Object could not be serialized, though i have made this Domain-class serializable with com.google.gwt.user.client.rpc.IsSerializable. Im using GWT SDK 2.01 and getting the following compiling error: [ERROR] com.google.gwt.core.client.JavaScriptObject is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.vostokdomains.kis.client.objetcs.Domain) [ERROR] com.google.gwt.core.client.JavaScriptObject has no available instantiable subtypes. (reached via com.vostokdomains.kis.client.objetcs.Domain) I hope you can help me out!! Enclosed some code-snippets: package com.vostokdomains.kis.client.objetcs; import java.util.Date; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.user.client.rpc.IsSerializable; == Domain-Object public class Domain implements ComparableDomain, IsSerializable{ private String adresse; private String tld; private Date create; private Date next; private int laufzeit; private double preis; private Kontakt registrar; private Kontakt admin; private Kontakt tech; private Kontakt owner; private String namesever1; private String nameserver2; private String records; Domain(){ } public Domain(String adresse, String tld, int tag, int monat, int jahr, Kontakt kontakt) { DateTimeFormat fmt = DateTimeFormat.getFormat(dd.MM.yyy); this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=fmt.parse((tag+.+monat+.+jahr)); return; } public Domain(String adresse, String tld, Kontakt kontakt){ this.setRegistrar(new Kontakt(Keine Angabe)); this.adresse=adresse; this.tld=tld; this.owner=kontakt; this.next=new Date(); } [] = DatabaseService public class DatabaseServiceImpl extends RemoteServiceServlet implements DatabaseService { /** * */ private static final long serialVersionUID = 1L; public Domain getDomains