Thursday, February 26, 2009

Bluetooth and Nokia PC Suite

I recently suffered a frustrating experience trying to make Nokia PC Suite work with my 6650. The problems began when I changed from using an ancient 6682 to the newer 6650; after suspending and resuming my laptop (an IBM/Lenovo Thinkpad T60p), PC Suite would lose its bluetooth connection to the phone.

Things went from bad to worse, with PC Suite eventually refusing to talk to the phone at all, just giving the message "Cannot authenticate the phone" when trying to pair with it. Moreover, Windows would behave as though the phone were trying to pair with the PC when PC Suite was trying to pair with the phone, asking for a security code (when it should have been the phone asking for a code to match the one given to PC Suite). Installing the very newest drivers from the IBM homepage made things worse still, with bluetooth failing to work at all, giving the message "No local bluetooth device was detected" despite it plainly being found in the device manager, though the "Bluetooth Bus Enumerator" device had disappeared.

To fix this nightmare, I had to uninstall the Thinkpad driver in the device manager, then uninstall PC Suite, "PC Connectivity Solution," "Nokia Connectivity Cable driver," all instances of "Windows Driver Package - Nokia *," and "Thinkpad Bluetooth with Enhanced Data Rate Software" from the "Add/Remove Programs" control panel.

Then I had to run the installation software for the last 5.1 release of the Thinkpad Bluetooth software. This is not the current release; the 5.5 driver version does not work properly with Nokia PC Suite as far as I can tell. Fortunately I still had the 5.1 release on my laptop. I'm not sure if it can still be downloaded from IBM, Broadcom, or Lenovo, or where one would find it if it can.

Then I finally reinstalled PC Suite, and everything works again.

Hopefully this helps others in the same or a similar situation.

Labels:


Thursday, February 05, 2009

How to get Hibernate parameter bindings and ONLY parameter bindings

Let me preface this by saying that Hibernate is a gimpy pile of steaming mule shit.

With that out of the way, if you search around with Google and look for information on how to get the parameter bindings for SQL statements executed by Hibernate (which brilliantly are not given if you turn on SQL logging; see also: "mule shit"), you'll see a lot of smartass answers like setting org.hibernate.types=debug in your log4j configuration.

While that configuration change does include the parameter bindings, it also includes a giant shit-pile (mule) of extra data that you probably couldn't possibly care less about, including every time Hibernate binds a return value to a type. These different messages cannot be immediately differentiated by severity or by type (see also: "gimpy").

There is a mostly-workable solution, provided Hibernate has implemented/continues to implement their debugging messages in a consistent fashion:
    <appender name="SQLparams" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<param name="Threshold" value="TRACE"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.StringMatchFilter">
<param name="StringToMatch" value=" to parameter: " />
<param name="AcceptOnMatch" value="true" />
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter" />
</appender>

<category name="org.hibernate.type">
<priority value="TRACE"/>
<appender-ref ref="SQLparams" />
</category>



This filters the log4j output of org.hibernate.type.*, including only the lines that contain the text " to parameter: ". This will of course also include constants coming back from your database that include the phrase " to parameter: ", but chances are this will usually be good enough, unless or until Hibernate pries its overinflated head out of its ass.

Labels: , , ,


Thursday, September 11, 2008

Fantastic Microsoft Idiocy

Some time yesterday, there was a power outage at my place of sufficient length to cause my UPS software to hibernate the machine. That apparently went OK, but when the machine tried to restore from the hibernate file, it instead bluescreened and rebooted.

This resulted in a familiar screen to frequent hibernate users to appear upon rebooting. It's the page of text that tells you that the last attempt to restore from hibernation failed, and asks if you want to continue with system restarting or delete the hibernate file and then start the system.

That's all fine and good. In cases like this, I usually want to try one more time to restore from hibernation (which works about 20% of the time), and when that fails, I just cut my losses, delete the hibernate file and continue.

