Re: GWT 2.9 compatiblity with GXT 2.3.1a

2021-10-15 Thread Colin Alworth
The short answer is yes, you need to do this for each such bug you find, 
and if you have a commercial license, you need to do it yourself - the only 
way to distribute fixes for things like this is under GPLv2, which may not 
be something you want in your project as a dependency. 

If this is a gwt compiler error, editing bytecode is not sufficient, as GWT 
consumes the source each time it builds. You probably should also update 
the bytecode if you update the source files. Only the file in question 
needs to be edited in this way (HtmlEditor, ListField are the ones I know 
of).

Do not replace with a .toString() call, in case the model holds an explicit 
null value, casting to object will use StringBuilder.append(Object), which 
will be null safe, or pick some other null safe approach.

Sencha's release policy at the time was that they supported the last major 
release - this means that until GXT 4 was released, GXT 2 was supported, 
and got updates, but once 4.0.0 was available, GXT 2 was no longer 
supported. To my knowledge, GXT isn't receiving any updates at all any 
more. Combined with the license issues, it is hard to do more than discuss 
the possible fixes and how they could be applied.

On Thursday, October 14, 2021 at 11:08:14 PM UTC-5 RT wrote:

> Yes, I agree changing the line in the GXT 2.3.1a ListField.java file from:
> sb.append(m.get(prop));
>
> To this:
> sb.append(m.get(prop).toString());
>
> Would seemingly fix the issue. However I would then need to compile this 
> to a .class file to replace the one in the gxt-2.3.1a-gwt22,jar that I 
> reference in my project and therein lies the problem.  Must I track down 
> all the dependencies for GXT and GWT so that I can do a full recompile from 
> source just for this one line change? Or can I use a java byte code editor 
> to simply insert the .toString() at the right place in the .class file for 
> ListField? I'm not sure how to do that, so I'll have to read up on byte 
> code editors as that seems easier than a full recompile - if I knew where 
> and how to inject the .toString()
>
> However if the OP already had GXT 2.3.1a working with GWT 2.8.2 then I'm 
> guessing they already had to do this operation, and may be able to provide 
> some insight. Unless they were using Java 7 and this is only a Java 8 issue 
> perhaps.
>
> On Wednesday, October 13, 2021 at 5:48:47 PM UTC-5 nilo...@gmail.com 
> wrote:
>
>> The updated JDT probably caused this (so that gwt 2.8.2 can support Java 
>> 8 language features) - at a guess you'll need to cast the result of 
>> m.get(prop) on that line to Object so that StringBuilder.append correctly 
>> uses the Object overload.
>>
>> On Wednesday, October 13, 2021 at 3:41:52 PM UTC-5 RT wrote:
>>
>>> Hi, I am attempting to update to GWT 2.8.2 from 2.7.0 using GXT 2.3.1a 
>>> however I get the following error:
>>> Errors in 
>>> 'jar:file:/war/WEB-INF/lib/gxt-2.3.1a-gwt22.jar!/com/extjs/gxt/ui/client/widget/form/ListField.java'
>>>  Line 322: The method append(boolean) is ambiguous for the type 
>>> StringBuffer
>>>
>>> How were you able to get 2.8.2 working with 2.3.1a?  I'm running Java 8 
>>> with compiler compliance set to 1.7
>>>
>>> On Thursday, June 11, 2020 at 7:13:31 AM UTC-5 priyako...@gmail.com 
>>> wrote:
>>>
 Hi All,

 Currently our application has below versions -
 1. GWT - 2.8.2
 2. GXT - 2.3.1a

 We are planning to upgrade GWT from 2.8.2 to 2.9.0. But have query 
 regarding its compatibility towards GXT 2.3.1a.
 I have gone through GXT Compatiblity version matrix page 
 , 
 but found nowhere officially mentioned that its supported.
 So can you please confirm that GWT 2.9 is officially supported with GXT 
 2.3.1a?

