C3P0: Not working when Jconnect4 driver used with Sybase - c3p0

We are trying to upgrade from jconn2 to jconn4 with Sybase 12.x version.
We are using c3p0-0.9.5.2.jar for connection and Preparedstatement pool.
When we use jconn4 we are getting below error
***com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -685: Resource governor for 'prepared statements' exceeded
at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2408)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2394)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:257)***
We are setting below details in code.
ComboPooledDataSource cpds = new ComboPooledDataSource();
cpds.setDriverClass(jdbc_driver);
cpds.setJdbcUrl(m_connURL);
cpds.setUser(m_username);
cpds.setPassword(m_password);
cpds.setMaxPoolSize(30);
cpds.setIdleConnectionTestPeriod(10*60);
cpds.setPreferredTestQuery(m_connection_test);
cpds.setTestConnectionOnCheckin(true);
Could you please share why its not working with Jconn4 properly. Jconn4 is JDBC 4. Is that making any issue here. From the below link we could see that "As of version 0.9.5, c3p0 fully supports the jdbc4 spec."
http://www.mchange.com/projects/c3p0/#what_is
Also when we use Jconn2 with same code,same DB settings and same C3P0 jar works fine. We are not getting any Resource governor error.Please share your thoughts.
There are many places in our product where closing of PreparedStatement is left to C3P0. C3P0 takes care of closing statement when connection is released to Pool.

Related

Couchbase Java SDK times out with BUCKET_NOT_AVAILABLE

I am doing a lookup operation Couchbase Java SDK 3.0.9 which looks like this:
// Set up
bucket = cluster.bucket("my_bucket")
collection = bucket.defaultCollection()
// Look up operation
val specs = listOf(LookupInSpecStandard.get("hash"))
collection.lookupIn(id, specs)
The error I get is BUCKET_NOT_AVAILABLE. Here are is the full message:
com.couchbase.client.core.error.UnambiguousTimeoutException: SubdocGetRequest, Reason: TIMEOUT {"cancelled":true,"completed":true,"coreId":"0xdb7f8e4800000003","idempotent":true,"reason":"TIMEOUT","requestId":608806,"requestType":"SubdocGetRequest","retried":39,"retryReasons":["BUCKET_NOT_AVAILABLE"],"service":{"bucket":"export","collection":"_default","documentId":"export:main","opaque":"0xcfefb","scope":"_default","type":"kv"},"timeoutMs":15000,"timings":{"totalMicros":15008977}}
The strange part is that this code hasn't been touched for months and the lookup broke out of a sudden. The CB cluster is working fine. Its version is
Enterprise Edition 6.5.1 build 6299.
Do you have any ideas what might have gone wrong?
Note that in Couchbase Java SDK 3.x, the Cluster::bucket method returns instantly, and continues opening a bucket in the background. So the first operation you perform - a lookupIn here - needs to wait for that resource opening to complete before it can proceed. It looks like it took a little longer to access the Couchbase bucket than usual and you got a timeout.
I recommend using the Bucket::waitUntilReady method after opening a bucket, to block until the resource opening is complete:
bucket = cluster.bucket("my_bucket")
bucket.waitUntilReady(Duration.ofMinutes(1));
This problem can occur because of firewall. You need to allow these ports.
Client-to-node
Unencrypted: 8091-8097, 9140 [3], 11210
Encrypted: 11207, 18091-18095, 18096, 18097
You can check more from below
https://docs.couchbase.com/server/current/install/install-ports.html#_footnotedef_2

websphere 9.0.0.6 - configuration transaction mode ECI_EXTENDED or ECI_EXTEND

I am using websphere application server 9.0.0.6.
I have configured a cics Ressource Adapter and the connection factory for that, to connect my cics.
For that connection I am using the cicseci-9.0.0.2.rar driver.
I can connect my CICS but I get an Abend Code:
com.ibm.connector2.cics.CICSTxnAbendException: CTG9638E Transaction Abend occurred in CICS. Abend Code=: AZI6, error code: AZI6
at com.ibm.connector2.cics.ECIManagedConnection.checkReturnCode(ECIManagedConnection.java:1643)
at com.ibm.connector2.cics.ECIManagedConnection.call(ECIManagedConnection.java:1442)
at com.ibm.connector2.cics.ECIConnection.call(ECIConnection.java:122)
at com.ibm.connector2.cics.ECIInteraction.execute(ECIInteraction.java:264)
at at.grz.jp.cics.Interaction.executeSequence(Interaction.java:179)
Due to the reason, that I use transaction mode ECI_EXTENDED instead of ECI_NO_EXTEND.
So I am trying to find a possibility to configure that parameter. On websphere I can't find a custom property that could be fit.
Is it possible to control this by my application?
Any suggestions for me?
The transactional controls for requests made over the ECI resources adapter are controlled by the TransactionAttribute of the method containing the ECI call.
By default methods are called with a TransactionAttributeType of REQUIRED which means a new transaction will be started if it doesn’t already exist and this causes the ECI request to be sent with ECI_EXTENDED.
If you set the TransactionAttributeType to NEVER then there will be no transaction when the ECI call is made and the request will be sent with ECI_NO_EXTEND.

