Startup issues with Labkey 2.3 branch

LabKey Support Forum (Inactive)
Startup issues with Labkey 2.3 branch slangley  2007-11-30 13:56
Status: Closed
 
I downloaded and built the Labkey 2.3 branch source and tried to run it against a new database.

I'm seeing this issue:

    http://localhost:8080/labkey/admin/moduleStatus.view

Missing Struts Module Configuration
There is no Struts module configuration registered for /org/labkey/core/admin/moduleStatus.do (module path /org/labkey/core/admin).

I'm using the IntelliJ 7.0.1; Java EE 5 SDK Update 3 which includes Java SE 6 Update 3; Apache Tomcat 5.5.20; all running on Windows XP Pro SP2 (32-bit).

Similar error messages appear in the console log:

log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.
INFO DbSchema 2007-11-30 13:43:42,155 main : Loading DbSchema "core" using the following configuration:
    Server URL: jdbc:postgresql://sqltest/scott_lk23test
    Database Product Name: PostgreSQL
    Database Product Version: 8.2.4
    JDBC Driver Name: PostgreSQL Native Driver
    JDBC Driver Version: PostgreSQL 8.2 JDBC3 with SSL (build 506)
ERROR terActionServlet 2007-11-30 13:43:45,665 main : Could not load Struts module configuration for /WEB-INF/classes/_pageflow/struts-config.xml.
INFO ViewServlet 2007-11-30 13:44:17,128 8080-Processor25 : ViewServlet.init: org.apache.catalina.core.StandardWrapperFacade@111c3f0
INFO DbSchema 2007-11-30 13:44:17,237 8080-Processor25 : Loading DbSchema "prop"
ERROR terActionServlet 2007-11-30 13:44:18,610 8080-Processor25 : No module configuration registered for /org/labkey/core/admin/moduleStatus.do (module path /org/labkey/core/admin).

Has anything changed with the Labkey 'core' module lately that may be causing this.
I'll try using a recent Java JDK 1.5 - instead of 1.6 - and see if that helps.

Thanks.

Scott Langley
 
 
slangley responded:  2007-12-03 14:50
For whatever reason, the *.xml files that normally appear in:

 build\labkeyWebapp\explodedWar\WEB-INF\classes\_pageflow\

are not getting built, nor is the '_pageflow' subdirectory itself being created.
 
Matthew Bellew responded:  2007-12-03 15:05
Be sure that the build.xml you are using matches the branch you are building (svn status build.xml).

In particular, the struts config files will not be built for a module (core in this case) unless this line appears inside the sub_build_module task for the module target.

            <param name="useBeehive" value="true" />
 
slangley responded:  2007-12-03 15:15
According to the IntelliJ's built-in Subversion->Check with Branch the build.xml is identical to the branch version.

Also, "useBeehive" is inside the sub_build_module task for the core module.
 
brittp responded:  2007-12-03 15:22
Hi Scott,

Are you building a module outside of the root labkey enlistment? (This would be the case if you created your module using the create_module script from the root build.xml.) If so, you'll also have a build.xml within your module root. Within this build.xml, you'll need to ensure that your build_module target looks like this:

   <target name="build_module"
           depends="init"
           description="Builds local module only. Deploys local module into LabKey installation.">
       <ant antfile="${main.build.xml}"
            target="sub_build_module"
            inheritall="false">
           <property name="moduleDir" value="${basedir}"/>
           <property name="moduleName" value="${module.name}"/>
           <!-- NEW PROPERTY: -->
           <property name="useBeehive" value="true" />
       </ant>
   </target>

Note the "NEW PROPERTY" comment above the required line.

Thanks,
Britt
 
slangley responded:  2007-12-03 15:25
I'm not attempting to build any module (except for what Labkey wants to do for it self.)

I'm running the Labkey Ant build task.

Scott
 
Matthew Bellew responded:  2007-12-03 15:34
Running out of ideas, but if it were me... I'd make sure to do a clean build, and I'd also check the labkey.xml of the running tomcat installation (tomcat\conf\Catalina\localhost\labkey.xml) to make sure that's pointing at the right place. While I'm thinking of that, you only have one tomcat?
 
jeckels responded:  2007-12-03 15:47
Scott,

Can you do a clean and then a build, and then attach the build output as a file?

Specifically, we're looking for lines like:

Copying 1 file to C:\labkey2.3\build\modules\experiment\pageflowTempDir

and

apt
Compiling 1 source file to C:\labkey2.3\build\modules\experiment\pageflowTempOutputDir

which indicate that the build process is successfully building the Beehive pageflows, which should result in XML files in directories like:

