<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random Bugs &#187; Java</title>
	<atom:link href="http://www.randombugs.com/category/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.randombugs.com</link>
	<description>Just another Bastard Operator From Hell. Everything from *nix to programming</description>
	<lastBuildDate>Thu, 05 Jan 2012 11:44:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Glassfish 3.1.1 workaround for Denial of Service through hash table multi-collisions</title>
		<link>http://www.randombugs.com/java/glassfish/glassfish-311-workaround-denial-service-hash-table-multicollisions.html</link>
		<comments>http://www.randombugs.com/java/glassfish/glassfish-311-workaround-denial-service-hash-table-multicollisions.html#comments</comments>
		<pubDate>Thu, 05 Jan 2012 11:42:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[DOS]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=783</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/gpg.png" width="24" height="24" alt="" title="Security" /><br/>This is an old bug, first discovered in 2003, but now was applied to the hash table functions from the new programming languages. The main idea behind this bug is to create hashes which collide, because collision will eat a lot more cpu cycles on your server. For a post of 2 MB is resulting in a 44 minutes of CPU time which will results in a DOS.

As suggested in advisory released by nruns.com  we can limit the maximum post size from several 10&#8242;s of KB. In Glassfish 3.1.1 ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/glassfish-311-workaround-denial-service-hash-table-multicollisions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User [admin] from host null does not have administration access</title>
		<link>http://www.randombugs.com/java/glassfish/user-admin-host-null-administration-access.html</link>
		<comments>http://www.randombugs.com/java/glassfish/user-admin-host-null-administration-access.html#comments</comments>
		<pubDate>Wed, 23 Nov 2011 08:24:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[jmx]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=771</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/recovery.gif" width="24" height="24" alt="" title="Recovery" /><br/>I should admit, I didn&#8217;t read the Glassfish 3.1 Administration Manual, and I don&#8217;t know if this is documented. Anyway the main problem appeared when I tried to connect on my cluster instances with admin credentials. If I connect with VisualVM or JConsole to Domain Administration Server (DAS) on 8686 I don&#8217;t have any problem. When I&#8217;m trying to connect to my cluster instances on port 28686 with admin credentials I get from JConsole

Connection Failed: Retry?
The connection to admin@rb.randombugs.com:28686 did not succeed.
Would you like to try again?

and on server.log

