I am able to successfully establish a connection between my java based app and SharePoint 2013 using CMIS. Everything works fine. I am running a CMIS Query. The first time the session is created and I run the query it works fine.
But when I run the same query second time using the already created session, it gives me "Unauthorized" error. I have also verified the same using a standalone Java program . Everytime I create a fresh session and run the query. Then it works.
I am getting this exception randomly.
Hope someone could help me solving this. Thanks!
Exception trace :Exception trace : (At the line when I try to perform any kind of operation on query result (even if I try to get the total number of items in query result))
org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException: Unauthorized
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:460)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:145)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:600)
at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
May be the session is getting expired. Check the session time out. Try re-creating the session when you receive the exception
Related
The following delete statement is working fine in SQL developer but when executed using JDBC api executeUpdate() is not working.
After removing the where clause its working fine.
Delete from Tab1
where TRUNC(CREATED_TS) <= TRUNC(ADD_MONTHS(SYSDATE,-3))
I am not able to figure out the problem as no exception or error is printed.Only code execution is getting hanged at the executeUpdate() method.
Database : Oracle 11g
Java: 1.6
Since there is no Exception or Stack Trace one can only guess.
Probably the Exception is being swallowed in the Java code. Have a look at that and Print it if possible.
where TRUNC(CREATED_TS) <= TRUNC(ADD_MONTHS(SYSDATE,-3)) will prevent index on CREATED_TS (if there was one) from being used and may slow down the process. And a timeout may have occurred. I would check the connection/statement timeout settings on the Java side of the setup.
The issue was not with the delete SQL.The issue was with another session in which there was some uncommitted changes.Because of that the delete SQL from java code was getting hanged indefinitely. On issuing a commit on the another session ,java api executeUpdate() responded and it started working fine.
The question is similar to the issue as in the below link:
Oracle database is hanging infinitly in UPDATE queries
We have been getting the following error from today morning onwards while inserting the contacts through Google API from java. Please find the stack trace below
Exception while adding contact in google....
com.google.gdata.util.ServiceException: Internal Server Error
A temporary internal problem has occurred. Try again later.
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:624)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.Service.insert(Service.java:1409)
at com.google.gdata.client.GoogleService.insert(GoogleService.java:599)
And we are getting this error while inserting at the line
ContactsService.insert(postUrl, contact)
Please reply if anyone knows the solution.
I have raised a CASE with Google. I suggest you all do the same. Here are the details of the case that I raised.
A detailed description of the problem
We have an integration that has been running for 5 years between external database and Google Contacts.
Today we are receiving errors when trying to insert or update Google Contact Records.
Others are also experiencing this issue as outlined at
Exception while adding contact in google.Internal server Error
We have multiple customers that use our marketplace application and they are also having the problem on their Google Domain Instances.
https://chrome.google.com/webstore/detail/ilink-by-i3cloudcom-api/nnidipmclichhijaifbfckcckdpbnmhj
What is the scope of the issue? Were you able to call the API without any errors before?
YES - Our Service has run for 5 years without this issue
** Are all users affected, has anything changed in your internal environment?**
YES - all users are affected across many domains and Google instances. Occurs for all users trying to INSERT/UPDATE contacts.
We are using the .Net client with the following call
Google.Contacts.Contact createdContact = cr.Insert<Google.Contacts.Contact>(new OAuthUri("https://www.google.com/m8/feeds/contacts/default/full/", user, domain), newContact);
The Error that is returned is:
Execution of request failed: https://www.google.com/m8/feeds/contacts/default/full/?xoauth_requestor_id=paul%40i3000.com.au
A temporary internal problem has occurred. Try again later.
This is affecting a lot of our users - please look into this ASAP
I am running a postgres query that takes more than two hours.
This query is executed using hibernate in a java program.
After about 1.5 hours the query stops showing up in the server status in pg_admin.
Since, the query disappeared from the list of active queries on the database, I am expecting a success or a timeout exception. But, I get none.(No exception) and my thread in stuck in the wait state.
I know the query has not finished because it was supposed to do some inserts in a table and I cannot find the expected rows in the table.
I am using pgbouncer for the connection pooling and the query_timeout is disabled.
Had it been a hibernate timeout I should have got an exception.
OS parameters on the DB machine and Client machine(Machine running java program)
tcp_keepalive_time is 7200 (seconds)
tcp_keepalive_intvl = 75
tcp_keepalive_probes = 9 (number of probes)
Both the machines run RHEL operating system.
I am unable to put my finger on the issue.
I found that the issue was caused due to the TCP connection getting dropped and the client still hanging waiting for the response.
I altered the following parameters at OS level:-
/proc/sys/net/ipv4/tcp_keepalive_time = 2700
Default value was 7200.
This causes a keep alive check at every 2700 seconds instead of 7200 seconds.
I am sure you would have already looked at the following resources:
PostgreSQL Timeout Docs
PgBouncer timeout (you already mention).
Hibernate timeout parameters, if any.
Once that is done, (just like triaging permission issues during a new installation, ) I recommend that you try the following SQL, from different scenarios (given below) and ascertain what is actually causing this timeout:
SELECT pg_sleep(7200);
Login to the server (via psql) and see whether this SQL times-out.
Login to the PgBouncer (again via psql) and see whether PgBouncer times out.
Execute this SQL via Hibernate (via PgBouncer), and see whether there is a timeout.
This should allow you to clearly isolate the cause for this.
i'm searching desperately for a working tutorial on how i can install jbpm3 and successfully
run the demo websale process from the jbpm-console.
With jbpm 3.2.9 (and jboss 5.0.1 or 4.2.3, with hypersonic) i am able to log into the jbpm console, but when I try to create and evaluate the Create new web sale order task, i get the following exceptions:
Error
Error completing task: An exception of type "org.jbpm.graph.def.DelegationException" was thrown. The message is: no applicable exception handler found
Closing the database context failed: An exception of type org.hibernate.exception.GenericJDBCException was thrown, with the message: Cannot open connection
Does someone know an jbpm3 tutorial which just works?
ok it seens that it is a problem concerning the hsqldb's missing support for two phase commit transactions. my own processes runned fine as long as i didnt use any timers.
the solution would be to install another db, for example postgres.
Today I managed to recreate the farms with Scalr.net and apparently after a few times restarting tomcat and fixing issues, I get this error once again. The thing is I was using MySQL with a clean install on the entire server, that includes Java 6.1_24, Tomcat 5.5.33, Sakai 2.7.1. The issue I keep running into is user denied when the fact that I have this user in the MySQL Instance, as well giving it complete remote access with sakai#% and even this is not working when it was working about an hour ago since this post was made.
... Continued from above log, everything before logs just fine
2011-03-31 18:31:14,120 WARN main org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy - Could not retrieve default auto-commit and transaction isolation settings
org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool
... continued over 400+ lines...
Here is another error in regards to the access denied error...
2011-03-31 18:31:16,854 WARN main org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: Access denied for user 'sakai'#'ec2-50-17-184-70.compute-1.amazonaws.com' (using password: YES)
.... continued....
I now get this error whenever I startup, this is with a fresh install of tomcat/sakai
SEVERE: Unable to set localhost. This prevents creation of a GUID. Cause was: ec2-72-44-56-167.compute-1.amazonaws.com: ec2-72-44-56-167.compute-1.amazonaws.com
java.net.UnknownHostException: ec2-72-44-56-167.compute-1.amazonaws.com: ec2-72-44-56-167.compute-1.amazonaws.com
(This most recent error (Localhost) was simply fixed by restarting the amazon aws instance. Thankfully) Although I keep getting the same errors even with a fresh install... Almost as if the information is being refreshed from a cache... Or something
As with the last question you posted on this topic, the error message seems very clear: the user 'sakai'#... does not have access to login to the database you have set it up to. I recommend taking a look at the Mysql documentation to understand how to administer the user accounts to find out if you've missed a setting somewhere to allow this account to have access.
I believe I may have figured out how to fix this problem. It has nothing to do with mysql, or the apache server itself. It has to do with the failure of Scalr.net not Initializing the IP or something of that sort. After doing some research I found some issues with the HostInit issues such as....
Cannot deliver message 'HostInit' (message_id: af9dcfdb-a09e-4971-bdb7-7871b3f7e21c) via REST to server '50.17.135.98' (server_id: e49cfec9-5bcb-44d1-bbc5-fde32450fc89). Error: 0 Timeout was reached; connect() timed out! (http://50.17.135.98:8013/control)
Cannot deliver message 'BlockDeviceAttached' (message_id: a153d83f-3d96-4d53-920a-ccb80701675a) via REST to server '50.17.135.98' (server_id: e49cfec9-5bcb-44d1-bbc5-fde32450fc89). Error: 0 Timeout was reached; connect() timed out! (http://50.17.135.98:8013/control)
Cannot deliver message 'HostUp' (message_id: 1adde27c-9982-4551-b266-c3c432d1dd44) via REST to server '50.17.135.98' (server_id: e49cfec9-5bcb-44d1-bbc5-fde32450fc89). Error: 0 Timeout was reached; connect() timed out! (http://50.17.135.98:8013/control)
Cannot deliver message 'HostInit' (message_id: f1aa4b14-ef57-4361-ae56-87702d674b11) via REST to server '50.17.135.98' (server_id: e49cfec9-5bcb-44d1-bbc5-fde32450fc89). Error: 0 Timeout was reached; connect() timed out! (http://50.17.135.98:8013/control)
So what I did was I made a snapshot image of the apache server/mysql etc. and terminated them allowing the recreation of the instance and this managed to solve the problem in one manner.