No Image Available Exception

Our team switched from C++ to java. The vision code worked in C++. When we ported the code to Java, we started getting a “No Image Available” exception when invoking the getImage method of AxisCamera. The cRIO was reimaged for Java and other parts of the Java code worked as expected. The camera view image is displayed on the DashBoard. Posts about “No Image Available” indicated the cause was the camera was not configured properly. Since the C++ code worked, I would think our camera was configured properly. I did look at the camera /etc/passwd file just to make sure that the FRC user was not clobbered and it was still there. Is there some configuration setting in netbeans that specifies what the camera login is (I assumed it was just hardcoded). Is my netbeans/FRC plugin out of date? Is there some initialization I need to do in Java that I didn’t need to do in C++. I am not writing any settings,e.g., writeResolution()

Thanks

The user/pass settings should be hardcoded. This should work even if Netbeans+plugins were outdated.

Can you post your code where you instantiate a camera object?

Here is a simple example of the code i am using. It can’t get much simpler

AxisCamera c = AxisCamera.getInstance();

// this works – checked camera settings via web browser
c.writeBrightness(75);

try {
ColorImage ci = c.getImage();
} catch (AxisCameraException ex) {
// always generates exception
}