Thursday, 23 February 2012

Target "profile-j2ee" does not exist in the project

This is an error which you can get when attempting to Profile a project in NetBeans. A solution I found is;

"It seems that something has changed in project's build script, so the project 
is only partially modified for profiling, leading to the message you've 
provided. Probably the easiest way how to enable profiling again is to undo all 
project modifications and let the Profiler to integrate with the project again.

To do it, perform following modifications:

 - in build.xml, remove <import file="nbproject/profiler-build-impl.xml"/> line
 - in ./nbproject directory, remove profiler-build-impl.xml file
 - in ./nbproject/private, remove <data 
xmlns="
http://www.netbeans.org/ns/profiler/1" version="0.4"/> line
 - (optional) remove ./nbproject/private/profiler directory to remove all 
Profiler settings related to the project

Now after clicking the Profile (Main) Project action again, the Profiler 
notifies you about build script modification and profiling should work again."


From: 
http://netbeans.org/bugzilla/show_bug.cgi?id=73742

Wednesday, 22 February 2012

copylibs doesn't support the "rebase" attribute

This can happen when a NetBeans 7.1 project opens a project with an older version of CopyLibs. The solution is;

- Tools->Libraries
- select the "Library location" that you want to fix (not the Global one)
- select the "CopyLibs Task"
- click the "Remove" button on the lower left corner
- click "Ok"

- In the project explorer right click on the "Libraries" virtual folder under
your project
- click "Add Library..."
- click the "Import" button
- select on "CopyLibs Task"
- click the "Import Library" button
- click the "Cancel" button

This can also happen the other way round i.e. when a version of NetBeans less than 7.1 opens a 7.1 project. The solution is;

- Open the file nbproject/build-impl.xml
- remove the rebase attribute and value from the line the error is coming from which is a <copylibs/> tag
 

Tuesday, 21 February 2012

Installing .msi files with wine

In a terminal enter;

wine msiexec /i your_file.msi

This will open the file as an exe allowing you to install/run the application.

To reboot wine enter;

wineboot

Linux execution/boot levels

This is the first process that is run by the Linux kernel and is what loads the rest of the system.

There are a number of different execution/boot levels i.e. the mode the computer operates.

The default init is set by a variable called initdefault found in /etc/inittab.

The execution levels are;

0: Halt (i.e. shut down)
1: Single user - reduced set of services, used if others do not boot
2: All services excluding network
3: Full user (no GUI)
4: Not used
5: Full user (with GUI)
6: Reboot

To change the init level enter init [mode] (e.g. init 3). To change the init on startup, change the initdefault value in the inittab file.

To check which level you are on use the who -r command.

For more commands use man init.

Wednesday, 2 November 2011

/bin/sh^M: bad interpreter: No such file or directory

I got the following error when attempting to run a .sh file I had obtained;

bash: ./thefile.sh: /bin/sh^M: bad interpreter: No such file or directory

After a little bit of research it turns out that the file had been written on Windows and then exported thus creating a basic text format issue.

Under DOS (Windows/PC) the end of a line of text is signalled using the ASCII code sequence CarriageReturn,LineFeed (alternately written as CR,LF or the bytes 0×0D,0×0A). On the Macintosh platform, only the CR character is used. Under UNIX, the opposite is true and only the LF character is used.

To fix this I ran the following command which converts the file to UNIX format;

dos2unix thefile.sh

Information on the dos2unix command can be found here.

Monday, 31 October 2011

How to start Jasper server in Linux

To start a JasperSoft server in Linux go to your Jasper server install directory, typically /usr/local/jasperserver/

cd /usr/local/jasperserver/

Then run the start command on the Jasper control shell script;

./jasperctl.sh start

This can be done in one with the command;

./usr/local/jasperserver/jasperctl.sh start

Wednesday, 26 October 2011

Recompiling Virtual Box's kernel

I recently installed some updates on my openSUSE Linux machine and found that my VirtualBox machines were no longer starting. I was receiving an error similar to the image below.


To fix this I needed to recompile my VirtualBox kernel. To do this I opened up a console as root (using su and my root password) and ran the following commands;

cd /etc/init.d/
./vboxdrv setup