3 Replies Latest reply: Apr 27, 2012 1:05 AM by 920209 RSS

    User data metadata not found! - read Network problem with Netbeans

    744977
      Hi to all,

      I have Oracle11gR2 and Fedora 13 as OS.
      I must do analysis (as compute of shortest path) on a my Network with NDM.
      I will use LOD API, but the Network is not already partitioned.
      Before partitioning I want see if Netbeans reads my Network. When I run the code for do this:
      String url = "jdbc:oracle:thin:@IP_of_machine:1521:dbSID";
      
          try {
      
                      Class.forName("oracle.jdbc.OracleDriver").newInstance();
                      
                      Connection conn = DriverManager.getConnection(url,"italia","italia");
                      System.out.println("Connect to Database");
                      conn.setAutoCommit(false);
         
                      Network net = NetworkManager.readNetwork(conn, "ITALY_NET");
                      System.out.println("Network has been read");
      but the output is:

      run:
      Connect to Database

      oracle.spatial.network.NetworkDataException: oracle.spatial.network.NetworkDataException: User data metadata not found!
      at oracle.spatial.network.NetworkAdapterSDO.readNetwork(NetworkAdapterSDO.java:792)
      at oracle.spatial.network.NetworkAdapterSDO.readNetwork(NetworkAdapterSDO.java:552)
      at oracle.spatial.network.NetworkManager.readNetwork(NetworkManager.java:176)
      at calcolopercorso.Main.main(Main.java:62)
      Caused by: oracle.spatial.network.NetworkDataException: User data metadata not found!
      at oracle.spatial.network.UserDataMetadataImpl.<init>(UserDataMetadataImpl.java:108)
      at oracle.spatial.network.NetworkMetadataImpl.<init>(NetworkMetadataImpl.java:585)
      at oracle.spatial.network.NetworkAdapterSDO.readNetworkMetadata(NetworkAdapterSDO.java:4148)
      at oracle.spatial.network.NetworkAdapterSDO.readNetwork(NetworkAdapterSDO.java:766)
      ... 3 more
      BUILD SUCCESSFUL (total time: 1 second)

      It's correctly connected to database but I have error when it must read the Network
      What I wrong?
      Thank you very much in advance.

      Edited by: crystal13 on Sep 16, 2010 3:05 AM

      Note that Network has been correctly validated:
      SQL> SELECT SDO_NET.VALIDATE_NETWORK('ITALY_NET') FROM DUAL;
      SDO_NET.VALIDATE_NETWORK('ITALY_NET')
      --------------------------------------------------------------------------------
      TRUE
        • 1. Re: User data metadata not found! - read Network problem with Netbeans
          Jack Wang-Oracle
          It looks like you might have set user_defined_data to 'Y' but did not populate your user defined data in user_sdo_network_user_data view.

          Do the following :
          select network,user_defined_data from user_sdo_network_metadata where network = 'ITALY_NET';
          if user_defined_data is set to 'Y', you can set it to 'N' then NDM will not look for user data definition in user_sdo_network_user_data.
          If you intend to use user data in your network, you need to set user_defined_data to 'Y' and
          populate your user data information in user_sdo_network_user_data.
          desc user_sdo_network_user_data;
          You can get more user data information form the whitepaper in ndm_whitepaper_11gR2 under User-Defined Data Section.
          https://spatial.samplecode.oracle.com/servlets/ProjectProcess?pageID=0Zl7oV

          I assume that you know you're using the 10g in-memory API instead of the 11g NDM LOD API.

          jack
          • 2. Re: User data metadata not found! - read Network problem with Netbeans
            744977
            Jack Wang wrote:
            It looks like you might have set user_defined_data to 'Y' but did not populate your user defined data in user_sdo_network_user_data view.

            Do the following :
            select network,user_defined_data from user_sdo_network_metadata where network = 'ITALY_NET';
            if user_defined_data is set to 'Y', you can set it to 'N' then NDM will not look for user data definition in user_sdo_network_user_data.
            If you intend to use user data in your network, you need to set user_defined_data to 'Y' and
            populate your user data information in user_sdo_network_user_data.
            desc user_sdo_network_user_data;
            You can get more user data information form the whitepaper in ndm_whitepaper_11gR2 under User-Defined Data Section.
            https://spatial.samplecode.oracle.com/servlets/ProjectProcess?pageID=0Zl7oV

            I assume that you know you're using the 10g in-memory API instead of the 11g NDM LOD API.

            jack
            Jack now I understand what was that "Y"!!
            No, I don't want define user_defined_data into user_sdo_network_user_data. So now I setted 'N' into user_sdo_network_metadata and it works!

            Yes, I know that I'm using 10g in memory API: I want only try the connection between Netbeans and NDM. Infact I went out of memory during reading :-)
            Now I will do partitioning and then I will use the LOD APIs.

            Thank you very much.
            • 3. Re: User data metadata not found! - read Network problem with Netbeans
              920209
              hey

              plz let me know too where changes are to be made to change it to 'N'. I am also getting same error "meta data not found".

              Please help me too

              Thanks
              Rema