Oracle 11g on Windows 7 professional (32 bits)
I have downloaded two zip files for Oracle 11g release 2 from Oracle site as follows.
Unzipped ‘em and ran setup.exe from \win32_11gr2_database_1of2\database\setup.exe and got zillion of file not found errors as follows.
–> \application\em.ear, \bin\db2gc\, \config\system-application.xml\
–> Template General_Purpose.dbc does not exist
–> Oracle Database Configuration Assistant failed
Anyway, after fiddling with some times, I found out that the two zip files I have downloaded, needed to combine together to solve file not found errors. So I copied win32_11gR2_database_2of2\database to win32_11gR2_database_1of2\database to merge two database directories and here is the login page for Oracle 11g r2 after a successful install.

A video that I found to show step by step but it does not say to combine two zip files if you download the the software from web.
HSSFWorkbook object write it to Excel, send it as an attachment
public static void loadDailyDataToExcel(ResultSet rs, Statement st, Connection connection, Properties properties) {
try {
HSSFWorkbook workBook = new HSSFWorkbook();
HSSFSheet sheet = workBook.createSheet("Excel Sheet");
HSSFRow rowhead = sheet.createRow((short) 0);
rowhead.createCell((short) 0).setCellValue("RESPONSE DATE");
rowhead.createCell((short) 1).setCellValue("SERVICE ID");
rowhead.createCell((short) 2).setCellValue("Q");
rowhead.createCell((short) 3).setCellValue("T");
rowhead.createCell((short) 4).setCellValue("V");
rowhead.createCell((short) 5).setCellValue("CUSTOMER");
rowhead.createCell((short) 6).setCellValue("OVERALL");
rowhead.createCell((short) 7).setCellValue("COMMENTS");
rowhead.createCell((short) 8).setCellValue("CONTACT");
rowhead.createCell((short) 9).setCellValue("CONTACT INFO");
int index = 1;
Format formatter = new SimpleDateFormat("MM/dd/yy");
while (rs.next()) {
HSSFRow row = sheet.createRow((short) index);
row.createCell((short) 0).setCellValue(formatter.format(rs.getDate(1)));
row.createCell((short) 1).setCellValue(rs.getString(2));
row.createCell((short) 2).setCellValue(rs.getString(3));
row.createCell((short) 3).setCellValue(rs.getString(4));
row.createCell((short) 4).setCellValue(rs.getString(5));
row.createCell((short) 5).setCellValue(rs.getString(6));
row.createCell((short) 6).setCellValue(rs.getString(7));
String comments = rs.getString(8);
if (comments != null) {
row.createCell((short) 7).setCellValue(comments);
}
String contact = rs.getString(9);
if (contact != null) {
row.createCell((short) 8).setCellValue(contact);
}
String contactInfo = rs.getString(10);
if (contactInfo != null) {
row.createCell((short) 9).setCellValue(contactInfo);
}
index++;
}//while
if (index > 1) {
String fileName = "SurveyResponsesDailyReport-TestServices.xls";
String to = properties.getProperty("survey.emailToDailyReport3aTest"); //from property file
String subject = "Customer Survey 'Please Contact' Daily Summary - Test Services";
String body = "Daily Survey Report for Test Services in Microsoft excel format.\n\n";
emailNotification = new EmailNotification();
emailNotification.sendEmailWithAttachment(to, subject, body, fileName, workBook, index);
try {
String hobiOneDirectoryPath = properties.getProperty("survey.hobiOneDirectoryPath"); // c:\\temp\\hobi\\
FileOutputStream fileOut = new FileOutputStream(hobiOneDirectoryPath+"SurveyResponsesDailyReport-TestServices.xls");
workBook.write(fileOut);
fileOut.close();
System.out.println("SurveyResponsesDailyReport-TestServices.xls was copied to "+ hobiOneDirectoryPath);
} catch (FileNotFoundException fnfe) {
emailNotification = new EmailNotification();
emailNotification.sendEmail(emailToSystemAdmin, "Survey error from : ExportSurveyResponsesTestServicesToExcel.jar", "Environment: " + serverName + " : " + fnfe);
System.out.println("Oops, FileNotFoundException caught. " + fnfe);
}
}
} catch (Exception e) {
emailNotification = new EmailNotification();
emailNotification.sendEmail(emailToSystemAdmin, "Survey error from : ExportSurveyResponsesTestServicesToExcel.jar", "Print Stack Trace " + e);
e.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
}
if (st != null) {
st.close();
}
if (connection != null) {
connection.close();
}
} catch (SQLException sx) {
sx.getMessage();
}
}
}//close method
public void sendEmailWithAttachment(String recipients, String subject, String body,String attachmentFileName, HSSFWorkbook hssWorkBook, int totalRows) {
properties = new Properties();
properties.put("mail.smtp.host", host);
properties.put("mail.smtp.port", port);
if (recipients.equals("") || subject.equals("") || body.equals("") || attachmentFileName.equals("") || hssWorkBook.getBytes().length < 0 ) {
System.out.println("Usage: sendEmailAttachemt() method parameter might be missing, you may check for the /test/local/surveyToExcel-test.properties for any recent changes");
System.exit(1);
}
Session session = Session.getInstance(properties, null);
try {
// create a message
MimeMessage msg = new MimeMessage(session);
DataSource ds = null;
msg.setFrom(new InternetAddress(from));
ArrayList recipientsArray = new ArrayList();
StringTokenizer stringTokenizer = new StringTokenizer(recipients, ",");
while (stringTokenizer.hasMoreTokens()) {
recipientsArray.add(stringTokenizer.nextToken());
}
int sizeTo = recipientsArray.size();
InternetAddress[] addressTo = new InternetAddress[sizeTo];
for (int i = 0; i < sizeTo; i++) {
addressTo[i] = new InternetAddress(recipientsArray.get(i).toString());
}
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Parse a comma-separated list of email addresses. Be strict.
// msg.setRecipients(Message.RecipientType.CC,
// InternetAddress.parse(<a href="mailto:test@aa.test">test@aa.test</a>, true));
msg.setSubject(subject);
// create and fill the first message part
MimeBodyPart mimeBodyPart1 = new MimeBodyPart();
mimeBodyPart1.setText(body);
// create the second message part
MimeBodyPart mimeBodyPart2 = new MimeBodyPart();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try{
hssWorkBook.write(baos);
byte[] bytes = baos.toByteArray();
ds = new ByteArrayDataSource(bytes, "application/excel");
}catch (IOException ioe ){
this.sendEmail("hobione@hobione.com", "Survey excel file send error", "ByteArrayOutputStream: " + ioe);
ioe.printStackTrace();
}
DataHandler dh = new DataHandler(ds);
mimeBodyPart2.setHeader("Content-Disposition", "attachment;filename="+attachmentFileName+".xls");
mimeBodyPart2.setDataHandler(dh);
mimeBodyPart2.setFileName(attachmentFileName);
// create the Multipart and add its parts to it
Multipart multiPart = new MimeMultipart();
multiPart.addBodyPart(mimeBodyPart1);
multiPart.addBodyPart(mimeBodyPart2);
// add the Multipart to the message
msg.setContent(multiPart);
// set the Date: header
msg.setSentDate(new Date());
// send the message
javax.mail.Transport.send(msg);
System.out.println("Report emailed successfully to: " + recipients +" Total rows count:" + totalRows);
}catch (MessagingException mex) {
mex.printStackTrace();
Exception ex = null;
if ((ex = mex.getNextException()) != null) {
this.sendEmail("hobione@hobion.com", "Survey excel file send error", "Print Stack Trace: " + ex);
ex.printStackTrace();
}
}
}
2010 in blog review
The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

