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: CSS 3.1.x PVManager / JCA ClassCastException
From: [email protected]
To: [email protected]
Date: Tue, 7 May 2013 16:07:37 +0200
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


Replies:
RE: CSS 3.1.x PVManager / JCA ClassCastException Carcassi, Gabriele

Navigate by Date:
Prev: Viewing multiple OPIs simultaneously with Control System Studio Qazi Zia-ul-Haque
Next: Re: Would like to add regular expressions to dbpr 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: Viewing multiple OPIs simultaneously with Control System Studio Qazi Zia-ul-Haque
Next: RE: CSS 3.1.x PVManager / JCA ClassCastException Carcassi, Gabriele
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 ·