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
mcoch...@redhat.com
(419) 543-0531

Reply via email to