GLException: Unable to select one of the provided

I am trying to start a JOGL application in a virtualized Linux system but I get this error when trying to compile:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Unable to select one of the provided GLCapabilities

and the application won´t work.

I have OpenGL support in my Linux system and I have tested other non-JOGL (but OpenGL) applications that work, so why don´t my JOGL app work?

Unlikely to have such a java exception when “compiling”, more likely to be when running.
I am not proficient with it but what are the GLCapabilities you ask for ?
Maybe some feature is not available, but the app request it.

What results do you get with this :

/sbin/lspci | grep VGA

And this :

glxinfo | grep OpenGL

?

Well, I don´t know what features that would be. I have also tested to just create a new simple opengl application using NetBeans opengl pack without changing the generated code and I still get the exception.

The GLJPanel is declared as this:

panel = new GLJPanel(createGLCapabilites());

And the createGLCapabilites() looks like this:

private GLCapabilities createGLCapabilites() {
        
    GLCapabilities capabilities = new GLCapabilities();
    capabilities.setHardwareAccelerated(true);

    // try to enable 2x anti aliasing - should be supported on most hardware
    capabilities.setNumSamples(2);
    capabilities.setSampleBuffers(true);
        
    return capabilities;
}

lspci | grep VGA gives:

$ lspci | grep VGA
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter

glxinfo | grep OpenGL gives:

$ glxinfo | grep OpenGL
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.0 Chromium 1.9
OpenGL shading language version string: 1.30
OpenGL extensions:

Any suggestions?

try to remove all the set* from createGLCapabilites().
if it still does not work, you will have to be check what this chromium renderer can really provide, and build your GLCapabilities() according to it.