jdo - Datanucleus exception adding new column to hbase table -


I am using it with I had a table user . There are 4 rows in it. Now I added a new column to the table. Now every time I use any old user object that does not have this column, DataNucleus throws an exception because it is trying to map the column to POJO with property. There is no other way than updating the old 'user' object with dummy data? My object mapping looks like something:

  @ persistent (column = {@ column (name = "next_mail_timestamp", insertValue = "# null", defaultValue = "#NULL", allowNull = "true")}, name = "next mailtemstamp", cacheable = "false", nullValue = NullValue.DEFAULT) private long nextmailtemstamp;   

As you can see I have insertValue , defaultValue , allowNull , nullValue Have tried to use . But nothing seems to work.

The Stacktrace looks like this: "java prettyprint-override"> . Hbase.util.Bytes.toLong (Bytes.java:453) org.datanucleus.store.hbase.fieldmanager.FetchFieldManager.fetchLongField at (Bytes.java:479) (FetchFieldManager.java:269) org.datanucleus.state.AbstractStateManager .replacingLongField (AbstractStateManager.java:2133) com.kuliza.sitepulse.data.User.jdoReplaceField (User.java) at com.kuliza.sitepulse.data.User.jdoReplaceFields (at user.java) org.datanucleus.state .JDOStateManagerImpl.replaceFields (JDOStateManagerImpl.java1989) at org.datanucleus.state.JDOStateManagerImpl.replaceFields (JDOStateManagerImpl.java008009) org.datanucleus.store.hbase.query.HBaseQueryUtils $ 2.fetchFields org.datanucleus.state.JDOStateManagerImpl.loadFieldValues At (HBaseQueryUtils.java:226) (JDOStateManagerImpl.java : 803) org.datanucleus.state.JDOStateManagerImpl.initialiseForHollow at (JDOStateM Org.datanucleus.store.hbase.query.HBaseQueryUtils org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated (Object ProviderFactory.java:88) on org.datanucleus.ObjectManagerImpl .findObject (ObjectManagerImpl.java month) .getObjectUsingApplicationIdForResult (HBaseQueryUtils.javamore21) at org.datanucleus.store.hbase.query.HBaseQueryUtils.getObjectsOfType (HBaseQueryUtils.java:168) at org.datanucleus.store.hbase.query.HBaseQueryUtils.getObjectsOfCandidateType (HBaseQueryUtils.java:80) org.datanucleus.store.hbase.query.JDOQLQuery.performExecute (org.datanucleus.store.query.Query.executeQuery on JDOQLQuery.java:20071) (Query.java:1766) org.datanucleus. On store.query at Query.executeWithArray at org.datanucleus.store.query.query.execute (Query.java:1628) at (query.java:1655) org.datanucleus.api.jdo.JDOQuery.execute (JDOQuery.java:221) com Com.kuliza.sitepulse.service.AuthenticationServ ice.getUserWithCredentials (AuthenticationService.java:46) com.kuliza.sitepulse.controller.AuthenticationController.signIn (AuthenticationController) on .kuliza.sitepulse.service.DataService.getUserWithCredentials (DataService.java:111) .java: 69)

and my method is (in DataService on .java: 111 ) (which throws exceptions)

  @override public user getUserWithCredentials (string user name, string password) {PersistenceManager pm = pmf .getPersistenceManager (); Query q = pm.newQuery ("SELECT FROM" + User.class.getName () + "WHERE user name == \" + user name + "\" "+" & amp; password == "+" & Lt; user & gt; C = (list & lt; user & gt;) q.execute (); pm.close (); If (c.size) Returning c.get (0); and returning the tap;}   

I actually created two new columns ( mail innerwolls ambientc , < Code> Next MailTestStamp ) which are added to both the long and in the Stacktrace I can call it DB column as long (AFAIK)

Current versions of the DataNucleus HBase plugin are currently available for all methods of schema development Except for fields / properties in particular, when they are primitive types, although data nucleus SVN supports this, you can use it.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -