[
https://issues.apache.org/jira/browse/CAMEL-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
黄颜木 updated CAMEL-8792:
-----------------------
Comment: was deleted
(was: Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor
Elapsed (ms)
[encoderCategory-ro] [encoderCategory-ro] [timer://foo?repeatCount=1
] [ 1256]
[encoderCategory-ro] [to1 ] [sql:select
MAINID,TYPENAME,TYPEPARENT,TYPECATEGORY from spg_material_type whe] [
1162]
[encoderCategory-ro] [log1 ] [log
] [ 81]
Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
Id ID-localhost-localdomain-59312-1432288083959-0-2
ExchangePattern InOnly
Headers
{breadcrumbId=ID-localhost-localdomain-59312-1432288083959-0-1,
CamelRedelivered=false, CamelRedeliveryCounter=0, CamelSqlRowCount=16,
firedTime=Fri May 22 17:48:06 CST 2015}
BodyType java.util.ArrayList
Body [com.ofbizian.CategoryBean@bbf16e,
com.ofbizian.CategoryBean@e79a45, com.ofbizian.CategoryBean@14135cf,
com.ofbizian.CategoryBean@33d7d7,]
]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke
method: .mainid on null due to:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke
method: mainid on null due to:
org.apache.camel.component.bean.MethodNotFoundException: Method with name:
mainid not found on bean: [com.ofbizian.CategoryBean@bbf16e,
com.ofbizian.CategoryBean@e79a45, com.ofbizian.CategoryBean@14135cf,
com.ofbizian.CategoryBean@33d7d7, ]]
at
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:117))
> org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
> invoke method:
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-8792
> URL: https://issues.apache.org/jira/browse/CAMEL-8792
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-sql
> Affects Versions: 2.15.2
> Environment: windows7 jdk1.7
> Reporter: 黄颜木
>
> 1. when just use sqlComponents ,its okay.
> 2. I try to just run the sql one times,so add timer//foo?repeatCount=1
> error happend.
> Stacktrace
> ---------------------------------------------------------------------------------------------------------------------------------------
> org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
> invoke method: .mainid on null due to:
> org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
> invoke method: mainid on null due to:
> org.apache.camel.component.bean.MethodNotFoundException: Method with name:
> mainid not found on bean: [com.ofbizian.CategoryBean@bbf16e,
> my code goes here:
> ----------------------------------------------------------------------------
> ...
> 42
> 43 <bean id="categoryBean" class="com.ofbizian.CategoryBean"/>
> 44
> ...
> 53 <route id="encoderCategory-route">
> 54 <!-- 仅运行一次-->
> 55 <from uri="timer://foo?repeatCount=1"/>
> 56 <to
> uri="sql:{{sql.selectCategory}}?outputClass=com.ofbizian.CategoryBean"/>
> ...
>
> -------------------------------------------------------------------------------
> CategoryBean.java
> 1 package com.ofbizian;
> 2
> 3 public class CategoryBean{
> 4 private String mainid;
> ...
> 8
> 9 public String getMainid(){
> 10 return mainid;
> 11 }
> 12
> 13 public void setMainid(String mainid){
> 14 this.mainid=mainid;
> 15 }
> 16
> ...
> 40 }
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)