google-code-export / gwtphp-derpc

Automatically exported from code.google.com/p/gwtphp-derpc
1 stars 0 forks source link

GXT BaseModel Serialize #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello this project is very good, but i user GXT BaseModel Object... and error 
:(((

Compiling module com.mycompany.project.ImageViewer
   Compiling 6 permutations
      Compiling permutation 0...
      Compiling permutation 1...
      Compiling permutation 2...
      Compiling permutation 3...
      Compiling permutation 4...
      Compiling permutation 5...
   Compile of permutations succeeded
Linking into 
D:\gwt\projects\ProbaGWTPHP-derpc\war\com.mycompany.project.ImageViewer
   Linking Public artifacts into D:\gwt\projects\ProbaGWTPHP-derpc\war
      Emitting resource phpservice/? extends Object.php
         [ERROR] Fatal error emitting this artifact
java.io.FileNotFoundException: 
D:\gwt\projects\ProbaGWTPHP-derpc\war\com.mycompany.project.ImageViewer\phpservi
ce\? extends Object.php (A fájlnév, a könyvtárnév vagy a kötetcímke 
szintaxisa nem megfelelő)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at com.google.gwt.dev.util.OutputFileSetOnDirectory$1.<init>(OutputFileSetOnDirectory.java:54)
    at com.google.gwt.dev.util.OutputFileSetOnDirectory.createNewOutputStream(OutputFileSetOnDirectory.java:54)
    at com.google.gwt.dev.util.OutputFileSet.openForWrite(OutputFileSet.java:63)
    at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.produceOutput(StandardLinkerContext.java:507)
    at com.google.gwt.dev.Link.doProduceOutput(Link.java:423)
    at com.google.gwt.dev.Link.link(Link.java:211)
    at com.google.gwt.dev.Compiler.run(Compiler.java:262)
    at com.google.gwt.dev.Compiler.run(Compiler.java:198)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.Compiler.main(Compiler.java:177)
      Emitting resource phpservice/?.php
         [ERROR] Fatal error emitting this artifact
java.io.FileNotFoundException: 
D:\gwt\projects\ProbaGWTPHP-derpc\war\com.mycompany.project.ImageViewer\phpservi
ce\?.php (A fájlnév, a könyvtárnév vagy a kötetcímke szintaxisa nem 
megfelelő)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at com.google.gwt.dev.util.OutputFileSetOnDirectory$1.<init>(OutputFileSetOnDirectory.java:54)
    at com.google.gwt.dev.util.OutputFileSetOnDirectory.createNewOutputStream(OutputFileSetOnDirectory.java:54)
    at com.google.gwt.dev.util.OutputFileSet.openForWrite(OutputFileSet.java:63)
    at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.produceOutput(StandardLinkerContext.java:507)
    at com.google.gwt.dev.Link.doProduceOutput(Link.java:423)
    at com.google.gwt.dev.Link.link(Link.java:211)
    at com.google.gwt.dev.Compiler.run(Compiler.java:262)
    at com.google.gwt.dev.Compiler.run(Compiler.java:198)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
    at com.google.gwt.dev.Compiler.main(Compiler.java:177)
   Link succeeded
   Compilation succeeded -- 38,616s

Original issue reported on code.google.com by eggPro...@gmail.com on 8 Jan 2012 at 7:33

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, I will work on it. I think it maybe comes from a generic parameter <?>. 
I'm investigating.

Original comment by mathieu....@gmail.com on 9 Jan 2012 at 10:15

GoogleCodeExporter commented 9 years ago
Thx...

so the problem is that many of the GXT model derivation is through ...
all data is actually

public class BaseModelData implements ModelData, Serializable {

  protected RpcMap map;

RpcMap stored all data!

getter and setter is generic method...

Original comment by eggPro...@gmail.com on 9 Jan 2012 at 11:43

GoogleCodeExporter commented 9 years ago
I found where the problem is. 
I will fix soon.

But I think it will be better for you to not pass a BaseModelData to the PHP 
because it will be difficult to handle it in PHP (many subclass).
I suggest you to create your own model for GWT-PHP communication and to 
implement Model from GXT. It will give you a easier implementation of your 
model to fill on PHP side.

Original comment by mathieu....@gmail.com on 10 Jan 2012 at 10:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have commited the fix.

Can you test it with your project ?

Original comment by mathieu....@gmail.com on 15 Jan 2012 at 12:00

GoogleCodeExporter commented 9 years ago
one day I will test and references to the issue here

Original comment by eggPro...@gmail.com on 15 Jan 2012 at 5:01

GoogleCodeExporter commented 9 years ago
New code generate php code, but: 2 error

1. RpcServlet.php 168 row => $e->message = "Server does not have a type sent by 
the client : Class not found [FastMap]"

2. GWT generate php code MyService.service.php 28 row require_once 
'MyService.php'; // this file does not exist

I attached my full project

Original comment by eggPro...@gmail.com on 17 Jan 2012 at 10:02

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, I will see that soon. I'm currently modifying the Java class to php 
algorithm so it could be linked. 

Original comment by mathieu....@gmail.com on 20 Jan 2012 at 12:04

GoogleCodeExporter commented 9 years ago
thx....

Original comment by eggPro...@gmail.com on 20 Jan 2012 at 2:21

GoogleCodeExporter commented 9 years ago
I just executed your project.

1. With the new java to php core, I haven't see the first issue.

2. For the second issue, one file is missing MyService.php. It is the file in 
php you must write. It must contains the server in php code. 
To write it, I suggest you to take the content of MyService.model.php (in 
war/com.mycompany.project.ImageViewer/phpservice), and to copy it in 
MyService.php (a file that you must create in a public directory of your GWT 
module, see 
http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideOrganizingProjec
ts.html#DevGuidePathFiltering). After you can fill methods (executed when GWT 
call service methods).

Could you try to do it. If your project work after that, I can close this issue 
:)

Original comment by mathieu....@gmail.com on 22 Jan 2012 at 4:06

GoogleCodeExporter commented 9 years ago

Original comment by mathieu....@gmail.com on 6 Jul 2012 at 6:35