Cannot start the build from source one of the latest revisions

LabKey Support Forum (Inactive)
Cannot start the build from source one of the latest revisions Leo Dashevskiy  2014-04-24 12:49
Status: Closed
 
[12:44:37]:~/Labkey/trunk svn info
Path: .
URL: https://hedgehog.fhcrc.org/tor/stedi/trunk
Repository Root: https://hedgehog.fhcrc.org/tor/stedi
Repository UUID: a4ab64de-fbdc-0310-83ae-be1847ca59a0
Revision: 31328
Node Kind: directory
Schedule: normal
Last Changed Author: t.chadick
Last Changed Rev: 31327
Last Changed Date: 2014-03-05 13:32:19 -0800 (Wed, 05 Mar 2014)




Building does not work for me after a successful 'ant clean':




dhcp157184:server cytomatic$ ant build
Buildfile: /Library/LabKey/server/build.xml

echo_props:
     [echo] GWT no-override
     [echo] tomcat.home=/Library/Tomcat/Current
     [echo] java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre
     [echo] ant.java.version=1.7
     [echo] java7.rt.dir=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib
     [echo] labkey.xml.template=../webapps/labkey.xml

build_applets:

buildToCore:

buildToCoreDirty:

prepare:
    [mkdir] Created dir: /Library/LabKey/build/applets

compile_all:
     [echo] Javac current target: 1.5
    [javac] Compiling 7 source files to /Library/LabKey/build/applets
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlinteprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 warning
     [copy] Copying 2 files to /Library/LabKey/build/applets
     [copy] Copying 2 files to /Library/LabKey/build/applets

compile:

jar:
     [echo] Creating manifest file
    [mkdir] Created dir: /Library/LabKey/build/applets/META-INF
     [echo] Creating manifest seems ready
      [jar] Building jar: /Library/LabKey/build/applets/applets.jar

-keystore.check:

-createstore:

-askpasswd:

signedjar:

BUILD FAILED
/Library/LabKey/server/build.xml:1936: The following error occurred while executing this line:
/Library/LabKey/server/applets/build.xml:237: The following error occurred while executing this line:
/Library/LabKey/server/applets/build.xml:241: The following error occurred while executing this line:
/Library/LabKey/server/applets/build.xml:228: retry doesn't support the "retrydelay" attribute

Total time: 2 seconds


I should may be add that the system recently had Tomcat6, then I managed to build the latest trunk revision of Labkey, then saw the error message that Tomcat6 is no longer supported, then upgraded to Tomcat7 and now cannot build...

Thanks!
-Leo
 
 
jeckels responded:  2014-04-24 14:28
Title: Cannot build from source one of the latest revisions
Hi Leo,

You most likely need to update your copy of Ant as well. That attribute is supported in 1.8.3 and greater.

http://ant.apache.org/manual/Tasks/retry.html

A copy of Ant 1.9.3 is checked into SVN at in the external/ant subdirectory.

Thanks,
Josh
 
Leo Dashevskiy responded:  2014-04-24 14:32
That must be it, Josh, thanks, I'm running ant 1.8.2 at the moment.

Is there a file, which states minimum required versions of various software that Labkey needs, by any chance?
 
Leo Dashevskiy responded:  2014-04-24 15:28
Now, I have the following error:


500: Unexpected server error

A failure occurred during LabKey Server startup.

org.labkey.api.data.SqlScriptRunner$SqlScriptException: EHR_ComplianceDB-0.00-11.20.sql : SqlExecutor.execute(); bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: schema "ehr_compliancedb" already exists
       at org.labkey.api.data.SqlScriptManager.runScript(SqlScriptManager.java:208)
       at org.labkey.api.data.SqlScriptRunner.runScripts(SqlScriptRunner.java:82)
       at org.labkey.api.module.DefaultModule.versionUpdate(DefaultModule.java:350)
       at org.labkey.api.module.ModuleUpgrader.upgrade(ModuleUpgrader.java:59)
       at org.labkey.api.module.ModuleUpgrader$1.run(ModuleUpgrader.java:75)
Caused by: org.springframework.jdbc.BadSqlGrammarException: SqlExecutor.execute(); bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: schema "ehr_compliancedb" already exists
       at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:111)
       at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
       at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:37)
       at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:31)
       at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:96)
       at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:65)
       at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:60)
       at org.labkey.api.data.SqlScriptExecutor$Block.execute(SqlScriptExecutor.java:168)
       at org.labkey.api.data.SqlScriptExecutor.execute(SqlScriptExecutor.java:64)
       at org.labkey.core.dialect.PostgreSql84Dialect.runSql(PostgreSql84Dialect.java:860)
       at org.labkey.api.data.SqlScriptManager.runScript(SqlScriptManager.java:203)
       ... 4 more
Caused by: org.postgresql.util.PSQLException: ERROR: schema "ehr_compliancedb" already exists
       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
       at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
       at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
       at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:395)
       at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
       at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
       at org.labkey.api.data.dialect.StatementWrapper.execute(StatementWrapper.java:1015)
       at org.labkey.api.data.SqlExecutor$NormalStatementExecutor.execute(SqlExecutor.java:123)
       at org.labkey.api.data.SqlExecutor$NormalStatementExecutor.execute(SqlExecutor.java:111)
       at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:89)
       ... 10 more


Sounds to me like it has something to do with the database, no?

Please, help!
Thanks.
 
jeckels responded:  2014-04-25 09:24
Hi Leo,

As for your version requirements question, we document run-time requirements here:

https://www.labkey.org/wiki/home/LabKey%20Server%20Documentation/page.view?name=supported

and build-time requirements and recommendations here:

https://www.labkey.org/wiki/home/LabKey%20Server%20Documentation/page.view?name=build

Thanks,
Josh
 
jeckels responded:  2014-04-25 09:30
Hi Leo,

The easiest fix, given that you most likely don't care about the EHR Compliance module's data on your local system, would be to simply drop that schema manually from the database. That should allow the upgrade to proceed.

We try hard to avoid the need for these kinds of manual database fixup, but sometimes dev machines, especially those that aren't syncing and building regularly, can get into a bad state as we consolidate SQL upgrade scripts between versions.

Let us know if you need any help with the manual database manipulation.

Thanks,
Josh
 
Leo Dashevskiy responded:  2014-04-25 14:10
I actually tried doing exactly that, but EHR Compliance schema, I was told by the Postgres system, was dependent on a whole bunch of other schemas that looked like system ones, so I did not proceed.

Well, that all seems to be irrelevant now as I somehow broke the Java installation in such a way that I cannot fix it...
 
jeckels responded:  2014-04-25 14:20
Hi Leo,

To get a sense of what scripts have run on your server, can you capture the output of running "SELECT * FROM core.sqlscripts" and "SELECT * FROM core.modules" and attach them here? We may be able to provide more targeted steps for getting the upgrade to complete cleanly.

Thanks,
Josh
 
Leo Dashevskiy responded:  2014-04-25 14:45
Oh, you know I did not read the error carefully, I guess.

It just said that it could not drop the schema because of the tables within it, so it seems, so I reran the command with CASCADE at the end and that did the trick.

Unfortunately, like I said, I totally messed up the Java installation on that Mac machine (while attempting to upgrade to the latest one), and the setup on Macs is way more involved as compared to Ubuntu, so I do not have the necessary knowledge in order to fix the issue: 'java -version' prints fine, but neither the Java Applet Plug-in for Firefox, nor Tomcat work correctly and the Java menu window in Settings does not open either...
 
Leo Dashevskiy responded:  2014-05-01 11:34
Resolved after updating to Mavericks...