Monday, July 07, 2014

LoadRunner 11.52 and weird compilation issues

I've had a perfectly working LoadRunner Java over HTTP script for ages. This stopped working once it was tried on 11.50 and 11.52.

It "compiles" inside the VUGen but fails to run inside VUGen or Controller and produces the following error:

Error: at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at DummyClassLoader.loadClass(DummyClassLoader.java:15)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at ScriptFactory.getScriptObject(ScriptFactory.java:51)
Error: Can't create script object.
Error: Exception was raised when calling abort-cleanup function in extension java_int.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION
Warning: Extension trans.dll reports error -1 on call to function ExtAbortCleanup
Notify: Found jdk version: 1.6.0.
Notify: classpath=C:\LoadRunnerScripts\FUBAR\;c:\hp\loadrunner\classes\srv;c:\hp\loadrunner\classes;C:\LoadRunnerScripts\WebClasses\fubar\Arialuni.jar;C:\LoadRunnerScripts\WebClasses\fubar\commons-collections-2.1.jar;C:\LoadRunnerScripts\WebClasses\myclient.jar;C:\LoadRunnerScripts\WebClasses\fubar\commons-logging-1.0.2.jar;C:\LoadRunnerScripts\WebClasses\fubar\djt.jar;C:\LoadRunnerScripts\WebClasses\fubar\itext-1.3.1.jar;C:\LoadRunnerScripts\WebClasses\fubar\iTextAsian.jar;C:\LoadRunnerScripts\WebClasses\fubar\jasperreports-3.0.0.jar;C:\LoadRunnerScripts\WebClasses\fubar\jcommon-1.0.0.jar;C:\LoadRunnerScripts\WebClasses\fubar\jfreechart.jar;C:\LoadRunnerScripts\WebClasses\fubar\JScript.jar;C:\LoadRunnerScripts\WebClasses\fubar\poi-3.0.1-FINAL-20070705.jar;;;;c:\hp\loadrunner\lib\xstream-1.3.jar;c:\hp\loadrunner\lib\xpp3-1.1.4c.jar
Notify: Path=C:\Java\jdk1.6.0_75\jre\bin\client;C:\HP\LOADRU~1\bin;C:\HP\LoadRunner\Bin;C:\HP\LoadRunner\Bin\tulip\bin;C:\Java\jdk1.6.0_75\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\HP\LoadRunner\strawberry-perl\perl\bin
Notify: VM Params: .
Error: at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at DummyClassLoader.loadClass(DummyClassLoader.java:15)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at ScriptFactory.getScriptObject(ScriptFactory.java:51)


Error: Can't create script object.
Error: Exception was raised when calling abort-cleanup function in extension java_int.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION
Warning: Extension trans.dll reports error -1 on call to function ExtAbortCleanup




After raising a call with HP, their suggestion was to move all of the <Vector> and List declarations to global sections, not inside methods.

