java


JPA Sequence Generator causing ORA-01438: value larger than specified precision allowed for this column for Id column


I am using sequence generator (type long) to generate the sequence.But throws "ORA-01438: value larger than specified precision allowed for this column".When i delete the same Sequence generator annotation from my Entity class.It works fine with hard coded user id.
Note:all other values for different columns remain same.
[1/3/14 12:04:41:886 IST] 00000033 SystemOut O Hibernate: select FACILITY_MAPPING_SEQ.nextval from dual
[1/3/14 12:04:42:194 IST] 00000033 SystemOut O Hibernate: insert into FACILITY_MAPPING (ACCESS_SYSTEM_LOCATION_NAME, CD_HOME_LOCATION_NAME, CREATED_BY, CREATION_DATE, DEPARTMENT_ID, FACILITY_ID, SYSTEM_TGAD, UPDATE_DATE, UPDATED_BY, FACILITY_MAPPING_PK) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[1/3/14 12:04:42:115 IST] 00000033 SystemErr R 6348489 [WebContainer : 3] INFO org.apache.bval.jsr303.ConfigurationImpl - ignoreXmlConfiguration == true
[1/3/14 12:04:42:874 IST] 00000033 JDBCException W org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: 1438, SQLState: 22003
[1/3/14 12:04:42:887 IST] 00000033 JDBCException E org.hibernate.util.JDBCExceptionReporter logExceptions ORA-01438: value larger than specified precision allowed for this column
[1/3/14 12:04:42:887 IST] 00000033 JDBCException W org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: 1438, SQLState: 22003
[1/3/14 12:04:42:888 IST] 00000033 JDBCException E org.hibernate.util.JDBCExceptionReporter logExceptions ORA-01438: value larger than specified precision allowed for this column
[1/3/14 12:04:42:899 IST] 00000033 RegisteredSyn E WTRN0074E: Exception caught from before_completion synchronization operation: javax.persistence.PersistenceException: org.hibernate.exception.DataException: Could not execute JDBC batch update
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1315)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1321)
at org.hibernate.ejb.AbstractEntityManagerImpl$3.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1235)
at org.hibernate.transaction.synchronization.CallbackCoordinator.beforeCompletion(CallbackCoordinator.java:122)
at org.hibernate.transaction.synchronization.HibernateSynchronizationImpl.beforeCompletion(HibernateSynchronizationImpl.java:51)
at com.ibm.tx.jta.impl.RegisteredSyncs.coreDistributeBefore(RegisteredSyncs.java:291)
at com.ibm.ws.tx.jta.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:152)
at com.ibm.ws.tx.jta.TransactionImpl.prePrepare(TransactionImpl.java:2338)
at com.ibm.ws.tx.jta.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:557)
at com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:1015)
at com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:949)
at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:438)
at com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:181)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:950)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:265)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:579)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4873)
at com.swissre.bae.shared.services.EJSLocal0SLAddNewFacilityServiceImpl_0f22d836.getUpdateAddNewFacility(EJSLocal0SLAddNewFacilityServiceImpl_0f22d836.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler.invoke(EjbBeanProxyHandler.java:204)
at org.javassist.tmp.java.io.Serializable_$$_javassist_18.getUpdateAddNewFacility(Serializable_$$_javassist_18.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:551)
at com.swissre.bae.server.rpc.BAEController.processCall(BAEController.java:54)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3751)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690)
Caused by: org.hibernate.exception.DataException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
at org.hibernate.transaction.synchronization.CallbackCoordinator.beforeCompletion(CallbackCoordinator.java:117)
... 55 more
Caused by: java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column
My FacilityMapping class:
#Entity
#Table(name = "FACILITY_MAPPING")
public class FacilityMapping implements Serializable{
private static final long serialVersionUID = 1977735642805030781L;
#Id
#GeneratedValue(strategy =GenerationType.SEQUENCE, generator = "FACILITYMAPPINGPKSEQ")
#SequenceGenerator(name="FACILITYMAPPINGPKSEQ", sequenceName = "FACILITY_MAPPING_SEQ")
#Column(name="FACILITY_MAPPING_PK")
private long faciltiyMappingPk;
#Column(name="SYSTEM_TGAD")
private String systemTGAD;
#Column(name="CD_HOME_LOCATION_NAME")
private String cdHomeLocationName;
#Column(name="ACCESS_SYSTEM_LOCATION_NAME")
private String accSysLocName;
#Column(name="FACILITY_ID")
private long facilityId;
#Column(name="DEPARTMENT_ID")
private long departmentId;
#Column (name="CREATION_DATE")
private Date creationDate;
#Column (name="UPDATE_DATE")
private Date updateDate;
#Column (name="CREATED_BY")
private String createdBy;
#Column (name="UPDATED_BY")
private String updatedBy;
public long getFaciltiyMappingPk() {
return faciltiyMappingPk;
}
public void setFaciltiyMappingPk(long faciltiyMappingPk) {
this.faciltiyMappingPk = faciltiyMappingPk;
}
public String getSystemTGAD() {
return systemTGAD;
}
public void setSystemTGAD(String systemTGAD) {
this.systemTGAD = systemTGAD;
}
public String getCdHomeLocationName() {
return cdHomeLocationName;
}
public void setCdHomeLocationName(String cdHomeLocationName) {
this.cdHomeLocationName = cdHomeLocationName;
}
public String getAccSysLocName() {
return accSysLocName;
}
public void setAccSysLocName(String accSysLocName) {
this.accSysLocName = accSysLocName;
}
public long getFacilityId() {
return facilityId;
}
public void setFacilityId(long facilityId) {
this.facilityId = facilityId;
}
public long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(long departmentId) {
this.departmentId = departmentId;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
}
Please suggest some help
Thanks in Advance
By your exception's stack trace, any of your inserting value is above the precision defined on DB column.
And most probable it will be with value generated by sequence. Just check what next value your sequence generating and increase the size a/c to that.

Related Links

javafx.scene.input.KeyCombination for “Crtl + +”
Generics and Callable causing peculiar error
How to handle chunks of a video uploading onto sever and server code written in Spring mvc
Show Dialog “Save To..”
How much overhead is usual while distributing processing?
Default Java annotation values: same instance by specification?
Docker image wrapping for binary blobs
How can I use fields to return subset of Elasticsearch query?
Setting a public int to a random number
Get the value of an XML element in a file folder
check if android device is connected to a network
How do we split the Date in the path?
'Using a for loop to compare if each element of an ArrayList equals a user response
Inputting and saving 2d arrays in Java?
calculate daily average sale from sql table
How to collect actor response on non-actor in akka and to write a Junit

Categories

HOME
winforms
jdo
openstack
isabelle
push-notification
nullpointerexception
read-eval-print-loop
framework7
routes
analysis
webpack-2
sql-server-2016
installshield
flyway4
in-app-purchase
autotools
gitpitch
session-variables
quicklook
mapserver
google-cloud-spanner
fortumo
iron-router
decimal
text-rendering
plunker
xlsxwriter
ehcache
web-sql
format-specifiers
dxf
crosstab
emgucv
smb
apache-commons-io
bootstrap-duallistbox
strncpy
publish
google-cloud-nl
subset-sum
gammu
atl
espeak
vapor
awt
glew
http-redirect
s
skeleton-css-boilerplate
worksheet
pebble-watch
svmlight
cudafy.net
nbconvert
gnome-shell-extensions
instant
passport-google-oauth
radtreelist
slicknav
phishing
mikroc
ctest
mathematica-frontend
django-debug-toolbar
impresspages
plottable.js
bstr
superstack
make-install
hexdump
captivenetwork
embedded-code
service-accounts
mmc
key-management
skos
formatjs
block-device
modalpopup
jscript.net
qcodo
tld
fluentautomation
picturefill
cloud-connect
django-nonrel
hungarian-algorithm
clipper
distutils
cisco-jtapi
google-email-migration
first-responder
hosts-file
dbproviderfactories
ticoredatasync
django-tagging
appender
yslow
createwindow
paster
sortable-tables
dentrix
preference
dbal
perfect-hash
brewmp
mtj

Resources

Encrypt Message