Thursday, December 22, 2005, 11:43 AM - SuSE
Symptom
Under openSuSE 10.0 the numeric keypad fails completely and the mouse fails on some widgets under KDE. The logfiles showed a missing modules.dep file and some other severe errors.
The system used is a 1.6Ghz Pentium 4 Dell dimension 4300.
Solution
Since this only has been observed after a system has been booted after install and after some sig 11 errors, the failure is most likely hardware-software interaction related, and is probably caused by the incorrect loading of some modules. The way out is to reboot the system. After that the errors are gone, and are not reproducable.
| permalink |
Monday, December 19, 2005, 04:00 PM - Java
Symptom
You pressed a key combination concerning <SHIFT>,<CTRL> and <-, and now the eclipse v3.2 editor acts weird. No inserts of characters possible, however deletes of characters are possible. Also using the arrows controls the scrollbar for the up/down arrow and jumps words for the left/right arrow.
What is wrong
You hit a key combination which put you in a different editing mode, or you are straight in a bug. I have not been able to reproduce it yet.
Solution
The correct solution is to reset the editing mode with the menu:
windows->Navigation->Activate Editor <F12>
| permalink |
Thursday, December 8, 2005, 03:46 PM - Java, MySQL
Symptom
While using JDBC, you get the following exception:
java.sql.SQLException: Can not issue data manipulation statements with executeQuery()
The query you wrote has INSERT, UPDATE or DELETE in it.
Solution
The JDBC standard does not allow this. So alter your way of executing the PreparedStatement.
Execute this with execute() or executeUpdate() instead of the very general executeQuery.
ExecuteQuery is only for real queries returning only values, not doing any data manipulation at all.
| permalink |
Wednesday, December 7, 2005, 11:08 PM - General applicable solutions, Linux
To create a filesystem in a file, first a file needs to be create at the size of the filesystem. This can be done with dd:
dd if=/dev/zero of=fileXYZ bs=1024 count=1024
The count can be made bigger to get a bigger file.
Use your favourite filesystem creator on this file, and you will have the filesystem in a file available for all to use.
Mounting the filesystem is done by:
mount fileXYZ /mnt -o loop
| permalink | related link |
Tuesday, December 6, 2005, 09:25 PM - Linux
From the help of the kernel config:
mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
Do this from inside your running UML system.
Also see the related link for more information
| permalink | related link |
Tuesday, December 6, 2005, 05:18 PM - MySQL
Symptom
A connection to the mysql server with a certain user/password combination fails with the error:
Host is not allowed to connect to this MySQL serverConnection
Solution
Alter the host column in the mysql database user table to the host on which it fails or to %. Restart mysql or reload the grant tables and the login should be possible.
| permalink |
Tuesday, December 6, 2005, 05:15 PM - Java
Symptom
In the logfiles of your tomcat you find the following error:
Parse error in application web.xml
java.lang.ClassNotFoundException: org.apache.catalina.Container
Solution
Apparently one of the jars you copied or linked to the tomcat/common/lib has caused a strange conflict. Remove the last added jar(s) and start tomcat again. Now tomcat starts again, except that your application still does not run.
The class/jar you copied should have been in tomcat/shared/lib. Copy or link the jar to that location, and the error will disappear, while the added jar should work.
| permalink |
Tuesday, December 6, 2005, 03:55 PM - Java, MySQL
Symptom
Trying to start tomcat, but it will not load because of the following exception:
Exception opening database connection
java.sql.SQLException: com.mysql.jdbc.Driver
etc.
Solution
Download the mysql jdbc connector from www.mysql.com and put it in the tomcat/common/lib directory. The driver will now load.
| permalink |
Tuesday, December 6, 2005, 03:14 PM - Java
Symptom
java.lang.NoClassDefFoundError: some class exception in the logfile of Tomcat.
Solution
Add the jar class to the tomcat/common/lib directory.
Restart Tomcat and the exception will be gone.
| permalink |
Monday, December 5, 2005, 11:41 PM - Linux
Note: This just works, it is not a complete configure so there is some work left for the rest of the setup.
Download a kernel newer than 2.6.8 from ftp.kernel.org. Newer than 2.6.8 because those versions do not need to be patched to get UML working (saves a few steps)
Unpack the kernel in your favourite location, and type:
make menuconfig ARCH=um
This starts the menuconfig in uml mode, giving you different options to configure just this kernel.
Configure what you want, but make sure you enable the following:
[b}Block devices->Virtual block device->Always do synchronous IO for UBD
This option is not obvious, but is needed to be able to access your root device.
Type:
make linux modules ARCH=um
This will create a executable file called linux in linux source directory. Copy this to a usefull location (/usr/bin for example)
While the kernel is being build, do the following:
Download a root filesystem from sourceforge.net (files starting with root_fs) or create on yourself by using dd:
dd if=/dev/hdX# of=root_fs_filename
So essentially you could copy your own install into an image.
Alter the downloaded or created image by mounting it and adding the disk locations needed for ubd:
mount -o loop -t auto root_fs /mnt
cd /mnt/dev
mkdir ubd
cd ubd
for i in 0 1 2 3 4 5 6 7; do mknod $i b 98 $[ $i * 16 ]; done
cd ..
chmod 660 ubd
chown -R root:disk ubd
cd /
umount /mnt
Start the user mode linux kernel with:
linux ubd=/yourlocation/root_fs_filename
The kernel should boot giving a running linux system on your console.
| permalink |
Monday, December 5, 2005, 04:02 PM - MySQL
Symptom
A MySQL CREATE TABLE returns with this error statement:
ERROR 1005 (HY000): Can't create table './dbname/tablename.frm' (errno: 150)
Solution
One of the tables being referenced in the FOREIGN KEY syntax does not exist. Correct this and the error will be gone.
| permalink |
Monday, December 5, 2005, 11:50 AM - General applicable solutions
Symptom
You are trying to commit a change or a new file in CVS, but it fails with the following error:
cvs [commit aborted]: received abort signal
cvs: hash.c:312: findnode: Assertion `key != ((void *)0)' failed.
cvs commit: saving log message in /tmp/cvsqLE7qZ
Cause
This can have multiple causes, usually filesystem related which made it impossible for CVS to complete the commit action. For example no disk space left of you CVS server.
Solution
Take care that there is enough diskspace for CVS to work and delete the offending file(s) out of your repository. After that commit again and it will work as usual.
| permalink |
Thursday, December 1, 2005, 05:53 PM - Linux
Symptom
The linux system has a high load, but there is not process visible which causes this.
Solution
Apparently a process is running/runable or in a D state (Waiting for a resource to become available, usually IO).
To locate the process use ps, or by "echo t >/proc/sysreq-trigger" which will dump the kernel state into /var/log/messages.
From there on it is possible to locate the process, and help it along or just plainly kill it.
| permalink |
Wednesday, November 30, 2005, 02:25 PM - Java
Suppose you need to do datetime calculations in Java, like your input needs for example to shift a timezone, or just be corrected by a certain amount of time, and the java.util.Calendar class is the class you selected to do the calculations with. Somehow however the calls you do to the class return strange values. There are two causes for this:
- Lenience.
- Month numbering is 0 to 11.
Lenience is used to be able to take wrong input and work with it anyway. This is done so that datetime calculations can be done in an easy way. Just overload a parameter, and the date which you request later, will be corrected for that overload.
For example: The following date is put into the Calendar: 2005-12-04 16:00
This is done by:
calendar.set(2005,12,04,16,00);
System.out.println(calendar.toString()); returns on this:
java.util.GregorianCalendar[time=?,areFieldsSet=false,
areAllFieldsSet=false,lenient=true,
zone=java.util.SimpleTimeZone[id=GMT,offset=0,dstSavings=3600000,
useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,
startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,
endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOfWeek=1,
minimalDaysInFirstWeek=1,ERA=?,YEAR=2005,MONTH=12,WEEK_OF_YEAR=?,
WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,
DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=14,MINUTE=0,
SECOND=?,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]
As you can see, the month says 12, and the year 2005.
Calling calendar.get(Calendar.YEAR); returns 2006. This is not an error, but a definition problem. Humans count months from 1 to 12, Sun however decided to put the months in an Enumeration with internal numbering from 0 to 11. Month 12 does not excist, so what does this Calendar do with it once you ask the date, is use the lenience (lenient=true), which results in:
Highest month in Calendar allowed is 11 (december), add 1 returns 0 (januari), add 1 to year to correct for this, returns 2006.
To prevent this, the input has to be corrected. The dirty way is just to substract 1 from the month, the correct way is:
public int getCalendarMonth(int month)
{
switch (month) {
case 1: return Calendar.JANUARY;
case 2: return Calendar.FEBRUARY;
case 3: return Calendar.MARCH;
case 4: return Calendar.APRIL;
case 5: return Calendar.MAY;
case 6: return Calendar.JUNE;
case 7: return Calendar.JULY;
case 8: return Calendar.AUGUST;
case 9: return Calendar.SEPTEMBER;
case 10: return Calendar.OCTOBER;
case 11: return Calendar.NOVEMBER;
case 12: return Calendar.DECEMBER;
}
return -1; // Invalid input!
}
And later, if you want a readable date again, in which DateFormat is again of no use for your case:
public int getMonth(int calendarMonth)
{
switch (calendarMonth) {
case Calendar.JANUARY : return 1;
case Calendar.FEBRUARY : return 2;
case Calendar.MARCH : return 3;
case Calendar.APRIL : return 4;
case Calendar.MAY : return 5;
case Calendar.JUNE : return 6;
case Calendar.JULY : return 7;
case Calendar.AUGUST : return 8;
case Calendar.SEPTEMBER : return 9;
case Calendar.OCTOBER : return 10;
case Calendar.NOVEMBER : return 11;
case Calendar.DECEMBER : return 12;
}
return -1; // Invalid input!, should not be possible
}
A fast way to validate your input, is to use the lenience=false. By putting lenience on false, the overload of the parameters is not allowed anymore, and invalid input will lead to an Exception instead of unexpected values. At this moment the default value for lenient=true.
| permalink | related link |
Tuesday, November 29, 2005, 04:57 PM - News
Hipersonik.com started with documenting the fixes which they make for their customers on their own website. This documentation is publicly available in a simple format. The goal of this documentation is for easier solving of future problems, which tend to repeat all the time, and to share knowledge between the Hipersonik.com engineers in an easy accesible format. At this moment no format has been chosen yet for the content. The content will later be placed in a more open environment (forum style). However unlike other forums on the internet, we do not want to have questions hanging around without a reasonable response, which just makes people come to this website and find out that they are not the only one with the questions. So the forum(s) will be moderated as in that only the engineers will post questions with solutions. Everybody else is allowed to add comments to it with requests for further explanation.
The general setup of the solutions is to provide a script which the user can follow to solve his or her problem.
Since the solutions will not always work on all platforms, there will be notes concerning software versions or platforms if applicable.
| permalink |
Tuesday, November 29, 2005, 04:53 PM - Java
Symptoms
Eclipse will give an error on your package like The declared package does not match the expected package /src/java/com/yourcompany/etc
Solution
Go to project/properties/java build path and click on the source tab. Add the src/java directory as source directory, and remove the old ones (if necessary, depends on your project).
If the problem stays after you altered your source directory to the correct directory, you will have to refresh or sometimes restart eclipse before it realizes the problem is solved.
| permalink |
I have a question about a product not mentioned in your expertise list. Can I still ask that question?
Tuesday, November 29, 2005, 11:27 AM - Faq
The listed expertise are the areas which is most known about by our engineers. You can ask other questions too. There is a good chance that the question can be answered anyway. See the contact information on how to contact us.
| permalink |
I paid to see solution XYZ on website QRS. I now discover that I could have found the same solution here for free. Can I get my money back?
Tuesday, November 29, 2005, 11:25 AM - Faq
Hipersonik.com publishes their solutions under the Gnu FDL license. This license states that everybody is free to copy the solution, and alter it (enhance or just plainly change it, there are some conditions, read the license for details). They can charge for access to their solution database to keep their cost of running it within proportions. We however have not relations with those websites and are not responsible for what they offer. We also do not get any revenues from them. So if you want your money back, you will have to go the company which you paid to see our solution and claim it there. We will not refund any payments made to other companies for you, nor will we help you with getting your money back.| permalink |
Tuesday, November 29, 2005, 11:24 AM - Faq
Most of the solutions which are implemented by Hipersonik.com are the result of reading the manuals, applying or making bugfixes on Open Source software, and using publicly available information. We think that the solutions which we create with this freely available information, on which we improve, should be freely available again. Since we do not post in other forums, we at least should give people a chance to copy a solution without them having to think about the consquences of copying the solution.
| permalink |
Sunday, November 27, 2005, 12:10 AM - General applicable solutions
Symptom:
Uptime program returns wrong value, just a few days instead of the expected 500+ days of uptime.
Solution:
Request your uptime with 'last -xf /var/run/utmp runlevel'. This will return the real uptime of your machine.
| permalink |
Back Next





