myBatis Callable Statement - java Date Issue - Upgrade to 3.2.5 Issue

212 views
Skip to first unread message

Chirag Jhaveri

unread,
Feb 20, 2014, 7:48:16 PM2/20/14
to mybati...@googlegroups.com

I was using mybatis-3.1.1 and there was no issue in the following code.

DAO Implementation

@Override
public ItunesPriorityReportDates getWeeklyPriorityDates(Date reportRunDate){

    ItunesPriorityReportDates itunesPriorityReportDates = new ItunesPriorityReportDates();
    Map<String,Object> weeklyPriorityDatesParamMap = new HashMap<>();

    weeklyPriorityDatesParamMap.put("reportRunDate", reportRunDate);

    log.debug("Report Run Date : " + reportRunDate);

    this.getItunesAnalysisMapper().getWeeklyPriorityDates(weeklyPriorityDatesParamMap);

    itunesPriorityReportDates.setAriaWeekStartDate((Date)weeklyPriorityDatesParamMap.get("ariaWeekStartDate"));
    itunesPriorityReportDates.setAriaWeekEndDate((Date)weeklyPriorityDatesParamMap.get("ariaWeekEndDate"));
    itunesPriorityReportDates.setitunesAccountPeriodStartDate((Date)weeklyPriorityDatesParamMap.get("itunesAccountPeriodStartDate"));
    itunesPriorityReportDates.setitunesAccountPeriodEndDate((Date)weeklyPriorityDatesParamMap.get("itunesAccountPeriodEndDate"));

    return itunesPriorityReportDates;

}

Mapper

public ItunesPriorityReportDates getWeeklyPriorityDates(Map<String,Object> weeklyPriorityDatesParamMap);

Mapper XML

<select id="getWeeklyPriorityDates" parameterType="java.util.HashMap" statementType="CALLABLE">
    {CALL external_reporting.itunes_sales.get_weekly_priority_dates(#{reportRunDate                 mode=IN, jdbcType=DATE},
                                                                    #{ariaWeekStartDate             mode=OUT, jdbcType=DATE},
                                                                    #{ariaWeekEndDate               mode=OUT, jdbcType=DATE},
                                                                    #{itunesAccountPeriodStartDate  mode=OUT, jdbcType=DATE},
                                                                    #{itunesAccountPeriodEndDate    mode=OUT, jdbcType=DATE}
                                                                    )
    }
</select>

After upgrading to mybatis-3.2.5 now it is passing null as DATE to Oracle procedure.

Can you please help me with this? Not sure whether I have to update my mapper XML and include something to tell it to parse correctly.

I am using java.util.Date in java.

Thanks Chirag




Eduardo Macarron

unread,
Feb 21, 2014, 12:00:11 PM2/21/14
to mybati...@googlegroups.com
Hi Chirag. I am not aware of any change in part and anyway 3.2.5 should be compatible with old versions so if something changed it will probably be a bug.

Can you please enable logging and post it?


--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chirag Jhaveri

unread,
Feb 21, 2014, 6:02:44 PM2/21/14
to mybati...@googlegroups.com
Hi,

I have looked at further and it doesn't look like issue with the DATE. It is something to do with the fact that I am using hashMap as parameterType.

However, when I ran one more callable statement which only had one output parameter it worked fine in with the new version. But also ran one more callable oracle stored procedure which has none output (only input) parameter. And it failed.

After investigating further, it appears that the JAVA doesn't raise any error. However it passes NULL instead of the value of the HashMap to Oracle. And that the reason the oracle stored procedure returns error due to null value. 
So the  problem is somethere mybatis not correctly converting hashMap value. It is thinking that they are null.

I have checked the DAO and it is passing correct value to the mapper.

Not sure how to actual myBatis logging.

See the below logs.

2014-02-22 09:56:06,402 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - Creating a new SqlSession
2014-02-22 09:56:06,403 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6ca4b6f2] was not registered for synchronization because synchronization is not active
2014-02-22 09:56:06,405 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - JDBC Connection [jdbc:oracle:thin:@**.**.**.**:1521:MYDB, UserName=MYUNAME, Oracle JDBC driver] will not be managed by Spring
2014-02-22 09:56:06,405 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - ooo Using Connection [jdbc:oracle:thin:@**.**.**.**:1521:MYDB, UserName=MYUNAME, Oracle JDBC driver]
2014-02-22 09:56:06,405 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - ==>  Preparing: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?, ?, ?, ?, ? ) } 
2014-02-22 09:56:06,414 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - ==> Parameters: null, null, null, null, null
2014-02-22 09:56:06,631 DEBUG [http-apr-8080-exec-1] (Slf4jLoggerImpl.java:46) - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6ca4b6f2]
Feb 22, 2014 9:56:06 AM com.sun.faces.application.ActionListenerImpl processAction
SEVERE: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIData.broadcast(UIData.java:912)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
at $Proxy6.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at $Proxy22.getWeeklyPriorityDates(Unknown Source)
at com.warnermusic.exr.db.impl.ItunesAnalysisDaoImpl.getWeeklyPriorityDates(ItunesAnalysisDaoImpl.java:151)
at com.warnermusic.exr.service.impl.ItunesAnalysisServiceImpl.getWeeklyPriorityDates(ItunesAnalysisServiceImpl.java:83)
at com.warnermusic.exr.client.managedbeans.ItunesAnalysisMb.generateWeeklyPriorityReport(ItunesAnalysisMb.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 29 more
Caused by: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:55)
at $Proxy39.execute(Unknown Source)
at org.apache.ibatis.executor.statement.CallableStatementHandler.query(CallableStatementHandler.java:63)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
... 45 more

