Archive for the ‘Hug the bug !’ Category
A JBoss 5.1.0 Exception !

This is about another exception you may get while playing around with JBoss, Transactions, Remote EJBs etc. And the exception is:
org.jboss.resource.JBossResourceException:
Could not enlist in transaction on entering meta-aware object!
My friend Venu had a post in his blog on why this exception happens and how to fix it in JBoss 5.0. You can read it here. But if we are using JBoss 5.1.0 this solution cannot help us. Because there are a couple of changes in the configuration in this new version of JBoss. In fact if you can take a look at the JBoss 5.1.0 GA release notes we can see a lot of changes in configuration especially if we are migrating from JBoss 5.0 to 5.1.
And here is the solution.
Open the JBOSS_HOME/server/JBOSS_CONFIGURATION/conf/jbossts-properties.xml. Set the following.
<!-- Support subtransactions in the JTA layer? Default is NO. --> <property name="com.arjuna.ats.jta.supportSubtransactions" value="YES"/>
Hope this helps.
P.S. If you have any more details in this issue, please feel free to share it. Thank you.
Today’s read: Web usabilty
I have always been a big fan of web design & web usability. I found a nice article in Smashing Magazine by Dmitry Fadeyev. Its all about some common usability mistake we do.
By now, all good designers and developers realize the importance of usability for their work. Usable websites offer great user experiences, and great user experiences lead to happy customers. Delight and satisfy your visitors, rather than frustrate and annoy them, with smart design decisions. Here are 9 usability problems that websites commonly face, and some recommended solutions for each of them.
Related links on usability
10 Usability Nightmaters That You Should Avoid
30 Usability Issues To Be Aware Of
12 Useful Techniques For Good Interface Design
About the author
Dmitry Fadeyev is the founder of the Usability Post blog, where you can read his thoughts on good design and usability.
Follow Dmitry on Twitter @usabilitypost.
Have a nice read.
Tip: How to handle broken images in HTML
I found this small but very good article in phpied.com by Stoyan Stefanov – Twitter page. The article tells about handling broken images in a web page, especially when we dont have control over what we load in our page.
I know, you don’t have broken images on your site, it’s unprofessional and ugly. But sometimes you may be loading images that you don’t control and you never know what’s going on on the other server you’re expecting to serve, but it may not feel up to the task.
One nice and simple strategy to deal with this uncertainty is to hide the images that fail to load. Browsers sent an “error” event when the worst happens and an image fails for whatever reason. Subscribe to this event using your favorite event-listener-attaching approach or library and hide the image.
The solution is very simple.
<img src="broken.png" onerror="this.style.display='none'" />
Another JBoss 5 hack by Venu
Venu had another JBoss hack and he was able to fix one more issue that may bubble up during the migration from JBoss 4.x to 5. This time found out how solve “Adding multiple last resources is disallowed. Current resource is ….” exception which happens while trying to access an EJB from a different EAR with in a transaction and trying to commit that transaction.
A Jboss 5 issue
Me and my colleague Venu were working on some Jboss 5 stuff (infact migrating from Jboss 4 to 5) when we got the following exception.
Exception:
ERROR [my.package.name] doSomething() Ex: javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.IsLocalInterceptor; local class incompatible: stream classdesc serialVersionUID = -3758782076801249473, local class serialVersionUID = 337700910587744646]
javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.IsLocalInterceptor; local class incompatible: stream classdesc serialVersionUID = -3758782076801249473, local class serialVersionUID = 337700910587744646]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:725)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:590)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
.. .. ..
Caused by: java.io.InvalidClassException: org.jboss.ejb3.remoting.IsLocalInterceptor; local class incompatible: stream classdesc serialVersionUID = -3758782076801249473, local class serialVersionUID = 337700910587744646
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
We are trying to connect to another server which is running on Jboss 4 and trying to access a remote EJB (session bean). Till now I’ve no clear idea about this whole issue. If any of you can put some light to this issue, please.
I will update this place once we tackle the issue.
Update 1:
I found some useful information here: https://jira.jboss.org/jira/browse/EJBTHREE-749
The problem seems to be mismatching SerialVersionUID in org.jboss.ejb3.remoting.IsLocalInterceptor of jboss-ejb3-client.jar.
Update 2: 28-Jan-2009
This issue has been fixed from Jboss-4.2.2 GA onwards. So all those who are using versions lesser than 4.2.2 are more likely to get this issue.
Find the JIRA post by Venu here: https://jira.jboss.org/jira/browse/EJBTHREE-1696



