IDEMPIERE-260 Configuration using Eclipse install.app does not work when db is Oracle / previous approach broke install.app
This commit is contained in:
parent
14085d6218
commit
cdafec1522
|
@ -16,7 +16,7 @@
|
|||
<stringAttribute key="location" value="${workspace_loc}/../runtime-install.app"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}/org.adempiere.server-feature"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="product" value="org.adempiere.server.server_product"/>
|
||||
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.activation@default:default,com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet@default:default"/>
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.adempiere.install.IDBConfigMonitor;
|
|||
import org.adempiere.install.IDatabaseConfig;
|
||||
import org.compiere.db.Database;
|
||||
import org.compiere.install.ConfigurationData;
|
||||
import org.compiere.tools.FileUtil;
|
||||
import org.compiere.util.CLogger;
|
||||
|
||||
/**
|
||||
|
@ -387,15 +388,28 @@ public class ConfigOracle implements IDatabaseConfig
|
|||
ospath = "windows";
|
||||
else
|
||||
ospath = "unix";
|
||||
// TNS Name Info via sqlplus
|
||||
String sqlplus = "sqlplus system/" + systemPassword + "@"
|
||||
+ "//" + databaseServer.getHostName()
|
||||
+ ":" + databasePort
|
||||
+ "/" + databaseName
|
||||
+ " @utils." + ospath + "/oracle/Test.sql";
|
||||
log.config(sqlplus);
|
||||
pass = testSQL(sqlplus);
|
||||
error = "Error connecting via: " + sqlplus;
|
||||
String testFile = "utils." + ospath + "/oracle/Test.sql";
|
||||
if (! new File(testFile).isFile()) {
|
||||
testFile = "org.adempiere.server-feature/" + testFile;
|
||||
if (! new File(testFile).isFile()) {
|
||||
testFile = null;
|
||||
}
|
||||
}
|
||||
if (testFile != null) {
|
||||
// TNS Name Info via sqlplus
|
||||
String sqlplus = "sqlplus system/" + systemPassword + "@"
|
||||
+ "//" + databaseServer.getHostName()
|
||||
+ ":" + databasePort
|
||||
+ "/" + databaseName
|
||||
+ " @" + testFile;
|
||||
log.config(sqlplus);
|
||||
pass = testSQL(sqlplus);
|
||||
error = "Error connecting via: " + sqlplus;
|
||||
} else {
|
||||
pass = false;
|
||||
error = "Test file does not exist";
|
||||
log.warning(error);
|
||||
}
|
||||
if (monitor != null)
|
||||
monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_SQL_TEST, "ErrorTNS",
|
||||
pass, true, error));
|
||||
|
@ -411,7 +425,7 @@ public class ConfigOracle implements IDatabaseConfig
|
|||
log.info("OK: Connection = " + url);
|
||||
else
|
||||
log.warning("Cannot connect via Net8: " + url);
|
||||
}
|
||||
} else
|
||||
log.info("OCI Test Skipped");
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue