EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: CAJ usage
From: "J. Lewis Muir" <[email protected]>
To: [email protected]
Date: Tue, 08 May 2007 16:14:54 -0400
David Dudley wrote:
Well, getting closer.

I had jca-2.3.1 source downloaded earlier.

Moved to directory and did 'ant', it said:

build.core.java:
[echo] Building core classes
[javac] Compiling 67 source files to
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/O.core
[javac]
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/src/core/gov/aps/jca/dbr/DBR_Double.java:89:
cannot resolve symbol
[javac] symbol : method format
(java.util.Locale,java.lang.String,java.lang.Object[])
[javac] location: class java.lang.String
[javac] toValue[i] =
String.format(Locale.US, formatFString, params);
[javac] ^
[javac]
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/src/core/gov/aps/jca/dbr/DBR_Double.java:93:
cannot resolve symbol
[javac] symbol : method format
(java.util.Locale,java.lang.String,java.lang.Object[])
[javac] location: class java.lang.String
[javac] toValue[i] =
String.format(Locale.US, formatEString, params);
[javac] ^
[javac]
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/src/core/gov/aps/jca/dbr/DBR_Float.java:91:
cannot resolve symbol
[javac] symbol : method format
(java.util.Locale,java.lang.String,java.lang.Object[])
[javac] location: class java.lang.String
[javac] toValue[i] =
String.format(Locale.US, formatFString, params);
[javac] ^
[javac]
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/src/core/gov/aps/jca/dbr/DBR_Float.java:95:
cannot resolve symbol
[javac] symbol : method format
(java.util.Locale,java.lang.String,java.lang.Object[])
[javac] location: class java.lang.String
[javac] toValue[i] =
String.format(Locale.US, formatEString, params);
[javac] ^
[javac]
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/src/core/gov/aps/jca/jni/JNIContext.java:147:
cannot resolve symbol
[javac] symbol : constructor IllegalStateException
(java.lang.String,java.lang.Throwable)
[javac] location: class java.lang.IllegalStateException
[javac] throw new IllegalStateException( "Context not
initialized", th );
[javac] ^
[javac] 5 errors


BUILD FAILED
/usr/local/EPICS/modules/soft/jca/jca-2.3.1/build.xml:144: Compile
failed; see the compiler error output for details.

Total time: 5 seconds

Getting closer, I would say.

So, you're saying that caj only replaces the JNI part of jca with a
java package, instead of the native interface package?

That's correct. Instead of using the EPICS libraries for Channel Access communication, CAJ implements the Channel Access protocol in Java.


About your build problem. What archive of JCA did you download? When I downloaded the tar-gz file from http://jca.cosylab.com/ and extracted it, tar said "tar: A lone zero block at 1809". I downloaded the zip file and it extracted cleanly:

$ curl -O http://jca.cosylab.com/distributions/jca-2.3.1-src.zip

Before building JCA, I set EPICS_BASE_RELEASE (sh shell):

$ export EPICS_BASE_RELEASE=/opt/epics-3.14.8.2/base

If you're planning to use the ant install target, you should set EPICS_EXTENSIONS to an appropriate value also.

Then I was able to do

$ ant clean
$ ant

If you are planning to use only the CAJ Channel Access implementation, you could consider compiling JCA without the native EPICS libraries. However, I don't know that this is officially supported. I was able to successfully compile JCA without native EPICS libraries by removing the build.core.jni target from the depends attribute of the build.core target in build.xml:

---replace this---
<target name="build.core" depends="build.core.java,build.core.jni">
---with this (i.e. remove "build.core.jni" target dependency)---
<target name="build.core" depends="build.core.java">
---

In this case, I just did (sh shell)

$ export EPICS_BASE_RELEASE=''
$ ant clean
$ ant

The JAR file is created at "O.core/jca.jar".

-lewis


Kay-Uwe Kasemir <[email protected]> 5/8/2007 2:24 PM >>>
Hi:

You need jca, which gives you
a) The basic java API, a lot of interfaces, in a jca.jar file.
    That's what ant complains about with the missing gov.aps.jca.
b) A JNI implementation of those interfaces,
    using the CA client lib from EPICS base,
    in some *so or *dll file.

Just jca works fine, but the problem is that it depends on the
JNI implementation, i.e. binary, system-dependent code.
You need to build the JNI part of jca for Win32, Linux, Linux 64-bit,
OSX-on-ppc, OSX-on-intel, for every version of EPICS base that
you want to use.

CAJ provides a pure java implementation, so it replaces (b).
At the SNS, we had some problems with CAJ possibly causing
hangups of CA server threads on IOCs, but the current hope is
that that's been fixed as long as you use the latest jca/caj
and IOCs run R3.14.9.

-Kay


On May 8, 2007, at 15:04 , David Dudley wrote:


I'm trying to configure and use the CAJ library, since I can't be
sure
what kind of machine the application will be used on. It can almost be
guaranteed that whatever machine it is, it won't have EPICS on it,
for
sure.

I downloaded caj-1.1.3-src and caj-1.1.3.tar, and am attempting to
figure out how to use it.

From the caj-1.1.3 source directory, I can't get ant to operate without
giving pages and pages of errors. It looks for package
'gov.aps.jca',
but shows that package does not exist.

Still working on getting use to java, I've been a 'c' programmer for
around 20 years or so.
All I did was go go to the source directory and type 'ant'.  Was
there
something else I was supposed to do as well?

David

"Matej Sekoranja" <[email protected]> 11/26/2006 1:49 PM

Hi,

sorry for the late reply.

Is there any additional information on utilizing the Jca library
other
than the Tutorial listed? I'd like to use a 'monitor' function to
display
changing data, but there isn't exactly any documentation on it.

There is a series of EPICS training material.
Java and JCA can be found here:
http://www.aps.anl.gov/aod/bcda/epicsgettingstarted/developtools/ java.html


See also CA client library tutorials.

Any help would be appreciated.


The best thing is to look at BasicExample source (found in the sources). I attach it anyway.

Matej
<David Dudley.vcf>




Replies:
Re: CAJ usage David Dudley
References:
Re: CAJ usage David Dudley
Re: CAJ usage Kay-Uwe Kasemir
Re: CAJ usage David Dudley

Navigate by Date:
Prev: Re: CAJ usage David Dudley
Next: Re: CAJ usage David Dudley
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: CAJ usage David Dudley
Next: Re: CAJ usage David Dudley
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·