Error in module [...] during network setup: Class [...] not found

2,447 views
Skip to first unread message

Skidder

unread,
Feb 1, 2011, 10:14:09 AM2/1/11
to omnetpp
Hi all,

I'm using OMNeT++ and MiXiM. I am building my own simulation classes
as a seperate project which I link against MiXiM, to keep a clean
MiXiM install which I can easily upgrade.

My own NED structure is in "org.dacs_mixim.[base, modules,
examples, ...]". In my dacs_mixim/base/connectionManager folder I
subclass MiXiM's connectionManager (to add some extra functionality)
in the package "org.dacs_mixim.base.connectionManager", and it also
imports "org.mixim.base.connectionManager.ConnectionManager;"

Compilation goes without trouble, my dacs_miximbase and dacs_modules
libs are linked just like the miximbase and miximmodules. Now, when I
start my simulation executable I get the following error:

<!> Error in module (cCompoundModule) sim (id=1) during network setup:
Class "org.dacs_mixim::WorldConnectionManager" not found -- perhaps
its code was not linked in, or the class wasn't registered with
Register_Class(), or in the case of modules and channels, with
Define_Module()/Define_Channel().

This seems odd, does the "::" mean 'not known' or is it just to
shorten the display? If it is not known then it is no wonder it is not
working. However, dacs_mixim/base is in the ned-path,
Define_Module(WorldConnectionManager) is used in the CC file, and my
NED files contain @namespace(org.dacs_mixim). So then why can it not
find my WorldConnectionManager at runtime?

Could somebody shed some light on this? Is it a namespace thing?

Is it even possible to make your own extension to MiXiM in this way?
(i.e. org.dacs_mixim.* subclasses some classes in org.mixim, to get to
a MiXiM with added functionality). It seems I want to merge two
namespaces...

Skidder

unread,
Feb 1, 2011, 12:23:56 PM2/1/11
to omnetpp
Ok, I managed to fix this by getting rid of the "org.dacs_mixim"
namespace and putting all package.ned and other NED files as relative
to the default namespace (e.g. in dacs_mixim/base there's a
package.ned with "package base;"), and my own connectionManager is nu
in package "base.connectionManager". I guess they are merged into the
org.mixim namespace; more or less exactly what I was trying to
accomplish.

People with similar aims (extend MiXiM or any OMNeT framework with
your own classes, have a look here for some basics:

http://www.omnetpp.org/pmwiki/index.php?n=Main.HowToExtendAProject

Rostyslav Galypchak

unread,
Feb 2, 2011, 7:22:07 AM2/2/11
to omn...@googlegroups.com
Hi,

I'm having a similar sort of error:

<!> Error in module (cCompoundModule) GoogleEarthNet.AP (id=4) 
during network setup: Class "NotificationBoard" not found -- perhaps

its code was not linked in, or the class wasn't registered with
Register_Class(), or in the case of modules and channels, with
Define_Module()/Define_Channel().

 but I'm not sure how to fix it using your method. What I'm trying to do here is, I've downloaded the Google Earth Demo
 from the omnetpp website and I'm trying to use some files from the examples provided with the INET MANET, specifically the 'handover'
 so I copied over the 'src' folder from INET MANET folder to my Google Earth Demo folder and ended up with the following code:

 package googleearthdemo;
//-----------------------------------------------------------------------------------
import googleearthdemo.src.networklayer.autorouting.FlatNetworkConfigurator;
import googleearthdemo.src.nodes.wireless.WirelessAP;
import googleearthdemo.src.world.ChannelControl;
//-----------------------------------------------------------------------------------
//
// The Google Earth Demo network.
//
network GoogleEarthNet
{
    parameters:
        @display("bgb=2000,2000;bgi=background/terrain,s");
        double playgroundLatitude; // geographic position of the playground's north-west corner
        double playgroundLongitude; // geographic position of the playground's north-west corner
        double playgroundWidth @unit("m") = default(1000m);  // the E-W size of playground
        double playgroundHeight @unit("m") = default(1000m); // the N-S size of playground

    submodules:
        chanCtrl: ChannelController {
            @display("p=90,250");
        }
        kmlHttpServer: KmlHttpServer {
            @display("p=90,350;t=Run the simulation in Fast mode\\, then\npoint your browser to localhost:4242\nor open the provided KML file");
        }
        
        AP: WirelessAP  { //error occurs when I add this line
         @display("p=900,200;r=,,#707070");
        }
       
        
        
        car[8]: MobileNode;
       
}

Can you help me with this? Did I copy the files over correctly, or do I need to include them some other way?

Many Thanks


--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.


Reply all
Reply to author
Forward
0 new messages