How to solve this during compiling WSO2API_Manager 1.5.0? - compilation

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.

Related

Cradle why did I start getting the CertificateExpiredException error?

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

How to generate jar file on Windows terminal compiler?

I have an old project with all files and folders and its jar file (xyz_2.11-1.0.jar) was at target\scala-2.11\ folder, and I removed it to replace by a new fresh one... I do and redo with similar final results:
cd xyz
sbt: say "[info] Loading settings from assembly.sbt ..." and seems all ok.
compile: say "[success] Total time: 11 s, completed"
package: say "[success] Total time: 6 s, completed"
But target\scala-2.11\ folder is empty, no new jar file!
How to compile and generate the jar file?
It might be a good idea to check the behavior using the latest stable version sbt 1.4.7 as opposed to sbt 1.1.5 from 2018. Because it seems like you missed the fix by one patch version.
This issue was reported in 2018 as https://github.com/sbt/sbt/issues/4118, and was later fixed by dadarakt also in 2018 as https://github.com/sbt/sbt/pull/4161, which released in sbt 1.1.6.
When I changed the source code (anything at /src/main) the procedure saved the jar file.
So, the SBT v1.1.5 logic is: not save jar when no changes... It is not a bug, but perhaps need a new issue for next SBT versions:
If there are no jar file (deleted) it need to save one.
To change the "verbose level" I used logLevel := Level.Info and logLevel := Level.Debug.
About jar file complete path, only the Debug "verbose level" shows it,
[debug] No changes
[debug] Jar uptodate: C:\Users\myUser\etc\xyz\target\scala-2.11\xyz_2.11-1.0.jar
But dir C:\Users\myUser\etc\xyz\target\scala-2.11\xyz_2.11-1.0.jar say "file not found". Only after source code changes it saved.

Sonarqube invalid value for java binaries

I'm trying to upload my project to a remote sonarqube server.
This is the command I run sonar scanner:
sonar-scanner -Dsonar.projectKey=my-project -Dsonar.host.url=https://xxxx:9000 -Dsonar.login=the-secret-key -Dsonar.java.binaries=**/target/classes
but it throws the error on java.binaries.
INFO: Configured Java source version (sonar.java.source):
none
INFO: JavaClasspath initialization
ERROR: Invalid value for sonar.java.binaries
INFO: ------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------
INFO: Total time: 20.276s
INFO: Final Memory: 10M/161M
INFO: ------------------------------------------------------
------------------
ERROR: Error during SonarQube Scanner execution
No files nor directories matching **/target/classes
I tried different values like ./target, /target/, /target/classes (where the jar is being stored). However, I am encountering this error of not found. (even though the directory exists)
By running sonar:sonar on my IDE and maven sonar:sonar on my terminal would send over the result to sonarqube, but my goal is to include this command in my jet-steps
Very old post but may help someone. I had similar issue and below configuration worked for me:
sonar.sources=src/main/java
sonar.java.binaries=target/classes
We also experienced a similar issue on our project (Maven multimodule), and for us the following configuration made things work:
sonar.java.binaries=.
sonar.java.source=8
sonar.sources=.
PS Java source is just for reference, it should not matter to fix the issue.
In my case, Im working with gradle, and we have subaplications, we are using sonarqube plugin from azure. I have to adapt to find binaries like this way:
sonar.java.binaries=./streamHubAndroidSDK/build/**,./nota/build/**,./app/build/**
But later I found that its better to define like this:
sonar.java.binaries=**/build/**
I can find this first building Android-Gradle project locally, and looking for all .class generated with bash:
find . -path '*/build/*.class' | xargs | tr ' ' ','

Issue with sonarqube analysis

Iam using sonarqube Version 5.0.1 along with sonar-ant-task-2.3.jar to analyse java source code.
My setup is working for many projects but for one project alone iam getting following error:
Caused by: com.persistit.exception.ConversionException: Requested
size=67108916 exceeds maximum size=67108864 at
com.persistit.Value.ensureFit(Value.java:784) at
com.persistit.Value.putCharSequenceInternal(Value.java:5411) at
com.persistit.Value.putUTF(Value.java:3518) at
org.sonar.batch.duplication.DuplicationBlockValueCoder.put(DuplicationBlockValueCoder.java:32)
at
org.sonar.batch.duplication.DuplicationGroupValueCoder.put(DuplicationGroupValueCoder.java:41)
at com.persistit.Value.put(Value.java:3453) at
com.persistit.encoding.CollectionValueCoder.put(CollectionValueCoder.java:126)
at com.persistit.Value.put(Value.java:3453) at
com.persistit.Value.put(Value.java:3255) at
org.sonar.batch.index.Cache.doPut(Cache.java:72) ... 57 more
Total time: 112 minutes 14 seconds
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Can anyone please help me to fix the issue...
This issue is referenced by https://jira.sonarsource.com/browse/SONAR-6000 and is fixed in versions 4.5.4 and 5.1.

Unable to download com.thoughtworks.paranamer#paranamer;2.5.6 with sbt

I'm getting the following error when building my project:
[warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.5.6/paranamer-2.5.6.pom: invalid sha1: expected=534448ad3c4af760c8995370c1405b9dbf88609e computed=0d33f7748ec6c8928db74f9652a2cb7567fe4044 (116ms)
[warn] module not found: com.thoughtworks.paranamer#paranamer;2.5.6
This is a transitive dependency, which I was able to download previously. I got this error when I wiped my ~/.ivy2/cache dir.
Not really sure what has changed with this depenency. When I look here, nothing has changed in 2.5.6 since 2013.
What can be the cause of this and how do I resolve it?
Author of Paranamer here. I've no idea why this happened. Could be related to https://issues.sonatype.org/browse/OSSRH-16113
Paul

Resources