Upgrading to 5.2.1 gives error - Cant be mapped for this datastore. No mapping is available


msyed080@...
 

We have created a custom id generator class ABCDLongValueGenerator.java for id column
plugin.xml
<?xml version="1.0"?>
<plugin id="abcd" name="DataNucleus plug-ins" provider-name="abcd">
<extension point="org.datanucleus.store_valuegenerator">
<valuegenerator name="ABCDLongValueGenerator" class-name="com.abcd.nm.stats.datanucleus.util.ABCDLongValueGenerator" unique="true"/>
</extension>
</plugin>
 
public ABCDLongValueGenerator(StoreManager store, String name)
{
super(store, name);
}

and the above constructor is also updated to 5.2.1 changes

The code was working fine in 5.0.0 version but when we update it to 5.2.1 its giving below exception 
  • Failed to generate new Mapping of type org.datanucleus.store.rdbms.mapping.java.LongMapping, exception : The java type java.lang.Long (jdbc-type="", sql-type="") for field "com.abcd.nm.stats.datanucleus.mediation.pmmo.NodeInv.id" cant be mapped for this datastore. No mapping is available.

Could you please help.


Andy
 

There are many releases between 5.0.0 and 5.2.1. Suggest that you try those and isolate where your case doesn't work. Then from that you can see what changes were made in GitHub for that release (for the RDBMS plugin). The log tells you lots about what datastore types are "available" for your datastore; only you know which datastore that is.


msyed080@...
 

Thanks for the quick response :)
Will try your suggestion. But for quick update what i found out was in datanucleus-core.jar - ColumnMetaData.java the JdbcType and sqlType are getting set as null for custom id field.