Hi Gabriele,
works fine for SHORT as well as FLOAT.
Thank You
Marcus
Von: "Carcassi, Gabriele" <[email protected]>
An: "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
Datum: 07.05.2013 23:32
Betreff: RE: CSS 3.1.x PVManager / JCA ClassCastException
Hi Marcus:
Pushed a change in the 3.1.x branch on github:
https://github.com/ControlSystemStudio/cs-studio/commits/3.1.x
I believe it should fix the issue, though I am not setup to test that
branch... So, let me know if it doesn't.
Gabriele
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of [email protected]
Sent: Tuesday, May 07, 2013 10:08 AM
To: [email protected]
Subject: CSS 3.1.x PVManager / JCA ClassCastException
Hello,
while using the PVManager inside of CSS 3.1 I got the following error:
2013-04-30 14:03:03,341 WARN [main] de.ptb.epics.eve.util.pv.PVWrapper:
*************: gov.aps.jca.dbr.DBR_TIME_Int cannot be cast to
gov.aps.jca.dbr.DBR_TIME_Short
java.lang.ClassCastException: gov.aps.jca.dbr.DBR_TIME_Int cannot be cast
to gov.aps.jca.dbr.DBR_TIME_Short
at org.epics.pvmanager.jca.JCAVTypeAdapterSet$4.createValue
(JCAVTypeAdapterSet.java:63)
at org.epics.pvmanager.jca.JCAVTypeAdapterSet$4.createValue
(JCAVTypeAdapterSet.java:1)
at org.epics.pvmanager.jca.JCATypeAdapter.updateCache
(JCATypeAdapter.java:93)
at org.epics.pvmanager.jca.JCATypeAdapter.updateCache
(JCATypeAdapter.java:1)
at org.epics.pvmanager.MultiplexedChannelHandler
$MonitorHandler.processValue(MultiplexedChannelHandler.java:49)
at org.epics.pvmanager.MultiplexedChannelHandler.processMessage
(MultiplexedChannelHandler.java:276)
at org.epics.pvmanager.jca.JCAChannelHandler.access$8
(JCAChannelHandler.java:1)
at org.epics.pvmanager.jca.JCAChannelHandler$2.monitorChanged
(JCAChannelHandler.java:249)
at gov.aps.jca.event.DirectEventDispatcher.dispatch
(DirectEventDispatcher.java:84)
at com.cosylab.epics.caj.CAJMonitor.monitorChanged(CAJMonitor.java:251)
at gov.aps.jca.event.DirectEventDispatcher.dispatch
(DirectEventDispatcher.java:155)
at com.cosylab.epics.caj.impl.requests.EventAddRequest.response
(EventAddRequest.java:213)
at
com.cosylab.epics.caj.impl.handlers.EventAddResponse.internalHandleResponse
(EventAddResponse.java:57)
at
com.cosylab.epics.caj.impl.handlers.AbstractCAResponseHandler.handleResponse
(AbstractCAResponseHandler.java:110)
at com.cosylab.epics.caj.impl.CAResponseHandler.handleResponse
(CAResponseHandler.java:139)
at com.cosylab.epics.caj.impl.CATransport.processRead
(CATransport.java:530)
at com.cosylab.epics.caj.impl.CATransport.processRead
(CATransport.java:412)
at com.cosylab.epics.caj.impl.CATransport.handleEvent
(CATransport.java:350)
at
com.cosylab.epics.caj.impl.reactor.lf.LeaderFollowersHandler.handleEvent
(LeaderFollowersHandler.java:77)
at com.cosylab.epics.caj.impl.reactor.Reactor.processInternal
(Reactor.java:400)
at com.cosylab.epics.caj.impl.reactor.Reactor.process(Reactor.java:284)
at com.cosylab.epics.caj.impl.reactor.lf.LeaderFollowersHandler.run
(LeaderFollowersHandler.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
I first checked the JavaDoc of PVManager on how to connect a PV and did
exactly that:
this.pv = PVManager.readAndWrite(channel(pvname)).notifyOn
(swtThread
()).asyncWriteAndReadEvery(ms(pvUpdateInterval));
The exception occured in the pvChanged() method:
Object newVal = pv.getValue();
Exception e = pv.lastException();
if (e != null) {
logger.warn(pvName + ": " + e.getMessage(), e);
}
Afterwards I downloaded the products NSLS-II 3.1.6 and SNS 3.1.4 (both
Linux 32 bit). There I used the PVTable and added the PV that has the above
mentioned problems.
One of them just has the PV colored red, the other showed the error above
and afterwards something like not connected, trying again in 5 sec ? (don't
know which of them did what anymore).
A cainfo of the PVs involved gives:
State: connected
Host: ***********
Access: read, no write
Data type: DBR_SHORT (native: DBF_SHORT)
Element count: 1
PVs of type short with access read and write have the same problem.
! Note that the same behaviour occurs for Double/Float pairs...
One possible (and planned) solution is to upgrade to CSS 3.2 with PVManager
2 API, but maybe there is another solution ?
Thanks
Marcus Michalsky
- References:
- CSS 3.1.x PVManager / JCA ClassCastException marcus . michalsky
- RE: CSS 3.1.x PVManager / JCA ClassCastException Carcassi, Gabriele
- Navigate by Date:
- Prev:
Re: CA subscription synchronisation shutdown problem Benjamin Franksen
- Next:
Re: Timer Queue crash Dirk Zimoch
- 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: CSS 3.1.x PVManager / JCA ClassCastException Carcassi, Gabriele
- Next:
Timer Queue crash Dirk Zimoch
- 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
|