Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Greenhorn questions about FIND_CONNECTED_COMPONENTS

mathguyNov 13 2020

Just starting with SDO_NET, so please forgive me if the questions are dumb or trivial (or both). You may say so, I won't be offended.
I am trying to work with the simplest model (simplest in my opinion, anyway) - an undirected graph of a few nodes, with a few links, and trying to find the connected components. No real-life application - this is just for my learning.
I did some preliminary work: I created and populated a VERTICES table and an EDGES table (outside any SDO stuff); I use this data to populate the nodes and links tables created by the SDO_NET procedure(s). It's a small graph, with 30 nodes and 82 links.
I read the documentation about hierarchical networks. For now, I want to assume a non-hierarchical graph. I am not sure what the correct argument is for the SDO_NET.CREATE_LOGICAL_NETWORK parameter NO_OF_HIERARCHICAL_LEVELS. For a non-hierarchical graph, it occurs to me that either NULL or 1 should be the right choices. My preference would be for NULL, if I was developing this procedure myself, but I don't know what Oracle chose; I tried both ways, and in both cases the network was created. So far so good.
Then I populated the *_NODE$ and *_LINK$ tables (using my VERTICES and EDGES tables), only giving values for the mandatory (non-NULL) columns: NODE_ID and NODE_NAME, resp. LINK_ID, START_NODE_ID and END_NODE_ID. In particular: I left the ACTIVE column as NULL in both tables (do I have to make it 'Y' explicitly, or is that taken as default?) and PARTITION_ID also NULL in the NODE$ table.
So far everything seemed to work without problems.
Then I called SDO_NET.FIND_CONNECTED_COMPONENTS and I ran into problems. I tried to execute the procedure by giving the network name, and LINK_LEVEL => 1 or LINK_LEVEL => NULL. In both cases, I got back the following error message (both when I had the logical network created with NO_OF_HIERARCHICAL_LEVELS set to 1 and when I set it to NULL):

ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.network.lod.LODNetworkException:
oracle.spatial.network.lod.LODNetworkException: For multi-level network, node level 
table is required in order to read partitions from tables. 
To generate the node level table, call SDO_NET.GENERATE_NODE_LEVELS.
ORA-06512: at "MDSYS.SDO_JAVA_STP", line 532
ORA-06512: at "MDSYS.SDO_NET", line 6744
ORA-06512: at "MDSYS.SDO_NET", line 6770
ORA-06512: at "MDSYS.SDO_NET", line 7114
ORA-06512: at "MDSYS.SDO_NET", line 7314
ORA-06512: at line 1
29532. 00000 - "Java call terminated by uncaught Java exception: %s"
*Cause:   A Java exception or error was signaled and could not be
          resolved by the Java code.
*Action:  Modify Java code, if this behavior is not intended.

Obviously that behavior was not intended (by me anyway). I did not create a node level table; I intended the network to be single-level. Perhaps I failed to tell Oracle that in the correct way. (See my question above - about CREATE_LOGICAL_NETWORK.) So, why is the Java app telling me what is required for MULTI-level network? How do I let the app know that the network is not multi-level?
And, why does the error message say "in order to read partitions from tables"? I read about partitioning networks in the documentation, too. One would not partition a network of 30 nodes and 82 links, would they? Even if the network WAS multi-level, what does that have to do with "read partitions from tables"?
Thank you for any light you can shed! - mathguy

Comments
Post Details
Added on Nov 13 2020
10 comments
163 views