Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Java variable type with "cannot access" error, but in compilable code

While coding, I have ran into a type that "behaves" neither like a primitive nor Object in my NetBeans IDE. The type is IoBuffer from Apache MINA (but propabably the exact type has nothing to this question).

From my perspective:

  • my project compiles well, despite that this type is used in lot places underneath
  • my NetBeans don't recognize this type ("cannot find symbol" hint when i wrote IoBuffer)
  • I can't create IoBuffer variable/instance (compile error: "cannot find symbol")
  • I can't invoke any method on that type, like toString.

Of course, this is a standard Java class, but it looks unusual from current perspective (Maven project of one of examples bundled with Red5 Media Server)

Simple invocation:

// videoData.getData() returns IoBuffer
videoData.getData().toString()

Causes hint & compile-time error:

org/red5/demos/oflaDemo/StreamMultiplexer.java:[89,30] error: cannot access IoBuffer

Same error if I write only videoData.getData() - hint in this case is The type od getData() is erroneous

What caused this situation?

like image 425
Piotr Müller Avatar asked Nov 12 '22 20:11

Piotr Müller


1 Answers

Have you tried clearing netbeans cache? To clear cache: Shutdown Netbeans, rename %AppData%\Local\NetBeans\Cache\7.2\index, restart, wait for background scanning to complete and try again...

like image 170
Mozfet Avatar answered Nov 14 '22 23:11

Mozfet