I have sucessfully connected database named 'sports.db' using db Navigator tool of sonic workbench. It works fine while I'm preparing query like 'select ccustomer.ccusm, ccustomer.ccustAddress from PUB.ccustomer where ccustomer.ccusn = 1'. But, when I'm going to test query as 'select ccustomer.ccusm, ccustomer.ccustAddress from PUB.ccustomer where ccustomer.ccusn = @Custnum' and going to test database operation using some scenario then it throws error as,
Error Message: | Service call failed. (Error Code:XQ_SERVICE_EXCEPTION) | ||
Step Name: | Step-1 | Service: | dev.DBService |
Process Name: | Top Process: | ||
Container Name: | TESTContainer | Host: | jv72-dinesh |
Details: | com.sonicsw.esb.service.rdbms.DatabaseServiceException: Service call failed. at com.sonicsw.esb.service.rdbms.DatabaseService.getConnectionFromPool(DatabaseService.java:774) at com.sonicsw.esb.service.rdbms.DatabaseService.service(DatabaseService.java:717) at com.sonicsw.xqimpl.service.debug.DebugServiceInterceptor.intercept(DebugServiceInterceptor.java:118) at com.sonicsw.xqimpl.service.XQServiceChain$XQInterceptorServiceWrapper.intercept(XQServiceChain.java:487) at com.sonicsw.xqimpl.service.XQServiceChain$XQInterceptorServiceWrapper.service(XQServiceChain.java:476) at com.sonicsw.xqimpl.service.XQServiceChain.service(XQServiceChain.java:152) at com.sonicsw.xqimpl.service.ServiceMessageHandler.callService(ServiceMessageHandler.java:477) at com.sonicsw.xqimpl.service.ServiceMessageHandler.handleMessage(ServiceMessageHandler.java:204) at com.sonicsw.xqimpl.service.XQDispatcher.onMessage(XQDispatcher.java:434) at com.sonicsw.esb.itinerary.model.EsbStepNode.doExecute(EsbStepNode.java:232) at com.sonicsw.esb.itinerary.model.EsbStepNode.execute(EsbStepNode.java:144) at com.sonicsw.esb.process.model.impl.DefaultActivityNode.offerIncoming(DefaultActivityNode.java:139) at com.sonicsw.esb.itinerary.engine.ItineraryEngine.executeProcess(ItineraryEngine.java:325) at com.sonicsw.esb.itinerary.engine.ItineraryEngine.handleToken(ItineraryEngine.java:188) at com.sonicsw.esb.itinerary.engine.ItineraryEngine.handleMessage(ItineraryEngine.java:178) at com.sonicsw.xqimpl.endpoint.container.EndpointContextContainer.onMessage(EndpointContextContainer.java:94) at com.sonicsw.xq.connector.jms.JMSEndpoint$JMSEndpointListener.onMessage(JMSEndpoint.java:577) at progress.message.jimpl.Session.deliver(Session.java:3057) at progress.message.jimpl.Session.run(Session.java:2463) at progress.message.jimpl.Session$SessionThread.run(Session.java:2852) Caused by: java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver]Login has timed out. at com.ddtek.jdbc.openedgebase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseExceptions40.createSQLException(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseExceptions.createException(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseExceptions.getException(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseConnectionStartup.<init>(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseConnection$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.ddtek.jdbc.openedgebase.BaseConnection.setupImplConnection(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseConnection.open(Unknown Source) at com.ddtek.jdbc.openedgebase.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:164) at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:134) at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:749) at org.apache.commons.dbcp.datasources.SharedPoolDataSource.registerPool(SharedPoolDataSource.java:202) at org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:159) at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:669) at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:653) at com.sonicsw.esb.service.rdbms.connections.DBConnectionPools.getConnectionFromPool(DBConnectionPools.java:205) at com.sonicsw.esb.service.rdbms.DatabaseService.getConnectionFromPool(DatabaseService.java:766) ... 19 more |
What could be the solution?
Regards,
Dinesh
Dinesh,
The line in exception "Caused by: java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver]Login has timed" suggests that the dev.DBService might not have configured with the right db details and credentials.
Can you re-check, if ther service is rightly configured with the required db details?
Regards,
Kiran
Hi Kiran,
Here I have attached my DB configuration files in png.
Please find the attachment.
Thank you,
Dinesh
Hi Dinesh,
From the screens what i see is that your dev.DBService is configured with the database named "sports" where as with the DB Navigator you are actually working with "sports.db".
Is that intentional or by mistake you configured with a wrong database name. Can you double check once?
Regards,
Kiran
We could also observe that the port number configured for dev.DB Service and DB Navigator is also different. Could you pls check that too?
Regards,
Neha
Hi Kiran and Neha,
As you mentioned, I have changed both database name and port number. Which you can find in the attachement.
When I execute query like "select ccustomer.ccusm, ccustomer.ccustAddress from PUB.ccustomer where ccustomer.ccusn = 1;" then it works fine but when try to execute db operation using query "select ccustomer.ccusm, ccustomer.ccustAddress from PUB.ccustomer where ccustomer.ccusn = @Custnum;" using some scenario then the error is same as previous.
But I can't find the solution.
What is the problem?
Here is the output,
Error Message: | Service call failed. (Error Code:XQ_SERVICE_EXCEPTION) | ||
Step Name: | Step-1 | Service: | dev.DBService |
Process Name: | Top Process: | ||
Container Name: | dev_ESBCore | Host: | jv72-dinesh |
Details: | com.sonicsw.esb.service.rdbms.DatabaseServiceException: Service call failed. |
Thank you,
Dinesh
Hi Dinesh,
The DBNavigator is using the datadirect driver of open edge and the DBService (in SMC) is using the sonic version of the OpenEdge driver. I have to verify the sonic version of the open edge driver, will have to tryout myself first.
To quick fix your problem can you try configuring the DBService using the data direct driver of open edge.
JDBC Driver - com.ddtek.jdbc.openedge.OpenEdgeDriver
Connection - jdbc:datadirect:openedge://localhost:15003;databaseName=sports.db
Also configure the requried credentails. After doing this, restart your container that is deploying the DBService.
Then, try your use-case and see if that works.
Regards,
Kiran
Hi Kiran,
I tried the option as you provided but still not working. Same exception has occured.
JDBC Driver - com.ddtek.jdbc.openedge.OpenEdgeDriver
Connection - jdbc:datadirect:openedge://localhost:15003;databaseName=sports.db
Any other alternative to work with it?
Thank you,
Dinesh
Hi Dinesh,
I tested with both the drivers that is "com.sonicsw.jdbc.openedge.OpenEdgeDriver" and the "com.ddtek.jdbc.openedge.OpenEdgeDriver". I am able to run a scenario of an ESBDB file using the DB Service configurations. Attached screen shots of my configurations.
Something must be wrong from your end, you can check if the DB is actually up and running. Also, you can increase the "timeout" of your DB Service - redeploy your service and run. See if that helps in anyway.
If things does not turn out well, then try the following.
(1) Keep things simple, deploy your dev.DBService in one container, i saw in one of the screens that it has been deployed in two containers. (i dont think that is causing any trouble though)
(2) Enable tracing on the container. Go to SMC -> Manage Tab -> Find your MFContainer -> Choose your ESB Container -> Right click properties dialog -> Tracing Tab -> check Verbose, Enable Debug Messages, ESB Service Tracing options. (attached a screen shot)
(3)The container must be running when you are enabling tracing and the next restart would wipe out your tracing options in this case.There is another mechanism to permanently add that.
(4)Run your ESBDB, make sure you selected the right ESB Service Address i.e., dev.DBService in your case.
(5)Hit the run button from your ESBDB scenarios page, if you have deployed your esb service in dev_ESBCore - see its error log, find out if you have any hints to fix the problem.
OR attach your log file here, i will take a look.
Regards,
Kiran
Thank you so much Kiran for your help. Now it works fine when I used same container for db service and project.
Best Regards,
Dinesh