Wednesday, October 26, 2016

Re: Wiered "[ERROR] Errors in 'jar:file..." "cannot be resolved to a type"


That was my fault, I didn't have to resolve dependencies manually for a while. It was just a classpath problem (of a jar added manually because it's not available on maven)

I just had to follow the unresolved symbols causes chain until I found the dependency on //
compile group: '', name: 'gwt-ajaxloader', version: '1.1.0' was not added

Sorry, this wasn't very useful in the forum (it's typically a beginner problem, but since gradle compiling and GWT 2.7 are new to me, I forgot my basics)

On Tuesday, October 25, 2016 at 10:05:19 PM UTC+1, Zied Hamdi wrote:

I have a series of interdependent GWT projects, all the chain works fine, but the last element seems to be unable to read java classes from the generated jar : I checked the jar, the .java and .class files are really there where they are supposed to be : it's amazing that the compiler finds the jar containing the wanted class but it doesn't read it (this is the case for many classes, see the pf file)

[ERROR] Errors in 'jar:file:/C:/Users/Zied%20Hamdi/git/VuMe/ShopAdmin/build/libs/ShopAdmin-1.0.jar!/fr/onevu/vume/shopadmin/'
[ERROR] fr.onevu.vume.shopadmin.ShopAdminClientFactory cannot be resolved to a type

The project ShopAdmin is the first in the chain to have a src/main/java structure (all other projects are eclipse projects converted to gradle without changing the tree sutrcture). this might be a hint to understand the cause of the issue...

group = 'fr.onevu.vume'
version = '1.0'

apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'gwt'
apply plugin: 'eclipse'
apply plugin: 'jetty'
apply plugin: ''  // App Engine tasks

//Java version compatibility to use when compiling Java source.
sourceCompatibility = 1.7
//Java version to generate classes for.
targetCompatibility = 1.7

buildscript {
repositories {
jcenter() //repository where to fetch gwt gradle plugin
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath ''    // latest App Engine Gradle tasks

// central repository to load the GWT library
repositories {
    maven {
url ''             // Google's mirror of Maven Central
//   url '' // SNAPSHOT Repository (if needed)


dependencies {
compile group: '', name: 'gradle-appengine-plugin', version: '1.9.42'
compile project(':VuMetest')

// needed for Maps API
compile group: '', name: 'gwt-ajaxloader', version: '1.0.0'
compile group: '', name: 'gwt-user', version: '2.7.0'
compile fileTree(dir: 'libs', include: '*.jar')

gwt {
modules 'fr.onevu.vume.ShopAdmin'
logLevel = 'ERROR'
minHeapSize = "1024M";
maxHeapSize = "2048M";
superDev {
// The following is only needed if you don't use the Google Plugin for Eclipse.
addGwtContainer=true // Default set to true
//Specify the deployment Port
jettyRunWar.httpPort = 8089

jar {
  manifest {
    attributes 'Implementation-Title': 'IntoGwt', 'Implementation-Version': version
  from project.sourceSets.main.allJava
  from('src/main/java') {
    include '**/*.xml'
    include '**/*.css'
    include '**/*.png'
    include '**/*.properties'
    exclude '**JUnit**'

but the generated jar file has everything in place : the uncompresses jar contains the class there where it is supposed to be :

 R‚pertoire de c:\temp\ShopAdmin-1.0\fr\onevu\vume\shopadmin

25/10/2016  22:00    <REP>          .
25/10/2016  22:00    <REP>          ..
25/10/2016  22:00    <REP>          activity
25/10/2016  22:00    <REP>          activitymappers
25/10/2016  21:43               856 ContentManager$1.class
25/10/2016  21:43             1ÿ836 ContentManager.class
23/09/2016  19:29               988
25/10/2016  22:00    <REP>          i18n
25/10/2016  22:00    <REP>          request
25/10/2016  21:43             1ÿ225 ShopAdmin$1.class
25/10/2016  21:43             1ÿ112 ShopAdmin$2.class
25/10/2016  21:43             6ÿ486 ShopAdmin.class
23/09/2016  19:29             5ÿ439
25/10/2016  21:43             1ÿ488 ShopAdminActivityManager$1.class
25/10/2016  21:43             2ÿ907 ShopAdminActivityManager.class
27/09/2016  12:59             1ÿ962
25/10/2016  21:43             4ÿ466 ShopAdminClientFactory.class
23/09/2016  19:29             2ÿ838
25/10/2016  21:43            11ÿ472 ShopAdminClientFactoryImpl.class
23/09/2016  19:29             7ÿ249
25/10/2016  21:43             1ÿ638 ShopAdminEnvironment$1.class
25/10/2016  21:43             7ÿ853 ShopAdminEnvironment.class
23/09/2016  19:29             4ÿ060
25/10/2016  21:43             1ÿ476 ShopAdminFacade.class
23/09/2016  19:29               794
25/10/2016  21:43             1ÿ426 ShopAdminPlaceController.class
23/09/2016  19:29             1ÿ024
25/10/2016  22:00    <REP>          view
              21 fichier(s)           68ÿ595 octets

 R‚pertoire de c:\temp\ShopAdmin-1.0\fr\onevu\vume\shopadmin\activity

Any ideas?

Best reagrds,

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
To post to this group, send email to
Visit this group at
For more options, visit

1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.