Wednesday, December 19, 2007

Monday, November 26, 2007

Software Configuration Management for the Rest of Us

I just recently brain dumped my views on software configuration management on http://www.software-configuration.com. This site lays down the groundwork for creating an effective software configuration management strategy for your small to large company. The site attempts to address some trends that seem to be occurring over the last couple of years.

In a nutshell those trends that I see occurring are...

1.) The role of software configuration manager and java or C++ developer are becoming more blurred, and many companies are choosing to hire developers that manage both software and the company's software configuration needs.

2.) Companies large and small are shying away from the big monolithic one size fits all software configuration management applications and choosing cheaper more agile solutions.

3.) Open source alternatives are becoming more competitive with the big software configuration management companies, and in many shops are taking over.

4.) Many companies are realizing that automation is the key to a successful development environment and that good software configuration management is playing a key role.

Here is the web site. Enjoy!

http://www.software-configuration.com

Sunday, October 28, 2007

Wolfram 2,3 Turing Machine Research Prize

A prize winner, Alex Smith, proved that the Wolfram 2 state 3 color Turing machine is universal. There is a 49 page proof of that this can be found on this website...

http://www.wolframscience.com/prizes/tm23/

Nice job!

Tuesday, October 16, 2007

Java Interview Questions

I know there are a lot of mock Java interview questions out there. Heres a good java questionnaire from one of the Java bloggers I regularly follow...

Java Mock Interview Questions


Yakov Fain has several Java books out on Amazon and is a J2EE / Adobe Flex RIA guru.


120x60 iTunes

Wednesday, October 10, 2007

Getting Started with Script.aculo.us and AJAX

I like the script.aculo.us library of JavaScripts, but really the guys over there REALLY need to put more effort into their documentation. I have always subscribed to the theory that a low entry barrier is good for any product. This holds true especially in the Java / JavaScript world and also should hold true for any open source project.

The "Getting Started" page is particularly heinous for someone that is trying to just take a dip into the Java Script libraries. Here's my re-write of that page and I hope to offer it as help for anyone trying to get started with the Java Script libraries.

First, download the script.aculo.us libs and drop them into a local javascripts directory. You should have the following libraries...
  • builder.js
  • controls.js
  • dragdrop.js
  • effects.js
  • scriptaculous.js
  • slider.js
  • unittest.js
Alright, here's the part that isn't in the instructions. You must also download the prototype.js library and also drop this library into java scripts/. You can download the prototype.js here.

NOTE: prototype.js is in the /lib directory and IS in the script.aculo.us zip JavaScript library file. Thanks Gregg B. for your feedback (see comments section)!

If not, you may see the following error:

uncaught exception: script.aculo.us requires the Prototype JavaScript framework >= 1.5.0

Next, add the following links into your html...

<script src="javascripts/prototype.js" type="text/javascript"></script>
<script src="javascripts/scriptaculous.js" type="text/javascript"></script>


Next, try the html reference in the example. Did it work? Of course not! Try adding the following reference to your html. NOTE: I leave the experimentation of trying the JavaScript example up to the reader. I may have received errors because I downloaded the latest prototype.js vs. using the prototype.js in the lib/ directory.


<div onclick="new Effect.CloseDown(this, arguments[1] || {});">

Click here if you've seen enough.

</div>


Your html should then look something like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<script src="javascripts/prototype.js" type="text/javascript"></script>

<script src="javascripts/scriptaculous.js" type="text/javascript"></script>

</head>

<body>

<div onclick="new Effect.CloseDown(this, arguments[1] || {});">

Click here if you've seen enough.

</div>

</body>

</html>


I recommend also reading
this article written by Michael Heilemann, and realize that the script.aculo.us documentation is not your friend. Thankfully, there are many articles that help the beginner get started with this JavaScript library.



iTunes_RGB_9mm

Monday, October 8, 2007

Java NetBeans 6 Beta Preview