>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/82fcc7c6-9397-470c-b76e-0c29dbf7ccdan%40googlegroups.com.


Re: Pbs with GWT + Eclipse + Jetty + Neo4J

2021-10-15 Thread David Nouls
What is the exception stack trace ?
On 12 Oct 2021, 19:09 +0200, Guillen Antonio , wrote:
> Hi all,
>
> I am struggling with a pb using RPC:
>
> When I use the service to create and store my objects in my DB (Neo4J) using 
> remote service, all is Fine.
> When I try to load my objects all is ok in my service class and in Neo4J as 
> well. But at the last line of the method public static void 
> writeResponse(ServletContext servletContext,  HttpServletResponse response, 
> String responseContent, boolean gzipResponse)  throws IOException {
>
> I have an exception.
>
> Here is the method of com.google.gwt.user.server.rpc.RPCServletUtils
>
>
>   public static void writeResponse(ServletContext servletContext,
>   HttpServletResponse response, String responseContent, boolean 
> gzipResponse)
>   throws IOException {
>
>     byte[] responseBytes = responseContent.getBytes(CHARSET_UTF8);
>     if (gzipResponse) {
>   // Compress the reply and adjust headers.
>   //
>   ByteArrayOutputStream output = null;
>   GZIPOutputStream gzipOutputStream = null;
>   Throwable caught = null;
>   try {
>     output = new ByteArrayOutputStream(responseBytes.length);
>     gzipOutputStream = new GZIPOutputStream(output);
>     gzipOutputStream.write(responseBytes);
>     gzipOutputStream.finish();
>     gzipOutputStream.flush();
>     setGzipEncodingHeader(response);
>     responseBytes = output.toByteArray();
>   } catch (IOException e) {
>     caught = e;
>   } finally {
>     if (null != gzipOutputStream) {
>   gzipOutputStream.close();
>     }
>     if (null != output) {
>   output.close();
>     }
>   }
>
>   if (caught != null) {
>     servletContext.log("Unable to compress response", caught);
>     response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
>     return;
>   }
>     }
>
>     // Send the reply.
>     //
>     response.setContentLength(responseBytes.length);
>     response.setContentType(CONTENT_TYPE_APPLICATION_JSON_UTF8);
>     response.setStatus(HttpServletResponse.SC_OK);
>     response.setHeader(CONTENT_DISPOSITION, ATTACHMENT);
>     response.getOutputStream().write(responseBytes);
>   }
>
> And the return message on my console is:
>
> 200 - POST /spotgwt/spotData (127.0.0.1) 501 bytes
>    Request headers
>   Host: 127.0.0.1:8887
>   User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) 
> Gecko/20100101 Firefox/92.0
>   Accept: */*
>   Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
>   Accept-Encoding: gzip, deflate
>   Content-Type: text/x-gwt-rpc; charset=utf-8
>   X-GWT-Permutation: A082E84D087467DED16699006D694A7B
>   X-GWT-Module-Base: http://127.0.0.1:8887/spotgwt/
>   Content-Length: 228
>   Origin: http://127.0.0.1:8887
>   DNT: 1
>   Connection: keep-alive
>   Referer: http://127.0.0.1:8887/SpotGWT.html
>   Sec-Fetch-Dest: empty
>   Sec-Fetch-Mode: cors
>   Sec-Fetch-Site: same-origin
>    Response headers
>   Date: Tue, 12 Oct 2021 16:57:51 GMT
>   Content-Encoding: gzip
>   Content-Length: 501
>   Content-Type: application/json; charset=utf-8
>   Content-Disposition: attachment
>
> Can you help me.
>
> Thanks a lot
>
> Antonio
> --
> You received this message because you are subscribed to the Google Groups 
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-web-toolkit/9073c1bb-20b6-4c19-90af-d462e8034716n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/91ceac81-72a5-4f1c-af03-90484c35c6e8%40Spark.