[#&#124;2011-11-23T12:12:40.599+0000&#124;INFO&#124;glassfish3.1.1&#124;javax.enterprise.system.tools.admin.com.sun.enterprise.container.common&#124;_ThreadID=34;_ThreadName=Thread-2;&#124;User [admin] ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/user-admin-host-null-administration-access.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed</title>
		<link>http://www.randombugs.com/java/glassfish/http-transport-error-javaxnetsslsslhandshakeexception-sunsecurityvalidatorvalidatorexception-pkix-path-validation-failed-javasecuritycertcertpathvalidatorexception-signature-check-failed.html</link>
		<comments>http://www.randombugs.com/java/glassfish/http-transport-error-javaxnetsslsslhandshakeexception-sunsecurityvalidatorvalidatorexception-pkix-path-validation-failed-javasecuritycertcertpathvalidatorexception-signature-check-failed.html#comments</comments>
		<pubDate>Wed, 13 Jul 2011 02:45:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=762</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/gpg.png" width="24" height="24" alt="" title="Security" /><br/>I switched all my Java Glassfish webservices to SSL, because I wanted to have an encrypted communication between me and my clients. Until then, all my applications worked flawlessly over the HTTP protocol, but now, after switching to SSL, I got the following error:
HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed

That means, the client doesn&#8217;t have the certificate and cannot check response against the server certificate. The most simple solution is to export the certificate from the webserver server and import it on the webservice ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/http-transport-error-javaxnetsslsslhandshakeexception-sunsecurityvalidatorvalidatorexception-pkix-path-validation-failed-javasecuritycertcertpathvalidatorexception-signature-check-failed.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing a Glassfish 3.1 Cluster on Debian 6.0 only from command line</title>
		<link>http://www.randombugs.com/java/glassfish/installing-glassfish-31-cluster-debian-60-command-line.html</link>
		<comments>http://www.randombugs.com/java/glassfish/installing-glassfish-31-cluster-debian-60-command-line.html#comments</comments>
		<pubDate>Wed, 04 May 2011 12:48:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=729</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/cluster.png" width="24" height="24" alt="" title="Clustering" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/help-contents.png" width="24" height="24" alt="" title="How-to" /><br/>Finlay is here. For me, Glassfish 3.1, was one of most awaited piece of software, for all it&#8217;s new features and clustering support. Glassfish 3.1 slightly changed the way to install cluster, in a much better and integrated way. This version come with a lot of new functionality, but also with improved parts related to Glassfish 2.1. 

The most interesting features of Glassfish 3.1 are: Clustering (100 instances per domain), SSH provisioning, Centralized management (with the help of ssh), High Availability Session Persistence, High Availability Java Message Service, RMI-IIOP Load ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/installing-glassfish-31-cluster-debian-60-command-line.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Glassfish Enhanced Broker Cluster and &#8220;Failed to load JDBC driver&#8221;</title>
		<link>http://www.randombugs.com/java/glassfish/glassfish-enhanced-broker-cluster-failed-load-jdbc-driver.html</link>
		<comments>http://www.randombugs.com/java/glassfish/glassfish-enhanced-broker-cluster-failed-load-jdbc-driver.html#comments</comments>
		<pubDate>Thu, 14 Apr 2011 10:44:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[imq]]></category>
		<category><![CDATA[JMS]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=721</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/cluster.png" width="24" height="24" alt="" title="Clustering" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/help-contents.png" width="24" height="24" alt="" title="How-to" /><br/>Is not a bug, but a pretty annoying configuration thing which appear when you try to configure Enhanced Broker Cluster in Glassfish. I configured my persistent store, for Enhanced Broker Cluster, as jdbc / MySQL:

[...]
imq.persist.jdbc.dbVendor=mysql
imq.persist.jdbc.mysql.driver=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
imq.persist.jdbc.mysql.property.url=jdbc\:mysql\://sqlserver\:3306/jms
imq.persist.jdbc.mysql.needpassword=true
imq.persist.jdbc.mysql.user=jms
[...]

and after at restart I got the following error:

[13/Apr/2011:12:12:30 CEST] [B1060]: Loading persistent data&#8230;
[13/Apr/2011:12:12:30 CEST] ERROR [B3198]: Error initializing cluster manager:
com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3024]: Failed to load JDBC driver: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
        at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.(DBManager.java:428)
        at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBManager.getDBManager(DBManager.java:219)
        at com.sun.messaging.jmq.jmsserver.persist.jdbc.JDBCStore.(JDBCStore.java:98)
  ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/glassfish-enhanced-broker-cluster-failed-load-jdbc-driver.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snmp support for Glassfish 2.1.1 (with cluster support)</title>
		<link>http://www.randombugs.com/java/glassfish/snmp-support-glassfish-211-cluster-support.html</link>
		<comments>http://www.randombugs.com/java/glassfish/snmp-support-glassfish-211-cluster-support.html#comments</comments>
		<pubDate>Mon, 14 Mar 2011 11:57:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=701</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/cluster.png" width="24" height="24" alt="" title="Clustering" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/debian.png" width="24" height="24" alt="" title="Debian" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><br/>Why you choose SNMP when Glassfish have strong JMX support? I presume, the answer for all who use SNMP is (almost) the same: Because the architecture of current monitoring solution is not scalable enough, and I cannot load my monitoring servers with supplementary JAVA processes. 

Before starting using SNMP I tried to see what solutions I have:
1. Re-design entire monitoring solution
2. Use SNMP
I&#8217;m a lazy person, so I choose to add SNMP support for all our clusters  .



