gluBuild2DMipmaps problems/bug

I tried to reimplement some C based OpenGL program, with a textured terrain. The original program uses gluBuild2DMipmaps, without any problems, but when translating this into Jogl, some areas of the terrain showed artefacts, like black stripes/areas on an otherwise green grassland. Then I tried to use the OpenGL 1.4 procedures for auto-generating mipmaps, by setting GL_GENERATE_MIPMAP to true. This worked without problems! So, is this expected behaviour or is there a problem with gluBuild2DMipmaps?

These are the two code fragments:

GLU glu = new GLU();
glu.gluBuild2DMipmaps(GL.GL_TEXTURE_2D, GL.GL_RGB8, bufferedImage.getWidth(), bufferedImage.getHeight(),
GL.GL_RGB, GL.GL_UNSIGNED_BYTE, imageBuffer);

gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_GENERATE_MIPMAP, GL.GL_TRUE);
gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGB8, bufferedImage.getWidth(), bufferedImage.getHeight(),
0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, imageBuffer);

Could you try running your program with -Djogl.glu.nojava on the command line and see whether the GLU-based mipmap code changes behavior? If it does, please file a bug with the Issue Tracker on the JOGL web page and attach a test case. There have been some bugs with the Java port of the original C mipmap code as well as some preexisting bugs in SGI’s open-source GLU implementation which is the basis of the Java port.

Yes, that also solves the problem, so apparently the problem is with the Java port I will file a bug report.