in attempt install component on karaf following error: caused by: org.apache.camel.camelexception: cannot find routes routebuilder reference: routebuilderref[logparserroutebean]
i've narrowed down conversion error in abstractbeanfactory using simpletypeconverter returned gettypeconverter()
.
given performancelogroute extends org.apache.camel.builder.routebuilder, how can convertion fail??
suggestions, , ideas solution appreciated.
update
package no.osl.cdms.profile.routes; import no.osl.cdms.profile.api.timemeasurement; import no.osl.cdms.profile.factories.entityfactory; import no.osl.cdms.profile.log.timemeasuremententity; import no.osl.cdms.profile.parser.loglineregexparser; import org.apache.camel.builder.routebuilder; import java.util.map; public class performancelogroute extends routebuilder { public static final string performance_log_route_id = "performancelogroute"; private static final string log_directory = "c:/data"; private static final string log_file = "performance.log"; private static final int delay = 0; private loglineregexparser loglineregexparser = new loglineregexparser(); private entityfactory entityfactory = entityfactory.getinstance(); private static final string log_file_endpoint = "stream:file? filename="+log_directory +"/"+log_file+"&scanstream=true&scanstreamdelay=" + delay; private static final string database_endpoint = "jpa:"; @override public void configure() throws exception{ fromf(log_file_endpoint, log_directory, log_file, delay) .convertbodyto(string.class) // converts input string .choice().when(body().isgreaterthan("")) // ignores empty lines .bean(loglineregexparser, "parse") // parses log entry string map .bean(entityfactory, "createtimemeasurement") // parses log entry database format .split(body()) .choice().when(body().isnotnull()) .tof(database_endpoint, body().getclass().tostring()) .routeid(performance_log_route_id); } public string tostring() { return performance_log_route_id; } }
the xml:
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <bean id="logparserroutebean" class="no.osl.cdms.profile.routes.performancelogroute" /> <camelcontext id="cdms-core-camel-context" xmlns="http://camel.apache.org/schema/spring"> <routebuilder ref="logparserroutebean" /> </camelcontext> </beans>
this found @ moment. remember identical caused error, i'll double check in morning.
Comments
Post a Comment