I have been using Java IDE NetBeans 6 Beta on Java 5 for a week or two now. This release is a definite improvement over the 5.X NetBeans. Here's a list of some of the new features that I ran into...

  • Highlights - Yay!
  • Ruby / Rails support - This includes a rails engine embedded in the full release. Project templates are created quickly and run from the IDE.
  • Swing GUI development - Uses the new Java Desktop Application project template.
  • Application profiling.
  • Better JavaScript support.
  • AJAX enabled Java Server Faces (JSF) components - Includes Project Woodstock component library.
  • Graphical Java WSDL editors
  • And my favorite - it seems less buggy! I was able to import J2EE projects without all of the issues I would experience in NetBeans 5.X. No code obfuscation!
For a full list of features added to NetBeans look here...

http://www.netbeans.org/community/releases/60/

Friday, October 5, 2007

Java Conversions of HTML to XML

I recently ran into this error in my browser while trying to convert html to xml via a java parser application. Apparently, html entities which are handled fine in most browsers, do not translate so nicely into xml. The reason is that most xml parsers do not handle "&nbsp" or any of the other 1000's of special characters out there.

XML Parsing Error: undefined entity
Location: http://localhost:8080/rssFeed.xml
Line Number 255, Column 16:href="r/3t">360°

---------------^

Here's a couple of options...

Option 1. Download the following entity definitions.

http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent

http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent
http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent

I concatenated the files together, but this is not necessary.

cat xhtml* >xhtml-pac.ent

Then in your xml file include a reference to the entities in your external file. You will need to describe an external entity as seen here...

http://www.w3.org/TR/REC-xml/#sec-external-ent

Example:
<!--ENTITY spec-chars  SYSTEM "resources/xhtml-pac.ent"-->
This inclusion of the entity file converts special characters to unicode. The unicode will always be processed by the xml processor.

Also take a look at the Java library JTidy. The JTidy Java API provides a method in their Tidy Java class that will automatically do the above work for you. You also get cleaned xml automatically. The Java method is setNumEntities and will convert those special HTML characters into unicode.

Sunday, September 16, 2007

Java HTML Screen Scraping (the Easy Way)

I thought this might be interesting. I have written screen scrapers in the past in Perl, but recently started using JTidy on an HTML stream in Java. I then parse that stream into a DOM tree and use XPath to search through the newly imported HTML. Here's an example class...

import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.tidy.Tidy;

import com.sun.org.apache.xpath.internal.XPathAPI;

public class Keywords {

private static final Log log = LogFactory.getLog(Keywords.class.getName());

private static String targetURLString = "http://inventory.overture.com/d/searchinventory/suggestion/";
private static String xpath = "//table/tr" ;

public Document tidy(InputStream inputStrm) {
Tidy tidy = new Tidy();
tidy.setQuiet(true);
tidy.setShowWarnings(false);
Document tidyDOM = tidy.parseDOM(inputStrm, null);
return tidyDOM;
}

public NodeList getKeywordList(String keyword) {
NodeList urlNodes = null;

try {
URL targetURL = new URL(targetURLString);
URLConnection targetConnection = targetURL.openConnection();
targetConnection.setDoOutput(true);

// Post to output
OutputStreamWriter out = new OutputStreamWriter(targetConnection
.getOutputStream());
out.write("stst=" + keyword);
out.close();

Document xmlResponse = tidy(targetConnection.getInputStream());

urlNodes = XPathAPI.selectNodeList(xmlResponse, xpath);

} catch (Exception urle) {
log.error("Error: " + urle.toString());
}

return urlNodes;
}

}

Converting the HTML to a DOM tree allows the data to be converted to any format via XSL. Mobile devices, RSS feeds, other web pages are just examples of different formats that can be generated. The possibilities are limitless.

Wednesday, September 12, 2007

Blogging, Search Engines, Web Presence, and Groupies

OK, I'm still waiting on the groupies part, but I have been blogging for about 9 months now. (Ha! I beat the average blog life span) Consequently, this has perked my interest and caused me to read up on search engine optimization techniques. One little trick that has been overlooked by many of the SEO experts and books, is the Blog itself. After analyzing this website, I noticed that Google scans my blog (framework provided by Google) quite often. It appears sometimes, soon after every new post each article is scanned. I believe that for any other reason this provides an incentive for anyone trying to get their website ranked (or even listed).

Last Friday, for instance, I dropped 6-7 domain links that I have parked on my blog. (See the lower right of this page). These were all sites unlisted on Google. I dropped a new post the same night. Within a day, Google had scanned those links and my parked domains were suddenly cached in Google. Interestingly, Google didn’t not cache my domain names with the Western Samoa (*.ws) extension until later that day. All .coms and .nets were in Google's cache the next day.

This is a great incentive for bloggers! Many bloggers write for pauper's wages (if that much), but Google has given writers the ability to push their domain names into the Google cache without waiting as long as weeks or months. Many bloggers will probably not take advantage of this. Too bad, what an easy way to promote keywords and peak special interest in a website than by blogging. Google has once more dropped the carrot in front of us to provide them more Google content :) I haven't even pumped this for all it's potential, so I expect to write more on this subject later. In the mean time, I will get back to the technical stuff that most of my readers are trying to find.

Sunday, September 9, 2007

Extreme Gigabit Routers for the Home

I recently purchased a D-Link Xtreme N gigabit router for the home network, and I have been pleasantly surprised. I was hoping that my jump into the world of low-price (119$) gigabit routers was not going to result in overly complicated setups, bad performance, or just bad quality that I have experienced in other routers. Overall, the experience was good.

I started here. Platon Scheblykin basically wrote an article reverse-engineering the D-Link (DIR 655). Being the hardware geek that I am, this article also fed my curiosity with it's breakdown of performance and throughput numbers. Platon also breaks open the DIR-655 and explains layer by layer the good and bad points of the layout and packaging. This is an extremely detailed and thorough article. It is worth the read if you are considering the D-Link DIR-655.

I have'nt had any hiccups so far with the D-Link DIR-655. The wireless network is reaching areas I never was able to reach with my old Netgear 802.11g 100MBps wireless router. I also, port forward to my web server and that setup took a total of 10 minutes. I was happy with the GUI interface. I thought the interface was well thought out, and I only experienced one issue during the setup and the problem was outside of the router (my linux firewall on my web server had port 80 closed :) Other than that I believe the entire setup took 30 minutes to get working with my BellSouth Westell router.

I am also seeing awesome speeds with a file server and other computers on the network. Much of this however, can simply be attributed to going from 100MBps to 1GBps. The QOS is great. I can throttle certain types of traffic while I am working to allocate enough bandwidth for VPN.

I do plan on getting a D-Link wireless card and hope to have more details on the improvements made on my network. Also, I will be posting pictures and specs soon to help anyone else who might be interested in GB home networks, and I should be delving more into the home entertainment area. For now, though I am happy with the home bandwidth boost, and will be happier when fiber gets here to my neighborhood at the end of this year.

Friday, August 31, 2007

Book Review: Database Design

Database Design
Ryan K. Stephens and Ronald R. Plew
Sams Publishing 2001

submitted to Amazon.com 8/31/2007

Recently, I worked with a few developers who were tasked with developing their own database, and soon realized that many developers are not disciplined database designers (myself included). Instead of struggling through ambiguous database designs and creating more work in the coding of business objects, I picked up a book. Database Design, by Ryan K. Stephens and Ronald R. Plew, provided a great foundation for me, and would probably be a good reference for many levels of developers, business analysts, and DBAs.

The book starts with an overview of the database design process. At times this section seemed basic for someone that has been through countless development cycles, but the section reiterates concepts that many may take for granted. For instance, the database design process of requirements gathering, logical modeling, and normalization is discussed. Also, from an academic perspective some history and non-traditional methods are reviewed that provide interesting contrasts to how the process of database design has evolved over time.

The second section begins to get into the technical meat. The second section discusses gathering business and system requirements. This also provides many good examples of how to translate the business model into database entities. The different forms of normalization are discussed with examples from the first, second, third, Boyce-Codd, fourth, and fifth normal forms. The authors also take the readers through the process of developing Entity Relationship Diagrams (ERDs) and uses accompanying examples.

The third section takes the concepts that are used from part two to design tables within the database. Consideration of storage, referential integrity, ownership, performance is all discussed as part of the physical design process. The authors also discuss enforcing business rules and view designs as well. The final chapter of this section ends in a real world scenario of a grocery store owner that wants to model his business activities into a live database. The book provides step by step re-iteration of the process involved in collecting business requirements, modeling data, normalization, and design. The author walks the reader through the process and shows how a designer would create a database from the information provided by the business owner. I thought this was a great example of how the books brought together concepts into real world situations. Kudos for the authors including some non-academic material.