The Blog-Health-o-Meter™ reads Wow.
Crunchy numbers
The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 93,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 4 days for that many people to see it.
In 2010, there were 4 new posts, growing the total archive of this blog to 69 posts. There were 17 pictures uploaded, taking up a total of 738kb. That’s about a picture per month.
The busiest day of the year was May 6th with 411 views. The most popular post that day was jQuery-ThickBox (Launch thickbox onload instead of onclick).
Where did they come from?
The top referring sites in 2010 were sitepoint.com, coderanch.com, google.co.in, google.com, and draptik.wordpress.com.
Some visitors came searching, mostly for tb_show, com.sun:tools:jar:1.4.2, thickbox onload, java.lang.classnotfoundexception: org.springframework.web.context.contextloaderlistener, and facesmessage.
Attractions in 2010
These are the posts and pages that got the most views in 2010.
jQuery-ThickBox (Launch thickbox onload instead of onclick) December 2007
40 comments
RichFaces Tabs: switch dynamically April 2008
22 comments
Missing com.sun:tools:jar:1.4.2 March 2009
4 comments
dataTable and radio button in JSF May 2009
11 comments
JSF: f:selectItem vs. javax.faces.model.SelectItem May 2009
1 comment
Maven Jetty-plugin and IntelliJ IDEA
Scenario: You have a maven project and you want to tie with IntelliJ 9 to make it part of IDE built-in commands instead of using command line interface.
Pre-requisite: Need to read Maven Jetty-Plugin User Guide.
Solution: Here is a skeleton project hierarchy:

