java - GAE ClassCastException Long cannot be cast to double -


Datastore Getting exception while trying to get the data to the unit here is my code:

  Persistence Manager Manager pmf = PMF.get (). GetPersistenceManager (); Try {query query = pmf.newQuery (DocHeader.class); @SuppressWarnings ("uncontrolled") list & lt; DocHeader & gt; docHeaders = (list & lt; DocHeader & gt;) query.execute ();   

Anyone can help in this issue.

Here is my object

  @PersistenceCapable (identityType = IdentityType.APPLICATION) public class Dokhaider {@PrimaryKey @ Persistent (Manswasthe = Aidijnaretr Sestaktisi. Secvens) Private Long Dokhaideraidi; @ Pricent Private Double Prepayment; @ Private private double current balance; @ Private Private Double Total Account Balance; @printingent private string account retiagentive; @princent private double minapment; }    

exception

ClassCastException no longer Maybe

the means to double that saved you have Datastore at least one DocHeader unit, where you make it an asset < code> long number but is referred to as your Java existence you double when you want it to query and convert it back into Java class f Week, the effort to transform long - & gt; Double throws the exception.

By using low-level Datastore API you can read all DocHeader officials, and long properties double Should be the first code in the double , then save those institutions or if existing institutions are not important (for example test data), then delete them.

Documentation:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -