My Debian Wheezy Web Hosting Image for the odroid u2

Lambda Recipe for attribute validation of Collection of POJOs

So here is a recipe you can use to validate a POJO attribute for some value. In my case I will show you how to check if attributes were set to null. But you can expand on the example as an exercise for yourself.

So here is the template method for a single object and a collection of objects:

My Git Cheat Sheet

Following is my cheat sheet that I extracted while reading the git tutorial git-scm.com. So I just listed the commands minus all the text there. If you have read the book than below will a quick reminder of the various commands there. Not all commands are listed but the more interesting only.

Endless select menu in bash script

 

There are many sources on the web for creating menus in bash scripts. After prodding through the many examples, I am documenting the approach that I felt was generic enough for all my intents and pusposes. Just as a reference even to me, in case I need to do it again.

Getting rid of bothersome kernel "Booted secondary processor" and "shutdown" notice messages from kern.log

My Odroid servers "kern.log" is basically swamped with these messages "Booted secondary processor" and "shutdown" that occur at every minute. Tried tweaking the "/etc/sysctl.conf" specifically the kernel.printk line to say "kernel.printk = 3 3 1 3". 3 is supposed to be error level but still these notice messages seemed to get printed some how.

Finally this is what got rid of them by drastic measures.

Adf :1-1-association returning more than one row fix by overriding findOrCreateAssociationAccessorRS

 

So this was a strange issue, I face when writing a certain Junit test for a 1:1 association. I was creating a new row which partially fullfilled the 1:1 association condition, and when programmatically asking on this 1:1 assocaition about the other end, the newly created row was getting returned.

 

ADF DI - How to operate on a selected row in the table component within excel

ADF-DI Excel

 

ADF DI is ADF's desktop integration that enables a user to work with data in an excel sheet. It is not too feature rich and has its limitations, but it also does well, what it sets out to do. Basically batch creates, deletes and updates are really no problems for tables.

 

ORA-24247 ACL error in Oracle 12c

So the debugger was not connecting to debug a PLSQL procedure one day. I knew I had debugged this on Oracle 11g, so it had to work as well on 12c. But the debugger was not connecting and complaining something like below:

 Connecting to the database MYDB_12c.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP('X.X.X.X', '57908')
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database MYDB_12c.

 

A case of oracle.jbo.TooManyObjectsException : Change createRowFromResultSet to createInstanceFromResultSet

TooManyObjectsException

So there are some documented cases of this exception happening and some remedies there-in, if you google this problem.

What if you think you don't fall into this category. So let me "describe" for you a scenario and if you fall into this category, this might save you some pain in troubleshooting this scenario. Again, this might not be the case for you and simple plain vanilla advice might be all you need. If the description some how matches your use case, you can try the solution I propose.

Deactivating Statistics, Counter and Leaflets Modules

Leaflet Module

So with Boost running, it made no sense really to have the Counter module, since it was always a snapshot view of the counter at some point in time when the page was first generated by boost. Similarly the leaflet module does not make sense. I have a feeling with Boost it is also not doing its job. Hence time to slim down my drupal install. This means I really also don't need the statistics module. Google analytics and Apache logs should be good enough for all purposes. Then the webalizer running already on the logs makes for good enough reports.

Pages

Subscribe to Ahsan's Corner RSS