Last, the authors discuss other areas that affect the database after the initial design. These areas include security, change control, analyzing legacy data. Each area includes examples and scenarios a DBA might encounter.

Overall, I thought this book laid down the foundations for database design very well. I think the authors had some very specific real world experiences that seemed useful during the discussions of the design process. The only con of this book was brief discussions about toolsets being used. It seemed apparent after a few of these examples that the authors are used to working in high budget software shops. Also, some of the tools may have been a bit outdated (2001). No mention of open source options was given which was a bit disappointing for someone who uses and develops open source products regularly (yes I am biased). The cons however, seemed minor in the big picture. This book lays down the framework for good process and also is very practical in its examples of the nuts and bolts of the database design process. I will definitely keep this somewhere close on my shelf, and do not expect the design aspects of the book to become outdated anytime soon. I think the authors did a great job at providing a good reference book on database design. I only wish more developers would read it :)

Friday, August 17, 2007

Portable Wikipedia

I thought this article was a bit innovative. It appeared on Slashdot the other day and described how to create a portable search engine from the Wikipedia mysql dump file. I have to admit that I'm not quite sure of the necessity of this, but the process this person used to design his system with garden variety open source tools was clever.

Turbo-charging JVM startup times

Startup time on JVMs especially when running standalone classes, JFrames, etc on a client has always been a bit slow. In many cases the JVM is often run multiple times asynchronously. Enter class data sharing.

JDK 5+ for the Java HotSpot client VM has included a feature that loads a series of startup classes in a common shared location. This is good, so that when the JVM starts up it no longer needs to load common classes because they are shared in memory. The more core classes being used, the more time is saved on startup. Woohoo!

See a more detailed description here...

Friday, August 10, 2007

Handling multi-part form data without pain

Apache commons uploader has some nice built-in frameworks to handle multi-part form data. In this example part of the form data are file uploads and other parts are form fields. As you will see Apache commons uploader makes this task extremely easy...

        // Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);

if (!isMultipart) return ;

// Apache commons upload section
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);

// Parse the request
List items = new ArrayList() ;
try {
items = upload.parseRequest(request);
} catch (FileUploadException fue) {
LOGGER.error("Error uploading file: " + fue.toString());
}

// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();

if (!item.isFormField()) {
// **************************************************
// Process your file input here! *****
// **************************************************
} else {
String name = item.getFieldName();
String value = item.getString();

// **************************************************
// Process your name and value pairs here! *****
// **************************************************

LOGGER.debug("Found field " + name + " and value " + value) ;
}
}

Friday, August 3, 2007

Adding Multiple Files for Upload

Here's a nice little Javascript that allows multiple file uploads in a fashion similar to Google's gmail attachments.

http://www.petefreitag.com/item/587.cfm

Thanks to Pete Freitag for this nice little piece of work.

Friday, June 22, 2007

Commoditizing Web Services

After a discussion with Collabnet sales today, I reached an often reoccurring realization of the power of web services. Collabnet, who is trying to sell their version-control services to large and small enterprises around the globe, hosts Subversion version control servers and also manages the process around tracking enhancements, defects, etc. All of these services can be run from the Collabnet servers. No mess for our company, no need to hire people to manage servers, the service is up as long as we pay the bills. Awesome...

Many companies spend money to hire, train, and retain people to manage apps internally. Why? Why would a company spend the time and effort to build up their own in-house expertise when for much smaller amounts they can just get a domain setup on a service providers website often within minutes.

This is the future. When I can buy version control services for a small amount every month and be up and running within minutes of signing up, we are reaching the point where each service is as ubiquitous and easier than say getting your water turned on at the county water department. Google desktop, Salesforce.com, Collabnet, and many others know this. I believe the rest of the world is catching on.

Sunday, June 17, 2007

Subversion Merge Tracking

I have been pimping Subversion now to every company I have worked with over the last 5 years. I believe with the upcoming Subversion 1.5 release has really moved Subversion over the top as far as version-control tools go. Here is why....

1.) Subversion is still free.
2.) The new release 1.5 addresses one of the most common criticisms of subversion. This is the lack of any embedded merge tracking.
3.) Subversion is still free.

