ie6 wast not previously defined error in GWT 2.6.0/GXT2.5.1 - gwt

I got the following error when compiling the code with GWT 2.6.0 and GXT 2.5.1.
Loading inherited module 'com.sencha.gxt.ui.GXT'L
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] The value ie6 was not previously defined.
[ERROR] Line 96: Unexpected exception while processing element 'set-property'
Even though we don't specify ie6 in gxt.user.agent, we still get the error: "[ERROR] The value ie6 was not previously defined."
Why does GXT still try to set ie6 despite we don't set it in gxt.user.agent?
Does anyone know when Sencha will release a new GXT version that resolve this problem?

They released a beta already: https://www.sencha.com/blog/announcing-gxt-3.1-beta/
…or you could re-enable the ie6 permutation:
<extend-property name="user.agent" value="ie6" />

Just to clarify 2 points,
If using GXT-3.0.1 or earlier => It is only compatible with GWT-2.5.1 (or earlier).
If using GXT-3.1.0_Beta => It is only compatible with GWT-2.6.0 (or later).
Otherwise various errors will be caused during compilation/runtime.

Related

Omnifaces ViewScoped with PWAResourceHandler

I have a web application currently deployed on Wildfly 23.0.2, using JSF 2.3 and OpenJDK 11.
I'm also using the latest version of OmniFaces (3.11).
One of the application requirements is PWA support. For this, I'm using PWAResourceHandler exactly as described in the omnifaces webpage.
I would like to use the ViewScoped annotation from OmniFaces instead of the one from JSF. I know this OmniFaces-JSF gap is reducing, but for testing purposes I changed the ViewScoped annotation import.
After this change, in all pages with
<f:metadata>
<f:viewParam name="myParam" value="#{omnifacesTest.myParam}" />
</f:metadata>
I get the following error:
Caused by: java.lang.IllegalStateException: Component ID omnifaces_omnifaces_js has already been found in the view.
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.util.Util.checkIdUniqueness(Util.java:1299)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.util.Util.checkIdUniqueness(Util.java:1283)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.view.FaceletPartialStateManagementStrategy.saveView(FaceletPartialStateManagementStrategy.java:453)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:64)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.view.WriteBehindStateWriter.getState(WriteBehindStateWriter.java:310)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:204)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:484)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)
at javax.faces.api#3.0.0.SP04//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
at javax.faces.api#3.0.0.SP04//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
at javax.faces.api#3.0.0.SP04//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
at deployment.my-application-0.0.1-SNAPSHOT.ear.my-web.war//org.omnifaces.viewhandler.OmniViewHandler.renderView(OmniViewHandler.java:155)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:102)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
at com.sun.jsf-impl#2.3.14.SP04//com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
at javax.faces.api#3.0.0.SP04//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708)
If I remove the viewParam from f:metadata, or disable PWA support, the error disappears.
I can't seem to find a reason for this behaviour.
Has anynone else found this problem? Any suggestions on how to handle this?
Thanks for your help!

Groovy:General error during semantic analysis: java.lang.NoSuchMethodError:

Imported the gradle project from the "complete" folder and received the following error:
Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'
I am using the latest version of Eclipse, 2020-12, with groovy tools installed.
From grails guide
https://guides.grails.org/gorm-without-grails/guide/index.html
Downloaded code sample from github
https://github.com/grails-guides/gorm-without-grails.git
It seems likely to be a version mismatch, but I cannot determine how to correct this problem.
I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.
The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?
I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.
The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94

Eclipse gives too many false errors and warnings on EL expressions in JSF files

