JBoss migration – the HAR archive

This is a continuation of the previous article regarding some migration points from JBoss 4.2.2-GA to JBoss 7.1.1 and, presumably, Tomcat 7. 2. The HAR archive The HAR archive was a nice mechanism which allowed hibernate integration. A ${name}.har file was created, containing all the mappings (*.hbm.xml) and data classes (*.class), allong with a hibernate-service.xml (later renamed to service-hibernate.xml in JBoss 5). This took care of creating the SessionFactory and making it accessible through JNDI....

July 20, 2012 · len

JBoss migration – the data source

I have spent a lot of time lately trying to create a migration plan for an application currently running on JBoss 4.2.2. Since this application development started a few migration attempts to newer versions of JBoss have been done (see for 5.1) but as it seems each version has different style configuration files and this application is expected to have a long lifetime the work seems a bit futile so in parallel of...

July 20, 2012 · len

RIA’s. Where to go from now?

I was a big fan of Flex. The code was clean, object-oriented, re-usable. We even had the bonus of E4X. We’ve wrote the interface of a huge project using it and I know there was no way we could have had such a rich client other than using native code. We developed multiplatform and the client ran multiplatform without a bit of change. The deployment was easy and the administration on the client side minimal....

June 30, 2012 · len

To migrate or not to migrate

This is not a guide, nor intended to help, it’s a steam valve for my efforts to migrate an application to jboss 7 as each exception can take minutes or hours to solve without altering the original code. Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82) at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80) at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotation Information(MethodAnnotationAggregator.java:58) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.ha ndleAnnotations(InterceptorAnnotationProcessor.java:85) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.pr ocessComponentConfig(InterceptorAnnotationProcessor.java:70) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.de ploy(InterceptorAnnotationProcessor.java:55) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more Caused by: java....

June 23, 2012 · len

Skype logs archiving on linux

I keep migrating my Skype logs from installation to installation and they are getting pretty large. As they are binary files there is no easy way to split them properly. However I’ve found this tool which parses the logs and outputs the entries. The output however it’s not that usable. For this reason I’ve wrote a python script which organizes the output from the previous tool and generates files in the form: logs/skype-name/date....

April 14, 2012 · len

Long hibernate transactions

This is just a short reminder to the cause and solution of the following exception (hibernate + jboss 4.2.2 GA + oracle 10): 2012-02-09 13:09:50,333 ERROR [Thread-3-org.hibernate.AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) java.lang.NullPointerException at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:176) at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225) at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:136) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:340) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:107) at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:230) at com.arjuna.ats.arjuna.coordinator.TransactionReaper.check(TransactionReaper.java:202) at com.arjuna.ats.internal.arjuna.coordinator.ReaperThread.run(ReaperThread.java:107) 2012-02-09 13:09:50,339 WARN [Thread-3-com....

February 9, 2012 · len

A bit more about hibernate cache, when the cache hurts

I have learned a lot about hibernate cache at the time I wrote the previous article on this subject and this brings also an interesting detail. You are using the query and second level cache. Here is an interesting sequence: 1. You execute a query which returns items of entity A. First time it takes some time. 2. You execute the query again, it takes much less time, you are very happy :)...

February 9, 2012 · len

Insert blob in Oracle

Assuming you have the following Oracle table: <pre lang="sql">create table icon(id number(19), icon blob); these are 2 methods I found for inserting the value of a file in the icon.icon column. Method 1 This is the most commonly found method: <pre lang="sql">CREATE OR REPLACE PROCEDURE load_icon (imagefile VARCHAR2) IS src_file BFILE; dst_file BLOB; icon_id NUMBER(19,0); BEGIN src_file := bfilename('TEMP', imagefile); -- insert a NULL record to lock INSERT INTO icon (ID, ICON) VALUES (icon_sequence....

January 26, 2012 · len

motp html5 app

After the Adobe Flex incident I spent a lot of time searching for a real RIA experience library and I found none. The truth is that I could not find any library which allows for the same ease of development, rich interface, multi-platform stability and advanced OOP language. Being fueled by marketing and buzz is not enough to have something solid to develop any kind of real RIA with ease....

January 8, 2012 · len

Backup, backup, backup

This is a short collection of subjects related to preventing, detecting and fixing a broken hdd from a raid1 array. Which drive is broken? 1. Check for messages in dmesg [ 1040.470282] ata1.00: device reported invalid CHS sector 0 [ 1040.470287] ata1: EH complete [ 6373.208104] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 6373.214488] ata1.00: failed command: FLUSH CACHE EXT [ 6373.221215] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0 [ 6373....

December 20, 2011 · len