Let me address #2 a bit. Subversion has always been a powerful tool, but in many ways the tool worked best in a single trunk or structured environments with controlled integration from multiple branches. The problem with that is that there are many development groups that are not structured, and do not have nice integration paths from multiple branches.

Many times groups over 10+ developers teeter on being chaotic, and the threat of chaos to the process was fine up to a point. I believe many larger development groups can go past that point in Subversion when complex branch and merge tasks are attempted on a daily basis. Groups often give up on spending the time on a good branching strategy (Bad Idea #1) and move to commiting to the trunk only. I think this is a huge mistake, and something a little update in subversion could probably fix.

The Subversion 1.5 release attempts to address the large development groups' integration issues, and I believe will help Subversion compete at the larger companies against the Clearcases and other high cost tools.

Here's the list of new features added to 1.5...
  • Handle Repeated Merges
  • Cherry Picking
  • Record Manual Merges
  • Rollback Merges
  • Block/Unblock Change Sets
  • Automated Merge
I believe that adding these features to the existing features (simple clients, atomic commits, hands-off server maintenance, open source, etc. etc.) makes Subversion a great tool for almost any environment.

BTW, If anyone needs help convincing their company to adopt Subversion, feel free to email me. I could write a book on what to say and what not to say :)

Friday, June 15, 2007

Passing arrays from JSF to Javascript

JSF can be a bit tricky and sometimes unfriendly when working with other tools especially Javascript functions that are not the simplest of implementations. One issue, that I have found very little documentation on the internet was how to pass arrays from JSF to a Javascript function.

Here's one way to accomplish passing an array to a Javscript function. This is limited by the amount of memory required to store a String, but in my case my upper bound of my array is well below the memory boundaries of the String.

1.) Create a String from an Array in your JSF page bean. This can also be set anywhere you JSF page can access the String value (i.e. session beans, etc). Use a delimiter between the elements of the array when converting the elements to a String to enable parsing later in this process.

2.) Reference the String created in step #1 wth an inputHidden. Here is an example...

<h:inputhidden id="bizStringAry" value="#{secure$BusinessEntry.businessStringAry}"></h:inputhidden>

3.) From the Javascript function reference the inputHidden field and place into a string. Use the Javascript split function on the String to remove the delimiters in step #1.

var bizname_array = document.getElementById('form1:bizStringAry').value
biz_fields_ary = bizname_array.split("?")


The biz_fields_ary is an actual Javascript array. You will need to reference the element(s) needed to process in your Javascript.

I hope this helps. Good luck!

Friday, May 25, 2007

Leia's Metal Bikini Cult

After being bombarded with 30 years of Star Wars marketing and hype, I have to say this is the weirdest Star Wars phenomena I have seen. Enjoy!

Thursday, May 10, 2007

Sun JSF vs. Apache MyFaces

Wrestling with Sun JSF classes on JBoss can aggravate and confuse, and from what I have seen on the newsgroups there isnt a clear explanation. Well if I may offer another opaque solution here it is...

The problem: Programming JSF pages that include table components in Sun's NetBeans 5.5 and deploying to JBoss 4.0.5 will cause runtime issues rendering from the javax.faces.component.UIComponentBase class. The results will look something like this...

23:03:40,543 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:741)
at javax.faces.component.UIComponentBase.getClientId(UIComponentBase.java:226)
at javax.faces.component.UIComponentBase.getClientId(UIComponentBase.java:219)
at com.sun.rave.web.ui.component.TableRowGroup.getProperties(TableRowGroup.java:1804)
at com.sun.rave.web.ui.component.TableRowGroup.restoreState(TableRowGroup.java:1490)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:728)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentState(JspStateManagerImpl.java:221)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:287)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:310)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)


Solution: Basically in a nutshell, we are removing all Apache classes and replacing them with the Sun classes in NetBeans. Follow these steps...

1.)
Remove the directory
JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-lib


2.) Remove any instances of the myfaces listener in the web.xml. The section to remove should look like this...
<listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>

3.) Now all apache libs should be purged from JBoss. We must now add the Sun libs back in to
the web app. Add the following libs from NetBeans (right click on libraries in your webapp and the option
to add libs should be selected)
4.) Add the following libs from NetBeans (JSF, and JSTL). These libs should add several jars including

