org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement] with root cause java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

Stack Overflow | Pranav Kumar | 4 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spring MVC +Hibernate - Issue in inserting RoleId in employee table

    Stack Overflow | 4 months ago | Pranav Kumar
    org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement] with root cause java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

    Root Cause Analysis

    1. org.springframework.dao.InvalidDataAccessResourceUsageException

      could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement] with root cause java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

      at oracle.jdbc.driver.T4CTTIoer.processError()
    2. Oracle jdbc
      OraclePreparedStatementWrapper.executeUpdate
      1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
      2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
      5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
      6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      7. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
      8. oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1044)
      9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
      10. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
      11. oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3665)
      12. oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1352)
      12 frames
    3. Hibernate
      AbstractTransactionImpl.commit
      1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
      2. org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
      3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
      4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
      5. org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
      6. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
      7. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
      8. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
      9. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
      10. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
      11. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
      12. org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      13. org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
      13 frames
    4. Spring ORM
      HibernateTransactionManager.doCommit
      1. org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
      1 frame
    5. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
      3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
      4. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
      5. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      5 frames
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
      2 frames
    7. Unknown
      $Proxy63.addEmployee
      1. $Proxy63.addEmployee(Unknown Source)
      1 frame
    8. com.techm.spring
      EmployeeController.addNewEmployee
      1. com.techm.spring.service.EmployeeServiceImpl.addEmployee(EmployeeServiceImpl.java:18)
      2. com.techm.spring.controller.EmployeeController.addNewEmployee(EmployeeController.java:48)
      2 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    10. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
      2 frames
    11. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
      8 frames
    12. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      1 frame
    13. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
      1 frame
    14. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      1 frame
    15. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
      10 frames
    16. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
      3 frames
    17. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      3. java.lang.Thread.run(Unknown Source)
      3 frames