Saturday, March 30, 2024

Re: Problem with GWT?

There really isn't enough information here to guess what is happen - what else could have changed, like server version or configuration, any errors in your browser dev tools console?

On Tuesday, March 26, 2024 at 2:57:37 PM UTC-5 germ...@gmail.com wrote:
When I access the web page, it remains blank. I tried different browsers, even on different computers, and they all showed the same problem. I am using the gwt-2.8.2 SDK Until a few days ago, was it working correctly? 
The curious thing is that the website works locally, that is, it is normally displayed in the browser, but when the project is uploaded it is not displayed. 
Please I need help on what can happen. Thank you so much

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/93114622-43f1-478c-96a2-15208b8c91f6n%40googlegroups.com.

Thursday, March 28, 2024

Re: i have applied below CSP policy and changed my GWT version to 2.8.2 after that i am getting below error for PRC call ( to read Database and populate the data in UI and save data to DB) and button click ( front validations , read data from DB ..et

See https://github.com/gwtproject/gwt/issues/9578

On Wednesday, March 27, 2024 at 8:23:13 AM UTC+1 paparao....@gmail.com wrote:
i have applied below CSP policy and changed my GWT version to 2.8.2
after that i am getting below error for PRC call ( to read Database and populate the data in UI and save data to DB) and button click ( front validations , read data from DB ..etc).

Error Details :
java.lang.Exception: com.google.gwt.core.client.JavaScriptException: (EvalError) : Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' https://salesiq.zoho.com https://js.zohocdn.com https://static.zohocdn.com https://css.zohocdn.com/salesiq/  'nonce-ByDmqt7tbtEnVEDxmZslig=='".

my current csp policy :
script-src 'self' https://salesiq.zoho.com https://js.zohocdn.com https://static.zohocdn.com https://css.zohocdn.com/salesiq/ 'nonce-ByDmqt7tbtEnVEDxmZslig=='; object-src 'self'; img-src https: 'self' data:

my current code to make RPC call : 

protected AsyncCallback<List<BillToCompany>> getTeamBillToCompaniesByUser()

{

final String methodName = "getTeamBillToCompaniesByUser: ";

GWTLOG.info(methodName + " started");

return new AsyncCallback<List<BillToCompany>>()

{

@Override

public void onFailure(Throwable caught)

{

Exception ex = new Exception(caught);

GWTLOG.info(methodName + "onFailure" + "caught:" + ex);

}

@Override

public void onSuccess(List<BillToCompany> result)

{

GWTLOG.info(methodName + "onSuccess: billingAccnId: " + billingAccnId);

updateBillToListBox(result, true); //boolean onload = true

}

};

}


based on browser console message error is with below code 


  msg = com_google_gwt_logging_client_TextLogFormatter_$format__Lcom_google_gwt_logging_client_TextLogFormatter_2Ljava_util_logging_LogRecord_2Ljava_lang_String_2(this.java_util_logging_Handler_formatter, record);
    val = record.java_util_logging_LogRecord_level.intValue__I();
    val >= (java_util_logging_Level_$clinit__V(),
    $intern_38) ? (window.console.error(msg),
    undefined) : val >= 900 ? (window.console.warn(msg),
   
undefined) : val >= 800 ? (window.console.info(msg),
    undefined) : (window.console.log(msg),
    undefined);
    $JsStackEmulator_stackDepth = JsStackEmulator_stackIndex - 1;

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/f03b64e4-b452-4b94-9e56-7863fc741203n%40googlegroups.com.

Monday, March 25, 2024

Re: DevMode as application server

You should aim to build a proper war / exploded war. Then everything tomcat needs is already in WEB-INF/classes and WEB-INF/lib. 

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 13:48:21 UTC+1:
i cleaned the project and did a full rebuild. which seemed to fix the reload issue.
Now i need to know how to tell tomcat where my sources are (classpath) 

i have tried using the tomcat without eclipse; So basicly starting it via the (windows) service.
I also tried starting tomcat from eclipse where you can add the project sources to the classpath.
But somehow tomcat is not loading the servlets/services
Op maandag 25 maart 2024 om 13:14:42 UTC+1 schreef Jens:
Sure you can also use tomcat or any other servlet container as you just deploy a war file/folder.

Does the browser actively reload the page? Or does the compile loop happen without reloading the page? I never heard of a compile loop so far so I assume that the browser actively reloads the page. Maybe you have some reload logic inside your app that is now triggered? For example if your app uses GWT-RPC you might have code that reloads the page if it detects that client and server GWT-RPC are out of sync?

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 12:56:56 UTC+1:
Hi Jens,

Thank you for the quick reply. I have tomcat as external web server.
That should work too, doesn't it?

My files are compiled in {projectfolder}\GWT\war\demo

I am letting tomcat point to that folder and if i would add the following lines to my demo-codeserver task:

<arg line="-launcherDir"/>

<arg value="${rootDir}\GWT\war\demo"/>


Then i get the same result. The browser shows compiling demo, this completes with the following logging:

[java] Linking succeeded -- 4.376s

[java] 13.264s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_0

[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext


But then it starts recompiling again and again...somehow get's stuck in a recompile loop.

Op maandag 25 maart 2024 om 12:41:57 UTC+1 schreef Jens:
CodeServer has a parameter named launcherDir which should point to your exploded war directory. CodeServer generates a special index.nocache.js file which needs to be deployed with your war file. Once you have done that, you just have to open the url to your deployed war file.

So in addition to CodeServer you also need a running jetty (local installation or via docker or possibly via eclipse jetty plugin)

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 11:40:37 UTC+1:
Hi all,

With the release of GWT 2.11.0 Using DevMode as an application server is deprecated.
From the release notes:
"Using DevMode as an application server is deprecated, and may be removed or changed in a future release. Please migrate local development workflows to using a general purpose server, or a custom ServletContainerLauncher."

We are using the Devmode as an application server and want to change, to also be prepared for the future.

We are using ant as the build tool and i want to know what to set up to make development mode working.

I did try "just" starting the code server via an ant task:

<target name="demo-codeserver" description="Run Super Dev Mode for demo">

<java failonerror="true" fork="true"

classname="com.google.gwt.dev.codeserver.CodeServer">

<classpath>

<pathelement location="src"/>

<path refid="gwt.classpath"/>

</classpath>

<jvmarg value="-Xmx1024M"/>

<arg value="-bindAddress"/>

<arg value="127.0.0.1"/>

<arg value="-port"/>

<arg value="9876"/>

<arg line="-src"/>

<arg value="${rootDir}\GWT\src"/>

<arg line="-logLevel"/>

<arg value="DEBUG"/>

<arg line="-style"/>

<arg value="PRETTY"/>

<arg value="com.sweet.demo.webclient"/>

</java>

</target>


The ant task starts and compiles the code, but when opening the url, it keeps recompiling. part of the log:


[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext

[java] GET /recompile/demo

[java] Job com.sweet.demo.webclient_1_192

[java] job's progress set to WAITING: com.sweet.demo.webclient_1_192

[java] added job to queue

[java] starting job: com.foxboro.foxnl.base.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] Constructing StandardLinkerContext

[java] binding: user.agent=safari

[java] skipped compile because no input files have changed

[java] 0.187s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_192

[java] job's progress set to GONE: com.sweet.demo.webclient_1_191

[java] GET /recompile-requester/demo


Am i missing a parameter or is do i have the wrong approach?


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/877a9969-9813-4799-a3a9-dfe82718b563n%40googlegroups.com.

Re: DevMode as application server

i cleaned the project and did a full rebuild. which seemed to fix the reload issue.
Now i need to know how to tell tomcat where my sources are (classpath) 

i have tried using the tomcat without eclipse; So basicly starting it via the (windows) service.
I also tried starting tomcat from eclipse where you can add the project sources to the classpath.
But somehow tomcat is not loading the servlets/services
Op maandag 25 maart 2024 om 13:14:42 UTC+1 schreef Jens:
Sure you can also use tomcat or any other servlet container as you just deploy a war file/folder.

Does the browser actively reload the page? Or does the compile loop happen without reloading the page? I never heard of a compile loop so far so I assume that the browser actively reloads the page. Maybe you have some reload logic inside your app that is now triggered? For example if your app uses GWT-RPC you might have code that reloads the page if it detects that client and server GWT-RPC are out of sync?

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 12:56:56 UTC+1:
Hi Jens,

Thank you for the quick reply. I have tomcat as external web server.
That should work too, doesn't it?

My files are compiled in {projectfolder}\GWT\war\demo

I am letting tomcat point to that folder and if i would add the following lines to my demo-codeserver task:

<arg line="-launcherDir"/>

<arg value="${rootDir}\GWT\war\demo"/>


Then i get the same result. The browser shows compiling demo, this completes with the following logging:

[java] Linking succeeded -- 4.376s

[java] 13.264s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_0

[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext


But then it starts recompiling again and again...somehow get's stuck in a recompile loop.

Op maandag 25 maart 2024 om 12:41:57 UTC+1 schreef Jens:
CodeServer has a parameter named launcherDir which should point to your exploded war directory. CodeServer generates a special index.nocache.js file which needs to be deployed with your war file. Once you have done that, you just have to open the url to your deployed war file.

So in addition to CodeServer you also need a running jetty (local installation or via docker or possibly via eclipse jetty plugin)

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 11:40:37 UTC+1:
Hi all,

With the release of GWT 2.11.0 Using DevMode as an application server is deprecated.
From the release notes:
"Using DevMode as an application server is deprecated, and may be removed or changed in a future release. Please migrate local development workflows to using a general purpose server, or a custom ServletContainerLauncher."

We are using the Devmode as an application server and want to change, to also be prepared for the future.

We are using ant as the build tool and i want to know what to set up to make development mode working.

I did try "just" starting the code server via an ant task:

<target name="demo-codeserver" description="Run Super Dev Mode for demo">

<java failonerror="true" fork="true"

classname="com.google.gwt.dev.codeserver.CodeServer">

<classpath>

<pathelement location="src"/>

<path refid="gwt.classpath"/>

</classpath>

<jvmarg value="-Xmx1024M"/>

<arg value="-bindAddress"/>

<arg value="127.0.0.1"/>

<arg value="-port"/>

<arg value="9876"/>

<arg line="-src"/>

<arg value="${rootDir}\GWT\src"/>

<arg line="-logLevel"/>

<arg value="DEBUG"/>

<arg line="-style"/>

<arg value="PRETTY"/>

<arg value="com.sweet.demo.webclient"/>

</java>

</target>


The ant task starts and compiles the code, but when opening the url, it keeps recompiling. part of the log:


[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext

[java] GET /recompile/demo

[java] Job com.sweet.demo.webclient_1_192

[java] job's progress set to WAITING: com.sweet.demo.webclient_1_192

[java] added job to queue

[java] starting job: com.foxboro.foxnl.base.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] Constructing StandardLinkerContext

[java] binding: user.agent=safari

[java] skipped compile because no input files have changed

[java] 0.187s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_192

[java] job's progress set to GONE: com.sweet.demo.webclient_1_191

[java] GET /recompile-requester/demo


Am i missing a parameter or is do i have the wrong approach?


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/43aec035-61c9-4b2d-9121-f36f855d09d6n%40googlegroups.com.

Re: DevMode as application server

Sure you can also use tomcat or any other servlet container as you just deploy a war file/folder.

Does the browser actively reload the page? Or does the compile loop happen without reloading the page? I never heard of a compile loop so far so I assume that the browser actively reloads the page. Maybe you have some reload logic inside your app that is now triggered? For example if your app uses GWT-RPC you might have code that reloads the page if it detects that client and server GWT-RPC are out of sync?

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 12:56:56 UTC+1:
Hi Jens,

Thank you for the quick reply. I have tomcat as external web server.
That should work too, doesn't it?

My files are compiled in {projectfolder}\GWT\war\demo

I am letting tomcat point to that folder and if i would add the following lines to my demo-codeserver task:

<arg line="-launcherDir"/>

<arg value="${rootDir}\GWT\war\demo"/>


Then i get the same result. The browser shows compiling demo, this completes with the following logging:

[java] Linking succeeded -- 4.376s

[java] 13.264s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_0

[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext


But then it starts recompiling again and again...somehow get's stuck in a recompile loop.

Op maandag 25 maart 2024 om 12:41:57 UTC+1 schreef Jens:
CodeServer has a parameter named launcherDir which should point to your exploded war directory. CodeServer generates a special index.nocache.js file which needs to be deployed with your war file. Once you have done that, you just have to open the url to your deployed war file.

So in addition to CodeServer you also need a running jetty (local installation or via docker or possibly via eclipse jetty plugin)

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 11:40:37 UTC+1:
Hi all,

With the release of GWT 2.11.0 Using DevMode as an application server is deprecated.
From the release notes:
"Using DevMode as an application server is deprecated, and may be removed or changed in a future release. Please migrate local development workflows to using a general purpose server, or a custom ServletContainerLauncher."

We are using the Devmode as an application server and want to change, to also be prepared for the future.

We are using ant as the build tool and i want to know what to set up to make development mode working.

I did try "just" starting the code server via an ant task:

<target name="demo-codeserver" description="Run Super Dev Mode for demo">

<java failonerror="true" fork="true"

classname="com.google.gwt.dev.codeserver.CodeServer">

<classpath>

<pathelement location="src"/>

<path refid="gwt.classpath"/>

</classpath>

<jvmarg value="-Xmx1024M"/>

<arg value="-bindAddress"/>

<arg value="127.0.0.1"/>

<arg value="-port"/>

<arg value="9876"/>

<arg line="-src"/>

<arg value="${rootDir}\GWT\src"/>

<arg line="-logLevel"/>

<arg value="DEBUG"/>

<arg line="-style"/>

<arg value="PRETTY"/>

<arg value="com.sweet.demo.webclient"/>

</java>

</target>


The ant task starts and compiles the code, but when opening the url, it keeps recompiling. part of the log:


[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext

[java] GET /recompile/demo

[java] Job com.sweet.demo.webclient_1_192

[java] job's progress set to WAITING: com.sweet.demo.webclient_1_192

[java] added job to queue

[java] starting job: com.foxboro.foxnl.base.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] Constructing StandardLinkerContext

[java] binding: user.agent=safari

[java] skipped compile because no input files have changed

[java] 0.187s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_192

[java] job's progress set to GONE: com.sweet.demo.webclient_1_191

[java] GET /recompile-requester/demo


Am i missing a parameter or is do i have the wrong approach?


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/d3e44db5-c0f1-4ba7-818f-5ca6dafceb64n%40googlegroups.com.

Re: DevMode as application server

Hi Jens,

Thank you for the quick reply. I have tomcat as external web server.
That should work too, doesn't it?

My files are compiled in {projectfolder}\GWT\war\demo

I am letting tomcat point to that folder and if i would add the following lines to my demo-codeserver task:

<arg line="-launcherDir"/>

<arg value="${rootDir}\GWT\war\demo"/>


Then i get the same result. The browser shows compiling demo, this completes with the following logging:

[java] Linking succeeded -- 4.376s

[java] 13.264s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_0

[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext


But then it starts recompiling again and again...somehow get's stuck in a recompile loop.

Op maandag 25 maart 2024 om 12:41:57 UTC+1 schreef Jens:
CodeServer has a parameter named launcherDir which should point to your exploded war directory. CodeServer generates a special index.nocache.js file which needs to be deployed with your war file. Once you have done that, you just have to open the url to your deployed war file.

So in addition to CodeServer you also need a running jetty (local installation or via docker or possibly via eclipse jetty plugin)

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 11:40:37 UTC+1:
Hi all,

With the release of GWT 2.11.0 Using DevMode as an application server is deprecated.
From the release notes:
"Using DevMode as an application server is deprecated, and may be removed or changed in a future release. Please migrate local development workflows to using a general purpose server, or a custom ServletContainerLauncher."

We are using the Devmode as an application server and want to change, to also be prepared for the future.

We are using ant as the build tool and i want to know what to set up to make development mode working.

I did try "just" starting the code server via an ant task:

<target name="demo-codeserver" description="Run Super Dev Mode for demo">

<java failonerror="true" fork="true"

classname="com.google.gwt.dev.codeserver.CodeServer">

<classpath>

<pathelement location="src"/>

<path refid="gwt.classpath"/>

</classpath>

<jvmarg value="-Xmx1024M"/>

<arg value="-bindAddress"/>

<arg value="127.0.0.1"/>

<arg value="-port"/>

<arg value="9876"/>

<arg line="-src"/>

<arg value="${rootDir}\GWT\src"/>

<arg line="-logLevel"/>

<arg value="DEBUG"/>

<arg line="-style"/>

<arg value="PRETTY"/>

<arg value="com.sweet.demo.webclient"/>

</java>

</target>


The ant task starts and compiles the code, but when opening the url, it keeps recompiling. part of the log:


[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext

[java] GET /recompile/demo

[java] Job com.sweet.demo.webclient_1_192

[java] job's progress set to WAITING: com.sweet.demo.webclient_1_192

[java] added job to queue

[java] starting job: com.foxboro.foxnl.base.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] Constructing StandardLinkerContext

[java] binding: user.agent=safari

[java] skipped compile because no input files have changed

[java] 0.187s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_192

[java] job's progress set to GONE: com.sweet.demo.webclient_1_191

[java] GET /recompile-requester/demo


Am i missing a parameter or is do i have the wrong approach?


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/bf6b3737-c207-419d-8006-75d2af6e6c57n%40googlegroups.com.

Re: DevMode as application server

CodeServer has a parameter named launcherDir which should point to your exploded war directory. CodeServer generates a special index.nocache.js file which needs to be deployed with your war file. Once you have done that, you just have to open the url to your deployed war file.

So in addition to CodeServer you also need a running jetty (local installation or via docker or possibly via eclipse jetty plugin)

-- J.

blackh...@gmail.com schrieb am Montag, 25. März 2024 um 11:40:37 UTC+1:
Hi all,

With the release of GWT 2.11.0 Using DevMode as an application server is deprecated.
From the release notes:
"Using DevMode as an application server is deprecated, and may be removed or changed in a future release. Please migrate local development workflows to using a general purpose server, or a custom ServletContainerLauncher."

We are using the Devmode as an application server and want to change, to also be prepared for the future.

We are using ant as the build tool and i want to know what to set up to make development mode working.

I did try "just" starting the code server via an ant task:

<target name="demo-codeserver" description="Run Super Dev Mode for demo">

<java failonerror="true" fork="true"

classname="com.google.gwt.dev.codeserver.CodeServer">

<classpath>

<pathelement location="src"/>

<path refid="gwt.classpath"/>

</classpath>

<jvmarg value="-Xmx1024M"/>

<arg value="-bindAddress"/>

<arg value="127.0.0.1"/>

<arg value="-port"/>

<arg value="9876"/>

<arg line="-src"/>

<arg value="${rootDir}\GWT\src"/>

<arg line="-logLevel"/>

<arg value="DEBUG"/>

<arg line="-style"/>

<arg value="PRETTY"/>

<arg value="com.sweet.demo.webclient"/>

</java>

</target>


The ant task starts and compiles the code, but when opening the url, it keeps recompiling. part of the log:


[java] GET /recompile-requester/demo

[java] Constructing StandardLinkerContext

[java] GET /recompile/demo

[java] Job com.sweet.demo.webclient_1_192

[java] job's progress set to WAITING: com.sweet.demo.webclient_1_192

[java] added job to queue

[java] starting job: com.foxboro.foxnl.base.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] job's progress set to COMPILING: com.sweet.demo.webclient_1_192

[java] Constructing StandardLinkerContext

[java] binding: user.agent=safari

[java] skipped compile because no input files have changed

[java] 0.187s total -- Compile completed

[java] job's progress set to SERVING: com.sweet.demo.webclient_1_192

[java] job's progress set to GONE: com.sweet.demo.webclient_1_191

[java] GET /recompile-requester/demo


Am i missing a parameter or is do i have the wrong approach?


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/06134aa2-95f2-4cdf-988f-f7747185aa2an%40googlegroups.com.