Feb 22, 2014 9:56:06 AM com.sun.faces.lifecycle.InvokeApplicationPhase execute
WARNING: #{itunesAnalysisMb.generateWeeklyPriorityReport}: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

javax.faces.FacesException: #{itunesAnalysisMb.generateWeeklyPriorityReport}: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIData.broadcast(UIData.java:912)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
... 28 more
Caused by: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
at $Proxy6.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at $Proxy22.getWeeklyPriorityDates(Unknown Source)
at com.warnermusic.exr.db.impl.ItunesAnalysisDaoImpl.getWeeklyPriorityDates(ItunesAnalysisDaoImpl.java:151)
at com.warnermusic.exr.service.impl.ItunesAnalysisServiceImpl.getWeeklyPriorityDates(ItunesAnalysisServiceImpl.java:83)
at com.warnermusic.exr.client.managedbeans.ItunesAnalysisMb.generateWeeklyPriorityReport(ItunesAnalysisMb.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 29 more
Caused by: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:55)
at $Proxy39.execute(Unknown Source)
at org.apache.ibatis.executor.statement.CallableStatementHandler.query(CallableStatementHandler.java:63)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
... 45 more

Feb 22, 2014 9:56:06 AM com.warnermusic.wis.util.JsfPhaseListener afterPhase
INFO: INVOKE_APPLICATION 5
javax.faces.FacesException: #{itunesAnalysisMb.generateWeeklyPriorityReport}: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:90)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.faces.FacesException: #{itunesAnalysisMb.generateWeeklyPriorityReport}: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIData.broadcast(UIData.java:912)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
... 23 more
Caused by: javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
... 28 more
Caused by: org.springframework.jdbc.UncategorizedSQLException: 
### Error querying database.  Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

### The error may exist in file [D:\workspace\WMA_Projects\WMAWeb\build\web\WEB-INF\classes\dbmappings\ItunesAnalysisMapper.xml]
### The error may involve com.warnermusic.exr.db.mappers.ItunesAnalysisMapper.getWeeklyPriorityDates-Inline
### The error occurred while setting parameters
### SQL: {CALL external_reporting.itunes_sales.get_weekly_priority_dates(?,                                                                         ?,                                                                         ?,                                                                         ?,                                                                         ?                                                                         )         }
### Cause: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

; uncategorized SQLException for SQL []; SQL state [72000]; error code [20000]; ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1
; nested exception is java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
at $Proxy6.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at $Proxy22.getWeeklyPriorityDates(Unknown Source)
at com.warnermusic.exr.db.impl.ItunesAnalysisDaoImpl.getWeeklyPriorityDates(ItunesAnalysisDaoImpl.java:151)
at com.warnermusic.exr.service.impl.ItunesAnalysisServiceImpl.getWeeklyPriorityDates(ItunesAnalysisServiceImpl.java:83)
at com.warnermusic.exr.client.managedbeans.ItunesAnalysisMb.generateWeeklyPriorityReport(ItunesAnalysisMb.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 29 more
Caused by: java.sql.SQLException: ORA-20000: GET_WEEKLY_PRIORITY_DATES: ORA-20008: Invalid account period
ORA-06512: at "EXTERNAL_REPORTING.ITUNES_SALES", line 211
ORA-06512: at line 1

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:55)
at $Proxy39.execute(Unknown Source)
at org.apache.ibatis.executor.statement.CallableStatementHandler.query(CallableStatementHandler.java:63)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
... 45 more

Guy Rouillier

unread,
Feb 21, 2014, 6:10:50 PM2/21/14
to mybati...@googlegroups.com
On 2/21/2014 6:02 PM, Chirag Jhaveri wrote:
>
> Not sure how to actual myBatis logging.

See section titled "Logging Configuration" in the MyBatis User's Guide.
This will help you see what values MyBatis is passing to the database
for each parameter.

--
Guy Rouillier

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Guy Rouillier

unread,
Feb 21, 2014, 11:50:16 PM2/21/14
to mybati...@googlegroups.com
On 2/20/2014 7:48 PM, Chirag Jhaveri wrote:
> I was using mybatis-3.1.1 and there was no issue in the following code.

> public ItunesPriorityReportDates getWeeklyPriorityDates(Map<String,Object> weeklyPriorityDatesParamMap);
>
> I am using java.util.Date in java.

