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: RE: JCA Error
From: Lucas José <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Thu, 28 Feb 2013 14:02:23 -0300
Thank you Mark,

But now, I got this error "gov.aps.jca.CAException: Unable to create context", and looking on code of JCA, I found this: "@exception CAException is thrown if the context could not be instanciated. ", but I don't found why could not be instanciated.

Thanks,
Lucas José.


From: [email protected]
To: [email protected]; [email protected]
Subject: RE: JCA Error
Date: Thu, 28 Feb 2013 16:18:31 +0000

You are using the Java Native Interface (JNI) which requires a shareable library on your host.  What happens if you use the pure-Java interface by using this call instead:

 

   ctx=jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);

 

Mark

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Lucas José
Sent: Thursday, February 28, 2013 9:48 AM
To: [email protected]
Subject: JCA Error

 

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
References:
JCA Error Lucas José
RE: JCA Error Mark Rivers

Navigate by Date:
Prev: RE: JCA Error Mark Rivers
Next: Re: Building an Epics module only for a target (not host) Andrew Johnson
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: JCA Error Mark Rivers
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 ·