Results 1 to 9 of 9

Thread: Unable to load IceBox CPP Demo Server

  1. #1
    jonp is offline Registered User
    Name: Jon Petitta
    Organization: GFI inc.
    Project: Distributed Task Framework
    Join Date
    Jan 2011
    Posts
    14

    Unable to load IceBox CPP Demo Server

    Windows 7 x64
    Visual Studio 2008
    Ice 3.4.1


    I extracted the demos.zip from the install package into a subdir of the install for Ice. I loaded the sln for cpp, and built IceBox.Hello.Server.

    When I attempted to load the server dll into IceBox all I would get is the following error message.

    icebox: error: ServiceManager: unable to load entry point `helloservice:create'

    Any help is greatly appreciated!

    Jon
    Jon Petitta
    GFI Inc
    http://www.gfi.com
    Distributed Task Framework

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi Jon,

    When dynamically loading a DLL (as IceBox is doing), it's critical that you use the correct build configuration and run-time environment. There are unfortunately many subtle ways to get it wrong.

    For example, perhaps you built the demo in debug mode (thereby generating HelloServiced.dll) but you're using the release executable (icebox.exe) and not the debug executable (iceboxd.exe).

    Another possibility is that you built the demo DLL in 64-bit mode, but you're using the 32-bit version of icebox.exe.

    So, check your PATH to verify whether you're using the 32- or 64-bit executable by default, and check your build configuration.

    Let us know if you're still having trouble.

    Regards,
    Mark

  3. #3
    jonp is offline Registered User
    Name: Jon Petitta
    Organization: GFI inc.
    Project: Distributed Task Framework
    Join Date
    Jan 2011
    Posts
    14
    I did build a debug win32 version of the demo, I changed the output file so it is not appended with a d. Is it possible to run the release version of icebox, with a debug version of the dll that is not appended with d?

    Funny thing you mention the 32/64 bit versions, I am on a 64 bit platform, and the directions stated you had to add the bin/x64 dir to your path in order for bzip to work correctly. Now when I do a where icebox.exe it shows both locations, bin and bin/x64, how do I ensure I am using the 32 bit version of icebox?

    I'm going to revert the appending of the d, and run with iceboxd, will let you know how it goes.

    Jon
    Jon Petitta
    GFI Inc
    http://www.gfi.com
    Distributed Task Framework

  4. #4
    jonp is offline Registered User
    Name: Jon Petitta
    Organization: GFI inc.
    Project: Distributed Task Framework
    Join Date
    Jan 2011
    Posts
    14
    Well hell, when I run iceboxd I get an sxs error... I don't think ICE likes me

    I think I'm starting to see my issue... It seems as tho you are unable to have a system configured for using both C++ and C# versions of ICE on a 64bit platform, I think a solution to this would be to move third party dependencies to their own bin folder.
    Jon Petitta
    GFI Inc
    http://www.gfi.com
    Distributed Task Framework

  5. #5
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    The d suffix is required for debug builds. This convention is used for Ice plug-ins as well as for IceBox services.

    The simplest way to guarantee that you are using the 32-bit version of the IceBox executable is to specify the full path on the command line. For example, assuming you are using a debug build:

    > set ICE_HOME=C:\Program Files (x86)\ZeroC\Ice-3.4.1
    > "%ICE_HOME%\bin\iceboxd.exe" --Ice.Config=config.icebox

    Keep in mind however that dependent DLLs (such as ice34d.dll) will be resolved by searching your PATH, so it's a good idea to put the 32-bit bin directory at the head of your PATH:

    > set ICE_HOME=C:\Program Files (x86)\ZeroC\Ice-3.4.1
    > set PATH=%ICE_HOME%\bin;%PATH%
    > "%ICE_HOME%\bin\iceboxd.exe" --Ice.Config=config.icebox

    Regards,
    Mark

  6. #6
    jonp is offline Registered User
    Name: Jon Petitta
    Organization: GFI inc.
    Project: Distributed Task Framework
    Join Date
    Jan 2011
    Posts
    14
    Yup, that was it! Thanks for the help, nothing like good old versioning issues!

    Thanks again!

    Jon
    Jon Petitta
    GFI Inc
    http://www.gfi.com
    Distributed Task Framework

  7. #7
    nlhaines is offline Registered User
    Name: Noah Libby Haines
    Organization: University of California-Berkeley
    Project: Implementing a Realtime Data Server
    Join Date
    Feb 2011
    Posts
    7

    IceBox Problems

    I'm having similar problems getting my icebox service to start successfully.

    I'm running Windows 7 x64, using Visual Studio 2010 with ice plugin....

    I set my path variable to only point to the \bin folder rather than to also include the 64-bit versions.

    Visual studio successfully builds the .dll in either Release or Debug mode.

    When I attempt to run iceboxd I get an error saying "The application has failed to start because its side-by-side configuration is incorrect", which I have no idea how to debug.

    When I attempt to run with icebox.exe I get an access violation which seems to occur when the start method is invoked within the icebox service.


    Here is the code defining the service:
    Code:
    void DataSourceSimService::start(const std::string& name, const Ice::CommunicatorPtr& communicator, const Ice::StringSeq& args){
    	std::cout << "starting data source sim service" <<std::endl;
    	_adapter = communicator->createObjectAdapter(name);
    	std::cout << "object adapter created" << std::endl;
    	Ice::ObjectPtr object = new QuoteServer::DataSourceSim();
    	std::cout << "dataSourceSim instantiated" <<std::endl;
    	_adapter->add(object, communicator->stringToIdentity("DataSourceSim"));
    	std::cout << "DataSourceSim object added to adapter" << std::endl;
    	_adapter->activate();
    	std::cout << "finished starting service";
    }
    void DataSourceSimService::stop(){
    	_adapter->deactivate();
    }
    
    //Based on example in manual
    extern "C" {
    DATASOURCESIM_API IceBox::Service*
    create(Ice::CommunicatorPtr communicator){
    	return new DataSourceSimService;
    }
    }
    Code:
    #include <IceBox/IceBox.h>
    
    #if defined(_WIN32) //Manual version only
    #	define DATASOURCESIM_API __declspec(dllexport)
    #else
    #	define DATASOURCESIM_API
    #endif
    
    class DATASOURCESIM_API DataSourceSimService : public IceBox::Service{
    public:
    	virtual void start(const std::string&, const Ice::CommunicatorPtr&, const Ice::StringSeq&);
    	virtual void stop();
    
    private:
    	Ice::ObjectAdapterPtr _adapter;
    };
    Here is the output from icebox.exe:
    Code:
    starting data source sim service
    -- 03/10/11 13:39:07.748 icebox-DataSourceSim: Network: accepting tcp connections at 0.0.0.0:9997
        local interfaces: 192.168.1.110, 127.0.0.1
    -- 03/10/11 13:39:07.769 icebox-DataSourceSim: Network: published endpoints for object adapter 'DataSourceSim':
       tcp -h 192.168.1.110 -p 9997
    object adapter created
    dataSourceSim instantiated
    So I'm not really sure where to go from here. Since I can't get the debug version to work I'm not sure how to debug this....Any help would be greatly appreciated.

  8. #8
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Noah,

    Are you using the correct binaries?

    Since you are using Visual Studio 2010, you need to use the binaries in the bin\vc10 or bin\vc10\x64 directory, and not the binaries in the main bin directory (or bin\x64) (these binaries are for Visual Studio 2008).

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  9. #9
    nlhaines is offline Registered User
    Name: Noah Libby Haines
    Organization: University of California-Berkeley
    Project: Implementing a Realtime Data Server
    Join Date
    Feb 2011
    Posts
    7
    I only have a vc100 directory, and not a vc10 directory, but setting my path variable to point here seems to have done it. Thanks for the help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-11-2010, 06:11 PM
  2. Unable to load .NET dll
    By ngambek2003 in forum Help Center
    Replies: 11
    Last Post: 10-05-2009, 01:03 PM
  3. Slice compilers unable to parse demo .ice files?
    By asynchronos in forum Help Center
    Replies: 14
    Last Post: 07-17-2008, 07:41 AM
  4. Replies: 1
    Last Post: 05-07-2008, 05:56 PM
  5. unable to load certificate authorities
    By xdm in forum Help Center
    Replies: 3
    Last Post: 11-24-2003, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •