A errir by building the chat demo

gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
sorry for the question. It's quite simple. But i really cann't find the solution.

Questoin:
I have setted the "config\Make.rules.mak" and "config\build.properties". The path for "#ICE_HOME = C:\Ice-3.3.1-VC90", "#jgoodies.forms = C:/Ice-3.3.1-ThirdParty-VC90/lib/forms-1.2.0.jar", "jgoodies.looks = C:/Ice-3.3.1-ThirdParty-VC90/lib/looks-2.1.4.jar" totally right.

But when i run "c:\ChatDemo-1.2.1>nmake /f makefile.mak", it always show the error ".\config\make.commen.rules.mak(112) : fatal error U1050: unable to find a valid Ice distribution, please verify ICE_HOME is properly configured and Ice is correctly installed"

I have runed other demos like "print" ..... sucessfully

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Zhenjia,

    What windows version and visual studio are you using?
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hello Jose
    i have tried in 2 pc.

    Windows XP professional, version 2002, service pack3
    MS VS2008 Version 9.0.21022.8rtm,
    MS .NET Framework Version 3.5 SP1



    Windows XP home edition, version 2002, service pack2
    MS VS2008 Version 9.0.21022.8rtm,
    MS .NET Framework Version 3.5 SP1
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    You need to set ICE_HOME

    you can set ICE_HOME in config/Make.rules.mak. removing the comment on the corresponding line.
    #ICE_HOME = C:\Ice-3.3.1-VC90
    

    it should be
    ICE_HOME = C:\Ice-3.3.1-VC90
    

    Or alternatively you could set it on the command line
    set ICE_HOME=C:\Ice-3.3.1-VC90
    

    Let us know if you have more troubles with that

    Regards,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Muchas gracias, Jose

    It works now. I am really sorry that i didn't notice the "#".

    Question:
    But there are other errors now.
    It show:

    "The command "cl.exe" is either not found or written faulse.
    NMAKE: fatal error U1077: 'cl.exe' : return code '0x1'
    Stop.
    NMAKE: fatal error U1077: 'for' : return code '0x1'
    Stop."

    BUT,
    after i have copied the "cl.exe" in to c:\ChatDemo-1.2.1 and added the path into VS, it still shows this error by running "namke /f makefile.mak"
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    after i have copied the "cl.exe" in to c:\ChatDemo-1.2.1 and added the path into VS, it still shows this error by running "namke /f makefile.mak"

    I think the problem is that you are using windows command prompt ? you should use visual studio command prompt from Visual Studio Tools menu.

    You doesn't need to copy any file or set paths in Vs
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hallo Jose
    thank you veeeeeeery much for the always fast answers.
    i can complie the files now.
    But still have 2 problemes.

    i wanna ask the 1. question at first.
    After sucessful compilation(D:\ChatDemo-1.2.1>nmake /f makefile.mak), i cann't install it (D:\ChatDemo-1.2.1>nmake /f makefile.mak install)....

    The Error is:

    copy.\certs\zeroc_ca_cert.pem D:\ChatDemo-1.2.1\certs
    the file cannt copy itself
    already copied 0 file
    NMAKE: fatal error U1077:"copy": the answer-code "0x1"
    Stop.
    q2b.JPG 63.5K
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Zhenjia,

    The problem is that you are trying to install and build in the same directory, this isn't supported. Try to install it to a different directory.

    You could edit the prefix variable in config/Make.rules.mak to change the installation directory.

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    hallo Jose
    after installation , i can run the chatserver. But i cannt run the glacier2 router. when i use "glacier2router --Ice.Config=config.glacier2router" in ".../config", it warns, "glacier2router" is not a command

    thanks a lot
    zhenjia
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    hello Jose
    actually i also have a problem with running the java client. I am reading a book about java and thinking if i could do something to solve this problem.

    it warns, "could not find the main class: chatdemogui.mainview"
    q4.JPG 48.5K
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Seems that you have build the Java client without using progruard if you look to java instruccions it say:
    The application can be found in the file lib\ChatDemoGUI.jar.
    
    If you built this JAR file using ProGuard, it is completely self-
    contained and has no external dependencies, in which case you can
    start the client with the following command:
    
      > java -jar lib\ChatDemoGUI.jar
    
    If you compiled the client without ProGuard, you will need to add
    Ice.jar, ChatDemoGUI.jar, and the JGoodies libraries to your
    CLASSPATH. You can start the client with this command:
    
      > java ChatDemoGUI.MainView
    

    So you should configure your CLASSPATH as explained or rebuild the java client with proguard in your classpath so the self contained jar could be created.

    Hope this help,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Thanks Jose
    but i still have another problem

    after installation , i can run the chatserver. But i cannt run the glacier2 router. when i use "glacier2router --Ice.Config=config.glacier2router" in ".../config", it warns, "glacier2router" is not a command

    thanks a lot
    zhenjia
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    You need to put Ice bin dir in your PATH, glacier2router command is included with Ice binary distribution.

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    sorry Jose
    the glacier2router works now. But there is now problem with chatserver.
    it says,
    "chaserver:error:service caught unhandled exception: ObjectAdapterI.cpp:774 :Ice ::InitializationException:
    initialization exception:
    object adapter 'ChatServer' requires configuration
    "
    i suppose , i should change somthing in /config/config.chatserver. But i dont know what i am supposed to do.

    sorry Jose. I dont wanna make u mad. I think , sometimes, my problem is, i have read the most related articles. But i think i cannt really understand them. When the problem comes, i cannt find the answers, althouth they are in the articls and i have read them. I really appreciate for your patience and time. thank you very much .
    q5.JPG 19.4K
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Seems that the command you are using to start chatserver isn't correct.

    try
    chatserver --Ice.Config=config.chatserver
    

    Note that Ice.Config should be property spell, with property case, the name of Ice properties passed on command line are case sensitive

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hello Jose,
    thanks for the answers.

    could u give me some suggestions
    1. Is it possible to make the installation to a exe file?
    2. What has the installation here done actually?
    3. Is it possible to pack Chaterserver ,glacier2 router and one java client to one exe file?

    thanks a lot
    zhenjia
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    I'm not sure i understand your questions
    1. Is it possible to make the installation to a exe file?
    Did you mean to create a windows installer? if that is the question yes you can create an exe or msi that takes care of the installation process.
    2. What has the installation here done actually?
    The installation copy needed files (executalbes, config files, icons, html, css) to the installation directory.
    3. Is it possible to pack Chaterserver ,glacier2 router and one java client to one exe file?
    again i'm unsure of what you are trying to archive, the short answer is yes, you could pack any file in an exe for installation purpose, to execute the files you need to unpack the files, is that what you mean?

    I could give you better advice if you clarify a bit what are you trying to do.

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Sorry Jose
    i still dont really understand the problem of java client

    1. What's the difference between /client/applet and /client/java?
    sorry , i dont know java well

    2. I have added the ProGuard to Classpath, comfirmed JGoodies libraries in config\build.properties and added JGoodies libraries in Classpath. I have compiled seperately in client/java and client/applet with "nmake /f makefile.mak".

    The Problem is when i try to run the java client, it still doesnt work. It warns: "failed to load main-class manifest attribute from lib\ChatDemoGUI.jar" and "could not find the main class: ChatdemoGUI.MainView"
    q6.JPG 71.6K
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi
    1. What's the difference between /client/applet and /client/java?
    sorry , i dont know java well

    Applets are Java applications that run inside a web browser, that is the applet client. Java client is a desktop application that use Swing the graphic Java toolkit. So both are java applications the applet run inside the browser the other is a normal desktop application developed with Java language.
    2. I have added the ProGuard to Classpath, comfirmed JGoodies libraries in config\build.properties and added JGoodies libraries in Classpath. I have compiled seperately in client/java and client/applet with "nmake /f makefile.mak".

    Looking at the output of your command prompt seems that you don' t have proguard correctly installed.

    If you build with proguard in your CLASSPATH you should see something like
    pro-jar:
    Building jar: C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar
    Updating jar: C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar
    Updating jar: C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar
    Deleting: C:\ChatDemo-1.2.1\lib\chatdemogui.mf
    ProGuard, version 4.4
    Reading input...
    Reading program jar [C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar]
    Reading program jar [C:\Ice-3.3.1-VC90\lib\Ice.jar] (filtered)
    Reading program jar [C:\Ice-3.3.1-ThirdParty-VC90\lib\looks-2.1.4.jar] (filtered
    )
    Reading program jar [C:\Ice-3.3.1-ThirdParty-VC90\lib\forms-1.2.0.jar] (filtered
    )
    Reading library jar [C:\Program Files\Java\jdk1.6.0_17\jre\lib\rt.jar]
    Reading library jar [C:\Program Files\Java\jdk1.6.0_17\jre\lib\jsse.jar]
    Initializing...
    Note: IceInternal.BasicStream: can't find dynamically referenced class org.apach
    e.tools.bzip2.CBZip2InputStream
    Note: IceInternal.BasicStream: can't find dynamically referenced class org.apach
    e.tools.bzip2.CBZip2OutputStream
    Note: the configuration keeps the entry point 'IceInternal.Selector { void add(I
    ceInternal.SelectorHandler,IceInternal.SocketStatus); }', but not the descriptor
     class 'IceInternal.SelectorHandler'
    Note: the configuration keeps the entry point 'IceInternal.Selector { void updat
    e(IceInternal.SelectorHandler,IceInternal.SocketStatus); }', but not the descrip
    tor class 'IceInternal.SelectorHandler'
    Note: there were 2 unkept descriptor classes in kept class members.
          You should consider explicitly keeping the mentioned classes
          (using '-keep').
    Note: there were 2 unresolved dynamic references to classes or interfaces.
          You should check if you need to specify additional program jars.
    Ignoring unused library classes...
      Original number of library classes: 17184
      Final number of library classes:    843
    Shrinking...
    Removing unused program classes and class elements...
      Original number of program classes: 1735
      Final number of program classes:    1734
    Inlining subroutines...
    Preverifying...
    Writing output...
    Preparing output jar [C:\ChatDemo-1.2.1\lib\ChatDemoGUI.jar]
      Copying resources from program jar [C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar]
    
      Copying resources from program jar [C:\Ice-3.3.1-VC90\lib\Ice.jar] (filtered)
      Copying resources from program jar [C:\Ice-3.3.1-ThirdParty-VC90\lib\looks-2.1
    .4.jar] (filtered)
      Copying resources from program jar [C:\Ice-3.3.1-ThirdParty-VC90\lib\forms-1.2
    .0.jar] (filtered)
    Deleting: C:\ChatDemo-1.2.1\lib\ChatDemoGUItemp.jar
    
    all:
    
    BUILD SUCCESSFUL
    Total time: 14 seconds
    
    C:\ChatDemo-1.2.1\client\java>
    

    You could run the normal jar following the instructions in INSTALL.WINDOWS

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hello Jose,
    thanks for the answer.
    1. "add ProGuard to your CLASSPATH."
    It means, copy the "D:\proguard4.4\lib" into CLASSPATH?

    2."The JGoodies libraries must either be present in your CLASSPATH or..."
    It means, copy the "D:\Ice-3.3.1-ThirdParty-VC90\lib" into the CLASSPATH?

    actually i have tried both with proguard or without.....
    when i try without proguard, it warns "could not find the main class: ChatDemoGUI.MainView"

    sorry for that, good night

    my CLASSPATH is
    D:\proguard4.4\lib;D:\apache-ant-1.8.0RC1\lib;D:\Program Files\Java\jdk1.6.0_18\lib\tools.jar;D:\Program Files\Java\jdk1.6.0_18\lib;D:\Program Files\Java\jdk1.6.0_18\jre\lib;D:\Program Files\Java\jdk1.6.0_18\jre\lib\rt.jar;D:\Ice-3.3.1-VC90\lib;D:\ChatDemo2-1.2.1\lib;D:\Ice-3.3.1-ThirdParty-VC90\lib;D:\proguard4.4\lib\proguard.jar
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    1. "add ProGuard to your CLASSPATH."
    It means, copy the "D:\proguard4.4\lib" into CLASSPATH?

    No, it means to add proguard.jar to your CLASSPATH enviroment variable.
    set CLASSPATH=D:\proguard4.4\lib\proguard.jar;%CLASSPATH%
    
    2."The JGoodies libraries must either be present in your CLASSPATH or..."
    It means, copy the "D:\Ice-3.3.1-ThirdParty-VC90\lib" into the CLASSPATH?

    No, that means to add both jars to your CLASSPATH environment variable.
    set CLASSPATH=D:\Ice-3.3.1-ThirdParty-VC90\lib\forms-1.2.0.jar;D:\Ice-3.3.1-ThirdParty-VC90\lib\looks-2.1.4.jar;%CLASSPATH%
    
    actually i have tried both with proguard or without.....
    when i try without proguard, it warns "could not find the main class: ChatDemoGUI.MainView"

    That is because ChatDemoGUI.jar isn't on your CLASSPATH and java couldn't find the MainView class to start the application, note that add ChatDemoGUI.jar to Java CLASSPATH is only necessary to run the non proguard jar.

    If you want to develop Java applications you need to get familiarized with CLASSPATH as is something basic, this article will give you a better understanding of CLASSPATH

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hello Jose,
    thanks very much for the answers and the link. Thank you so much.
    Everything works good now.

    You have asked u dont understand what i am going to do.
    Actually i would like to pack the "chat server" ,"glacier2 router" and "a java gui (client)" in one exe file and make the other client for the sensor in a exe file.

    Could you please give me some advices , when u have time.
    thanks very much

    zhenjia
    ziel.jpg 150.3K
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi

    I think that the deployment configuration you show will be not possible, and even if possible it will add some headaches to your project deploy.

    I think a simpler deployment configuration is to deploy glacier2router, and chatserver as services, and have the services configured to be started by the operating system.

    Then you could have each client as a separate executable.

    For c++ applications using Ice you need to install the Ice dlls used by the application, in java you could use proguard to build a self contained jar.

    If you need a c++ application that is self contained, you could build it with IceE (IceE supports static linkage, Ice do not support static linkage)

    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Thanks a lot Jose,

    1.
    Is it right to add the "chat demo client in cpp" files into a win32 project and compile?
    I have added the "D:\Ice-3.3.1-VC90\bin" "D:\Ice-3.3.1-ThirdParty-VC90\bin" to the VS "Executable files".

    "D:\Ice-3.3.1-VC90\lib" and "D:\Ice-3.3.1-ThirdParty-VC90\lib" into "VS libraries files"

    "D:\Ice-3.3.1-VC90\include" and "D:\Ice-3.3.1-ThirdParty-VC90\include" into"VS include files"

    But they cannt find some classes and they dont search for the head files.

    2. or people can just use VS IDE with IceE?

    3. or i change the ICE_HOME to \IceE-1.3.0 and compile?

    sorry for that

    zhenjia
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi
    1.
    Is it right to add the "chat demo client in cpp" files into a win32 project and compile?
    I have added the "D:\Ice-3.3.1-VC90\bin" "D:\Ice-3.3.1-ThirdParty-VC90\bin" to the VS "Executable files".

    "D:\Ice-3.3.1-VC90\lib" and "D:\Ice-3.3.1-ThirdParty-VC90\lib" into "VS libraries files"

    "D:\Ice-3.3.1-VC90\include" and "D:\Ice-3.3.1-ThirdParty-VC90\include" into"VS include files"

    But they cannt find some classes and they dont search for the head files.

    Not that isn't enough, you also need to add slice files to the project, if you are using Ice Visual Studio Plugin, the slice compilation will be handle by the extension, if not you need to provide a custom build step so Visual Studio knows how to build slice files, we encourage Ice visual studio users to use visual studio extensions to build they projects.
    2. or people can just use VS IDE with IceE?

    You can use Visual Studio to build Ice and IceE projects, but you should configure the project correctly. (note that Ice Visual Studio Extension currently does not support IceE)

    The best is to take the demos that comes with Ice or IceE as an example and build your own projects from here.
    3. or i change the ICE_HOME to \IceE-1.3.0 and compile?
    you cannot do that, note that Ice and IceE has different feature sets, not all Ice APIs are supported by IceE. There is a comparison between Ice and IceE features here.

    The cpp chat demo client in ChatDemo distribution is not expected to work with IceE, if you want to build and IceE project is better to take a look at the demos that comes with IceE distribution and use them as a start point for your IceE application.

    Cheers,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hello Jose
    i have installed the Ice Visual Studio Plugin and added the ".c" , ".h" files from "chat demo, cpp client" into a "exe" project in Visual C. I think, i just need to combine the "client.cpp" and the File for Initialisation of "exe window". It still doesnt work rightly. But is it a right direction?

    By the way, i have noticed, some demos doesn't work in Win xp home edition , just in Win xp professional edition. But that's no problem

    THanks soooo much

    Zhenjia
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    You need to enable the Ice Visual Studio Extension for your project and add slice files to your project. The usage is explained here

    You could be also interested in Ice Visual Studio Extension screencast, it shows how to use the Ice Visual Studio extension.

    Bests,
    José
  • gogosapgogosap Member Zhenjia YangOrganization: Univeristy Duisburg EssenProject: Application of ICE for RFID Sensor
    Hi Jose
    i have seen the vido shortly. Thank you very much!!! Actually i have setted the Ice Configuratoin as the link shows. I will see the video tomorrow to see if i have done everything right

    Have just seen u here before 10 min. If u are in the place in your profil, then we have the same time. its really late now.

    Thanks so much
    :-)
Sign In or Register to comment.