Archive for the ‘how to fix the error…’ Category

Spring Roo Exception: Row was updated or deleted by another transaction

While playing around with Spring roo I see this error while running the integration tests via

perform tests

roo org.springframework.orm.jpa.JpaOptimisticLockingFailureException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction

The problem was here, that my database table which stored the specific entities had a version column but only NULL values inside. I have replaced the NULLs with an numeric value and then it worked.

“Updating Maven Project”. Unsupported IClasspathEntry kind=4

I’m just playing around with Spring Roo and multi-module Maven projects. When I start to import a project into the STS I am getting the following error and the SDK is getting unresponsive:

“Updating Maven Project”. Unsupported IClasspathEntry kind=4

The problem is somehow related to the m2e plugin integrated in the STS.

So solve this select (right click) on the STS/Eclipse modules

Maven -> Disable Maven Nature
Maven Disable Maven Nature in STS (Eclipse)

Maven Disable Maven Nature in STS (Eclipse)

run in the terminal

mvn eclipse:clean

and select again in STS

Configure -> Convert to Maven Project

 

 

 

’502 Bad Gateway’ when running WordPress with spawn-fcgi nginx php

I am running a WordPress blog using nginx + PHP + spawn-fcgi and it works fine, but once a day spawn-fcgi seems to crash.

(more…)

Jenkins, github and Host key verification failed.

I have just switched a Jenkins project from Svn to git (hosted on GitHub). When I wanted to build the project I experienced the following error: Host key verification failed.

(more…)

Error when trying to deploy Rails 3 application with ActiveAdmin

I have just tried to deploy my Rails 3 application which uses ActiveAdmin and I’ve gotten the following error:

File to import not found or unreadable: active_admin/mixins

(more…)

‘xterm-256color’: unknown terminal type.

The following error popped up when I was accessing a Ubuntu EC2 instance from my MacOS X system:

xterm-256color’: unknown terminal type.

To fix this error I needed to install ncurses-term via

sudo apt-get install ncurses-term

YAML parsing errors in Rails 3.0.x application (couldn’t parse YAML)

I’ve just got this error in my Rails 3.0.7 application:

Psych::SyntaxError (couldn’t parse YAML at line 289 column 14)

To fix this I needed to add

require 'yaml'
YAML::ENGINE.yamler= 'syck'

into my first two lines of the config/boot.rb

Running Apache Archiva on Debian Linux 64bit causes errors

I had some problems running Apache Archiva – the Maven repository management tool – on my Debian Linux 64bit system. The error I got when starting the standalone version via

(more…)

SugarCRM Inbound E-mail problem

I’ve just got the following error message while accessing the Inbound E-mail feature in SugarCRM:

Inbound Email cannot function without the IMAP c-client libraries enabled/compiled with the PHP module

To fix this error on my Debian server I’ve had to install the PHP IMAP module via

apt-get install php5-imap

Fixing “use -source 5 or higher to enable generics” during Maven compilation

I just wanted to compile & assemble a Maven project using mvn assembly:assembly and got the following error:

Compilation failure [...]
(use -source 5 or higher to enable annotations)

To fix this error I needed to add

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>2.3.2</version>

<configuration>

<source>1.6</source>

<target>1.6</target>

</configuration>

</plugin>

to my pom.xml file.

`require’: no such file to load — readline (LoadError)

I got the following error when trying to start the ‘rails console’ in a Rails3/Ruby 1.9.2 project:

`require’: no such file to load — readline (LoadError)

The problem was that readline was not installed properly. To install it, I needed to go into the ruby sources. In my case they were located in the directory /use/local/src/ruby-1.9.2-p0/ext/readline. I changed to it an built and installed realdline via

ruby extconf.rb
make
sudo make install

Creation of nested models in Rails3 failed with HashWithIndifferentAccess error

I just tried to create a Rails model which contained nested other models and got an HashWithIndifferentAccess error. I used accepts_nested_attributes_for in the parent model. To solve this problem the solution was to add an attr_accessible :MODELNAME_attributes for the child-model (MODELNAME) into the parent model. E.g.

Parent model

class ParentModel < ActiveRecord::Base
 has_one :child_model
 attr_accessible :child_model_attributes
end
Next Page »" class="small button">older posts