Appliweb

All dimensions of your web developments

Affichage des articles marqués linux

As Google App. Engine uses a datanucleus plugin for database access, I’ve now switched to it (and leaved Hibernate).

Datanucleus uses bytecode instrumentation for persistance mapping, but not in real time like Hibernate does. Your classes must be enhanced just after compilation.

With maven, it’s not a problem for me, as described here:
http://www.datanucleus.org

Netbeans + Linux + Maven + datanucleus-plugin = hell

Using datanucleus-maven-plugin 1.1.4 (don’t use version 1.1.3 it will force download of Datanucleus 2.0), I get an error when running the compilation under Netbeans.

1.
2.
Embedded error: Error while executing process.
java.io.IOException: error=2, No such file or directory.

I then enable the log for the plugin to see what’s happening, but get no logs. No logs at all…

Of course, nothing in the doc about this problem, so I finally searched the plugin source code:

I see that the plugin is calling « java » directly to process the enhancements. And it seems that when Netbeans calls Maven for compilation, it doesn’t provide the linux path, so the plugin couldn’t start java.

I noticed then a hidden or not-so-documented option, fork, that if set to false, will call directly the bytecode enhancer with no calls to « java ».
Here is the maven configuration to use:

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
<plugin>
  <groupId>org.datanucleus</groupId>
  <artifactId>maven-datanucleus-plugin</artifactId>
  <version>1.1.4</version>
  <configuration>
    <fork>false</fork>
    <mappingIncludes>**/*.class</mappingIncludes>
    <api>JPA</api>
    <log4jConfiguration>
      ${basedir}/src/test/resources/log4j.properties
    </log4jConfiguration>
    <verbose>true</verbose>
    <enhancerName>ASM</enhancerName>
    <props>
       ${project.build.testOutputDirectory}/datanucleus.properties
    </props>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyclient</artifactId>
      <version>10.5.3.0_1</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
    </dependency>
  </dependencies>
</plugin>

So I tried, and this worked like a charm.
PS: The other plugin, schema-create doesn’t have this option, so I have to run it from command line.

I just switched my main development computer from Kubuntu to Mandriva.

Why switching ?

I used Kubuntu distribution for quite a long time now (almost 3 years), and I was quite happy with it.

- Lots of softwares

- The updates are smooth (distribution updates are often done automatically)

- you can escape the long « checking /dev/sda » sequence that always pops up when you need to quickly boot your computer !

But, since 3-6 monthes, I noticed more and more annoying problems.

- KDE 4 is really slow. There is always this annoying delay between a click and an action. Even without 3D installed.

- Before displaying any new window, you get garbage for 1s on screen at the window future position.

- It is badly integrated, For example, by default, Firefox opens all documents with Ark, even a directory or a PDF.

- I tried OpenOffice 3.0 from an official depot (in launchpad), but it kept crashing all the time.

So, regarding this, I decided to try other distribs, mainly Mandriva  and OpenSuse. I finally choose to install Mandriva.

Why Mandriva ?

First,

its install tool allowed me to resize dynamically and split the Kubuntu root filesystem in two partitions. And I installed Mandriva inside the newly created partition.

It has worked like a charm, I now have root Kubuntu, root Mandriva, and all uses the same /home directory. See the Mandriva partitioning tool in action:

With OpenSuse, it seems KDE is greatly integrated, but the partitioning tool scared me off. Even when you choose to split the partition and don’t format anything, it always displays the « recommand installation », that is, reformat all hard disk drive. I was not sure my demands were taken into account, and I surely didn’t want to loose all my data !

Second,

Mandriva is a great Distro.

- It boots very fast (27s from grub to login for Mandriva, 45s for Kubuntu)

- And more important KDE is back as a smooth, fast and responsive desktop,

- default  3D desktop settings are  well configured

- Firefox is nice and correctly set up (see pictures)….

Firefox under Mandriva:

Firefox under Kubuntu:

Which one is nicer ?

- The admin GUI interface is much better than Kubuntu, and much more things can be done through it.

For example, grub can be graphically modified:

- Fonts seem to be more pleasants for the eyes, but zooming them doesn’t seem to show any real difference.

On the not-so-bright side:

- I can’t figure out how to skip the checkdisk at boot, like in Kubuntu

- I had to install manually the printing system because default installation didn’t.

-what else ™?

I will see as time goes if this Mandriva distribution stays on this high level (especially full distro update was horrible in old mandriva versions), but for now, I’m quite happy with the change !

Hello,

I’m developing my project under Kubuntu. I’m quite happy with this OS, and really like

- the new Application Launcher Menu

- the button that allows you to browse your directories directly from the taskbar…

But this time I have a small problem. Maybe I didn’t catch the new desktop metaphor , but I have difficulties with this simple little thing:

I’m using Java development tools, that starts with a .sh, I want this .sh to be easily accessible from my desktop.


So I used Kubuntu « Desktop view »,and put a link to the .sh there:

See the javatools.sh  ?

Now my question is: How can I run it ?

It’s a link to an executable, but how can it be run ? When I click on it, I get kwrite opening the file.

When I right-click it,  I see that the .sh is recognized as a script shell:

But no options to run it….

What’s wrong with this ? How can I do a simple icon that starts a .sh ?

UPDATE: Found the solution.

The link must be directly on the desktop, not in folder view.