[omniORB] Cannot instantiate abstract class in Win32 omniorb

Xueming Wu xwu at cse.unl.edu
Mon Jun 14 18:58:25 BST 2004


Greetings,

My CORBA programs were developed in MS Visual C++ .Net.
I'm using OmniORB 4.0.3 on Windows 2000. When I compiled
the programs, I got the following error:

d:\arc_dev\SpatialInfo\SpatialInfoObject_Server.cpp(101): error C2259:
'SpatialInfoObject_i' : cannot instantiate abstract class.

I also tried to use Visual c++ 6.0. I got the same error.
The following is the definition of the class.

/*------begin of the definition----------------*/
#include "SpatialLayer.hh" #include <iostream>

using _CORBA_MODULE SpatialLayer;
using _CORBA_MODULE POA_SpatialLayer;

class SpatialInfoObject_i: public POA_SpatialLayer::SpatialInfoObject,
            public PortableServer::RefCountServantBase
{
private:
	omni_mutex com_mutex;

public:
	SpatialInfoObject_i();
    virtual ~SpatialInfoObject_i();

    NADSSLayer::ParameterList* getCapability();
    OverLayerSeq* getOverLayers(const BaseMap& mask) throw
(SpatialLayer::InvalidParameterException);
    BinaryData* generateThumbnail(const BaseMap& mask, OverlayType
baselayer,
	const OverLayerSeq& layers,const MapResolution& resolution,
	const SpatialLayer::SpatialInfoObject::MapOutputFormatType format_type,
	const SpatialLayer::SpatialInfoObject::ReColorSeq& color_rule)
		throw (SpatialLayer::LayerNotAvailableException,
SpatialLayer::MapFormatNotAvailableException,
			SpatialLayer::SpatialOperationException,
SpatialLayer::InvalidParameterException);

	BinaryData* generateOverLayerMap(const BaseMap& mask, const
RasterData& baselayer,
		const OverLayerSeq& layers, const
SpatialLayer::SpatialInfoObject::LegendType& legend,
		const SpatialLayer::SpatialInfoObject::MapAttributes&
attributes,
		const MapResolution& resolution, const
SpatialLayer::SpatialInfoObject::MapOutputFormat& format)
        throw (SpatialLayer::LayerNotAvailableException,
SpatialLayer::LengendNotAvailableException,
			SpatialLayer::MapScaleNotAvailableException,
SpatialLayer::MapFormatNotAvailableException,
			SpatialLayer::SpatialOperationException,
SpatialLayer::InvalidParameterException);

	BinaryData* generateClimateMap(const BaseMap& mask, const SiteSet&
siteList,
		const OverLayerSeq& overlays, OverlayType averagelayer,
		const SpatialLayer::SpatialInfoObject::LegendType& legend,
		const SpatialLayer::SpatialInfoObject::MapAttributes&
attributes,
		const Interpolation& interpMethod, const MapResolution&
resolution,
		const SpatialLayer::SpatialInfoObject::MapOutputFormat&
format)
        throw (SpatialLayer::SiteOutOfBoundaryException,
SpatialLayer::LayerNotAvailableException,
			SpatialLayer::LengendNotAvailableException,
SpatialLayer::MapFormatNotAvailableException,
			SpatialLayer::MapScaleNotAvailableException,
SpatialLayer::InterpolationNotAvailableException,
			SpatialLayer::InvalidParameterException,
SpatialLayer::SpatialOperationException);

};
/*--------------end of the definition-----------------------*/

Here comes the part which cause the error:

CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
SpatialInfoObject_i* mySpatialInfoObject = new SpatialInfoObject_i();

Any Suggestion? Thank you.

Xueming




More information about the omniORB-list mailing list