I just coded up a simple example that simply echoes back the date I give it:

create procedure echoDate
(
inputDate IN DATE,
returnDate OUT DATE
)
is
begin
returnDate := inputDate;
end;
/

It's working fine for me with both 3.1.1 and 3.2.5. Why do you have
your HashMap declared like this:

Map<String,Object> weeklyPriorityDatesParamMap = new HashMap<>();

All your parameters are Date, so declare it like this instead and see if
it makes any difference:

Map<String,Date> weeklyPriorityDatesParamMap = new HashMap<String,Date>();

Eduardo Macarron

unread,
Feb 22, 2014, 1:09:53 PM2/22/14
to mybati...@googlegroups.com
Thank you very much Guy. Can you share that test somehow, so that Chirag can try to make it fail? 


--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user+unsubscribe@googlegroups.com.

Guy Rouillier

unread,
Feb 22, 2014, 5:05:56 PM2/22/14
to mybati...@googlegroups.com
Certainly. I expanded my test stored proc to have 3 in parameters and 3
out parameters, all dates, to more closely reflect what Chirag is doing.
Eclipse project is attached. This is my playground project that I use
to test various features, so just ignore the irrelevant parts. Create
the echoDate stored proc in database/create_schema_oracle.sql. Then
execute Main.java in the test directory.

I removed the JAR files from the attachment to make it more easily
downloaded. Here is what I'm using:

commons-lang-2.4.jar
log4j-1.2.11.jar
mybatis-3.1.1.jar
mybatis-3.2.5.jar
ojdbc6.jar

On 2/22/2014 1:09 PM, Eduardo Macarron wrote:
> Thank you very much Guy. Can you share that test somehow, so that Chirag
> can try to make it fail?
>
>
> 2014-02-22 5:50 GMT+01:00 Guy Rouillier <guy.ro...@gmail.com
> <mailto:guy.ro...@gmail.com>>:
>
> On 2/20/2014 7:48 PM, Chirag Jhaveri wrote:
>
> I was using mybatis-3.1.1 and there was no issue in the
> following code.
>
>
> public ItunesPriorityReportDates
> getWeeklyPriorityDates(Map<__String,Object>
> send an email to mybatis-user+unsubscribe@__googlegroups.com
> <mailto:mybatis-user%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mybatis-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


mybatis_contact_manager_cli_ssm.zip

Eduardo Macarron

unread,
Feb 23, 2014, 3:33:15 AM2/23/14
to mybati...@googlegroups.com
I got it. It is an interesting finding. Have a look at the expression you posted.

#{reportRunDate mode=IN, jdbcType=DATE},
There is no comma separating the property name and the mode!

What is happening is that 3.0 and 3.1 admitted using an space as a separator, though that was undocumented, untested and at least in my case unknown :)

3.2 parsing code was improved and now it supports a well defined grammar:

 * Inline parameter expression parser. Supported grammar (simplified):
 * 
 * <pre>
 * inline-parameter = (propertyName | expression) oldJdbcType attributes
 * propertyName = /expression language's property navigation path/
 * expression = '(' /expression language's expression/ ')'
 * oldJdbcType = ':' /any valid jdbc type/
 * attributes = (',' attribute)*
 * attribute = name '=' value
 * </pre>

And the space is not a valid separator (so properties can in fact be called "input date").

This change was unwanted but was introduced in 3.2 one year ago so I am afraid we  cannot go back.

I hope you just missed the comma and that was not intentional. Sorry!




2014-02-22 23:05 GMT+01:00 Guy Rouillier <guy.ro...@gmail.com>:
Certainly.  I expanded my test stored proc to have 3 in parameters and 3 out parameters, all dates, to more closely reflect what Chirag is doing.  Eclipse project is attached.  This is my playground project that I use to test various features, so just ignore the irrelevant parts.  Create the echoDate stored proc in database/create_schema_oracle.sql.  Then execute Main.java in the test directory.

I removed the JAR files from the attachment to make it more easily downloaded.  Here is what I'm using:

commons-lang-2.4.jar
log4j-1.2.11.jar
mybatis-3.1.1.jar
mybatis-3.2.5.jar
ojdbc6.jar


On 2/22/2014 1:09 PM, Eduardo Macarron wrote:
Thank you very much Guy. Can you share that test somehow, so that Chirag
can try to make it fail?


2014-02-22 5:50 GMT+01:00 Guy Rouillier <guy.ro...@gmail.com

For more options, visit https://groups.google.com/groups/opt_out.


--
Guy Rouillier


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user+unsubscribe@googlegroups.com.

Chirag Jhaveri

unread,
Feb 23, 2014, 5:18:00 PM2/23/14
to mybati...@googlegroups.com
Brilliant.

Space thing worked perfectly fine. I just added comma as a separator after name and now it works. I believe I just looked at some old examples online and they didn't use space after name. So even I didn't use that.

Thanks a lot for your help guys.

Thanks for debugging this for me Eduardo. Also thanks for everyone else who replied and tried to solve this.


To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages