Error casting an object of type to an incompatible type. Usually Java error....

CFGRID & CFGRIDUPDATE:
My cfgridupdate used to work ok, I think. I have been experiencing other bugs lately and have installed 1 update to my CFMX 7 server. Also, I have added some tables and altered some PKs and FKs to accomodate those tables but the fundamentals are still the same. Now I get this error every time I submit an edited grid to either of my main tables from within my member_admin area. I have been foolin with it for days but I'm scared to touch my table structure.
ElectriciansnetAsked:
Who is Participating?
 
_agx_Commented:
Yes, personally I don't like the automated type of inserts or updates.  I prefer to do my own queries.

>The memberID is a part of 10 tables and I'm still reluctant to give my members control over their
> own data. I wish I could find a way to delete a member db wide (me only) with one
> iteration though. I run SQL 2005 locally but the process is tedious at bes

Personally I don't like hard deletes.  Once a record is deleted, its gone forever.  So if you made a mistake,  you'd best hope you have a backup.  I prefer "soft" deletes.  Meaning, I add a column to my tables called "IsDeleted" and set the value to "1" (for deleted) and "0" for not deleted.  Then use that column in my queries

SELECT * FROM Something WHERE IsDeleted = 0

What do you mean db wide?  
0
 
ElectriciansnetAuthor Commented:
Under "Indexes/Keys" in SQL Studio I have this long number appended to my primary key ID:
(name)    PK__members__4EA8A765
Create As Clustered     Yes

However, I do not remember doing this. I do need this primary key though. It is the common denominator for almost all tables.

Could this have anything to do with it?
0
 
_agx_Commented:
Electriciansnet,

I don't know that I can help, but if you could post a bit more information like:
- the full error message
- small section of code that produces the error
- the columns and data types involved
...

It might help someone else to assist you with your problem.

Cheers

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
ElectriciansnetAuthor Commented:
Hello _agx_!
I posted another question with complete detail and pages as well as sample credentials so you can try it yourself but I guess it was too big for response so I posted this question. You can view it at:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22858734.html

However, I have decided to alter Livedocs example of DB update using cfgrid and cfquery. I have successfully deployed the method for my dbo.memberzip which you can see using credentials and clicking "Edit Service Area". But I have not had a chance to change the method for dbo.members. You can see the error for yourself there using the same credentials and clicking "Edit Profile"> I would like to fix the error if for no other reason than trying to maintain a bug-free server. Plus I use cfgrid in other places on the site. Thanks for your response, Andy
0
 
ElectriciansnetAuthor Commented:
p.s. From the limited amount of coverage this error has on the net, the best explaination seems to be that the error was caused by updating the server with the  the .jar file from cumulative hotfix 3.
0
 
_agx_Commented:
Thanks for being so thorough, but that's a lot of code on the other page.  I can't tell which part is causing the error.  Let's narrow it down a little.  

- What is the full version number of CF that you're running  7.0.x.x?
- Which update/hotfix did you recently apply
- Can you post the full error message so we can see the line number/code where there error occurred  
0
 
ElectriciansnetAuthor Commented:
Version  7,0,2,142559    
_____________________________________________
Cumulative Hotfix 3 file: chf7020003.jar  but if I remember correctly, I applied this hotfix because of the problem meaning that the problem could have started after applying Cumulative Hotfix 2
_____________________________________________
 Error casting an object of type  to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
 
The error occurred in C:\Inetpub\wwwroot\electriciansnet.com\Admin_member\handle_grid.cfm: line 27

25 : <!---<cfif isDefined ('form.submit')>--->
26 :
27 : <cfgridupdate grid="member_grid"
28 :   datasource="enetdb1sql"
29 :   tablename="enetdb1sql.dbo.members">
_________________________________________________

You can create problem yourself by goin to http://www.electriciansnet.com/admin_member/login.cfm username: joe@electriciansnet.com, password: joe
0
 
_agx_Commented:
Sorry for the delayed response.  

> From the limited amount of coverage this error has on the net, the best explaination seems to be
> that the error was caused by updating the server with the  the .jar file from cumulative hotfix 3.

It does seem to be an issue with CFGRID/CFGRIDUPDATE.  This post mentions it was logged as a bug/issue, but I have not seen a resolution or hotfix for this problem yet.  What is interesting about the response is that they say "the database is updated" despite the error.  

http://www.sagewire.org/advanced-cfml-techniques/CFGRIDUPDATE-not-working-properly-384546.aspx
0
 
ElectriciansnetAuthor Commented:
Yes that is correct- the update does occur. I think the reason we can't seem to find a resolutions is that people figure out real quick that the cfquery method is far superior. Also, Livedocs does offer a very good example using the keywords "cfgidupdate using cfquery". However, even this method worries me because of my relational database. The memberID is a part of 10 tables and I'm still reluctant to give my members control over their own data. I wish I could find a way to delete a member db wide (me only) with one iteration though. I run SQL 2005 locally but the process is tedious at best.
0
 
ElectriciansnetAuthor Commented:
Thats awesome- Thanks!
0
 
ElectriciansnetAuthor Commented:
I'm trying to apply your method but I have many queries and some of them depend on one another- not so much a query of queries but queries based on results of other queries. The point is that this is looking like a bigger task than I had imagined. Is there a way to do it 1 time in Application.cfm ?
Even if I could do something like this in Application.cfm:
<cfquery name="chkStatus" datasource="#enet#">
select isDeleted from dbo.members
</cfquery>
<cfif chkStatus.isDeleted = 1>
<cflocation url="index.cfm">
<cfabort>
</cfif>

But that would abort if 1 member was suspended and would not allow the display of any other member matching the search criteria. Is there an easy way?
0
 
_agx_Commented:
Electriciansnet,

I just came across this one in a search.  Sorry for not responding, but I didn't know you'd posted another comment.   Like a lot of people, I often unsubscribe from 'closed' questions.  Which means I won't receive a notification if you post a follow-up.  Sorry for the mix up.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.