C:\labkey2.3\build\modules\experiment\pageflowTempOutputDir\_pageflow

Those should then be copied into a directory like:

C:\labkey2.3\build\modules\experiment\explodedMar\META-INF\_pageflow

which should then be rolled up into a file like:

C:\labkey2.3\build\labkeyWebapp\tempModules\experiment.module

which is actually a ZIP file. Inside, it should contain a META-INF/_pageflow directory. When the server starts up, it should copy the contents of that directory into your explodedWar/classes/_pageflow directory.

It's a somewhat complicated process, but it should give you a few other places to look to see where the chain might be broken. I can take a look at your build output and help diagnose as well.

Thanks,
Josh
 
slangley responded:  2007-12-03 16:55
There is one Tomcat installed. And it points to the correct path.

I'm attaching the output text of:

cc-clean-build
clean
build

which I executed in that order.

I do see these kinds of messages:

 Copying 4 files to C:\labkey23\build\modules\experiment\pageflowTempDir

but not the others you suggested. No _pageflow subdirectories are created.

As for which classes get compiled, I'm attaching the output of running the DOS tree command on the \build\core\modules directory.
 
Matthew Bellew responded:  2007-12-03 17:23
Try building with the version of ant checked into the project. E.g.

set ANT_HOME=C:\labkey23\external\ant
set PATH=%PATH%;%ANT_HOME%\bin

There are a lot of strange warnings in this log, culminating in

    java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory

Josh may have some more insight as to why this happens, but I think this is essentially an ant configuration problem.
 
jeckels responded:  2007-12-04 10:40
I agree with Matt that the NoClassDefFoundError is the problem. That class should be part of tools.jar.

Be sure that your PATH and JAVA_HOME are set correctly, and that you're not somehow pointing at a JRE, which won't have toos.jar. You might want to try building from the command line instead of through IntelliJ so that it's easy to change the environment variables and see if the error message changes.

Josh
 
slangley responded:  2007-12-04 12:44
I'm attaching the standard output from running the ant task from the command line when these environment variables were set:

ANT_HOME=C:\labkey23\external\ant
ANT_OPTS=-Xmx256m
CATALINA_HOME=C:\Program Files\LabKey\apache-tomcat-5.5.20
JAVA_HOME=C:\Program Files\Java\jdk1.5.0_14
LABKEY_ROOT=c:\labkey_dev\trunk
Path=c:\labkey23\external\ant\bin;C:\Program Files\Java\jdk1.5.0_14\bin;C:\WINDO
WS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

The NoClassDefFoundError's no longer appear, only warnings like:

[echo] sourcepath: C:\labkey23\build\modules\core\pageflowTempDir;C:\labkey23\build\modules\core\pageflowTempDir\WEB-INF\src
     [echo] webcontentdir: C:\labkey23\server\modules\core/src
     [echo] destdir: C:\labkey23\server/../build/modules/core/pageflowTempOutputDir
     [echo] tempdir: C:\labkey23\server/../build/gensrc/pageflow
      [apt] Compiling 12 source files to C:\labkey23\build\modules\core\pageflowTempOutputDir
      [apt] warning: Annotation types without processors: [org.labkey.api.security.RequiresPermission, org.labkey.api.security.RequiresSiteAdmin, java.lang.Override, org.labkey.api.security.RequiresLogin]
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

However, the pageflow XML files were created, and Labkey actually runs under Tomcat.

I had to specify the Path variable like I did because the EE SDK 5 (w/ Java SDK 6 Update 3) puts copies of a number of Java binaries in the C:\Windows\System32 directory.
 
slangley responded:  2007-12-04 15:59
I spent some time further troubleshooting this problem.

As long as I don't point JAVA_HOME to the location of the JDK1.6.0_03 installed with EE SDK 5, I can get proper builds inside IntelliJ with JDK 1.5 and either Ant 1.65 or Ant 1.70 (included with IntelliJ 7.0.1).

And if I use a version of the JDK 1.6.0_03 installed separately from the EE SDK 5, which uses the default installation path of:
  
  C:\Program Files\Java\jdk1.6.0_03\

the LabKey software will also build correctly with Ant 1.70. (I didn't bother trying it with Ant 1.65.)

So, I assume that issue comes down to using the JDK 1.6.0_03 that gets installed with the EE SDK 5. Perhaps, there are conflicts between the latest Java EE jars that come with the EE SDK and the jars you have in the labkey\external\lib directory?

Regardless, I'll just avoid using the JDK 1.6.0_03 included with the EE SDK 5 from now on.