The problem? This menu does not work, at all, if you have a USB keyboard. At first I thought it might be a problem with my KVM switch, so I took that out of the loop and connected my USB keyboard directly to the PC. No luck. Then I thought maybe there was a problem with my new USB keyboard, so I tried accessing the BIOS with it. That worked fine.

Fortunately I still had my old PS2 keyboard laying around, and I could plug it in to respond to that prompt. But anyone without a PS2 keyboard handy would be unable to boot into windows until they got one.

Somehow, Microsoft, one of the largest software companies in the world, with its thousands of engineers working on Windows XP, can't manage to make a simple menu work with standard USB keyboards. Idiots.

Postscript:
It seems a number of others have gotten into this particular failure mode. A Google search for windows hibernate "restoration data" "usb keyboard" turns up a number of people experiencing the same problem, and mostly solving it the same way: by plugging in a PS/2 keyboard to respond to the menu.

Labels: , , ,


Monday, April 28, 2008

Fixing that Annoying Windows XP Taskbar Resizing Problem

Windows XP can be an annoying POS sometimes. Especially when it thinks it knows better than I do how many lines my taskbar should be. I like it to be 2 rows high. For reasons unknown, Windows wants it to be one row less than whatever I set it to. Every time I reboot, Windows reduces the height of the taskbar by one row of buttons.

Or it did. I made it stop. It seems like this is related in some way to Windows' theme support. One way to make it stop is to disable that. In the Control Panel, open Administrative Tools | Services. Look in the list for "Themes". Right-click it and choose "Properties." Change the Startup Type to "Disabled" and click "Stop."

Now Windows XP doesn't change my taskbar anymore. And before you ask, yes I tried locking the taskbar first. It had no effect, other than making it take one more step for me to resize the taskbar back to where I set it.

Labels: ,


Monday, April 09, 2007

Why is Maven Still Such a Horrific Pile of Garbage?

Maven is, hands-down, the absolute worst piece of crapware I have had the misfortune of using in the last 4 years. This collection incidentally includes all versions of Microsoft Internet Explorer, including IE7, which only crashed every time I started it for a week due to an incompatibility with the Google Toolbar. It's worse than Norton Antivirus. It's worse than Microsoft Outlook. It is a complete waste of bits.

The terrible, tragic thing about Maven is that there's a kernel of a really good idea behind it. Building stuff, handling dependencies, running tests, producing reports. Great! Fantastic! If only it weren't to software development what Mr Garrison's "It" was to transit.

First, those who get excited about XML configuration need to die in a fire. A sewage fire. You know what? XML blows. The XML fad is over. Stop using XML for all kinds of garbage that it was never intended for. What the hell is wrong with you? People do not like writing this crap, and they like reading it even less. I don't give a damn that it makes your crapware XML/Object mapping tool spit out nice little objects that are easy for YOU to deal with when handling configuration. It's not about YOU if you want people to use your diarrhea soup.

Next, why does everything in this obtuse XML configuration HELL have to be

nested

and nested

and nested

and nested

and nested?


Seriously, if I need to get a file included in my output, why does it have to be in a structure 4 levels deep? And why do some of the bottom-layer elements allow file globbing? Don't you realize that if you can handle file globbing, you could just one ONE DAMN TAG ONE LAYER DEEP and be done with it? Die!

Want to see the results of your unit tests? Go look in a bunch of individual files! Because the build can only scream FAILURE!!! at you (just like that) and doesn't bother to tell you which assertion failed at which line in which class and method.

What a horrible pile of dung. Maven has been around for well over 4 years and in that time the only thing that appears to have improved is its startup time.

I don't know why anyone puts up with this crap.

Labels: , , , , , ,


Sunday, March 04, 2007

Open JPA Can't @OrderBy a Related Object's @Id

https://issues.apache.org/jira/browse/OPENJPA-162

I just can't win tonight.

UPDATE: it turns out that @OrderBy with no options means to order by the identity value of the related object, and this does work correctly in OpenJPA.

Labels: , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]