Experimental Physics and Industrial Control System
|
Mark, I solved the problem installing the CAJ on the same project, I don't know why. Thanks again. Lucas José.
From: [email protected]To: [email protected]; [email protected]Subject: RE: JCA Error Date: Thu, 28 Feb 2013 17:18:23 +0000
This is the code I use in the areaDetector EPICS_AD_Viewer.java code:
// Get the JCALibrary instance.
jca = JCALibrary.getInstance();
ctxt = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);
ctxt.initialize();
I have not seen the error you are getting.
Mark
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
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é
|
- References:
- JCA Error Lucas José
- RE: JCA Error Mark Rivers
- RE: JCA Error Lucas José
- RE: JCA Error Mark Rivers
- Navigate by Date:
- Prev:
Re: What I learned today... Benjamin Franksen
- Next:
Re: seq: benign(?) error message when building with R3.15 Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: JCA Error Mark Rivers
- Next:
Strange Interaction between CA gateway and CAJ Carr, Gary
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|