I had problems with Netbeans project from trunk. Their was a lot of unresolved dependencies. I had to create my own project from trunk sources. I had following troubles when building it:

1. In file SqlXmlUtil.java, Netbeans couldn't suggest a package for OutputProperties. Later I found that it was in org.apache.xalan.templates package

2. It couldn't suggest where to find org.apache.xpath.XPath class constructor with XPath(java.lang.String exprString,
             SourceLocator locator,
             PrefixResolver prefixResolver,
             int type,
             ErrorListener errorListener)
syntax. Later I figured out that it was http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/XPath.html#constructor_detail
So there is two imports missing in source code

3. Reflection problems:
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java:1982: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
            VTICosting          result = (VTICosting) (java.lang.Object[]) constructor.newInstance( null );
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java:1982: inconvertible types
found   : java.lang.Object[]
required: org.apache.derby.vti.VTICosting
            VTICosting          result = (VTICosting) (java.lang.Object[]) constructor.newInstance( null );
            
sqlxUtil.compileXQExpr(
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java:148: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                "directShutdown", null);

/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java:261: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                                                                                         null);
                                                                                         ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/shared/org/apache/derby/shared/common/sanity/AssertFailure.java:165: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                    return m.invoke(null, null);
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java:327: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                return (String) toPlainString.invoke(localValue, null);
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java:350: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class<?> for a varargs call
cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
            m = BigDecimal.class.getMethod("toPlainString", null);
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java:356: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class<?> for a varargs call
cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning
            m = BigDecimal.class.getMethod("precision", null);
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java:1169: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                                                null)).intValue();
                                                ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectMethod.java:46: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                        return realMethod.invoke(ref, null);
                                                      ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java:368: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                                        Object ov = m.invoke(this, null);
                                                                   ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java:567: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                    Object ov = m.invoke(this, null);
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.java:1519: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                        theConnection = (Connection) method.invoke( null, args );
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java:380: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                                user == null ? dc.getMethod("getConnection", null) :
                                                                             ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java:384: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                                         user == null ? null : new String[] {user, password});
                                                      ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1025: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                    m = c.getMethod("getJCCBuildNumber", null);
                                                         ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1027: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                    build = (Integer)m.invoke(o,null);
                                                ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1030: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                    m = c.getMethod("getBuildNumber", null);
                                                      ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1032: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                    build = (Integer)m.invoke(o,null);
                                                ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1034: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                m = c.getMethod("getMajorVersion", null);
                                                   ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1035: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                major = (Integer)m.invoke(o,null);
                                            ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1036: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this warning
                m = c.getMethod("getMinorVersion", null);
                                                   ^
/media/4c618535-dce4-4aa5-b621-475b44dd7adf/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java:1037: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
                minor = (Integer)m.invoke(o,null);
                                            ^
I found this http://java.sun.com/docs/books/tutorial/reflect/member/methodTrouble.html. I will try to do it on my own just for practice. But that is not a solution. That what I will code is performance aware. I never re-factored reflection related code; the reflection API stuff. Only for PHP 5 reflection API. So help from community will be needed. John