<?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, 06 May 2010 14:21:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<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>0</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>0</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>0</slash:comments>
		</item>
		<item>
		<title>Changing default logging system in Glassfish 2.1 with Log4J</title>
		<link>http://www.randombugs.com/java/glassfish/changing-logging-system-glassfish-21.html</link>
		<comments>http://www.randombugs.com/java/glassfish/changing-logging-system-glassfish-21.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 18:04:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Debian]]></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[Tuning]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=606</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/apache3.jpg" width="24" height="24" alt="" title="Apache" /><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" /><br/>A lot of people are not satisfied by the default Java Logging (JUL) in Glassfish. Also, myself I encountered some problems on clustered environments where we should have one single log and not one log for each instance.  Trying to change the logging system in Glassfish it looks to be almost impossible , but I found a very interesting project  java.util.logging to log4j Bridge and the sky become more clear for Glassfish logging. Jul to Log4J Bridge are part of log4J project and is very useful when you ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/changing-logging-system-glassfish-21.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DBAppender for Log4j 1.2</title>
		<link>http://www.randombugs.com/java/dbappender-log4j-12.html</link>
		<comments>http://www.randombugs.com/java/dbappender-log4j-12.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 20:19:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Headline]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=595</guid>
		<description><![CDATA[<img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/apache3.jpg" width="24" height="24" alt="" title="Apache" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/kexi.png" width="24" height="24" alt="" title="Databases" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/debian.png" width="24" height="24" alt="" title="Debian" /><br/>Initially, DBAppender for Log4j was introduced in version 1.3 of Log4j, but this version was ABANDONED by Apache team. DBAppender is very useful when we want to send our log on a JNDI resource and not on standard JDBC or file. If you need just logging in a database for your application, then you should use JDBCAppender. If you want to log on a JNDI or Database Connection Pool the DBAppender is for you. In this post I will show you how to get, compile and quick test the DBAppender.

1. ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/dbappender-log4j-12.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>java.lang.SecurityException: JCE cannot authenticate the provider BC</title>
		<link>http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html</link>
		<comments>http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html#comments</comments>
		<pubDate>Mon, 10 Aug 2009 09:57:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=577</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/gpg.png" width="24" height="24" alt="" title="Cryptography" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/debian.png" width="24" height="24" alt="" title="Debian" /><br/>Trying to integrate BouncyCastle Cryptography provider in Java can be a nightmare. I read a lot of forums messages about &#8220;JCE cannot authenticate the provider BC&#8221; and I didn&#8217;t find any clear response. After several hours of tweaking and digging I found the main reason of the problem. If you want to use BouncyCastle as Security provider then install it directly on your Java Virtual Machine and remove any library of bc from your application. 

How to install correctly Bouncy Castle on your JVM:
First for Ubuntu/Debian users you should look ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing defaults ports for JMS under Glassfish</title>
		<link>http://www.randombugs.com/java/glassfish/changeing-defaults-ports-jms-glassfish.html</link>
		<comments>http://www.randombugs.com/java/glassfish/changeing-defaults-ports-jms-glassfish.html#comments</comments>
		<pubDate>Thu, 28 May 2009 07:47:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Newbie]]></category>
		<category><![CDATA[JMS]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=452</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/>Why you should do that?  All this ports, by default, are allocated dynamically and if you want to use a firewall between your client and JMS broker then you should have static ports assigned. Another solution is to tunnel through httpjms and httpsjms protocol but this are slow. In the next article I will show you how to assign static ports to this JMS service in Glassfish.  To show you the all ports what need for JMS I just &#8220;ripped&#8221; the following table from SUN Site:  http://docs.sun.com/app/docs/doc/820-4916/gcuhq?a=view





Connection ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/changeing-defaults-ports-jms-glassfish.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Glassfish 2.1 with HADB</title>
		<link>http://www.randombugs.com/java/glassfish/install-glassfish-21-hadb.html</link>
		<comments>http://www.randombugs.com/java/glassfish/install-glassfish-21-hadb.html#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:06:25 +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[Headline]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=403</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/>If you want  99.999% availability of your Glassfish cluster then you should do 2 things: 1. Use HADB for user HTTP and Session persistence, 2. get some SUN support. I cannot help you with the decision on point 2, but with point 1 I will show you how to doit.In this article I will NOT start again to show you how to configure a Glassfish cluster, because this is already made in this article. Today I will present how to add HADB functionality to a existent Glassfish cluster.

Note:

 Install ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/install-glassfish-21-hadb.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Liferay 5.2.1 with Mysql in Glassfish 2.1</title>
		<link>http://www.randombugs.com/java/liferay-521-mysql-glassfish-21.html</link>
		<comments>http://www.randombugs.com/java/liferay-521-mysql-glassfish-21.html#comments</comments>
		<pubDate>Fri, 13 Feb 2009 11:21:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Liferay]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Glassfish]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=182</guid>
		<description><![CDATA[<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/liferay.png" width="24" height="24" alt="" title="Liferay" /><img src="http://www.randombugs.com/wp-content/uploads/icons/24x24/tux.png" width="24" height="24" alt="" title="Linux" /><br/>In the old versions of Liferay, switching from HSQL to MySQL was easy under Glassfish. Just replace the jdbc connector created for HSQL with one for MySQL and at the next restart of Liferay all was working ok. From version 5.2.1 configuration was changed and all is done from portal.properties. To switch from HSQL just create a portal-ext.properties with the following content:


jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&#038;characterEncoding=UTF-8&#038;useFastDateParsing=false
jdbc.default.username=lportal
jdbc.default.password=lportalpassword

and putit in /domain/domain1/applications/j2ee-module/liferay-portal/WEB-INF/classes/ if you are running in a single instance or if you are running in a clustered instance /nodeagents/agent1/instance1/applications/j2ee-module/liferay-portal/WEB-INF/classes .
Good Luck
Related Posts:How to install and configure ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/liferay-521-mysql-glassfish-21.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cluster for Glassfish 2.1</title>
		<link>http://www.randombugs.com/java/glassfish/cluster-glassfish-21.html</link>
		<comments>http://www.randombugs.com/java/glassfish/cluster-glassfish-21.html#comments</comments>
		<pubDate>Thu, 29 Jan 2009 11:36:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.randombugs.com/?p=146</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/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" /><br/>Again some problems with glassfish cluster. If in Glassfish v2UR2 all was ok in Glassfish 2.1 we had some problems. This post is based on How to install and configure a Glassfish cluster
 my early article. So first part of installing the cluster, first server with DAS and all the stuff is working perfectly, but second part when we need to add more instances we get some problems. Following the steps to add a new instance on the cluster we get an error:
asadmin start-node-agent &#8211;syncinstances=true ws-agent-2
Please enter the master password ...]]></description>
		<wfw:commentRss>http://www.randombugs.com/java/glassfish/cluster-glassfish-21.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
