I had a fully working project in java and gradle. Today it stopped running, how can I fix it?
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Sat Nov 26 06:59:59 NOVT 2022
at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:619)
at java.base/sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
at java.base/sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
The error occurs when trying to download any dependency.
(In offline mode, there will simply be an error of no dependencies.)
repositories {
mavenCentral()
}
Less than a day ago, everything worked.
Gradle 7.6
Related
I worked as follows to deploy Intellij Spring Boot using gradle on heroku. I proceeded from the directory containing the source files.
> git init
> git add .
> git commit -m "first commit"
> heroku create
> git push heroku master
However, the following error occurred during the push process.
What went wrong: Execution failed for task ':compileJava'.
invalid source release: 11
After the problem occurred, a file called system.properties was also created in the source file and the following input was also entered.
java.runtime.version=11
But it is still unresolved. How do I solve this problem?
First you have to ensure your local development and your deployed instance are using the same version.
You specified a version with system.properties with content java.runtime.version=11 but haven't provided an image of the updated log. The log still says you are installing JDK 1.8.
Furthermore you should specify a Java version that is currently being supported. You can find the versions here: https://devcenter.heroku.com/articles/java-support#supported-java-versions
Java 7 - 1.7.0_302
Java 8 - 1.8.0_292
Java 11 - 11.0.11
Java 13 - 13.0.7
Java 15 - 15.0.3
Java 16 - 16.0.1
I've just face this problem following a course. Solve it by change the sourceCompatibility='17'(on my file) to '1.8' on my built.gradle file change sourceCompatibility='1.8' on build.gradle file
and change the Gradle JMV on setting and JKD on project structure to 1.8.
enter image description here
duno if the last change anything, but worked for me.
Getting the following sync error while trying to build my first helloWorld program in IntelliJ.
I've installed IntelliJ for the first time on my computer running Windows 10.
Could not open init generic class cache for initialization script 'C:\Users\nikhils\AppData\Local\Temp\wrapper_init5.gradle' (C:\Users\nikhils\.gradle\caches\6.6.1\scripts\2xaig2b083uxqwleg0fdntova).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
Change project and Gradle JDK to the supported version (8—15). Current Gradle release versions do not support Java 16. You would need Gradle 7 if you want to use Java 16.
The easiest way would be to create a new project with Java 11.
Also note that full Java 16 support will be available starting from IntelliJ IDEA 2021.1 release (current release version is 2020.3.3).
See https://www.jetbrains.com/idea/nextversion/ if you want to give it a try.
I am running Vaadin 7 with IntelliJ. I am unable to develop my company's project because I am stuck at a problem that occurs after deployment.
The Server tab in IntelliJ says that starting the server and deploying the artifact is successful
Connected to the target VM, address: '127.0.0.1:9009', transport: 'socket'
Connected to server
[2020-01-03 01:33:16,250] Artifact CO:war exploded: Artifact is being deployed, please wait...
[2020-01-03 01:33:18,006] Artifact CO:war exploded: Artifact is deployed successfully
[2020-01-03 01:33:18,006] Artifact CO:war exploded: Deploy took 1,756 milliseconds
After that IntelliJ navigates to http://localhost:8080/company on the browser. It displays a 'HTTP Status 404 - Not Found' error. The console says:
Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: com/vaadin/server/VaadinServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:295)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:592)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:461)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:417)
at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:394)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:269)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:278)
at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:239)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
Our company hasn't upgraded to higher Vaadin versions yet, and upgrading Vaadin isn't an option for fixing my problem. I can show you some excerpts of files that might be important, such as pom.xml.
Information recap:
Vaadin 7.7.10
Payara Server 4.1.2.174 on local computer
IntelliJ IDEA 2019.3.1 (Ultimate Edition)
Build #IU-193.5662.53, built on December 18, 2019
Runtime version: 11.0.5+10-b520.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
If you have any idea on what might cause this error, please offer suggestions. I am grateful for your help.
Nine months later the problem started happening on my computer again. My error message starts with
Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: com/vaadin/server/VaadinServlet
Notice how the error Error in annotation processing has a message of {0}. The message for the error is missing.
I looked at numerous articles from the internet. None of the potential causes of NoClassDefFoundError applied to this case I had. My jar-files were generated after the build.
Last time I solved the problem by reinstalling Windows. This time I tried a less severe fix by reinstalling IntelliJ and my Payara server. Also I deleted and re-downloaded my company's GitHub project. After I did these, my builds started working again.
Re-installing IntelliJ could be enough, but I did all of these just in case since I was not certain which piece of software caused the problem.
I am not fully satisfied with this fix as I still do not understand the cause of the problem.
We are facing a strange problem. We are using net.ltgt.errorprone, version (0.0.8), along with guava(version 21) and gradle(version 3.1). Everything was working fine till today's morning. But suddenly all developers started getting this error
[system.err] An exception has occurred in the compiler (1.8.0_162). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NoSuchMethodError: com.google.common.base.Verify.verify(ZLjava/lang/String;Ljava/lang/Object;)V
at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:132)
We searched through internet, most of the solutions are related to guava, but there was no change in guava version or
errorprone or gradle since a long time. We tried running old code also, getting the same error. We are unable to understand root cause of the problem. Did anyone face the same problem?
com.google.collections:google-collections was renamed to com.google.guava:guava which is really annoying and can often lead to two versions of the library on the classpath.
Here's how I'd diagnose the problem
Run gradle dependencies in the "broken" build
Go back in history in source control (git?) until you have a working version
Run gradle dependencies in the "working" build
Look for differences in versions of com.google.collections:google-collections
Look for differences in versions of com.google.guava:guava
See here in the Gradle docs where guava rename is discussed
You might need to add this to build.gradle
dependencies {
modules {
module("com.google.collections:google-collections") {
replacedBy("com.google.guava:guava", "google-collections is now part of Guava")
}
}
}
A new version(2.3.0) of errorprone was released, this broke our build.
We find out the dependency using this command
./gradlew -q dependencyInsight --configuration errorprone --dependency error_prone_core
This clearly showed that latest version is being used. We fixed it by using a last workable version forcefully. Following lines were added to build.gradle file
configurations.all {
resolutionStrategy {
force 'com.google.errorprone:error_prone_core:2.2.0'
}
}
We downloaded the latest source code of WSO2API_Manager 1.5.0.But during compilation of "org.wso2.carbon.apimgt.impl",it occurred an error:
method :getLength() can't be found in class org.wso2.carbon.registry.core.pagination.PaginationContext.
I searched this imformation through Google and founded this SVN record:
http://mail.wso2.org/mailarchive/commits/2013-September/045568.html. it shows the error is fixed in Sep 30 ,2013.
But the jar I used is donwloaded from
http://maven.wso2.org/nexus/content/groups/wso2-public/org/wso2/carbon/org.wso2.carbon.registry.core/4.2.0/ org.wso2.carbon.registry.core.The jar is updated Wed Sep 04 08:27:16 PDT 2013.It means the jar is expired.
So what should I do if I want to compile the source code? Download all the dependencies and compile them one by one , or just wait for the jar to be updated?
Please check out https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/patches/patch0001 and trigger a buid from patch001.
Then continue your build from the failed point.