EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: JCA Error
From: Lucas José <[email protected]>
To: <[email protected]>
Date: Thu, 28 Feb 2013 12:47:41 -0300
Hello, all

I'm trying to execute the simple example using JCA, to implement a channel access client in Java, but doesn't work.

    The main function of my class (SimpleJCAGet):
    
    (...)

    SimpleJCAGet simpleJCAGet = new SimpleJCAGet();
    JCALibrary jca=null;
    Context ctxt=null;
    Channel chan=null;

    if(!simpleJCAGet.parseCommand(args)) System.exit(1);
    if(!simpleJCAGet.pvSpecified) {
      System.err.println("No PV specified\n");
      System.exit(1);
    }


    try {

      jca=JCALibrary.getInstance();

      ctxt=jca.createContext(JCALibrary.JNI_SINGLE_THREADED);
      chan=ctxt.createChannel(simpleJCAGet.name);
      ctxt.pendIO(simpleJCAGet.timeout);
    
    } catch(Exception ex) {
      System.err.println(ex);
      System.exit(1);
    }

    (...)

In this point (chan=ctxt.createChannel(simpleJCAGet.name)), he throws an exception: "java.lang.IllegalStateException: Context not initialized".

The doc ( http://www.aps.anl.gov/bcda/jca/jca/2.1.2/api/gov/aps/jca/Context.html#createChannel%28java.lang.String%29 ) says: "    java.lang.IllegalStateException - if the context has been destroyed." , but the context was created in the previous row.

The files are correct, the IOC is running corretly, and this example is in page of JCA. What could be wrong?

Thanks (And sorry my english)!
Lucas José



Replies:
RE: JCA Error Mark Rivers

Navigate by Date:
Prev: Re: What I learned today... Benjamin Franksen
Next: Re: What I learned today... Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Building an Epics module only for a target (not host) Michael Davidsaver
Next: RE: JCA Error Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·