ORA-01000: maximum open cursors exceeded

First, assume your schema is called ‘D’. To see the cursor parameters: <pre lang="sql"> show parameter cursor; See this faq for the meaning of these parameters: http://www.orafaq.com/node/758 To check the amount of “open” and “closeable” run: <pre lang="sql"> select a.value, s.username, s.sid from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic# and s.sid=a.sid and b.name = 'opened cursors current' AND username = 'D'; To find the session which is having the largest number of cursors:...

October 13, 2015 · len

For nowhere land

I guess nobody is still using flex, but I still have to debug legacy code and I run into this nice compiler error: [mxmlc] Error: null [mxmlc] [mxmlc] java.lang.NullPointerException [mxmlc] at flex2.compiler.util.QName.hashCode(QName.java:131) [mxmlc] at java.util.HashMap.hash(HashMap.java:366) [mxmlc] at java.util.HashMap.getEntry(HashMap.java:466) [mxmlc] at java.util.HashMap.get(HashMap.java:421) [mxmlc] at flex2.compiler.util.QNameMap.get(QNameMap.java:46) [mxmlc] at flex2.compiler.as3.reflect.Class.getVariable(Class.java:194) [mxmlc] at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.findEvents(DataBindingFirstPassEvaluator.java:702) [mxmlc] at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.findEvents(DataBindingFirstPassEvaluator.java:662) [mxmlc] at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.watchExpression(DataBindingFirstPassEvaluator.java:959) [mxmlc] at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:635) [mxmlc] at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:85) [mxmlc] at macromedia.asc.parser.QualifiedExpressionNode.evaluate(QualifiedExpressionNode.java:43) [mxmlc] at flex2.compiler.as3.binding.DataBindingFirstPassEvaluator.evaluate(DataBindingFirstPassEvaluator.java:436) [mxmlc] at macromedia....

July 8, 2015 · len

Create timelapse movie from shaked photos

The problem consist of creating a timelapse made of photos which have been taken with a camera which has been removed and attached to a tripod during a few months thus creating a lot of shaking. Solution, use hugin to align photos: <pre lang="bash"> #!/bin/bash align_image_stack -v -a$1 -s 2 *.jpg mkdir base for i in $(find . -maxdepth 1 -name "*.tif"); do n=".$(echo $i | cut -f2 -d".").jpg"; convert $i $n && mv $n base; done rm *....

July 5, 2015 · len

Oracle 12c on Ubuntu 14.04 (sort of)

After Oracle 11g very good experience with installing on Ubuntu I had high hopes for 12C also. They crumbled down quite fast. This is the summary of almost 2 days lost trying to install oracle on Ubuntu with the ups and downs. Conclusion First the conclusion: my personal conclusion is that oracle 12c does not work, with an acceptable amount of effort, on Ubuntu 14.04. It should be possible to install it following a guide but it’s by no means comparable to an 11g install....

May 1, 2015 · len

Resize a kvm disk image

1. From the vm, stop the vm: poweroff 2. From the host, resize the disk image: qemu-img resize /virt/disk02.img +50G 3. From the host edit partition table parted /virt/disk02.img GNU Parted 2.3 Using /virt/disk02.img Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free Model: (file) Disk /virt/disk02.img: 107GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 16....

April 29, 2015 · len

The difficult to find bug

After upgrading from 3.4 to 3.6 my JGroups code stopped working. On a 2 nodes setup when the second node tried to join I got the following errors: 2015-04-22 21:38:12,510 INFO [ViewHandler,monalisa,tux-7762|fr.mcc.test.TestJGroups] Detected a change in cluster members: [tux-7762, tux-9846] 2015-04-22 21:38:14,460 WARN [main|org.jgroups.protocols.pbcast.GMS] tux-9846: JOIN(tux-9846) sent to tux-7762 timed out (after 2000 ms), on try 1 2015-04-22 21:38:16,463 WARN [main|org.jgroups.protocols.pbcast.GMS] tux-9846: JOIN(tux-9846) sent to tux-7762 timed out (after 2000 ms), on try 2 2015-04-22 21:38:18,466 WARN [main|org....

April 22, 2015 · len

ojdbc14.jar to ojdbc6.jar migration

Migrating from ojdbc14.jar to ojdbc6.jar is not, as one might think, completely seamless. Here are at least 3 points which required code change: Changes in class hierarchy error: OracleTypes is not public in oracle.jdbc.driver; cannot be accessed from outside package <span class="error">[javac]</span> private static Integer OracleRefCursorType = new Integer(oracle.jdbc.driver.OracleTypes.CURSOR); Behaviour is also not the same: java.sql.SQLException: Could not commit with auto-commit set on at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2356) at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2403) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) at org....

March 25, 2015 · len

Create a database of exif data

Create a database of exif data from photos using pyexiv2 and save it in a sqlite database for futher query: <pre lang="python"> #!/usr/bin/env python import os, sys, pyexiv2, sqlite3 thumbFormats = ('JPG', 'JPEG') rawFormats = ('ARW', 'CR2') formats = thumbFormats + rawFormats tags = ['Exif.Image.LensInfo'] dbFile = 'metadata.db' conn = None cursor = None def parse(dir): cnt = 0 for root, dirs, files in os.walk(dir, topdown=False, followlinks=True): refFiles = map(str.upper, files) for file in files: fullPath = os....

January 18, 2015 · len

Recover your lost apk

#Find the device adb devices #Find the package adb shell pm list packages | grep ro.len #Find the apk path adb shell pm path ro.len.test #Pull the package adb pull /data/app/ro.len.test-3.apk

January 2, 2015 · len

Webex on linux 64 bit

After installing java there are still a lot of issues: java.lang.UnsatisfiedLinkError: /home/gigi/.webex/1324/libdbr.so: /home/gigi/.webex/1324/libdbr.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1088) at DBR.loadNativeDBR(DBR.java:22) at DBR.loadNativeModule(DBR.java:166) at DBR.onDBRMessage(DBR.java:297) at DBR.processMessage(DBR.java:319) at DB.processMessage(DB.java:431) at DB.run(DB.java:397) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java....

November 19, 2014 · len