To do that you should do 3 easy steps:
1. Upload the  ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/snmp-support-glassfish-211-cluster-support.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol &#8220;gHotSpotVMTypeEntryTypeNameOffset&#8221;</title>
		<link>http://www.randombugs.com/java/sunjvmhotspotdebuggernosuchsymbolexception-find-symbol-ghotspotvmtypeentrytypenameoffset.html</link>
		<comments>http://www.randombugs.com/java/sunjvmhotspotdebuggernosuchsymbolexception-find-symbol-ghotspotvmtypeentrytypenameoffset.html#comments</comments>
		<pubDate>Tue, 08 Feb 2011 14:33:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[libpthread]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=676</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bug.png" width="24" height="24" alt="" title="Bugs" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/debian.png" width="24" height="24" alt="" title="Debian" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><br/>This, probably, is a bug which was not spotted very often because is very obscure and the Debian guys moved very quick and fixed the problem. I know, I found a lot of bugs related to sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol &#8220;gHotSpotVMTypeEntryTypeNameOffset&#8221;, but this is different. Usually was a problem of &#8220;striping symbols from libjvm.so&#8221;, but in my case wasn&#8217;t that. Also I found this error related to OpenJDK (I use Sun JDK) and the solution was to use -server flag to get the correct libjvm.so. Anyway it took me ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/sunjvmhotspotdebuggernosuchsymbolexception-find-symbol-ghotspotvmtypeentrytypenameoffset.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Glassfish Cluster 2.1.1, HttpSessions replication and multi-thread concurrent access</title>
		<link>http://www.randombugs.com/java/glassfish/glassfish-cluster-211-httpsessions-replication-multithread-concurrent-access.html</link>
		<comments>http://www.randombugs.com/java/glassfish/glassfish-cluster-211-httpsessions-replication-multithread-concurrent-access.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 10:07:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[httpsession]]></category>
		<category><![CDATA[session]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=634</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/cluster.png" width="24" height="24" alt="" title="Clustering" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><br/>I have several clusters with Glassfish 2.1.1 in a BIG virtual environment and all worked fine &#8230; until I add new processors to this clusters. After upgrade, I started to have problems with HttpSession replication. Starting debugging JXTA, Shoal and the Web Container didn&#8217;t help at all. Until I found this page Memory Replication &#038; Multi-threaded Concurrent Access to HttpSessions. My applications was doing multi-thread concurrent access some times (Ajax) and this was the root cause of all lost sessions. I modified sun-web.xml from  my application, accordingly with the ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/glassfish-cluster-211-httpsessions-replication-multithread-concurrent-access.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Java networking problems in Debian squeeze/sid</title>
		<link>http://www.randombugs.com/java/java-networking-problems-debian-squeezesid.html</link>
		<comments>http://www.randombugs.com/java/java-networking-problems-debian-squeezesid.html#comments</comments>
		<pubDate>Tue, 16 Feb 2010 08:46:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=630</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bug.png" width="24" height="24" alt="" title="Bugs" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/debian.png" width="24" height="24" alt="" title="Debian" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/text-x-java.png" width="24" height="24" alt="" title="Java" /><br/>After upgrading to the latest version of Debian squeeze/sid, I was not able to use the networking in java.
If you get:
[2/16/10 10:39 AM] Exception occurred:
java.net.SocketException: Network is unreachable
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:525)


then you should disable ipv6. To do that ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/java-networking-problems-debian-squeezesid.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrade from Glassfish 2.1 to 2.1.1</title>
		<link>http://www.randombugs.com/java/glassfish/upgrade-glassfish-21-211.html</link>
		<comments>http://www.randombugs.com/java/glassfish/upgrade-glassfish-21-211.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 13:39:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=625</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/cluster.png" width="24" height="24" alt="" title="Clustering" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/bluefish.png" width="24" height="24" alt="" title="Glassfish" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/help-contents.png" width="24" height="24" alt="" title="How-to" /><br/>For some reasons the asupgrade tool from Sun Glassfish doesn&#8217;t work if you want to upgrade your Glassfish from 2.1 to 2.1.1. The upgrade method what I will present you in the next post, probably, is not recommended by SUN, but it will work in most cases (clustered or not). Just follow this steps:

1. Stop all domains, node agents, instances from all cluster (or only the domain if you have only 1 server)
2. Rename Glassfish folder to g2.1
3. Install glassfish 2.1.1

$ java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-linux.jar
$ cd glassfish
$ chmod +x lib/ant/bin/ant
$ ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/upgrade-glassfish-21-211.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

