[jira] Commented: (CONNECTORS-100) DB lock timeout
[ https://issues.apache.org/jira/browse/CONNECTORS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12914588#action_12914588 ] Andrzej Bialecki commented on CONNECTORS-100: -- Sorry for not reporting this earlier... but setting the timeout to -1 simply causes the process to wait indefinitely, so it doesn't solve the issue. For now the workaround seems to be to avoid accessing api and UI at the same time when using Derby. DB lock timeout --- Key: CONNECTORS-100 URL: https://issues.apache.org/jira/browse/CONNECTORS-100 Project: Apache Connectors Framework Issue Type: Bug Components: Framework core Environment: Running unmodified dist/example from trunk/ using the default configuration. Reporter: Andrzej Bialecki Assignee: Karl Wright Fix For: LCF Release 0.5 When a job is started and running (via crawler-ui) occasionally it's not possible to display a list of running jobs. The problem persists even after restarting ACF. The following exception is thrown in the console: {code} org.apache.acf.core.interfaces.ACFException: Database exception: Exception doing query: A lock could not be obtained within the time requested at org.apache.acf.core.database.Database.executeViaThread(Database.java:421) at org.apache.acf.core.database.Database.executeUncachedQuery(Database.java:465) at org.apache.acf.core.database.Database$QueryCacheExecutor.create(Database.java:1072) at org.apache.acf.core.cachemanager.CacheManager.findObjectsAndExecute(CacheManager.java:144) at org.apache.acf.core.database.Database.executeQuery(Database.java:167) at org.apache.acf.core.database.DBInterfaceDerby.performQuery(DBInterfaceDerby.java:727) at org.apache.acf.crawler.jobs.JobManager.makeJobStatus(JobManager.java:5611) at org.apache.acf.crawler.jobs.JobManager.getAllStatus(JobManager.java:5549) at org.apache.jsp.showjobstatus_jsp._jspService(showjobstatus_jsp.java:316) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at
[jira] Commented: (CONNECTORS-99) REST API serialization inconsistency
[ https://issues.apache.org/jira/browse/CONNECTORS-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12906799#action_12906799 ] Andrzej Bialecki commented on CONNECTORS-99: - Yes, it's a wish :) I can live with the way things are, and I can always check whether it's a naked object or an array... it's just not too friendly for the client. At least it would be good to document this behavior. REST API serialization inconsistency Key: CONNECTORS-99 URL: https://issues.apache.org/jira/browse/CONNECTORS-99 Project: Apache Connectors Framework Issue Type: Wish Components: API Environment: ACF trunk. Reporter: Andrzej Bialecki Priority: Minor There is some inconsistency in REST APIs that makes the returned values more difficult to process than necessary. It boils down to the fact that lists of values are serialized into JSON arrays only when there is more than 1 element on the list, but they are serialized into plain JSON objects when there is 0 or 1 element on the list. Example: * listings of jobs, connectors, connections, repositories etc. all suffer from this symptom: {code} * 1 element: {job:{id:1283811504796,description:job 1 ... * 2 elements: {job:[{id:1283811504796,description:job 1 ... {code} * nested elements, such as e.g. job metadata: {code} 1 element: metadata:{_value_:,_attribute_name:jobKey1,_attribute_value:jobVal1} 2 elements: metadata:[{_value_:,_attribute_name:jobKey1,_attribute_value:jobVal1},{_value_:,_attribute_name:jobKey2,_attribute_value:jobVal2}] {code} In my opinion, in all the above cases the API should always return a JSON array for those elements that can occur with cardinality 1. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.