You also should have a pom.xml file directly under the project.
Now, open up the IntelliJ. Go to File –> Open Project and choose the pom.xml file to bring the project into Intellij and here how it looks. Notice, Idea has created few extraneous files like .impl, .ipr and .iws.

How to configure Run command?
In the IDEA, go to Run –> Edit Configurations
You see the “Run/Debug Configurations” window. Under Parameters tab choose the directory and set the goal command:

Under Runner tab, set VM Parameters to these: (You may not need to sett all these)
-Xms512m -Xmx512m -Dcron.properties="c:\MySDP\cron.properties" -Dcrowd.properties="C:\Documents and Settings\hobee haq\My Documents\buildLocal\itrsbenchstock\src\etc\resources\crowd.properties" -Dlogin.jsp="C:\Documents and Settings\hobee haq\My Documents\buildLocal\itrsbenchstock\src\webapp\pages\login.jsp"
Application is ready to run by click the play button.
![]()
Here is the proof:
![]()
It should shows the Build option to the IDEA drop down. Choose the Build option and click the play button.

How to configure scm bootstrap?
![]()
Here is the final configured list looks like:

Hopefully, this post will help me to remember and configure all my future apps with maven jetty-plugin in IntelliJ Idea.
Exadel Tiggr Mockups
I have just started using Exadel Tiggr mockups. It is an online mockup tool, very easy to use and the closest design I can deliver it to the client before develop the product. Components like, text box, table, tabs, panels are very real looking. We are using JSF Richfaces implementations so; it does make sense to use Tiggr during mockups building.
Another cool feature that I love the most; it is a pure online-based tool, which eliminates all download and configurations issues. Tiggr creates shares and collaborate mockups with any number of designers, developers, project manager, scrum master ….. you name it.
Spring 3.0 and ROO
Had a great training on Spring 3.0 from Craig Walls. Here are highlighted topics.
- Wiring
- Testing
- AOP
- Transactions
- Spring MVC
- RESTful Spring
- Messaging
- RabbitMQ
- Security and
- Spring ROO 1.0
It was good to see ROO (Real Object Oriented) in action, just few commands, created the whole application, entity, controller, wiring and packaged up the application which was ready to deploy. Great tutorial from Ben Alex to build wedding RSVP app using ROO. One simple command created these following basic app hierarchy.
roo> project –topLevelPackage com.hobione.roo
JSF @ UCO
I was honored to give a presentation at the University of Central Oklahoma Computer Science department on Java Server Faces. I was invited by Dr. Sung who teaches Java Server Programming and also he is my java guru. I took my first java class with him 10 years ago (man I am getting old …) while I was finishing up my degree. Anyway, it was a great experience. I was little nervous standing front of a class specially front of Dr. Sung and preach about a java framework. It went really well, I believe. Dr. Sung and along with students seemed to enjoy the presentations and I was happy to deliver my materials as well.
Balsamiq Mockups
What a cool way to mock up web app. Here is my first design that I am about to work on.
To, Balsamiq team: Keep up the good work, and probably need to give a catchy name. Balsamiq is too hard to remember. Really like the integration approach with Atlassian product like Jira and Confluence. Thumbs UP!
ICEFaces 1.8.1 migration
I have recently needed for upgrade to 1.8 from 1.7.2. The main reason I needed 1.8 is because my Auto Complete pop up list would not stay. It showed up for split of second and went away. It did not give me any chance to pick one from list. It worked perfectly on Firefox but not on IE 6 or 7. Here are some steps I had to take to make it work with my existing source.
Step 1:
First, I changed the pom.xml file to 1.8.1, it should be a piece of cake but apparently it did not do a thing.
<dependency> <groupId>org.icefaces</groupId> <artifactId>icefaces</artifactId> <version>1.8.1</version> </dependency> <dependency> <groupId>org.icefaces</groupId> <artifactId>icefaces-comps</artifactId> <version>1.8.1</version> </dependency> <dependency> <groupId>org.icefaces</groupId> <artifactId>icefaces-facelets</artifactId> <version>1.8.1</version> </dependency>
Steps I had taken to make it work:
Stopped and started the Glassfish server. Closed and restarted MyEclipse 7.1 with -clean command but still would not work. Here are some sample errors I was getting:
java.lang. <div id=":b0">IllegalArgumentException: Illegal null argument to ObjectInputStreamWithLoader java.lang.RuntimeException: Cant copy Serializable object: Caused by: java.lang.IllegalArgumentException: Illegal null argument to ObjectInputStreamWithLoader [#|2009-07-28T19:59:38.107-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=11;_ThreadName=pool-1-thread-2;|19:59:38,107 INFO D2DViewHandler:84 - ICEsoft Technologies, Inc. ICEfaces 1.7.2 Build number: 17 Revision: 17749</div> <div>
As you may noticed that, even though I changed the pom to ICEfaces 1.8.1 but the server console showed 1.7.2. I should thought about the server’s cache issue but instead I did these following long steps.
I installed MyEclipse 7.5 which I meant to install it anyway and also 1.8 comes with MyEclipse 7.5. So after install the MyEclipse 7.5, I was still getting errors. Then, I created a brand new project using MyEclipse 7.5 and copied src, web and pom.xml to the new project.
Eeeeh, still would not work. Finally I logged in to the admin console for Glassfish and undeployed all old 1.7.2 related project, stopped the server, restarted the server but wait, still negative. I was getting this weird error.
java.lang.OutOfMemoryError: PermGen space</div> <div>
JavaOne 2009: Day four
This is it. Last day of JavaOne or may be the last JavaOne. No body knows what’s going to happen to JavaOne under Oracle umbrella. I just hope for the best and wising to come back again right here in San Francisco. The entire general session was hosted by James Gosling. He handed Duke awards to several outstanding project team include Terracotta.org and Grameen Foundation.org etc. The project name for Grameen Foundation is MIFOS. I do feel connected to Grameen foundation and their effort to defeat global poverty and also support Dr. Yunus.
![]() |
![]() |
![]() |
Conversations and Page Flows on the Java: I took this session with Dan Allen who is the author of Seam in Action book. He talked the concept that Seam and Spring Web Flow both introduce, a conversation context whose purpose is to maintain state that pertains to a use case across a series of pages. Dan also covered,
- The definition of a page flow
- How page flows are developed in Seam
- How page flows are developed in Spring Web Flow
- Seam’s ad hoc conversations
He recommended use Seam with ICEfaces since ICEfaces is a single page application but Spring will work as well. In JSF 2.0, this conversation scope will be part of the framework.
One to one discussion with ICEfaces core Developer, Judy: Here are some of her tips for my current HR training application:
- Add a search to find a class
- Eliminate white spaces
- Break code to more XHTML files
- Show stuff only it is needed on the page
- Every action has to be happen in 1 (one) second
Here is the picture with me and Judy: Thank you Judy for your helful tips and sat down with me while everyone was rushing to go home in Friday afternoon. Appreciated.

Bye bye JavaOne, bye bye San Francisco. It was such a quick 5 days for me. My head is stuff full of good information, hopefully I get to use some these tips and techniques before I forget ‘em. Until next time I will be tune in Tony Bennett – I left my heart in San Francisco and Scott McKenzie or with Global Deejays.
-
Archives
- January 2011 (3)
- September 2010 (1)
- August 2010 (1)
- May 2010 (1)
- April 2010 (1)
- November 2009 (1)
- July 2009 (1)
- June 2009 (5)
- May 2009 (2)
- April 2009 (4)
- March 2009 (2)
- January 2009 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS







