Sonar Scanner encountered an issue with a Java error: java/lang/NoClassDefFoundError: java/lang/Object

I'm currently setting up Sonarqube for a new project. I was successful in configuring it around a month ago, but now I'm facing an error that I can't seem to resolve. The issue might not be directly related to Sonarqube, so any help in troubleshooting would be much appreciated. The error occurs when I try to execute the command "sonar-scanner" in my project directory.

Here's the specific error message:

Error occurred during initialization of VM

java/lang/NoClassDefFoundError: java/lang/Object

Steps I've taken to try and fix the problem:

  • Restarted my computer (LOL)
  • Updated Java
  • Installed Java
  • Cleared Java caches
  • Updated Sonarqube
  • Tried using Sonar-Runner (an older version of the Sonar-Scanner as per my understanding)
  • Installed Sonar-Scanner
  • Checked if there's enough RAM for the VM
  • Checked my Java installation with a simple class

My Environment :

openjdk version "12.0.1" 2019-04-16

OpenJDK Runtime Environment (build 12.0.1+12)

OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

javac 12.0.1

MacOS Mojave version 10.14.5

sonarqube 7.8

sonar-scanner 3.3.0.1492

Answer №1

Encountered a similar problem while using eclipse.

The most recent update of SonarLint for IntelliJ (version 4.0.1) addresses the issue effectively.

If the problem persists after incorporating it into Jenkins, kindly verify and inform us promptly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Validating an Element Directive in AngularJS: A Step-by-Step Guide

I have developed a directive for handling numbers function numberInputDirective() { return { restrict: 'E', scope: { model: '=', disabled: '=?', decimals: ...

Using jQuery to format a data value with content

Hovering over my price slider reveals a tooltip displaying the slide price. As the slider is moved, the values in the tooltip change accordingly. I recently added the £ sign to the tooltip values, but I need help correcting its position as it currently ...

What is the method for determining the number of properties that share a common value?

After fetching a JSON object from an API, I am currently going through the result set and constructing a ticket object. Here is the link to the JSON data: data.ticket.seating.forEach((seat: any) => { this.listings.push({ section: seat ...

Purge the navigation history for a duo of graphs simultaneously

I am facing an issue with navigation graphs and the Navigation Extension. I want to transition from one fragment to another in a way that clears the stack, preventing any possibility of returning. Despite adding app:popUpTo="@id/nav_graph" app:po ...

Is there a way to obtain an Instagram login token through AJAX?

I'm encountering issues while trying to receive a token from Instagram. Despite using the following code, I keep running into these errors: SEC7127: CORS request blocked the redirect. SCRIPT7002: XMLHttpRequest: Network Error 0x2ef1, Unable to final ...

Enhance the functionality of Map.set by automatically storing the new entry on the disk as well

This code is intended for development purposes only, to resume work from where I left off when restarting the local server. I aim to avoid modifying the production code in any way. My goal is to save new entries to disk when using map.set(...). Below is a ...

Commitments, the Angular2 framework, and boundary

My Angular2 component is trying to obtain an ID from another service that returns a promise. To ensure that I receive the data before proceeding, I must await the Promise. Here's a snippet of what the component code looks like: export class AddTodoCo ...

Analyzing the advantages and disadvantages of utilizing Java versus Python for unit testing frameworks and Selenium step by step

Currently, we are at a crossroads in deciding between Java or Python for automation using Selenium WebDriver and an appropriate unit testing framework. While I have experience with JUnit, TestNG, and WebDriver in Java and have successfully created framewor ...

Creating a dynamic progress bar with jQuery that randomly adjusts the width of an

I'm struggling to figure out what I'm doing incorrectly. My goal is to set the width of an image to a random value between 0 and 100%. Can someone help me identify my mistake? function updateProgressBar() { $("body").append("<div class=& ...

Can you explain the behavior of this Java array when it is passed to a method?

My understanding of Java tells me that arrays are passed by reference, allowing them to be modified within functions. However, I recently stumbled upon a code snippet that left me puzzled as it exhibited inconsistent behavior. import java.io.*; import java ...

Recording incoming audio from headphones programmatically involves accessing the audio input stream, which can be done by

I need assistance in creating a JavaScript application that can record incoming audio through headphones. I am able to record my own voice, but I am struggling to capture the audio of the other person speaking through the same headphones. ...

What is the best way to extract the variable inside a script tag as a JSON value?

Hey, I need help figuring out how to convert a JavaScript variable into a JSON value using Python with the help of libraries like BeautifulSoup and requests. I attempted to solve this issue by following a similar topic on Stack Overflow, but unfortunately ...

Tips for utilizing AjaxElementLocatorFactory with Selenium and Page Factory

When setting up my pages in Selenium, I have utilized Pagefactory to handle the elements. However, I am facing an issue with dynamic tests where certain elements only exist in some tests. My understanding is that AjaxElementFactory functions as follows: P ...

Problem: Reactjs renders only a single navbar instead of two navbars

const Navbar = () => { return ( <div> {location === '/' ? ( <AuthNav /> ) : location === '/home' && isAuthenticated ? ( <MainNav /> ) : <AuthNav /> } & ...

`The post route in the Express app is encountering an issue where req.body is not

Here is my router config: router.post('/', async(req, res) => { const posts = await loadPostsCollection() await posts.insertOne({ text: req.body.text, createdAt: new Date() }) res.status(201).send() }) An error has occurred in the ...

When I press the back button to return to a previous activity, my arraylist is reset

One of the challenges I am facing in my app is with multiple activities. In my main activity, I have a listview populated by an arraylist. Strangely, when I navigate to the second activity and then press the back button to return to the main activity, my a ...

ng-click not responding when clicking on a programmatically triggered event

I have some experience with jQuery, but I am new to AngularJS. Recently, I encountered an issue when trying to call a function on the click event of a link. When I manually clicked on the link, everything worked fine and the code looked like this: <di ...

Guide to managing AutoComplete {onChange} in MUI version 5 with a personalized hook

Currently, I am utilizing a custom hook that manages the validation and handling of the onChange function. For most components like input, select, and textField, I have no trouble with handling the onChange event using the syntax below: The code snippet ...

Leveraging getter and setter functions within Java

Currently working on a project that involves creating a system to calculate the daily cost of a car rental based on user input and predefined information. However, I'm facing an issue with the CarRental class not receiving input from the test class. U ...

Creating JSON files in JavaScript - Issue with adding data

My goal is to generate a unique JSON dataset structured in the following way: JSON: { "category": { "id": "10100", "name": "Dessert", "products": [ ...