Problems resyncing the project

Hi,
getting this message when trying to resync. Can you pls help? My internet connection works smoothly, so the problem is not there.

Below the output.
Regards,
Carlos.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘Test1’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not download cuba-plugin.jar (com.haulmont.gradle:cuba-plugin:7.1.1)
Could not get resource ‘https://dl.bintray.com/cuba-platform/main/com/haulmont/gradle/cuba-plugin/7.1.1/cuba-plugin-7.1.1.jar’.
Could not GET ‘https://dl.bintray.com/cuba-platform/main/com/haulmont/gradle/cuba-plugin/7.1.1/cuba-plugin-7.1.1.jar’. Received status code 403 from server: Forbidden
Could not download gradle-idea-ext.jar (gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.5)
Could not get resource ‘https://dl.bintray.com/cuba-platform/main/gradle/plugin/org/jetbrains/gradle/plugin/idea-ext/gradle-idea-ext/0.5/gradle-idea-ext-0.5.jar’.
Could not GET ‘https://dl.bintray.com/cuba-platform/main/gradle/plugin/org/jetbrains/gradle/plugin/idea-ext/gradle-idea-ext/0.5/gradle-idea-ext-0.5.jar’. Received status code 403 from server: Forbidden

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

CONFIGURE FAILED in 2s

Hi,

Please consult with this pinned topic: Important: shutdown of the Bintray and Jcenter repositories

Hi Alexander,

thanks for your answer.

I managed to sync the project, but although CubaStudio is able to recognize again the project as a CUBA project, I am not being able to start it on the IDE’s Tomcat instance. Logs are attached app.log (43.4 KB) . Please provide guidance then I am not at all familiar with Spring architecture.

Here’s also my gradle build file build.gradle (5.9 KB)

Looks like I am missing some dependency, but before I do something inadequate I prefer to ask you guys.

UPDATE: I managed to solve it partially, by changing in build.gradle

this

if (!JavaVersion.current().isJava8()) {

       runtime('javax.xml.bind:jaxb-api:2.3.1')
       runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1')
    }
    compile 'com.itextpdf:itextpdf:5.0.6'

into this:

if (!JavaVersion.current().isJava8()) {
}
compile ‘com.itextpdf:itextpdf:5.0.6’
runtime(‘javax.xml.bind:jaxb-api:2.3.1’)
runtime(‘org.glassfish.jaxb:jaxb-runtime:2.3.1’)

So basically there were two important dependencies not there anymore.

What’s most curious is that this didn’t happen with the previous repo (bintray), and the java version is the one supplied with the IDE. Does it make any sense?

Thanks and regards,
Carlos.

The error “java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException” happens when you compile project with Java 8, and then run it on Java 11.

This is because:

  • Java 8 contains Jaxb implementation and doesn’t like when you add extra jaxb dependency
  • Java 11 doesn’t contain Jaxb, and requires to add Jaxb library dependency.

Thanks Alexander.

Regards,
Carlos.

So, if I compile and run a Java project in version 11, how must the Jaxb library be included?

Then this code created by Studio by default will work fine, with or without condition:

if (!JavaVersion.current().isJava8()) {
       runtime('javax.xml.bind:jaxb-api:2.3.1')
       runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1')
}    
1 Like

Thanks @albudarov