M.S.S.E. Barcamp March 2014

Another successful M.S.S.E. Barcamp thanks to Ray Tiley. As promised my slides and some additional resources are posted here. Feel free to comment positive or negative feedback or questions :P.

Slidedeck I Presented at the 2014 M.S.S.E Barcamp

Mobile Game Business Value
How strong of an idea is a Mobile Gaming company?
Enter the code

Additional Resources

Course on Starting a Small Busines – Udacity

Market Analysis – Forbes

Game Player Data – Entertainment Software Association (esa)

ORA-00907 Hibernate 4.1 and JPA 2

This ORA-00907 can occur in many situations because oracle needs its queries formatted just right. Unfortunately, hibernate 4.1′s Oracle10gDialect does not handle mapping JPA QueryCriteria select projections to suitable SQL. I have found this little bug gem when trying to create a mildly complex exists subquery with the JPA criteria objects. More interestingly, the issue is because I wasn’t projecting ideally which is likely why you will have trouble finding support because many will have just created the subquery’s projection properly.

The inefficient way:

Subquery subquery = criteriaQuery.subquery(SomeDomainObj.class);
Root entry = subquery.from(SomeDomainObj.class);

Will produce:

exists( select (col1, col2, col3) from ...)

The problem is Oracle throws up on the parentheses around the selected columns. To fix this make your exists subquery more efficient like:

Subquery subquery = criteriaQuery.subquery(String.class);
Root entry = subquery.from(SomeDomainObj.class);

Will produce:

exists( select compositeStringComponent from ...)

Spring and jBPM SAXParseException loading Application Context

Here is a fun gotcha that was not obvious to me: if you forget to include the ‘drools-spring-5.4.0.Final.jar’ into your classpath spring might throw you an exception like below. It suggests the schema is invalid for drools, and the type of error is common with character encodings, but the fix is to have the resolver from the drools-spring dependency, hope this saves someone the headache.

java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:157)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:290)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:com/datacard/secura/xii/test/jbpm-persistent-context.xml]
Offending resource: class path resource [com/datacard/secura/workflow/jbpm/JBPMWorkflowIT-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 14 in XML document from URL [file:/C:/Users/lynessm/Secura/secura-parent/secura-xii-master/out/production/secura-xii-test/com/datacard/secura/xii/test/jbpm-persistent-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Drools - JBoss Community'.
	at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadBeanDefinitions(AbstractGenericContextLoader.java:205)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:100)
	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1)
	at org.springframework.test.context.support.DelegatingSmartContextLoader.loadContext(DelegatingSmartContextLoader.java:228)
	at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:124)
	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:148)
	... 22 more
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 14 in XML document from URL [file:/C:/Users/lynessm/Secura/secura-parent/secura-xii-master/out/production/secura-xii-test/com/datacard/secura/xii/test/jbpm-persistent-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Drools - JBoss Community'.
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:239)
	... 40 more
Caused by: org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Drools - JBoss Community'.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.characters(SchemaDOMParser.java:188)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:464)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:435)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:491)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:510)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1802)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2437)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1782)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:725)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
	... 45 more

XSOM “unresolved reference” InternalError

I’ve been playing with the XSOM library for a couple days now trying to get a simple XML Schema into Java objects and this little exception gave me a good four hour Google search fest. I’m writing this quick blurb to help other XSD programmers avoid this simple mistake that is not documented on Google or Stack Overflow anywhere!

