How I defeated the maven-release-plugin in a flat structured multi module project (via warpedjavaguy)

Thanks for clearing my M2 multi-module confusion. My problem was trying to mavenize multiple “flat” ANT projects. I created a new Maven parent project, and was then able to add child modules to it using your guidance. Rules are made to be broken so that paradoxes can be created. Maven is a handy tool and has a lot of available plugins. It adopts the convention over configuration philosophy and provides a standard build lifecycle out of the box. This makes it very easy to automate a build and release process without writing a single line of script. But there's a … Continue reading How I defeated the maven-release-plugin in a flat structured multi module project (via warpedjavaguy)

Awesome Blog-of-the-Day

In my quest for good blogs, I will find by daily favorite and post it in this category. This may sound like a cliche idea, but I hope to stick with a few equally weighted criteria for my “Blog of the day” selections: up-to-date content (a.k.a Fresh) visually pleasing (at least to me) not too long or philosophical useful, unique and informative I hope that my selections don’t look like the WordPress popular list. Let me know about your blog and an elevator pitch as to why you think it should be an awesome blog of the day. Continue reading Awesome Blog-of-the-Day

The “Quick Study”

“One who is able to memorize something easily and quickly or is able to understand and deal with something easily and successfully”.. Have you ever been called a “quick study”? I think a single day lesson is adequate to examine a technology of interest. Perhaps it’s my mild programmer A.D.D, but I don’t have patience for the multi-part series, where each lesson spans days, weeks, or months. Examples include the “Summer of Nhibernate“, “Learn step-by-step in 7 days“. Of course, s/w methodologies are not learned in a day, but specific software platforms and applications make a good “quick study”. The goal of each quick study will be to: 1) … Continue reading The “Quick Study”

Overcoming Weaknesses in CMS / Portal Software

Historically, the obstacles in this space (CMS) have been cost and ease of use. Cost There is really no rhyme or reason to the cost of CMS software. The cost problem is that the great majority of CMS / portal vendors use competitor-based pricing which has created greyness for buyers. “Why is this CMS product $1000 and this other CMS product $50,000?”. Or as I have often heard, “Your CMS app does the same thing as one that was came in at over 6 figures.” Secondly, application pricing and offshore programming fees have plummeted, so vendors have tried to reclaim … Continue reading Overcoming Weaknesses in CMS / Portal Software

Resolving Postgres "returning auto generated keys no supported"

I discovered Jean-Pol Landrain’s, “TriggerAssignedIdentityGenerator” to address the issue of the Hibernate ID Generator not supporting an Id created by the database via a BEFORE INSERT trigger. However the TriggerAssignedIdentityGenerator design for Oracle did not work for the older JDBC PostgreSQL driver which doesn’t support the return of auto-generated keys. The probem was resolved by changes to the ‘prepare’ and ‘executeAndExtract’ methods: protected PreparedStatement prepare(String insertSQL, SessionImplementor session) throws SQLException { return session.getBatcher().prepareStatement(insertSQL + ” RETURNING *”);} protected Serializable executeAndExtract(PreparedStatement insert) throws SQLException { insert.execute(); // get the new id back ResultSet rs = insert.getResultSet(); if (rs.next()) { return new … Continue reading Resolving Postgres "returning auto generated keys no supported"

Postgres create trigger error: relation does not exist 42P01

PostgreSQL 8.4: When attempting to create a simple trigger the executes a function, for a table that exists, I was getting a 42P01 error: relation “table_name” does not exist CREATE TRIGGER genUuid BEFORE INSERT ON table_name FOR EACH ROW EXECUTE PROCEDURE generate_function_v1(); This was simple resolved by including the schema name along with the table as follows: CREATE TRIGGER genUuid BEFORE INSERT ON my_schma.table_name FOR EACH ROW EXECUTE PROCEDURE generate_function_v1(); While there is a default_schema property in the hibernate.cfg.xml that is set to “my_schma”, hibernate seems to only use this for schema generation, but not for queries. Is this a … Continue reading Postgres create trigger error: relation does not exist 42P01

Hibernate – org.hibernate.HibernateException: Unable to locate current JTA transaction

It started with a “org.hibernate.HibernateException: Could not find datasource” which was resolved by moving the hibernate-cfg.xml to the root folder (above WEB-INF). Once this was resolved my servlet returned a “Unable to locate current JTA transaction” transaction error. The postgres datasource configured via JBoss indicated status DOWN. Error text: org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:88) org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:621) occurs when getSessionFactory is attempted. Direct connection to db (w/o JBoss DS) works fine. Continue reading Hibernate – org.hibernate.HibernateException: Unable to locate current JTA transaction