Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Socket closed - Access cyc from Java API

Help
Celia Lai
2010-01-13
2013-05-28
  • Celia Lai
    Celia Lai
    2010-01-13

    Hi,

    I have the ResearchCyc up and running. I can access it from the browser. However, my Java code keeps complaining "Socket closed".

    I use the default constructor to create an instance of CycAccess
    CycAccess access = new CycAccess();

    The stack trace is as following:

    Timeout while awaiting Cyc connection establishment, closing sockets
    Closing server's api response socket associated with uuid: 38a5d998-4f36-4105-98b8-d8756d411576
    Sending API-QUIT to server that will close its api request socket and its handling thread
    Closing cfaslInputStream
    Closing cfaslSocket
    Interrupting any threads awaiting replies
    closed inbound socket associated with 38a5d998-4f36-4105-98b8-d8756d411576
    Waiting at most 500 milliseconds for the taskProcessorBinaryResponseHandler thread to die
    java.net.SocketException: Socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at org.opencyc.api.CfaslInputStream.readObject(CfaslInputStream.java:386)
    at org.opencyc.api.CycConnection$TaskProcessorBinaryResponseHandler.run(CycConnection.java:1071)

    Any help would be appreciated.

    Celia

     
  • alestarrr
    alestarrr
    2010-05-17

    Hi , and excuse for the informal interruption
    I´m student from ISPEJAE Institute,CUBA and  i working in a desktop aplications, that use OpenCyc v2.0querys like:
    isa _asertions(for instance and example relation between term  )
    _genls
    asertions(for class-subclas herarchy dependence )

    Idon´t know what is your porpuse but maybe i´m a step a head .  Anyway I  did also use the default constructor to create an instance of CycAccess
    CycAccess access = new CycAccess();
    ,but previusly click the C:\opencyc-2.0\scripts\run-cyc.bat ´s srcrip to start cyc server. It shows the following in a comand prompt:
    Start time: Sun May 16 09:42:58 CEST 2010
    Lisp implementation: Cycorp Java SubL Runtime Environment
    JVM: Sun Microsystems Inc. Java HotSpot(TM) Client VM 1.6.0 (1.6.0-b105)
    Current KB: 5018
    Patch Level: 10.128401
    Running on: FRANCOIS1
    OS: Windows Vista 6.0 (x86)
    Working directory: C:\opencyc-2.0\server\cyc\run
    Total memory allocated to VM: 1169MB.
    Memory currently used: 541MB.
    Memory currently available: 627MB.
    Initializing HL backing store caches from units/5018/.
    ;;  At this point the cyc http server is running and you can access
    ;;  Cyc directly via the local web browser.
    ;;  http://localhost:3602/cgi-bin/cyccgi/cg?cb-start
    ;;  You can browse cyc via the Guest account or perform updates by
    ;;  logging on as CycAdminstrator.
    CYC(1):

    and the aplications works!!!!!!!!!!,but only as a batch process, a  thread( an aplications working with directories, no user interfase). The problems comes when i try to use a java frame,with buttoms for user interfase interaction.

    My stack trace comes as :
    org.opencyc.api.CycApiException: Invalid attempt to synchronously communicate with Cyc from the AWT event thread.

    org.opencyc.api.DefaultSubLWorkerSynch:
    Id: null
    Server: host localhost, cfaslPort 3614
    Status: Working
    Incremental results: false
    Timeout: 0 msecs
    Command:
    (CYC-IMAGE-ID)

    Please sorry for the unplacent bothering,but could you please help me or know someone-were that could……..  8]