I have run into a weird situation. I have an application which was originally developed in RAD and uses a construct like
rendered="#{bean.show and user.can('foo')}"
Our developers use mix of RAD and Eclipse Juno / Kepler. So we need to make the code work in both the environments.
In RAD, the above line does not generate any errors. When I export the project as archive and import it into Eclipse Juno, it generates this error
Cannot apply expression operators to method bindings
Our environment is Websphere 8.5, RAD / Eclipse, JSF 2.1
How can I fix this?
In general, if you face a false EL validation error in a JSF file in Eclipse, try peeking around in Window > Preferences > Web > JavaServer Faces Tools > Validation and tune some settings currently (unnecessarily) set at Error.
Your particular problem is triggered by "Applying operator to method binding" which indeed defaults to Error. If upgrading Eclipse to most recent version is somehow not an option, setting it back to Warning should tone down it.
After all, EL validation in Eclipse is quite an epic fail. It seems like it's using regular expressions to validate EL syntax instead of a true stack based parser like as EL itself is doing. There are several entries below "Type Coercion Problems" and "Type Assignment Problems" which are unnecessarily set to Error and known to cause false errors.
See also:
Method must have signature "String method() ...[etc]..." but has signature "void method()"
Eclipse errors on #{component.valid}: "valid cannot be resolved as a member of component”
I had the same error with any of these statements:
<h:panelGroup rendered="#{!bean.isValid(obj)}">
<h:panelGroup rendered="#{not bean.isValid(obj)}">
I resolved the error by changing the statement as follows:
<h:panelGroup rendered="#{bean.isValid(obj) == false}">
I found yet another example that resolved the problem:
<ui:fragment rendered="#{bean.isValid(obj) eq 'false'}">

Automatic Generation of orm.xml file in netbeans

Is there a way i can automatically generate orm.xml file in Netbeans even if i can modify it later. Am using eclipselink JPA 2.1 and it keeps giving me this warning when am building
warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.7'
Note: Creating non-static metadata factory ...
Note: Found Option : eclipselink.canonicalmodel.use_static_factory, with value: false
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
Note: Found Option : eclipselink.canonicalmodel.use_static_factory, with value: false
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
warning: The following options were not recognized by any processor: '[eclipselink.canonicalmodel.use_static_factory]'
Note: C:\Users\USER\Documents\NetBeansProjects\payroll\src\dcl\payroll\GUI\Login.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
The warning is just there to let you know that if you are using an orm.xml to define your mappings, it wasn't found. If you place one there, you will still get messages letting you know one was found. This gives a notice in the log to help point where to start looking if something unexpected in your application occurs - such as the wrong orm.xml version is used or one is unexpectedly packaged and picked up, which seems a common issue in development.

Failed to resolve class via deferred binding

// ...some imports
public class Menu {
final MenuMaker myClass = GWT.create(MenuMaker.class); // ERROR
My ...gwt.xml:
...
<generate-with class="com.gwt.rebind.MenuGenerator">
<when-type-assignable class="com.gwt.client.MenuMaker" />
</generate-with>
...
All work perfectly when I run compile in DevMode but when I "Build the project with the GWT compiler" I get this error:
[ERROR] Line 15: Failed to resolve 'com.gwt.client.MenuMaker' via deferred binding
Scanning for additional dependencies: jar:file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201208080121-rel-r42/gwt-2.4.0/gwt-user.jar!/com/google/gwt/dom/client/DOMImpl.java
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.gwt.client.MenuMakerGen
[ERROR] Cannot proceed due to previous errors
At the end of com.gwt.rebind.MenuGenerator:
sourceWriter.commit(logger);
Check if all your client classes have default, zero-parameter constructor. I had the same "deferred binding" issue, and it turned out that one of my classes hadn't had default constructor. It was strange, because this class wasn't even mentioned in GWT compiler log.
Check for gwt-compile problems. The message
[ERROR] Line 15: Failed to resolve '...' via deferred binding
can result from compile problems in your gwt code. In my case it was a class, which was only available on the server side of the application, but was referenced in a class belonging to 'shared' part of the application.
In Java it compiled well, so I had no error in eclipse. The above error-message only showed up when building it with maven. Still it remained somewhat difficult to find the real problem, as the message text was not very helpful.
It turned out, that running the app on com.google.gwt.dev.DevMode would produce a more detailed logfile of the gwt-compilation (probably one could configure maven to do the same?).
Right at the beginning of this more detailed log, there were entries, which pointed me to the problem described above. After correcting these problems, the "Failed to resolve ... via deferred binding"-error was gone.
Check your model/ Pojo Class should implements Serializable
interface and also
Class have default constructor(No argument constructor).
In my case, some of the model classes were not implementing com.google.gwt.user.client.rpc.IsSerializable, that's why I got the error mentioned in the question.
In my case, a key in Resource Bundle properties file which corresponds the method name was missing and the problem resolved after adding it.