I just noticed you said you updated from Java 8. JAXB classes are 
considered Java Enterprise Edition classes and have been removed in Java 9 
from the default classpath and fully removed from JDK in Java 11. As you 
now use a newer JDK you have to add a new dependency to your project to 
have javax.xml.bind.annoations.XmlTransient class again.

You would need to add jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 to use 
the JAXB API with the old javax.xml package. Any newer version will use the 
newer jakarta package name. If you also need a matching implementation on 
your server you can use org.glassfish.jaxb:jaxb-runtime:2.3.9. I use both 
on the server with Java 17+.

-- J.

Midhunkumar schrieb am Mittwoch, 12. Februar 2025 um 13:07:11 UTC+1:

> Hi,
>
> I have attached my classpath file below
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" output="target/classes" path="src/main/java">
> <attributes>
> <attribute name="optional" value="true"/>
> <attribute name="maven.pomderived" value="true"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="src" output="target/test-classes" 
> path="src/test/java">
> <attributes>
> <attribute name="optional" value="true"/>
> <attribute name="maven.pomderived" value="true"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con" 
> path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
> <classpathentry kind="lib" 
> path="C:/Users/mkanbazhahan/.m2/repository/com/sencha/GXT/4.2.0/gxt-4.2.0.jar"/>
> <classpathentry kind="lib" 
> path="C:/Users/mkanbazhahan/.m2/repository/com/sencha/GXTChart/4.0.3/GXTChart-4.0.3.jar"/>
> <classpathentry kind="lib" 
> path="C:/Users/mkanbazhahan/.m2/repository/com/sencha/GXTGantt/4.0.3/GXTGantt-4.0.3.jar"/>
> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> <classpathentry kind="output" path="target/classes"/>
> </classpath>
>
>  Is there anything I need to change to resolve the error, and the error 
> was not about only XmlTransient in one file I have same kind of n number of 
> errors which indicated cannot to be resolved and all are only just imports 
> of an another class but it shows the reported error.
>
> And I have changed the latest version of GWT for java 17 and I have gone 
> through some of the sites which indicates that as of now GWT will support 
> only upto Java 11.
>
> Kindly share your thoughts regarding it.
>
> Thanks,
> Midhun.
> On Wednesday, February 12, 2025 at 4:35:19 PM UTC+5:30 Jens wrote:
>
>> The error you posted shows nothing that would indicate that Java 17 is 
>> the issue. Looks more like a general setup/dependency issue.
>>
>> Your code uses XmlTransient (I guess it is an annotation) but for some 
>> reason GWT compiler cannot see the annotation. Also you should make sure 
>> that you really only have GWT 2.11 on classpath. If you use GWT libraries 
>> you might also have an older GWT on classpath and things can be mixed up. 
>> So check your full dependency tree just to be sure.
>>
>> -- J.
>>
>> Midhunkumar schrieb am Mittwoch, 12. Februar 2025 um 07:52:12 UTC+1:
>>
>>> Hi,
>>>
>>> We have GWT developed project at the version 2.7.0 in Java 8. Currently 
>>> we are migrating to Java 17 I have changed the Gwt plugin versions to 2.11. 
>>> After n number of changes in the setup and lot of deployments and build I 
>>> am still facing the below error
>>>
>>> Tracing compile failure path for type 
>>> 'com.ultramain.client.UltramainHtml'
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/client/UltramainHtml.java'
>>>             [ERROR] com.ultramain.client.UltramainWebServiceAsync cannot 
>>> be resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/client/UltramainWebServiceAsync.java'
>>>             [ERROR] com.ultramain.shared.MobileCommandReference cannot 
>>> be resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/MobileCommandReference.java'
>>>             [ERROR] com.ultramain.shared.ExportExecutionDto cannot be 
>>> resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/ui/ViewSecurityOptions.java'
>>>             [ERROR] com.ultramain.shared.settings.Options cannot be 
>>> resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/SaveDeleteStatisticsOptionCommandDto.java'
>>>             [ERROR] 
>>> com.ultramain.shared.MobileSaveDeleteOptionCommandDto.SaveDeleteOptionCommandDtoEnum
>>>  
>>> cannot be resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/navigators/PaintableEntry.java'
>>>             [ERROR] com.ultramain.shared.ui.Filter cannot be resolved to 
>>> a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/DtoData.java'
>>>             [ERROR] com.ultramain.shared.DataLink cannot be resolved to 
>>> a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/MobileLoadFromImportExportCatalogDto.java'
>>>             [ERROR] com.ultramain.shared.importexport.Import cannot be 
>>> resolved to a type
>>>          [ERROR] Errors in 
>>> 'file:/W:/Java%2017/USI.UNITY.OXY/UltramainHtml/src/main/java/com/ultramain/shared/dashboard/HtmlDashboard.java'
>>>             [ERROR] Line 162: XmlTransient cannot be resolved to a type
>>>             [ERROR] Line 177: XmlTransient cannot be resolved to a type
>>>             [ERROR] Line 11: The import com.ultramain.system cannot be 
>>> resolved
>>>             [ERROR] Line 140: XmlTransient cannot be resolved to a 
>>> type..... goes on
>>>
>>> My primary question Is GWT 2.11.0 truly compatible with java 17?
>>>
>>> I have tried removing the GWT maven plugin and build the project the 
>>> build is success, but the GWT compilation is not happening. The compilation 
>>> has to happen and all GWT JS resources will be put inside ultramainhtml 
>>> folder inside our project's war.
>>>
>>> Appreciate your help.
>>>
>>> Thanks,
>>> Midhun.
>>>
>>>
>>>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit/5831e2ce-3dc3-471d-aaec-69f7a49173edn%40googlegroups.com.

Reply via email to