|

Tuesday September 09, 2008
SAAJ ClassCast Error with JDK 6
A project I'm working on at the moment has an authentication component which uses a webservice to do most of the work. During the development I stumbled across an issue, which while appearing to be known, is not well documented in any place, so in case anyone else hits this ....
Software Environment
The key part here is the JDK version, from what I can discern after doing some searching
all 1.6 JDK's have this issue, for the example here I'm using the 1.6.0_06 JDK (services & support), as bundled
with Solaris Nevada (snv_97)
(services & support), either Tomcat 6 or Glassfish 3 for the app server, and Netbeans 6.5 as the IDE. Our webservice in this case was generated using wscompile as bundled with Appserver 9.1 (services & support).
Stacktrace
The stacktrace that we are getting here (from Tomcat in this case, but the appserver is not important here)
is
org.apache.jasper.JasperException: java.lang.ClassCastException:
com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl cannot
be cast to com.sun.xml.messaging.saaj.soap.MessageImpl
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.ClassCastException: com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl
cannot be cast to com.sun.xml.messaging.saaj.soap.MessageImpl
com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
.............
Whats actually going on here (and if anyone has corrections please feel free to provide them,
this is not an area I've spent time reading into) is that the saaj classes that you would have
used before from the webservices development packs are now present in the 1.6 jdks rt.jar, and
we have a conflict between what is expected by the webservice and what we have.
Workarounds
A couple of workarounds exist, namely things I really don't like as the vary from environment to
environment e.g. placing endorsed libs in place. A more generic workaround is to add an extra startup option of
-Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
which eliminates the problem, but may have implications for other aspects of your application, so
use with caution.
(2008-09-09 06:35:11.0)
Permalink

Wednesday September 03, 2008
Amazons EBS
Werner Vogels (Amazon's CTO) has a nice post about Amazons Elastic Block Store. Well worth a read. Combined with the recently launched OpenSolaris AMI Catalogs this could be really interesting.
And into the mix you can add our developer and support services for OpenSolaris and MySQL - what more could you ask for if EC2 is in your plans.
(2008-09-03 06:46:46.0)
Permalink

Monday August 11, 2008
VDBench Release....
Just back from some quite enjoyable vacation time, and I noticed that Henk has released VDBench to the general public.
In my previous role with the Perf folks here in Dublin I used vdbench very extensively. We found (and the guys still find) more than a few bugs with it, and I can't praise it highly enough as a benchmark. In a world where some benchmarks are completely unrealistic and others are just plain pointless (yep dd is a benchmark tool, honest guv) vdbench allows you to stimulate realistic workloads quickly and easily. If you benchmark disks at all you should be aware of vdbench.
(2008-08-11 04:02:32.0)
Permalink

Tuesday July 29, 2008
Cool Cuil & Privacy
Have you seen Cuil yet? Its a new search engine founded by some ex Google folks among others. The area that has really grabbed my attention is their privacy policy, my favourite part being
when you search with Cuil, we do not collect any personally identifiable information, period. We have no idea who sends queries: not by name, not by IP address, and not by cookies (more on this later). Your search history is your business, not ours.
Music to my ears, and Cuil is now my default search engine on the privacy basis alone. The Irish connection does of course help :).
(2008-07-29 03:43:56.0)
Permalink

Monday July 28, 2008
Solaris Nevada 94 on Acer Aspire 5610
I've been a bit lax on my Nevada upgrades for my laptop recently, but I got a chance today to bring myself back up to date with snv_94. If your going to install this on an Acer Aspire 5610 you will run into a panic on boot due to some recent ACPI changes.
Straight off on boot you will get a panic similar to below, you will however
need to boot in kmdb mode to see this properly (just add -k to your grub options).
ddi_driver_major+9(0)
ddi_create_minor_common+0x51(0, f97a5538, 2000, 400, f97a5720, 0)
ddi_create_minor_node+0x25(0, f97a5538 , 2000, 400, f97a5720, 0)
acpi_drv`acpi_drv_attach+0xc2()
The work around is to add -B disable-acpi_drv=true to your grub options, my snv_94 grub entry reads
title snv_94
root (hd0,2,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B disable-acpi_drv=true -B acpi-user-options=8
module$ /platform/i86pc/$ISADIR/boot_archive
There is a fix in place for snv_95, and the relevant bugs are
- 6726425 - Dell XPS M1330 panic in 32 bit kernel.
- 6727562 - acpi_drv: snv_94 panics on 3 different laptops.
(2008-07-28 06:36:53.0)
Permalink

Wednesday July 02, 2008
The LinkedIn Cloud
An interesting blog which passed over my desk recently on Linked In's architecture. Well worth a read. Solaris, Java & MySQL - seems like the perfect software stack to me ;).
(2008-07-02 03:19:21.0)
Permalink

Tuesday June 17, 2008
Blogging bosses...
My new boss, Amy O'Connor, (well my bosses boss) got a mention over on the On The Record blog last week, but for a slightly less formal introduction, and a lot more background, take a look at her blog.
Amys first post in her role as VP of Services Marketing is highlighting our OpenSolaris Essentials and OpenSolaris Production Subscriptions. Changing my hat from an OpenSolaris user (and yes still a core contributor to the test community) to a member of the Services marketing team, these subscriptions offer you an unprecedented level of support with an open source OS, so go forth and deploy with confidence. Oh our multiple acronyms get a mention as well, although they are not quite up there with Tom Waits and PEHDTSCKJMBA.
Now we just have to get the direct boss blogging :).
(2008-06-17 07:02:44.0)
Permalink

Tuesday May 20, 2008
MySQL on ZFS
Nice brief article over on dev.mysql.com - A look at MySQL on ZFS.
(2008-05-20 02:05:13.0)
Permalink

Wednesday May 07, 2008
uperf - opensource network benchmark
I noted that the availability of uPerf, has just been announced over on perf-discuss. I had the opportunity to play with uperf a little bit in my previous role, its an extremely powerful and useful network benchmarking tool. If you need to measure networking performance with "real world" type workloads (and lets face it thats what you need to be doing) uPerf is well worth checking out.
(2008-05-07 08:49:18.0)
Permalink

Thursday April 10, 2008
xVM and the art of beer maintenance
We all know global warming is occurring, and from individual's
to corporations we can all make a contribution to containing, and eventually reversing climate change,
and save a bit of cash along the way as well. Seems like a win, win deal to me. But now the urgency
has grown, a colleague of mine forwarded on an article about the price of beer. The price of beer I
hear you ask? From the AP
release
Jim Salinger, a climate scientist at New Zealand's National Institute of Water and Atmospheric
Research, said climate change likely will cause a decline in the production of malting barley
in parts of New Zealand and Australia. Malting barley is a key ingredient of beer.
"It will mean either there will be pubs without beer or the cost of beer will go up," Mr. Salinger
told the Institute of Brewing and Distilling convention.
Now considering the fact, to borrow a quote the folks over on Goats, that
Beer is the salvation of all mans souls
this is a matter of some urgency for all of us
in the technology industry to address. Luckily for us the most complete suite of technologies, services
and solutions to address these problems is available from Sun.
Virtualization & Consolidation
There is virtualization from the management layer with
Sun xVM Ops Center, to
our hypervisor level offering xVM,
based on the work of the openxVM community, to logical domains
with LDoms on our award
winning CoolThreads servers,
to software level virtualization with Solaris
Zones and desktop level virtualization with Sun
xVM VirtualBox.
Using xVM and our range of
x64
and
Sun Blade Systems you can consolidate
your existing Solaris, Windows and Linux environments into one environment. Personally I still
have a soft spot for the Sun Fire x4600 M2,
but given the choice I would go for the Sun Blade
6000 with Sun Blade x6220 Server Modules
for x64 and x86 consolidation.
Why the Sun Blade 6000? Very simple, because
I can use the same blade chassis with LDoms
and the Sun Blade T6320 Server Module to
consolidate my existing Sparc applications. Of course if you don't feel that xVM is the right choice for your Windows or Linux consolidation all
of our x64 servers are VMWare certified,
and you can get your support and services directly from
Sun.
Sometimes however its not possible to migrate your ISV application to the latest version of
Solaris, we are all aware of the application that
was certified on with database X, jvm y and os z that no one wants to get recertified due to
the costs, but you know that the old machine thats there is just not efficient any more, users
would like better performance that can only come from a hardware upgrade, but the new hardware
doesn't support the old OS - fear not as
Solaris 8 Containers, building
on the excellent work of the Zones
and BrandZ communities over at
OpenSolaris allows you to safely consolidate
applications certified for Solaris 8 and Solaris 9
applications using Solaris 10 Containers, using any of our servers, from the most energy efficent
servers on the market,
Suns CoolThreads servers, to
our high end offerings.
If your not sure if this is for you or uncertain if you want to undertake a migration, why not
get one of our newly launched Sun Sparc
Enterprise T5140 Servers on our Try & Buy program, contact our Professional Services group about our
Enterprise Migration service, and see how much you could save on power, maintenance and support. Your boss will thank you for
saving your business money and more importantly you will be helping to protect the global beer supply, which we all know is the real issue here :).
(2008-04-10 05:43:10.0)
Permalink

Wednesday January 23, 2008
HTML 5 Draft Spec
Just noted that w3 sent out a press release about HTML 5 yesterday. The draft spec is well worth a look if you are in any way interested in the direction of HTML 5.
(2008-01-23 07:00:46.0)
Permalink

Friday January 18, 2008
17th Irish OpenSolaris Users Group Meeting
Tim have been busy planning the next IE-OSUG meeting
Topic News from December/January, Lightning talks
& generally being social!
Date Thursday January 31st
Time 7:00pm onwards
Location DIT, Kevin Street, room KE: 1-008
(unless I hear otherwise from the nice folks at DIT)
This month, we don't actually have a main speaker organised, so we're
just going to wing it.
Along with presenting the OpenSolaris news which we didn't get to talk
about in December[1], we'll also cover January's news items, which are
already starting to mount up!
In addition, we could use the extra time to host some ad-hoc Lightning
Talks[2] - these worked pretty well the last time we did these, and we
think the casual atmosphere was a good one:
http://www.opensolaris.org/os/project/ie-osug/meetings/11/
If you've slides in advance that you want to send on, drop Tim a mail,
or feel free to just bring them along on the night.
We'll update this month's web page at:
http://www.opensolaris.org/os/project/ie-osug/meetings/17/
with any Lightning Talk topics we get in advance -- all volunteers
welcome!
As always, we'll be recording the talk and adding it to our
podcast feed as well as posting the slides here, in case you can't make
it to the meeting.
Note this month, we're holding the meeting on a Thursday this month -
we've had a few people say that Tuesdays don't suit, so perhaps it would
be better switching the day the meetings on each month to better
accommodate people ?
Many thanks to the nice folks at DIT for hosting our meeting, please let
me know if the change of date doesn't suit?
A link to this announcement is:
http://www.opensolaris.org/os/project/ie-osug/meetings/17/
there's a PDF poster on the page you can use to further publicise the
meeting.
(2008-01-18 04:04:28.0)
Permalink

Friday January 11, 2008
[ music ] A bit of trad
[ cross post from the other side, but its for a good cause ]
... or a blatant plug. A cousin of mine Niamh Ni Charra is playing a showcase gig during the upcoming Temple Bar Trad festival in Dublin.
You can hear some of Niamh's tunes over on myspace. And yes, you can make this, and then go on to Explosions In The Sky, all in one night ;).
(2008-01-11 07:23:40.0)
Permalink

Friday December 21, 2007
DTrace ip Network Provider I see that Brendan Gregg has posted a draft PSARC case for the first part of the DTrace Network Provider over on DTrace-discuss. I can't even begin to describe how useful this will be.
(2007-12-21 07:33:30.0)
Permalink

Wednesday December 05, 2007
DTrace and the case of the slow login...
An interesting little problem came my way earlier on today which yet again
let me show just how useful DTrace is. Way back when
I did a bit of work with a customer around a small webapp they migrated to Solaris
from Linux. Anyway I got a mail from them earlier today, they split out
the webserver onto a seperate box a while back, and recently the initial
connections to the database tier have gotten very slow, for no obvious reasons.
They were looking into things like large logs and slow writes etc, but nothing
obvious was popping up. So we went through a couple of initial steps to see if
anything obvious jumped out - the various *stat tools showed everything running
normally so time to reach for DTrace. A quick oneliner showed up exactly where
the problem was, and while its a simple fix I thought I'd share it as an example here. The key point here is that this isn't a resource starvation issue, which is when people generally reach for DTrace, rather its a nasty side effect of a simple change that doesn't manifest itself in an obvious manner. Right, enough typing, the oneliner was...
dtrace -n 'syscall:::entry { @sc[ustack()] = count(); } tick-5sec { printa(@sc); }'
Looking at the output the first thing that I spotted were some stacks similar
to
libc.so.1`_so_send+0x7
libresolv.so.2`send_dg+0xe5
libresolv.so.2`res_nsend+0x45b
libresolv.so.2`res_nquery+0xc9
libresolv.so.2`ho_byaddr+0x379
libresolv.so.2`ho_byaddr+0x80
libresolv.so.2`gethostbyaddr_p+0x8e
libresolv.so.2`res_gethostbyaddr+0x26
nss_dns.so.1`_gethostbyaddr+0x21
nss_dns.so.1`__nss_dns_getbyaddr+0x91
nss_dns.so.1`getbyaddr+0x1b
libc.so.1`nss_search+0x17d
libnsl.so.1`_switch_gethostbyaddr_r+0x71
libnsl.so.1`_uncached_gethostbyaddr_r+0x2a
nscd`gethost_lookup+0x3dc
nscd`0x80541da
and
libc.so.1`stat64+0x7
nss_files.so.1`getbygid+0x2e
libc.so.1`nss_search+0x17d
libc.so.1`_uncached_getgrgid_r+0x63
nscd`getgr_lookup+0x3b2
nscd`0x8054852
libc.so.1`_thr_setup+0x4e
libc.so.1`_lwp_start
Hmmm, so nscd is busy. The next question was "have there been any network
changes?", they weren't aware of any but on some digging there was some
reconfiguration work done recently on the DNS server they use. Anyway the
temporary solution that they have put in place until the DNS issues are
resolved is to add the new webserver machine directly to /etc/hosts.
Without DTrace the root cause would have been a lot more painful to find,
instead this exchange was a couple of e-mails in the background while I
got on with the day job. Gotta love DTrace ;).
(2007-12-05 09:05:27.0)
Permalink
|