[Source] NPS branch OGLExtrusion compilation problem when netbeans "fixes"imports

Norbraten, Terry (CIV) tdnorbra at nps.edu
Sat Sep 8 22:47:53 PDT 2012


Try a full SVN update.  The aviatrix jar was renamed to take out the -nps
b/c they are the same jars, both in the trunk and branch

On 9/8/12 11:34 AM, "Don Brutzman" <brutzman at nps.edu> wrote:

>Hi Terry.  It has been a few weeks since I tried working with the
>NPS branch OGLExtrusion.java code.
>
>Interesting project failure alert:  when trying to "fix" imports for
>this class, the NPS branch no longer compiles for me.  A number of
>errors appear regarding class visibility for a number of classes.
>These appear in the Netbeans editor and also when building -
>compilation console follows.
>
>This is pretty unusual. I haven't seen the fix-imports feature provoke
>errors before (after using it hundreds of times).  So thought I'd post
>this alert to be extra careful with such imports.  Perhaps you will
>see something relevant in the project configuration that is unusual
>or fixable to avoid this anomaly - it is always good practice to
>correct and silence superfluous errors/warnings, when possible.
>
>The Netbeans project Java Sources Classpath still includes
>	lib/aviatrix3d-all_2.2.0-nps.jar
>	lib/j3d-org-all_1.1.0.jar
>I have not locally checked out or built either j3d or aviatrix.
>
>Working, existing import section:
>=================================
>// External imports
>import javax.vecmath.*;
>
>import org.j3d.aviatrix3d.*;
>
>import org.j3d.geom.GeometryData;
>
>// Local import
>import org.web3d.vrml.lang.*;
>
>import org.web3d.vrml.nodes.VRMLNodeType;
>import org.web3d.vrml.renderer.common.nodes.geom3d.BaseExtrusion;
>import org.web3d.vrml.renderer.common.nodes.GeometryUtils;
>import org.web3d.vrml.renderer.common.nodes.GeometryHolder;
>import org.web3d.vrml.renderer.ogl.nodes.OGLGeometryNodeType;
>=================================
>
>Failing import section after Netbeans "fixes" imports, followed by
>console.
>Note that org.j3d.aviatrix3d.* has been stripped out:
>=================================
>// External imports
>import javax.vecmath.*;
>import org.j3d.geom.GeometryData;
>import org.web3d.vrml.lang.*;
>import org.web3d.vrml.nodes.VRMLNodeType;
>import org.web3d.vrml.renderer.common.nodes.GeometryHolder;
>import org.web3d.vrml.renderer.common.nodes.GeometryUtils;
>import org.web3d.vrml.renderer.common.nodes.geom3d.BaseExtrusion;
>import org.web3d.vrml.renderer.ogl.nodes.OGLGeometryNodeType;
>=================================
>ant -f C:\\Xj3D.nps\\build_nps.xml build
>[...]
>compile.ogl:
>Compiling 2366 source files to C:\Xj3D.nps\classes
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:36: cannot find symbol
>symbol: class NodeUpdateListener
>    implements OGLGeometryNodeType, NodeUpdateListener{
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:49: cannot find symbol
>symbol  : class Geometry
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>    private Geometry implGeom;
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:96: cannot find symbol
>symbol  : class GeometryData
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>    protected GeometryData geomData;
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:359: cannot find symbol
>symbol  : class Geometry
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>    public Geometry getGeometry() {
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:432: cannot find symbol
>symbol  : class SceneGraphObject
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>    public SceneGraphObject getSceneGraphObject() {
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:131: cannot find symbol
>symbol  : variable TriangleArray
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        ((TriangleArray)implGeom).setVertices(
>TriangleArray.COORDINATE_3,
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:131: cannot find symbol
>symbol  : class TriangleArray
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        ((TriangleArray)implGeom).setVertices(
>TriangleArray.COORDINATE_3,
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:158: cannot find symbol
>symbol  : class TriangleArray
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>            ((TriangleArray)implGeom).setNormals(geomData.normals);
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:231: cannot find symbol
>symbol  : class GeometryData
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        geomData = new GeometryData();
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:232: cannot find symbol
>symbol  : variable GeometryData
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        geomData.geometryType = GeometryData.TRIANGLES;
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:449: cannot find symbol
>symbol  : class TriangleArray
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        implGeom = new TriangleArray(true,
>VertexGeometry.VBO_HINT_STATIC);
>C:\Xj3D.nps\src\java\org\web3d\vrml\renderer\ogl\nodes\geom3d\OGLExtrusion
>.java:449: cannot find symbol
>symbol  : variable VertexGeometry
>location: class org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLExtrusion
>        implGeom = new TriangleArray(true,
>VertexGeometry.VBO_HINT_STATIC);
>Note: Some input files use or override a deprecated API.
>Note: Recompile with -Xlint:deprecation for details.
>Note: Some input files use unchecked or unsafe operations.
>Note: Recompile with -Xlint:unchecked for details.
>12 errors
>C:\Xj3D.nps\build_nps.xml:184: Compile failed; see the compiler error
>output for details.
>BUILD FAILED (total time: 19 seconds)
>=================================
>
>Anyway, fair warning.  This would be good to fix, since the editor is
>mistakenly reporting errors and preventing aviatrix3d class exploration,
>even though subsequent compilation and execution nevertheless succeeds.
>
>p.s. additional troubleshooting follows:
>
>Further clue:  for the unmodified current/compiling version, hovering over
>the yellow warning light bulb reports the following warning:
>
>	Package org.j3d.aviatrix3d does not exist
>
>So apparently that path is not visible internally to the editor, despite
>having the .jar files in the project classpath?
>
>FWIW I tried adding lib/ to the folders list under project Java Sources
>but that had now effect, it still reports the "does not exist" warning.
>
>Recommendation:
>Something else needs to be added to the Netbeans project configuration
>to match the class visibility provided within Ant for compilation/running.
>
>all the best, Don
>-- 
>Don Brutzman  Naval Postgraduate School, Code USW/Br
>brutzman at nps.edu
>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>+1.831.656.2149
>X3D graphics, virtual worlds, navy robotics
>http://faculty.nps.edu/brutzman




More information about the Source mailing list