If you see the following exception,
====================================================================
javax.xml.stream.XMLStreamException: ParseError at [row,col]:
Message: elementGetText() function expects text only elment but START_ELEMENT was encountered.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getElementText(Unknown Source)
at com.sun.xml.internal.stream.XMLEventReaderImpl.getElementText(Unknown Source)
at javax.xml.stream.util.EventReaderDelegate.getElementText(Unknown Source)
=====================================================================
it means that your STAX based parser is not handling the embedded xml properly. Your parser is expecting a regular text element and doing XMLEventReader.getElementText() call.
Solutions:
1) Bad: You can convert all "<" of your embedded xml to & l t ; (characters brought together).
2) Good: Let the parser peek at the next event and see if it is embedded xml and handle properly.
Thursday, January 28, 2010
Scott McNealy's Last Memo to Sun Employees
As usual, the greatness reeks in every word written by Scott. Kudos to him.
Text picked up from: CNET
================================
Subject: Thanks for a great 28 years
Date: Tue, 26 Jan 2010
From: Scott McNealy
To: [all Sun employees]
Gang,
When I interviewed many of you for employment at Sun over the years, one commitment often made was that things will change above, below, and around you faster than any place you have ever been. Looks like this was one area we exceeded plan for 28 years. While it was never the primary vision to be acquired by Oracle, it was always an interesting option. And this huge event is upon us now. Let's all embrace it with all of the enthusiasm and class and talent that we have to offer.
This combination has the potential to put Sun, its people, and its technology at the center of yet another industry and game-changing inflection point. The opportunity is well-documented and articulated by Larry and the Oracle folks. Not much I can add on this score. This is a very powerful merger. And way better than some of the alternatives we were facing.
So what do I say to all of you, now this is happening?
It turns out that one simple message to the large and diverse Sun community is actually quite hard to craft. Even for a big mouth who is always ready with a clever quip. The community includes our resellers and customers, our current and former employees, their friends and families who supported our employees on their mission to change the industry, our investors, our supply and service partners, students and educators, and even our competitors with whom we often collaborated.
But let me try. Though nothing I could write comes close to matching the unbelievably strong and positive emotions I have for you all. See, I never was able to master dispassion. I truly loved starting, running, and living Sun. And the last four years have not been without serious withdrawal. And the EU approval rocked me more than it should have.
So, to be honest, this is not a note this founder wants to write. Sun, in my mind, should have been the great and surviving consolidator. But I love the market economy and capitalism more than I love my company.
And I sure "hope" America regains its love affair with capitalism. And except for the auto industry, financial industry, health care, and some other places (I digress), the invisible hand is doing its thing quite efficiently. So I am more than willing to accept this outcome.
And my hat is off to one of the greatest capitalists I have ever met, Larry Ellison. He will do well with the assets that Sun brings to Oracle.
What we did right and wrong at Sun over the years might make for interesting reading. However, I am not a book writer. I am a husband, father of four, and a builder and leader of people who want to make a difference.
But spare me a bit of nostalgia. Not of the mistakes we made, and lord knows I made a ton. But of the things we did right and well.
First and foremost, Sun innovated like crazy. We took it to the limit (see Eagles). And though we did not monetize our inventions as well as we could have, few companies have the track record in R&D that we had over the last 28 years. This made working at Sun really cool. Thanks to all of you inventors and risk takers who changed how we live.
Sun cared about its customers. Even more than we cared about our own company at times. We looked at our customer's mission as more important than ours. Maybe we should have asked for more revenue in return, but our employees were always ready to help first. I love this about Sun, which I guess makes me a good capitalist, if not a great capitalist.
Sun did not cheat, lie, or break the rule of law or decency. While we enjoyed breaking the rules of conventional wisdom and archaic business practice, and for sure loved to win in the market, we did so with a solid reputation for integrity. Nearly three decades of competing without a notable incident of our folks going off course morally or legally. Not all executives and big companies are bad. Really. There are good companies out there. Special thanks to all of my employees for this. I never had to hide the newspaper in shame from my children.
Sun was a financial success. We paid billions in taxes, salaries, purchases, leases, training, and even lawyers and accountants for devastatingly cumbersome SOX and legal compliance (oops, more classic digression). Long-term and smart investors made billions in SUNW. And our customers generated revenue and savings using our equipment in countless ways. Many employees started families, bought homes, and put them through school while working at Sun. Our revenues over 28 years exceeded $200B. Few companies make it to the F200. We did. Nice.
Sun employees had way more fun than any other company. By far. From our dress code ("You must!") to beer busts to our April Fools' pranks to SunRise to our quiet enjoyment at night of a long, hard, well-done day of work, no company enjoyed "work" more than Sun. Thanks to all of our employees past and present for making Sun such a blast.
I could go on for a long time reminiscing about the good and great stuff we did at Sun, but just allow me one last one. We shared. Not the greatest attribute for a capitalist. But one I could not change and was not willing to change about Sun while I was in charge. We shared in the success of Sun with our resellers. With our employees through stock options, SunShare, beer busts, and the like (for as long as Congress would allow) and through our efforts to keep as many of them on board for as long as possible during the inevitable down cycles. With our partners through the Java Community Process, through our open-source collaborations, and licensing strategies. With our customers through our commitments to low barriers to exit. Sun was never just about us. It was about we. And that may be a bit of the reason we are where we are today.
But I have few regrets (see Sinatra's "My Way") and will always look back at Sun and its gang with only pride. Enormous pride. You are the best this industry ever had, though few outside of Sun recognized it.
And what we are about will live on in Sparc, Solaris, Java, our products, and our spirit. Well past everyone's recollections of what we did together. I will never forget, though.
Oracle is getting a crown jewel of the technology industry. They will do great things with Sun. Do your best to support them, and keep the Sun spirit alive and well in the industry. Our children will be better for it.
Thanks for the off-the-charts support to everyone who ever carried a Sun badge, used our products, or helped our company through the years.
And thanks to my wonderful wife, Susan, who gave this desperado (see Eagles) a chance to choose the Queen of Hearts before it was too late.
Someday, hopefully, you will all get to see or meet her and my other life's works named Maverick, Dakota, Colt, and Scout. If you do, perhaps you will understand why I stepped back from the CEO role four years ago. And why I feel like the luckiest guy in the whole world.
My best to all of you, and remember:
Kick butt and have fun!
Scott
===================================================================
The legacy of this great memo will live on!!!
Text picked up from: CNET
================================
Subject: Thanks for a great 28 years
Date: Tue, 26 Jan 2010
From: Scott McNealy
To: [all Sun employees]
Gang,
When I interviewed many of you for employment at Sun over the years, one commitment often made was that things will change above, below, and around you faster than any place you have ever been. Looks like this was one area we exceeded plan for 28 years. While it was never the primary vision to be acquired by Oracle, it was always an interesting option. And this huge event is upon us now. Let's all embrace it with all of the enthusiasm and class and talent that we have to offer.
This combination has the potential to put Sun, its people, and its technology at the center of yet another industry and game-changing inflection point. The opportunity is well-documented and articulated by Larry and the Oracle folks. Not much I can add on this score. This is a very powerful merger. And way better than some of the alternatives we were facing.
So what do I say to all of you, now this is happening?
It turns out that one simple message to the large and diverse Sun community is actually quite hard to craft. Even for a big mouth who is always ready with a clever quip. The community includes our resellers and customers, our current and former employees, their friends and families who supported our employees on their mission to change the industry, our investors, our supply and service partners, students and educators, and even our competitors with whom we often collaborated.
But let me try. Though nothing I could write comes close to matching the unbelievably strong and positive emotions I have for you all. See, I never was able to master dispassion. I truly loved starting, running, and living Sun. And the last four years have not been without serious withdrawal. And the EU approval rocked me more than it should have.
So, to be honest, this is not a note this founder wants to write. Sun, in my mind, should have been the great and surviving consolidator. But I love the market economy and capitalism more than I love my company.
And I sure "hope" America regains its love affair with capitalism. And except for the auto industry, financial industry, health care, and some other places (I digress), the invisible hand is doing its thing quite efficiently. So I am more than willing to accept this outcome.
And my hat is off to one of the greatest capitalists I have ever met, Larry Ellison. He will do well with the assets that Sun brings to Oracle.
What we did right and wrong at Sun over the years might make for interesting reading. However, I am not a book writer. I am a husband, father of four, and a builder and leader of people who want to make a difference.
But spare me a bit of nostalgia. Not of the mistakes we made, and lord knows I made a ton. But of the things we did right and well.
First and foremost, Sun innovated like crazy. We took it to the limit (see Eagles). And though we did not monetize our inventions as well as we could have, few companies have the track record in R&D that we had over the last 28 years. This made working at Sun really cool. Thanks to all of you inventors and risk takers who changed how we live.
Sun cared about its customers. Even more than we cared about our own company at times. We looked at our customer's mission as more important than ours. Maybe we should have asked for more revenue in return, but our employees were always ready to help first. I love this about Sun, which I guess makes me a good capitalist, if not a great capitalist.
Sun did not cheat, lie, or break the rule of law or decency. While we enjoyed breaking the rules of conventional wisdom and archaic business practice, and for sure loved to win in the market, we did so with a solid reputation for integrity. Nearly three decades of competing without a notable incident of our folks going off course morally or legally. Not all executives and big companies are bad. Really. There are good companies out there. Special thanks to all of my employees for this. I never had to hide the newspaper in shame from my children.
Sun was a financial success. We paid billions in taxes, salaries, purchases, leases, training, and even lawyers and accountants for devastatingly cumbersome SOX and legal compliance (oops, more classic digression). Long-term and smart investors made billions in SUNW. And our customers generated revenue and savings using our equipment in countless ways. Many employees started families, bought homes, and put them through school while working at Sun. Our revenues over 28 years exceeded $200B. Few companies make it to the F200. We did. Nice.
Sun employees had way more fun than any other company. By far. From our dress code ("You must!") to beer busts to our April Fools' pranks to SunRise to our quiet enjoyment at night of a long, hard, well-done day of work, no company enjoyed "work" more than Sun. Thanks to all of our employees past and present for making Sun such a blast.
I could go on for a long time reminiscing about the good and great stuff we did at Sun, but just allow me one last one. We shared. Not the greatest attribute for a capitalist. But one I could not change and was not willing to change about Sun while I was in charge. We shared in the success of Sun with our resellers. With our employees through stock options, SunShare, beer busts, and the like (for as long as Congress would allow) and through our efforts to keep as many of them on board for as long as possible during the inevitable down cycles. With our partners through the Java Community Process, through our open-source collaborations, and licensing strategies. With our customers through our commitments to low barriers to exit. Sun was never just about us. It was about we. And that may be a bit of the reason we are where we are today.
But I have few regrets (see Sinatra's "My Way") and will always look back at Sun and its gang with only pride. Enormous pride. You are the best this industry ever had, though few outside of Sun recognized it.
And what we are about will live on in Sparc, Solaris, Java, our products, and our spirit. Well past everyone's recollections of what we did together. I will never forget, though.
Oracle is getting a crown jewel of the technology industry. They will do great things with Sun. Do your best to support them, and keep the Sun spirit alive and well in the industry. Our children will be better for it.
Thanks for the off-the-charts support to everyone who ever carried a Sun badge, used our products, or helped our company through the years.
And thanks to my wonderful wife, Susan, who gave this desperado (see Eagles) a chance to choose the Queen of Hearts before it was too late.
Someday, hopefully, you will all get to see or meet her and my other life's works named Maverick, Dakota, Colt, and Scout. If you do, perhaps you will understand why I stepped back from the CEO role four years ago. And why I feel like the luckiest guy in the whole world.
My best to all of you, and remember:
Kick butt and have fun!
Scott
===================================================================
The legacy of this great memo will live on!!!
Monday, January 25, 2010
"The type java.lang.Object cannot be resolved." with Eclipse
There can be many cases for this:
1) You have lost .classpath and other eclipse files. If you use maven, then do "mvn eclipse:eclipse:.
2) Your .classpath may contain (org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java5) Just remove that to yield
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
1) You have lost .classpath and other eclipse files. If you use maven, then do "mvn eclipse:eclipse:.
2) Your .classpath may contain (org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java5) Just remove that to yield
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Wednesday, January 20, 2010
Eclipse Issues on Fedora 12
Now if you are facing issues with eclipse on Fedora 12, you need to do the following depending on how you start eclipse.
You will need to export GDK_NATIVE_WINDOWS=true before you start eclipse.
Relevant eclipse bug: https://bugs.eclipse.org/bugs/show%5Fbug.cgi?id=291257
If you use command line to start eclipse:
Create a script that looks as follows:
#!/bin/sh
export MOZILLA_FIVE_HOME=/usr/lib/mozilla/
export ECLIPSE_HOME=/opt/IBM/eclipse
export GDK_NATIVE_WINDOWS=true
$ECLIPSE_HOME/eclipse $*
If you use a Desktop shortcut under KDE (Dolphin):
Then in the Properties dialog, under the application tab do the following:
export GDK_NATIVE_WINDOWS=1; /opt/eclipse/eclipse -showlocation -data /home/xxx/workspace
Please do not forget to the rename the workspace directory propertly. Also verify whether your eclipse installation directory is /opt/eclipse or change it accordingly.
You will need to export GDK_NATIVE_WINDOWS=true before you start eclipse.
Relevant eclipse bug: https://bugs.eclipse.org/bugs/show%5Fbug.cgi?id=291257
If you use command line to start eclipse:
Create a script that looks as follows:
#!/bin/sh
export MOZILLA_FIVE_HOME=/usr/lib/mozilla/
export ECLIPSE_HOME=/opt/IBM/eclipse
export GDK_NATIVE_WINDOWS=true
$ECLIPSE_HOME/eclipse $*
If you use a Desktop shortcut under KDE (Dolphin):
Then in the Properties dialog, under the application tab do the following:
export GDK_NATIVE_WINDOWS=1; /opt/eclipse/eclipse -showlocation -data /home/xxx/workspace
Please do not forget to the rename the workspace directory propertly. Also verify whether your eclipse installation directory is /opt/eclipse or change it accordingly.
Tuesday, January 12, 2010
Fedora: smartmontools = 1:5.38-2.fc9 is needed by (installed) smartmontools-config-1:5.38-2.fc9.x86_64
When you see this error, it means that you have some bad dependencies.
==============
Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
smartmontools = 1:5.38-2.fc9 is needed by (installed) smartmontools-config-1:5.38-2.fc9.x86_64
Complete!
===============
Remedy:
You need to clean up bad deps using package-cleanup:
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
Missing dependencies:
Package smartmontools-config-5.38-2.fc9.x86_64 requires smartmontools = 1:5.38-2.fc9
Package libflashsupport-000-0.5.svn20070904.i386 requires libcrypto.so.7
Package libflashsupport-000-0.5.svn20070904.i386 requires libssl.so.7
anil@localhost:~$ sudo rpm -e smartmontools-config-5.38-2.fc9.x86_64
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
Missing dependencies:
Package libflashsupport-000-0.5.svn20070904.i386 requires libcrypto.so.7
Package libflashsupport-000-0.5.svn20070904.i386 requires libssl.so.7
anil@localhost:~$ sudo rpm -e libflashsupport-000-0.5.svn20070904.i386
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
No problems found
=====================================
==============
Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
smartmontools = 1:5.38-2.fc9 is needed by (installed) smartmontools-config-1:5.38-2.fc9.x86_64
Complete!
===============
Remedy:
You need to clean up bad deps using package-cleanup:
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
Missing dependencies:
Package smartmontools-config-5.38-2.fc9.x86_64 requires smartmontools = 1:5.38-2.fc9
Package libflashsupport-000-0.5.svn20070904.i386 requires libcrypto.so.7
Package libflashsupport-000-0.5.svn20070904.i386 requires libssl.so.7
anil@localhost:~$ sudo rpm -e smartmontools-config-5.38-2.fc9.x86_64
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
Missing dependencies:
Package libflashsupport-000-0.5.svn20070904.i386 requires libcrypto.so.7
Package libflashsupport-000-0.5.svn20070904.i386 requires libssl.so.7
anil@localhost:~$ sudo rpm -e libflashsupport-000-0.5.svn20070904.i386
anil@localhost:~$ sudo package-cleanup --problems
Setting up yum
Loaded plugins: dellsysidplugin2, refresh-packagekit
Reading local RPM database
Processing all local requires
No problems found
=====================================
Subscribe to:
Posts (Atom)