Spring batch 未在Unix上运行Spring批处理数据库安装脚本

Spring batch 未在Unix上运行Spring批处理数据库安装脚本,spring-batch,derby,spring-jdbc,Spring Batch,Derby,Spring Jdbc,我们有一个Spring批处理应用程序,它在开发中使用了一个嵌入式Derby数据库。当从IntelliJ中运行时,或者在windows上作为jar运行时,Derby数据库将按照我们的预期创建。此外,还将运行设置数据库的脚本 这都是在launch-context.xml的配置中定义的 我们的设置是标准的: 这就是Spring应用程序的引导方式: GenericXmlApplicationContext ctx = new GenericXmlApplicationContext(); ctx.l

我们有一个Spring批处理应用程序,它在开发中使用了一个嵌入式Derby数据库。当从IntelliJ中运行时,或者在windows上作为jar运行时,Derby数据库将按照我们的预期创建。此外,还将运行设置数据库的脚本

这都是在launch-context.xml的配置中定义的

我们的设置是标准的:

这就是Spring应用程序的引导方式:

GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
ctx.load("app-context.xml");
ctx.getEnvironment().getPropertySources().addLast(propertySource);
ctx.refresh();
ctx.start();
代码或配置没有更改-是否有人知道问题可能是什么


谢谢

您是如何启动这些作业的?JobExecution=jobLauncher.runjob,param;抱歉,我的意思是上下文如何引导…已更新问题以包括引导,谢谢连接到数据库时是否覆盖用户名/密码?是否有可能有时您以UserA连接,而有时您以UserB连接,因此UserB看不到在UserA的模式中创建的表?
Caused by: java.sql.SQLException: Table/View 'BATCH_JOB_INSTANCE' does not exist.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 54 more
Caused by: ERROR 42X05: Table/View 'BATCH_JOB_INSTANCE' does not exist.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source)
        at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source)
        at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
        at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
        at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
        ... 48 more
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
ctx.load("app-context.xml");
ctx.getEnvironment().getPropertySources().addLast(propertySource);
ctx.refresh();
ctx.start();