com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED exception

I am getting the following error stack trace, when I am trying to connect an SMB share that I connect using the library most of the time, so yes the code mostly works but sometimes not. I could not try anything yet because I do not have any idea about what can be wrong, the share config, the network or the code, no idea.
com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED (0xc00000c9): Authentication failed for 'your-user' using com.hierynomus.smbj.auth.NtlmAuthenticator#565d98da
com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:182)
Here is my SmbConfig and I am using the 0.9.1 of smbj.
SmbConfig config = SmbConfig.builder()
.withMultiProtocolNegotiate(true)
.withSigningRequired(true)
.withDfsEnabled(true)
.build();
Here https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/6ab6ca20-b404-41fd-b91a-2ed39e3762ea it gives more information about 0xC00000C9 - STATUS_NETWORK_NAME_DELETED exception and says
The network name specified by the client has been deleted on the
server. This error is returned if the client specifies an incorrect
TID or the share on the server represented by the TID was deleted.
Should I think something happened to the share on the windows server during the execution of the code?

Agile PLM Unable to extract {0}, see the log for details

I am new to Agile PLM,
I am getting error like Unable to extract {0}, see the log for details message in ATO's.
Can anyone help me to resolve this and root cause for this issue?
Log to Javaclient and try to do Destination reset.
Please check for space on your managed servers. Generally when it is more than 80% occupancy on server this error comes.
Third approach you can do is :
Disable all the Subscribers.
Test destination if it works or not.
4th Approach :
If you are having a clustered environment. You can check ACS configurations :
if ACS.Skips = True in all the server then it's not ideal scenario. It should be true only on one.
Apart from the above suggestions, if your issue is still not resolved, you can try to check if any exception is occurring during extract. I hope, if you are using any clustered environment, ACS is enabled in only one managed server. So expecting that, check out the STDOUT log of the particular managed server (if using WLS) where the ACS is enabled. If the WLS managed servers are installed as Windows Service you need to edit the registry entries for each of them & modify the server start up parameters for each of them to set ACS.Skipserver=true in all but one.
Now, to print the logs, you need to log in to web client, go to tools & settings -> Administration --> Logging configuration --> Set the following entries to DEBUG:
com.agile.acs.PCExtractTask
com.agile.acs.ScheduleMaster
com.agile.acs.ScheduledEventTask
com.agile.extract.server
com.agile.extract.server.ExtractService

SSIS web service task, can't execute web service

I have a web service that is called from my ssis.
Used to work fine in test mode, when moved to live environment I get the error :
[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an object.. at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
We are using a proxy to access the web. Could this be a proxy problem. how to solve ?
Thanks
It was simple proxy issue.
Don't forget to configure the proxy tab in your Http Connection Manager
To help diagnose this, you might try using a script task and adding a Service Reference or Web Reference to the web service. Call the service within a try/catch block and log ex.ToString() if you get an exception. That way, you'll be sure to have all the details, and you can post them here in an edit to your question.
It's also worth noting that SSIS cannot invoke services with spaces in the names. See the following for details:
http://connect.microsoft.com/SQLServer/feedback/details/368606/ssis-web-service-task-cannot-call-services-with-a-space-in-the-name
This answer would have saved me time so I'm adding it in the hope it saves someone else some time.
I had the same problem, except my cause was that I was attempting to pass an integer (Int32) as a web service parameter. It looks like web service parameters in SSIS should always be strings.
I'm using SSIS 2017 and none of the solutions worked for me. But, after changing the SQL Server used by the project, from 2017 to 2016 (or whatever version of SQL is installed), I was able to run the WebService task successfully.
Hope will help somebody.