Unable to run Adapter Service using Stored procedure

Hi All,

I getting the below issue when trying to run the JDBC adpater:

com.wm.pkg.art.error.DetailedServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service AIA_GetCustomerDetails.GetCustomerDetails_DataService:GetCustomerDetails_AdapterQuery.
[ADA.1.316] Cannot execute the SQL statement "call db_cus.po_pstp_cup_contact_list_new (?, ?) ". "
(ZZZZZ/509) User name ‘db_cus’ not found.
"
User name ‘db_cus’ not found.

at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:122)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:113)
at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:100)
at com.wm.pkg.art.ns.AdapterServiceNode.invokeService(AdapterServiceNode.java:412)
at com.wm.pkg.art.ns.ARTNSService.baseInvoke(ARTNSService.java:53)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:646)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:299)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:545)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:382)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:215)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:257)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:520)
at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:437)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:331)
at wm.server.flowdebugger.stepFlow(flowdebugger.java:992)
at wm.server.flowdebugger.execute(flowdebugger.java:508)
at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:414)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:646)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:299)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:545)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:382)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:156)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:173)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:397)
at com.wm.util.pool.PooledThread.run(PooledThread.java:127)
at java.lang.Thread.run(Thread.java:745)

Caused by: com.wm.adk.error.AdapterServiceException: [ADA.1.316] Cannot execute the SQL statement "call db_cus.po_pstp_cup_contact_list_new (?, ?) ". "
(ZZZZZ/509) User name ‘db_cus’ not found.
"
User name ‘db_cus’ not found.

at com.wm.adk.error.AdapterException.<init>(AdapterException.java:299)
at com.wm.adk.WmAdapter.createAdapterException(WmAdapter.java:182)
at com.wm.adapter.wmjdbc.connection.ConnectionInfo.handleSQLException(ConnectionInfo.java:821)
at com.wm.adapter.wmjdbc.connection.ConnectionInfo.handleSQLException(ConnectionInfo.java:832)
at com.wm.adapter.wmjdbc.services.ProcedureCaller.invokeProcedure(ProcedureCaller.java:381)
at com.wm.adapter.wmjdbc.services.StoredProcedure.execute(StoredProcedure.java:97)
at com.wm.adk.cci.interaction.WmInteraction.execute(WmInteraction.java:76)
at com.wm.pkg.art.ns.AdapterServiceNode.invokeService(AdapterServiceNode.java:362)
... 42 more

Caused by: java.sql.SQLException: User name ‘db_cus’ not found.

at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeLoop(Unknown Source)
at com.sybase.jdbc4.jdbc.SybCallableStatement.execute(Unknown Source)
at com.wm.adapter.wmjdbc.services.ProcedureCaller.invokeProcedure(ProcedureCaller.java:300)
... 45 more

have created the adapter service using stored procedure template.Have configured the procedure name,parameters and resultset and using Sybase database. We have given only few parameters in the resultset though the DB contains more attribute values.
db_cus is the Catalog name and we are trying to access the procedure name in it (po_pstp_cup_contact_list_new)which has the table.

Can someone please help me on this.

Hi Swaathi,

what is your Adapter Version on which IS version?

Any Fixes applied to the ART or the Adapter?

Regards,
Holger

Hi Holger,

JDBC adapter version is 9.10 and IS version is 9.12.

So far no fixes have been applied to ART or the Adapter.

Regards,
Swaathi

Hi Swaathi,

please appliy latest Fix for JDBC Adapter 9.10 (which is Fix2 currently).


JDB-1575 (JDBC_9.10_Fix1)

In webMethods Adapter for JDBC 9.10, an error occurs when stored
procedure is executed using the StoredProcedure service
template in Sybase database.

When you run the StoredProcedure adapter services using connection
with local transaction, and the stored procedure which is executed
also contains transaction, then the following error message
is displayed:
"TRUNCATE TABLE command not allowed within multi-statement transaction"

This issue is resolved.

Additionally check for the driver version for sybase databse for latest version.

Regards,
Holger

Hi Holger,

Thanks for the reply.But the fix which you have stated above is for the error “TRUNCATE TABLE command not allowed within multi-statement transaction”

But the error i get is different as mentioned above.Can you please clarify on this.

Also the jdbc driver which we use for sybase is com.sybase.jdbc4.jdbc.SybDataSource

regards,
Swaathi

Hi Swaathi,

applying the Fix might be solving yoiur issue as well.

Sometimes these things get solved “under the hood”.

If you are unsure you might want to open an incident in Empower to get SAG Support involved.

Regards,
Holger

@Swati,

Its always a best practice to have the latest fixes installed on your IS and JDBC Adapter as and when the fixes are publicly available. Kindly get in touch with your Dev Ops team for this.

Also can you check if you are having an issue seeing the database fields when using the schema in the JDBC Adapter service.
You may have to manually select the schema name.

This might not be a webMethods issue, but more of permission or access issue set to the current schema that you are using in the adapter connection. Kindly involve DBA for further investigation.

1 Like