A hint for the “Object foo is not a known entity type” errors from Glassfish

As a JavaEE-codemonkey you have perhaps noticed this error:

java.lang.IllegalArgumentException: Object: Ting@193c227 is not a known entity type.

This will occur when you have redeployed an app f.ex through Eclipse to Glassfish, the Glassfish server has not quite understood that it`s time to update its version, so what you need to do then is to simply restart the server (or domain).

The Pirate Bay redirects abuse to lawyers (LOL)

Guessing that this whois output should say it all 🙂

torhenning@bais:~$ host thepiratebay.se
thepiratebay.se has address 91.191.138.15
thepiratebay.se mail is handled by 10 mx.thepiratebay.org.
torhenning@bais:~$ whois 91.191.138.15
% This is the RIPE Whois query server #3.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Note: This output has been filtered.
% To receive output for a database update, use the “-B” flag.

% Information related to ‘91.191.138.0 – 91.191.138.63’

inetnum: 91.191.138.0 – 91.191.138.63
netname: SE-TPB
descr: TPB, Stockholm
descr: Customer of Danowsky & Partner Advokatbyra KB
descr: Customer of Maqs Law Firm Advokatbyra AB
descr: Customer of Svenska Antipiratbyran
descr: ———————————————
descr: All abuse mail should be sent to:
descr: lawfirm@danowsky.se
descr: monique.wadsted@se.maqs.com
descr: henrik.ponten@antipiratbyran.com
country: SE
admin-c: MS7556-RIPE
admin-c: LA2217-RIPE
admin-c: TB3373-RIPE
tech-c: MS7556-RIPE
tech-c: LA2217-RIPE
tech-c: TB3373-RIPE
status: ASSIGNED PA
mnt-by: AS21202-MNT
source: RIPE # Filtered

person: Maria Stahl
address: Danowsky & Partners Advokatbyra KB
address: Box 16097
address: SE-103 22 Stockholm
address: Sweden
e-mail: lawfirm@danowsky.se
phone: +46 8 6146400
mnt-by: AS8434-MNT
nic-hdl: MS7556-RIPE
source: RIPE # Filtered

person: Lars Adolfsson
address: Maqs Law Firm Advokatbyra AB
address: Norrmalmstorg 1
address: 10386 Stockholm
address: SE
phone: +4684070924
e-mail: lars.adolfsson@se.maqs.com
nic-hdl: LA2217-RIPE
mnt-by: TELIANET-LIR
source: RIPE # Filtered

person: Thomas Bjork
address: Maqs Law Advokataktieselskab
address: Pilestraede 58 4
address: 1112 Koebenhavn K
address: DK
phone: +45 35240810
nic-hdl: TB3373-RIPE
mnt-by: TDK-MNT
source: RIPE # Filtered

% Information related to ‘91.191.128.0/20AS21202’

route: 91.191.128.0/20
descr: DCS.net
origin: AS21202
remarks: ———————————————————–
remarks: ABUSE related questions should be mailed to abuse@dcs.net
remarks: Other questions may be directed to noc@dcs.net
remarks: For peering-requests mail peering@dcs.net
remarks: ———————————————————–
mnt-by: AS21202-MNT
source: RIPE # Filtered

torhenning@bais:~$

Oh, PS:
“Customer of Svenska Antipiratbyran” means: “Customer of the Swedish anti piracy bureau” 😉

Show/hide a div with javascript

Looking for a simple javascript to show/hide a given text/element?

Here`s all you need! 🙂

<!--
   Simple show/hide system
   @author - Tor Henning Ueland
-->
<script language="javascript" type="text/javascript">

        //ShowHide function - takes the div ID as argument
        function showHide(divId) {

                //Switch the display mode for the the div to hide
                var theDiv = document.getElementById(divId);
                if(theDiv.style.display == 'block')
                        theDiv.style.display = 'none';
                else
                        theDiv.style.display = 'block';

                //Remove this part if you dont want a "show/hide" text
                var showText = document.getElementById("showText");
                var hideText = document.getElementById("hideText");

                //Switch the display mode for the the show/hide text/div
                if(showText.style.display == 'block') {
                        showText.style.display = 'none';
                        hideText.style.display = 'block';
                } else {
                        showText.style.display = 'block';
                        hideText.style.display = 'none';
                }
        }
</script>

<div id="showHideMe" style="display:none;">
        Now you see me!
</div>

<a href="#" onClick="showHide('showHideMe')">
        <div id="showText" style="display:block;">Show</div>
        <div id="hideText" style="display:none;">Hide</div>
</a>

Fix for the “Out of memory! Callback called exit.” error in Request Tracker (RT)

When RT is upgraded, users can experience WSOD(White Screen Of Death), all the log will say is:
“Out of memory! Callback called exit.”. Not so informative eh?

The solution is pretty simple, run this query in the database:

“ALTER TABLE sessions CHANGE a_session a_session LONGBLOB;”

Then clear the table with:

TRUNCATE TABLE `sessions`;

Any logged in users will be logged out, but the problem should disappear.