I was trying to be a sly Java programmer and use the Javadoc as my guide to the API (vai: http://xsom.java.net/nonav/javadoc/), if you read the XSOMParser class documentation you may see the #getDocuments(); method first. This looks like the call you need to make to retrieve the schema! STOP!!! Don’t do it!!! If I was a better copy and paste programmer, i would have already avoided this trap because the user guide uses the #getResults() method which returns a wrapper schema set object.

Here is the exception I was receiving:

java.lang.InternalError: unresolved reference
	at com.sun.xml.xsom.impl.parser.DelayedRef._get(DelayedRef.java:103)
	at com.sun.xml.xsom.impl.parser.DelayedRef$Type.getType(DelayedRef.java:148)
	at com.sun.xml.xsom.impl.ElementDecl.getType(ElementDecl.java:110)
	at com.datacard.secura.v2.core.meta.ProgramMetaService.getType(

I don’t know why the #getDocuments() is public, but if you end up using it you’ll need to create a silly hack like the following:

private static XSType getType(XSElementDecl decl) {
    try {
        return decl.getType();
    } catch(InternalError e) {
        if(e.getMessage().equalsIgnoreCase("unresolved reference")) {
            try {
                Field f = decl.getClass().getDeclaredField("type");
                Object fObj = f.get(decl);
                if(fObj instanceof DelayedRef)
            } catch (Exception e2) {
                throw new RuntimeException(e2);
        return decl.getType();

save yourself the nightmare and just use the #getResults() method.

noSQL? Reflecting on Tim Burglund’s Smackdown at NFJS

Latency is a powerfully factor with all user applications. Users always want more responsive systems, and quickly become annoyed with seemingly small delays as they occur upon every request. This can often mean the difference between converting a new visitor to them leaving after only accessing a few pages that have loaded at a sub-optimal speed. “Man, if it takes 3 seconds just to open a product page, it is going to take me all night to try and customize this product!”

We can all understand the requirement of low latency systems, particularly in customer facing systems, but what is an acceptable range and how do we not drop the ball when the golden age arrives? How do we ensure what works today to give us an acceptable latency measures for that fantasized point in time when we have more customers than we know what to do with? Now, maybe that time is far far in the future as a typical scale up solution works marvelously for 90% of companies, but if there is even a remote possibility of out growing traditional normalized database systems it is irresponsible to try and cope with them as architectural decisions.

Even more importantly, what happens to a user when a system becomes unavailable? Well, if that user was a fresh lead, good luck seeing them again. High Availability (HA) is a vastly important concept in any consumer facing application, even more important than latency if that is even conceivable. Our customers are narcissistic, impatient, and more importantly spoiled. Why? Because companies want their business and can afford to train them to be this way. Examples like Amazon over sell the problem, but even at more modest e-commerce shops cannot ignore the problem and potential profit losses. If your company is based on repeat business or continued engagement like Facebook or Digg you better care just as much as a company that can directly attribute this down-time to dollars (and they do).

What does all this have to do with noSQL databases like Casandra, MongoDB, and Redis? You cannot plan your system architectures on traditional boxed solutions without considering your user’s needs now and far far into the future. Perhaps you’ll be fine with a traditional database system that offers consistency and availability that you maybe able to scale in a traditional master slave paradigm. What if your transactions really have no reason to be transactions, and perhaps writes don’t need to be consistency verified? Why would you require your systems team to purchase monstrous systems so your database system can do a few thousand JOINs per second when you could architect your product catalog to push to a Casandra (Dynamo backed) no SQL database system that provides instant support for highly scalable systems or a denormalized document based MongoDB?

I’m not saying these new flavor of the month database systems should replace all of your old RDBMS, but many of them do make a lot of sense for many applications designed for the Internet of tomorrow. Knowing these systems is vital to making quality architectural decisions around your companies customer driven applications, and surveying the landscape is the bare minimum to being a responsible web architect.

Overriding hibernate annotated model objects library in a specific application or spring context

If you use Spring 2 or 3 along with Hibernate and take advantage of the wonderfully declarative annotation development style, you probably have had this same problem as I have. Say you have defined your model objects with hibernate EJB 3 style annotations for your main database. Now perhaps you have several satellite databases that differ slightly from the main database to fulfill auxiliary roles.

You certainly wouldn’t want to package and provide an additional model objects library for the application or specific context using one of these auxiliary databases. Luckily, there is a rather simple solution. Hibernate allows you to override any annotations by providing an XML definition and specifying it in your configuration. The Spring Framework also provides access to this through their applicationContext.xml files during the session factory and DataSource configuration points.

Essentially, you can have a set of overrides for every application context you load allowing access to multiple different databases using the same model library.

My Specific Situation

In my case, I had a well defined @Id column that provided a cross database sequence or identity population using the AUTO generator type provided by the Hibernate libraries. In one of our applications we had a case where the main database was used to create this record, but a duplicate needed to exist on the outside database to fulfill database integrity constraints on an additional table. Sparing, the specific implementation details (which could probably been avoid with better original design), I needed to disable the generator on this object for this application context.

Here is the default configuration as defined based on the main

@Column(name = "object_id")
@GeneratedValue(strategy = GenerationType.AUTO, generator="some_sequence")
private Integer id;

Here is the XML hibernate mapping override file created in my src/main/webapp/WEB-INF directory along with the application context XMLs for the Spring 3 configuration:


One important configuration to note is the ‘metadata-complete’ attribute on the entity tag. This attribute defines whether to throw away other configuration metadata defined with annotations on the object and use your configuration exclusively. To do simple overrides this is definitely not the intended action.

To enable the configuration file in spring, the following snippet shows what was added to the application context:




Get Application Context inside Aspect from Spring MVC Servlet

After spending some time using aspects to do various cross cutting application tasks like live profiling and logging mechanisms in one of my Spring MVC web applications, I found myself wanting to use Spring’s IoC mechanism without it’s AOP implementation. Spring provides a dynamic runtime pure Java implementation of Aspects that they promote as a complement to AspectJ. It works great with all of the injected components you use as spring already uses a proxy layer to manipulate them. If you want to be able to place join points on code that isn’t managed by spring you will find yourself looking for an AspectJ weaver/compiler.

If you use Maven2 much like I do, you’ll find it quite simple to setup an AspectJ compiler/weaver. I’m using the aspectj-maven-plugin configured to attach to the compile and test-compile life cycle goals. Here is the configuration I used:


Getting the Application Context…

Enough with this fluffy preamble, what I wanted to do was get the application context so I could access my Hibernate managed data access object and services tier. Initially, I wanted to autowire my service and declare the class as a component that would be injected with Spring’s IoC mechanism. Unfortunately, I could not discover a method of doing so without using Spring’s proxy based runtime AOP solution. One obvious solution would be to use the XML class path context loader and specify the context file via filename and location, but this was a very brittle method that would just introduce multiple points of context file configuration (not a very good solution.).

I realized my join points where on controller actions; therefore, I always had access to the incoming HttpServletRequest object supplied by our Apache Tomcat container. With the request object I was able to get the servlet context which gave me access to both the servlet configuration parameters and a method of retrieving the Spring application context that the servlet was configured with. We used the web.xml to define spring as the dispatch servlet (following the common MVC pattern) and had our context definition split into several XML documents. By using Spring’s WebApplicationContextUtils.getRequiredWebApplicationContext() helper one can get the entire application context that the servlet is configured with.

Here is an example of retrieving a dynamic setting from a database inside of an advice annotated method that wraps around a controller action:

  public String getWebSetting(String settingName, Object[] joinPointArgs) {
        for(Object arg: joinPointArgs) {
            if(arg instanceof HttpServletRequest) {
                return ((WebSettingService)WebApplicationContextUtils.
                            ((HttpServletRequest) arg).getSession(false).getServletContext()
        return null;

    public Object profileControllers(ProceedingJoinPoint pjp) throws Throwable {
        String setting = getWebSetting("enable_performance_logging", pjp.getArgs());

    @Pointcut("execution(@org.springframework.web.bind.annotation.RequestMapping * (@org.springframework.stereotype.Controller *).*(..))")
private void inControllers() {}

Setting up Netbeans 6.8 with Maven2 and SVN

For anyone new to the Netbeans IDE, like myself, you might find yourself perplexed by the fact that you can’t execute any substantially large projects. Netbeans relies heavily on 3rd parties for their integration with other tools, i noticed while setting up a simple SSH tunneled SVN connection. This might be a little confusing to a new developer or someone not very familiar with the two technologies.

Let’s jump into configuring this beast:

SubVersion svn+ssh://

Seeing i’m setting everything up on the new workstation my office gave me, this will be a guide for Windows 7 x64bit users.


  • SilkSVN (Client Only)
  • TortoiseSVN 1.6.9….

Both are quite easy to install with their standard Microsoft MSI bundles. The need for TortoiseSVN is two fold: 1. It is an awesome SVN client, and 2. It comes with TortoisePlink, which I had better luck with than the PuttyPlink base itself.

Now in the Netbeans IDE follow the menus ‘Team >> Subversion >> Checkout’ this will produce a dialog where you can setup your SVN repository. This example is exclusively for the svn+ssh protocol so the URL will look like: svn+ssh://servername.net/path/to/repo

The external Tunnel command will look like: TortoisePlink -l username -pw password

This assumes you have updated your windows environment variable PATH to include the bin directories of both TortoiseSVN and SilkSVN, which by default get installed to your C:\Program Files\ directory. The really nice thing about TortoisePlink is that it will not continue to ask for your password!!!! Major pain in the a** when working with the standard plink out of the box.


This one was a little more confusing to find the solution for, but luckily it has gotten much easier thanks to the Netbeans dev team. The Netbeans team have released an update to the codehaus exec mojo SNAPSHOT that fixes the fun execution problem (https://netbeans.org/bugzilla/show_bug.cgi?id=153644).

After setup of a brand new maven 2.2.3 install, Netbeans will fail to execute any project/file that has a dependency chain over a certain length. To rectify this problem add the codaus snapshot repository to your maven 2 settings.xml as suggested in the bug report above. It will look something like:


Next you will need to setup your project to use the new version, luckily this is rather easy as they define the version in the execution string. Right click on your project and select properties. A dialog with a list of forms on the left should appear, select the 'Actions' button. Here you will need to go through each action that uses the exec plugin and update the Execute Goals changing the '1.1.1' string to '1.1.2-SNAPSHOT'. This data is then saved to an XML file; however, editing the XML file directly did not seem to work properly (probably because i did it while netbeans was running).

Hope this helps save some hair from getting pulled out!

Installing Xvfb on Ubuntu 9.10 (Karmic Koala)

Today I spent several hours wrestling with Xvfb on a fresh new Ubuntu 9.10 (Karmic Koala) installation. The initial stages of the install are very promising, simply running:

>> aptitude install xvfb

Seems to work its charm and successfully install the software package. Unfortunately, if you attempt to test the Xvfb using something like:

>> Xvfb :99 -ac

You will most likely see a long list of error messages, something like:

[dix] Could not init font path element /usr/share/fonts/X11/misc, removing from 
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing 
from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, 
removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, 
removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/Type1, removing 
from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing 
from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing 
from list!
sh: /usr/bin/xkbcomp: not found
(EE) Error compiling keymap (server-42)
(EE) XKB: Couldn't compile keymap
[config/dbus] couldn't take over org.x.config: 
org.freedesktop.DBus.Error.AccessDenied (Connection ":1.74" is not allowed to 
own the service "org.x.config.display99" due to security policies in the 
configuration file)

Let us tackle this mess of an automated installation…

1. xkbcomp

Try running:

>> sudo aptitude install x11-xkb-utils

This will install the xkbcomp required.

2. Missing Font Errors (unnecessary?)

The font issues, probably, do not require fixing from a functional standpoint; nonetheless, you can install them with the following command:

>> sudo aptitude install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

3. HAL

Apparently, some of the required components of this fake X server are within the core package of the actual X server. Try installing:

>> sudo aptitude install xserver-xorg-core

4. dbus

This last fix, is not going to work for everyone. I can use it because my intended use is on a remote server configuration not requiring any packages that depend on DBUS messaging system.

>> sudo aptitude remove dbus

These four steps enabled my 9.10 Ubuntu server to run Xvfb. I tested the xvfb-run command like:

>> xvfb-run firefox

It launches the firefox browser (if installed, if not installed it just exits) and waits for you to CTRL+C cancel it.