Wednesday, 6 January 2010

Spring 3.0

At the end of last year Spring 3.0 was released (http://blog.springsource.com/2009/12/16/spring-framework-3-0-goes-ga/). But if you're developing v1.0 portlets, then you won't be able to use it, because it REQUIRES portlet v2.0 API.

Friday, 11 September 2009

After setting up environment for developing web services, creating simple Demo service and deploying it, console gave out the following message:
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@337838
org.apache.axis2.transport.http.AxisAdminServlet
java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet
...
The cause is that current WTP doesn't support Axis2 1.5 version. Currently it supports only 1.4.1 (see this discussion).

Saturday, 27 June 2009

Adding local postgres database to PgAdmin in ubuntu

Synaptic makes both (posgres & pgadmin) installations trivial. After installation you must change password of 'postgres' user:
sudo -u postgres psql postgres
ALTER USER postgres WITH PASSWORD 'secret';
\q
Now add local database in PgAdmin, which shouldn't cause any problems.

Friday, 26 June 2009

Eclipse minimal installation

Update: I've created an updated (my) version of installation of minimal versionupdated (my) version of installation of minimal version since link referred in this post is dead.

This post explains how to get minimal eclipse installation. This works great! Now i can install plugins by my choice - i don't need nor CVS, nor RST and a lot of other stuff included in JEE version.
Also new plugin installation has been improved a lot in Galileo. Eclipse keeps getting better and better. Can't wait to see other new features and improvements.

Wednesday, 3 June 2009

Maven remote archetype catalogs through proxy

Some days ago created a new maven archetype. Everything went good till i had to deploy it on our maven (Nexus) repository.
First i had to install an archetype plugin. Since i had older Nexus installation, i had to update it to 1.3.x to get that plugin working (later i came across some e-mail treads where developers agreed to create that plugin 1.2.x-compatible... later... :( ).
Finally i could see archetype-catalog.xml through my browser. But when i added it to eclipse as remote file, it gave me WARN messages saying "Error reading archetype catalog http://my.domain.com/service/local/nexus-archetype-plugin/public/archetype-catalog.xml Error transferring file". Now what?!?
It turns out that there's a bug http://jira.codehaus.org/browse/ARCHETYPE-202 - can't fetch remote archetype catalogs through proxy. And no fix versions. yet... Is this the cause?

Now i'm using workaround:
  1. downloadi XML file and save it as /home/me/.m2/archetype-catalog.xml
  2. add it to m2eclipse archetypes as local catalog
  3. repeat after catalog changes :(
Better ideas?

"mvn archetype:generate -DarchetypeCatalog=http://my.domain.com/service/local/nexus-archetype-plugin/public/archetype-catalog.xml"
But why is it working though command line?

There's still much to learn...

Friday, 24 April 2009

HIbernate equals/hashCode

Just to write this down:
When implementing equals() or hashCode() methods wich will be used in Hibernate, you should always use properties with real "business value" (keep your hands off the ID).
See also: http://www.hibernate.org/109.html

Eclipse fails to recognise tomcat startup

Some time ago i had a problem with starting tomcat from Eclipse. First time i couldn't solve this problem, but few months ago i run into it again.
Brief introduction to problem:
  1. Start tomcat
  2. Console says "Server startup in ...ms"
  3. Server's state still is "Starting..."
  4. After timeout it says "Server ... failed to start"
My problem was that first page (http://localhost/) contains a redirect. So Ecipse did receive status code 30x (instead of 200 OK). When I removed the redirect, it started working.
Of course, check WTP Tomcat FAQ for other possible problems.