git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unit test advicewith sql-stored


I am having some issues when I am trying to use adviceWith in my unit test
to intercept my sql-stored endpoint.  I am fine with skipping this
endpoint, but haven't been able to get anything to work.  Below is the
exception even when I can see the logging for advice with is there.

*Logging:*
InterceptSendToEndpoint[sql-stored:* -> [To[mock:sql-stored:test],
Transform[constant{Result=SUCCESS}]]],

Exception:
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not
found: <Stored proc name>

*Route:*



*from(ROUTE_SB_AND_RESPOND).routeId(ROUTE_SB_AND_RESPOND_ID).to("sql-stored:<stored
proc name>(VARCHAR ${headers.correlationId})").id("stored-proc")*

*Test:*












* - context.getRouteDefinition(""route-name").adviceWith(context, new
AdviceWithRouteBuilder() { @Override public void configure() throws
Exception {
interceptSendToEndpoint("https4://endpoint1*").to("mock:https4/endpoint1").skipSendToOriginalEndpoint().transform(constant(json));
interceptSendToEndpoint("https4://endpoint2*").to("mock:https4/endpoint2").skipSendToOriginalEndpoint().transform(constant(json2));
//weaveById("stored-proc"); //weaveByToString("sql-stored*");
//.to("mock:sql-stored:test").transform(constant("Result=SUCCESS"));
interceptSendToEndpoint("sql-stored:*").to("mock:sql-stored:test").skipSendToOriginalEndpoint().transform(constant("Result=SUCCESS"));}
});*
Note that the other interceptSendToEndpoints are working properly. Any
thoughts?

Thanks!
Mary Cochran
Red Hat Consulting
mcochran@xxxxxxxxxx
(419) 543-0531


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03306.html on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0007364568{main}( ).../msg03306.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03306.html on line 118
Call Stack
#TimeMemoryFunctionLocation
10.0007364568{main}( ).../msg03306.html:0