Dienstag, 20. Oktober 2009

Caused by: org.hibernate.MappingException: Could not determine type for: XXX, at table: XXXX, for columns: YYYY

This is a common hibernate mapping exception and in most cases you simply forgot to implement

toString()
hashCode()
equals()

in your class you are using a relation to another class (only when using annotations)

Another thing what could be the cause of this could be to mix the annotations between above the fields and above the getter MEthods.
Try to put all the annotations consistent above the getter methods AND not above the data fields.

So:
instead of :
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "count")
public long id;

public long getId() {
return id;
}

alter all of them to:


public long id;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "count")
public long getId() {
return id;
}

Mittwoch, 14. Oktober 2009

Running Jetty 5 under Ubuntu 9.04 Jaunty

Ok another weird thing just happened.
I have installed jetty5 and some war applications via jetty webapps folder as also via maven2 jetty plugin but just cant connect through any webbrowser via localhost:8080 (mvn2) or localhost:8280 (jetty). So i tried and tried but just cant connect to it. Here is what happened: Though jetty describes itself as a complete full integrated http webserver I think it is not configured right on ubuntu because i just found out that you need to install apache2 package in order to run localhost jetty applications!

Sonntag, 15. Februar 2009

Using Joomla and the Strato website provider

Today I had the problem that I had to alter my php.ini because the joomla pony gallery plugin needed extra memory when generating thumbnails and the strato memory size was too low for processing.

So I did some research and found out that Strato allows own php.ini files which can overwrite their values. Problem was only that I could not get my own php.ini to work with the website or backend, I got a lot of internal server failures. So I did some research again and here are the correct settings to use own customized .htaccess and php.ini:

create a .htaccess in your root dir :
Directoryindex index.php , index.htm, index.html
AddType application/x-httpd-php5 .php .php4 .php3 .php5
next create a php.ini in your root dir and in your administrator dir where you now do what you like and it actually will work:

register_globals = Off
safe_mode = Off
memory_limit = 16M
upload_max_filesize = 10M
max_execution_time = 30
max_input_time = 60
so have phun with this!!