Migrate application from 7.5.5 to 7.6.4

I try to migrate an application developped with ignition 7.5.5 (win server 2008, Java 1.7.0_09)
to igntion 7.6.4.

I’ve lots of error caused by :
system.tag.writeToTag need to be replace by system.tag.write.

I’ve this error, I don’t understand the cause :

Traceback (most recent call last):

  File "<event:visionWindowOpened>", line 29, in <module>

  File "<module:app.commun>", line 176, in jourDansDate

java.lang.ClassCastException: java.lang.ClassCastException: Cannot coerce value '[Tue Oct 08 17:32:11 CEST 2013, Tue Oct 08 17:32:11 CEST 2013, Tue Oct 08 17:32:11 CEST 2013, 1]' into type: class [Ljava.lang.Object;

	caused by ClassCastException: Cannot coerce value '[Tue Oct 08 17:32:11 CEST 2013, Tue Oct 08 17:32:11 CEST 2013, Tue Oct 08 17:32:11 CEST 2013, 1]' into type: class [Ljava.lang.Object;

Ignition v7.6.4-rc1 (b2013100210)
Java: Oracle Corporation 1.7.0_09
deb = system.tag.read("[Client]SelectionHorodate/MessageInstitu/DateDebut").value
fin = system.tag.read("[Client]SelectionHorodate/MessageInstitu/DateFin").value

if app.commun.jourDansDate(deb,fin,1)==0:
...

app.commun

def jourDansDate(deb,fin,jour):
	import system
	import app.commun
	results=system.db.runPrepQuery("select count(*) from"
									+ " (select DAYOFWEEK(T.jour) as num from " 
									+ " (select DATEADD('DAY', X,?) as jour from (select * from system_range(0,CONST_RANGE_INSTITU))) T"
			 						+ " where T.jour between ? and ?) D where D.num=?",[deb,deb,fin,int(jour)],dbfrontal)
	return results[0][0]

DateDebut And DateFin are DateTime Client Tag :

[attachment=0]err.jpg[/attachment]

Hi,

If you go to Help>Diagnostics>Console, is there more of a stack trace for that error? It is very strange, as any array should theoretically be castable to an array of Objects. It appears to be your parameter list, but everything seems to be in order… and I’ve mocked up the same setup here without a problem.

Hopefully more of the stack trace will show me exactly where the cast is failing.

As for the write/writeToTag difference, I think either should work, it’s just that “write” is the preferred way going forward.

Regards,

This problem seems to be linked with :
http://www.inductiveautomation.com/forum/viewtopic.php?f=72&t=11183&p=40018#p40018