Like this:
@@ -436,14 +437,27 @@ public class Actions {
         *
         * @return
         * @throws Throwable
-        */
+       */             
+      
+       Vector<Vector<String>> pterryPack = null;
+        Vector<Vector<String>> ankhmorphocContents;
+        //Vector<String> vetrinari_results;
+        Vector<String> fubarDetails;
+        Vector<String> snafuDetails;
+        Vector<String> fibbsDetails;
+        Vector<String> gremlinsDetails;
+        Vector<String> rincewindConfig;
+        Vector<Vector<String>> ConanDetails;
+        Vector<Vector<String>> unseenuniversityDetails;
+        Vector<Vector<String>> discworldData;

OK, in many ways my Vector etc. declarations are a bit funny wrt to the modern Java coding standards but it is the way the legacy code I work with is written so I shouldn't get the flack. The funny thing is it works with Java 1.6 and LoadRunner 11.0 but not 11.52, it -looks- like a classpath issue based on various discussions on the net but it isn't. It looks like the parser LoadRunner uses to create the runtime classes for data injection can't handle such Vector and List declarations (legitimately) peppered around the code and must observe them up front and prepare itself.

Beware.

Tuesday, July 01, 2014

screen stuff

Man screen makes you learn stuff.

hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

Ubuntu 14.04 and Oracle 12c

I followed this as much as possible although the way he documents it is a bit cumbersome, although it's OK if you want to find out exactly why he's done things.

Additional packages:
apt-get install lib32z1-dev libc6-dev-i386 elfutils libaio1 libaio-dev libstdc++6-4.4-dev numactl pdksh sysstat unixODBC-dev unixODBC build-essential libaio1 gawk ksh libmotif3 alien libtool

Instead of pages long doc, here's a quick diff between the files modified:

diff ins_net_server.mk  $ORACLE_HOME/network/lib/ins_net_server.mk
29c29
<       $(TNSLSNR_LINKLINE)
---
>       $(TNSLSNR_LINKLINE) -lnnz12 -lons


diff ins_rdbms.mk $ORACLE_HOME/rdbms/lib/ins_rdbms.mk
865c865
<       $(ORAPWD_LINKLINE)
---
>       $(ORAPWD_LINKLINE) -lnnz12
883c883
<       $(PLSHPROF_LINKLINE)
---
>       $(PLSHPROF_LINKLINE) -lons
901c901
<       $(RMAN_LINKLINE)
---
>       $(RMAN_LINKLINE) -lons
914c914
<       $(EXTPROC_LINKLINE)
---
>       $(EXTPROC_LINKLINE) -lagtsh
941c941
<       $(HSOTS_LINKLINE)
---
>       $(HSOTS_LINKLINE) -lagtsh
1067c1067
<       $(TG4PWD_LINKLINE)
---
>       $(TG4PWD_LINKLINE) -lnnz12



diff env_rdbms.mk $ORACLE_HOME/rdbms/lib/env_rdbms.mk
2922c2922
< ORACLE_LINKLINE=$(ORACLE_LINKER) $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) \
---
> ORACLE_LINKLINE=$(ORACLE_LINKER) -Wl,--no-as-needed $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) \
2943c2943
< DBV_LINKLINE=$(LINK) $(OPT) $(DBVMAI) $(SSDBED) $(LLIBDBTOOLS) \
---
> DBV_LINKLINE=$(LINK) $(OPT)  -Wl,--no-as-needed $(DBVMAI) $(SSDBED) $(LLIBDBTOOLS) \
2987c2987
<       $(LLIBSLAX) $(LLIBPLSQL) $(LIBPLCN) $(LINKTTLIBS)
---
>       $(LLIBSLAX) $(LLIBPLSQL) $(LIBPLCN) $(LINKTTLIBS) -lons
2994c2994
< EXTPROC_LINKLINE=$(LINK) $(OPT) $(EXTPMAI) $(PROD_EXTPROC_OPT) \
---
> EXTPROC_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(EXTPMAI) $(PROD_EXTPROC_OPT) \
3001c3001
< HSDEPXA_LINKLINE=$(LINK) $(OPT) $(HSDEPMAI) $(HSALIB_SUBSET1) \
---
> HSDEPXA_LINKLINE=$(LINK) $(OPT)  -Wl,--no-as-needed $(HSDEPMAI) $(HSALIB_SUBSET1) \
3004c3004
< HSOTS_LINKLINE=$(LINK) $(OPT) $(HSOTSMAI) $(HSALIB_SUBSET1) \
---
> HSOTS_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed  $(HSOTSMAI) $(HSALIB_SUBSET1) \
3071c3071
< KFED_LINKLINE=$(LINK) $(S0MAIN) $(SSKFEDED) $(SKFEDPT)  \
---
> KFED_LINKLINE=$(LINK) -Wl,--no-as-needed $(S0MAIN) $(SSKFEDED) $(SKFEDPT)  \
3075c3075
< KFOD_LINKLINE=$(LINK) $(S0MAIN) $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
---
> KFOD_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
3084c3084
< AMDU_LINKLINE=$(LINK) $(S0MAIN) $(SSKFMUED) $(SKFMUPT) \
---
> AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) \


And here's the symlinked files for my case, I didn't have to do all of the symlinks he had done. Weird.
root@fubar:/usr/lib64# ls -la
total 8
drwxr-xr-x  2 root root 4096 Jul  1 16:02 .
drwxr-xr-x 13 root root 4096 Jul  1 15:41 ..
lrwxrwxrwx  1 root root   42 Jun 30 16:46 libc_nonshared.a -> /usr/lib/x86_64-linux-gnu/libc_nonshared.a
lrwxrwxrwx  1 root root   48 Jun 30 16:43 libpthread_nonshared.a -> /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a


oracle@hakan-work:~$ ls -la /bin/awk
lrwxrwxrwx 1 root root 12 Jul  1 10:45 /bin/awk -> /usr/bin/awk


Thursday, June 19, 2014

Good riddance

Ubuntu One is no more. Long live the new king, OwnCloud version 6. Don't use v5. It shreads files for fun.

Tuesday, February 18, 2014

Help! Git eats all of my memory!

My little server runs a whole a lot of things on 2GB RAM. Then I run git clone with some files as big as 1GB in the repository and the poor server keels over, sticks its legs out and starts pining for the fjords.

The following reduces the amount of memory & resources Git uses. I am obviously sure it will make it crappier, slower and make it run as slow as molasses but at least it won't kill the box. That's a win in my book. Consult the manual for further reading.

git config --global pack.windowMemory "100M"
git config --global pack.packSizeLimit "100M"
git config --global pack.threads "1"