commons-beanutils.jar, commons-collections.jar, commons-digester.jar,
commons-logging.jar, jsf-api.jar, jsf-impl.jar, standard.jar, and jstl.jsr
.

That worked for me. I have found other articles that may help. Here's one that seems to be more helpful...

http://blogs.sun.com/divas/entry/missing_image_bug

Good Luck

Sunday, April 22, 2007

NetBeans and EJB 3.0 persistence.xml generation

For everyone using Netbeans, I found an issue in generating the persistence.xml for an EJB using EJB3.0, JBoss, and MySQL. The jta-data source in the config file was generated as follows...

<jta-data-source>mysql</jta-data-source>

After making the following update, the datasource was bound correctly from the EJB and all worked fine...

<jta-data-source>java:/mysql</jta-data-source>

Tuesday, February 27, 2007

Widgets 1.0

W3C has created a widget spec 1.0 which is an attempt to get all of the widget makers to play nice. Google, Yahoo, Microsoft, and Apple were targeted with this spec since each has their own version of widgets.

http://www.w3.org/TR/widgets/

This should be an interesting technology in the same vein as AJAX. The spec doesn't quite instill confidence yet, since it is still in draft form. After a bit of research it seems that current widgets run on an existing app (Yahoo's widget engine / Google's desktop app). It will be interesting to see if any of the browsers pick this up. That would be cool.

Java Studio Creator and JAAS

Thanks to the guys and gals over at Sun. After several crash and burn attempts in setting up authentication in Java Studio Creator, I finally downloaded the JAAS example provided by Sun. Here is the link...

http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/jaas_authentication.html

This seemed to be the most straight-forward implementation of authentication that I have found. I was able to setup JAAS in roughly an hour in my webapp, and I am now also compatible with many SSO providers. Woo hoo!

Sunday, January 21, 2007

Managing Quartz from a Web App continued...

My previous post mentioned this quartz based web app...

http://sourceforge.net/project/showfiles.php?group_id=23781&package_id=99269

I'm finding it quite buggy, but far enough along where I believe I can throw a few improvements into the app. Basic functionality seems to be there, but it needs some validation of forms to keep invalid states from occuring. Updates will follow..

Sunday, January 7, 2007

Friday, January 5, 2007

Microsoft's Coup d’état of My Living Room

OK, I don't think I am typically paranoid, but after the latest Windows Vista release with the Windows media center, I am beginning to see the well laid designs that Microsoft has on my living space.

Let me give some reasons why...

1.) Microsoft has become the major player in designing the OS and software for the IPTV set top boxes. Very few other companies have made the inroads that MS has made over the last couple of years in this area.

2.) IPTV will be the future method of video delivery no matter what broadband service is used.

3.) The number of deals made by Microsoft to push their IPTV solution has been going on for years...
and my favorite the Swisstel "Bluwin" service not to be confused with the "Blue Screen" we all knew in previous MS OS versions

(these are only a few)

4.) The XBox which contains a "Media Center Extender". Wow! How convenient another outlet that allows me to use a Microsoft product.

5.) Vista! Yet another way I can use Microsoft's media center.

Once you put all these together you have the video, gaming, computing, communications, and Internet all potentially managed by one version or another of a Microsoft product. As they say where I am from, that is "purty smart".

Thursday, January 4, 2007

Managing Quartz from a Web App

After working on message driven bean last night, I was trying to understand how to implement/package/manage a Quartz scheduler to run the client for the message bean.

Before I could start coding, I saw a quick and dirty web app on one of the Quartz users' forum. After loading it up locally on JBoss, I was able to navigate around and execute scheduled tasks w/o any issues.

http://sourceforge.net/project/showfiles.php?group_id=23781&package_id=99269

I did need to remove the log4j lib due to a dependency issue to run this on the latest JBoss, but hey what a great and easy way to manage scheduled tasks.

TOAD data modelling

Well I finally downloaded the TOAD data modeller after years of using the data tool. Thumbs up so far... the tool supports Oracle 10g, visual data modelling, and sql generation. The freeware version of course is difficult to find, but for anyone interested:

http://www.casestudio.com/enu/features.aspx

There's an red and a blue button. I chose the blue button. I guess I'll get my invite into the Matrix another day.