teiid SVN: r3844 - branches/7.7.x/connectors/sandbox.
by teiid-commits@lists.jboss.org
Author: van.halbert
Date: 2012-02-06 00:18:45 -0500 (Mon, 06 Feb 2012)
New Revision: 3844
Removed:
branches/7.7.x/connectors/sandbox/coherence_connector/
Log:
removing old example to be replaced with new version, differently named
12 years, 10 months
teiid SVN: r3843 - branches/7.7.x/api/src/main/java/org/teiid/translator.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-02-02 16:17:05 -0500 (Thu, 02 Feb 2012)
New Revision: 3843
Modified:
branches/7.7.x/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java
Log:
TEIID-1922 start should not be delegated
Modified: branches/7.7.x/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java
===================================================================
--- branches/7.7.x/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java 2012-02-02 16:22:09 UTC (rev 3842)
+++ branches/7.7.x/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java 2012-02-02 21:17:05 UTC (rev 3843)
@@ -73,11 +73,6 @@
}
@Override
- public void start() throws TranslatorException {
- this.delegate.start();
- }
-
- @Override
public boolean areLobsUsableAfterClose() {
return delegate.areLobsUsableAfterClose();
}
12 years, 11 months
teiid SVN: r3842 - in branches/7.7.x: connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc and 10 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-02-02 11:22:09 -0500 (Thu, 02 Feb 2012)
New Revision: 3842
Added:
branches/7.7.x/metadata/src/test/resources/TEIIDDES992_VDB.vdb
Modified:
branches/7.7.x/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java
branches/7.7.x/api/src/main/java/org/teiid/metadata/FunctionMethod.java
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
branches/7.7.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Constants.java
branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
branches/7.7.x/documentation/reference/src/main/docbook/en-US/content/translators.xml
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
branches/7.7.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
branches/7.7.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
branches/7.7.x/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
Log:
TEIID-1902 updating extension property keys and adding back source function support
Modified: branches/7.7.x/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java
===================================================================
--- branches/7.7.x/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -59,6 +59,8 @@
private LinkedHashMap<String, String> properties;
private String annotation;
+
+ public static final String RELATIONAL_URI = "{http://www.teiid.org/ext/relational/2012}"; //$NON-NLS-1$
public String getUUID() {
if (uuid == null) {
@@ -134,6 +136,18 @@
return properties;
}
+ public String getProperty(String key, boolean checkUnqualified) {
+ String value = getProperties().get(key);
+ if (value != null || !checkUnqualified) {
+ return value;
+ }
+ int index = key.indexOf('}');
+ if (index > 0 && index < key.length() && key.charAt(0) == '{') {
+ key = key.substring(index + 1, key.length());
+ }
+ return getProperties().get(key);
+ }
+
/**
* The preferred setter for extension properties.
* @param key
Modified: branches/7.7.x/api/src/main/java/org/teiid/metadata/FunctionMethod.java
===================================================================
--- branches/7.7.x/api/src/main/java/org/teiid/metadata/FunctionMethod.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/api/src/main/java/org/teiid/metadata/FunctionMethod.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -108,7 +108,7 @@
private Determinism determinism = Determinism.DETERMINISTIC;
@XmlElement(name="inputParameters")
- protected List<FunctionParameter> inParameters = new ArrayList<FunctionParameter>();
+ protected List<FunctionParameter> inParameters = new ArrayList<FunctionParameter>(2);
private FunctionParameter outputParameter;
private Schema parent;
Modified: branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
===================================================================
--- branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -39,25 +39,13 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.teiid.language.Argument;
-import org.teiid.language.Call;
-import org.teiid.language.Command;
-import org.teiid.language.Comparison;
-import org.teiid.language.DerivedColumn;
-import org.teiid.language.ExpressionValueSource;
-import org.teiid.language.Function;
-import org.teiid.language.In;
-import org.teiid.language.LanguageObject;
-import org.teiid.language.Like;
-import org.teiid.language.Literal;
-import org.teiid.language.NamedTable;
-import org.teiid.language.SearchedCase;
-import org.teiid.language.SetClause;
+import org.teiid.language.*;
import org.teiid.language.Argument.Direction;
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SetQuery.Operation;
import org.teiid.language.visitor.SQLStringVisitor;
+import org.teiid.metadata.AbstractMetadataRecord;
import org.teiid.metadata.Procedure;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TypeFacility;
@@ -68,9 +56,8 @@
* to produce a SQL String. This class is expected to be subclassed.
*/
public class SQLConversionVisitor extends SQLStringVisitor{
-
- public static final String TEIID_NATIVE_QUERY = "teiid:native-query"; //$NON-NLS-1$
- public static final String TEIID_NON_PREPARED = "teiid:non-prepared"; //$NON-NLS-1$
+ public static final String TEIID_NATIVE_QUERY = AbstractMetadataRecord.RELATIONAL_URI + "native-query"; //$NON-NLS-1$
+ public static final String TEIID_NON_PREPARED = AbstractMetadataRecord.RELATIONAL_URI + "non-prepared"; //$NON-NLS-1$
private static DecimalFormat DECIMAL_FORMAT =
new DecimalFormat("#############################0.0#############################"); //$NON-NLS-1$
@@ -193,10 +180,10 @@
public void visit(Call obj) {
Procedure p = obj.getMetadataObject();
if (p != null) {
- String nativeQuery = p.getProperties().get(TEIID_NATIVE_QUERY);
+ String nativeQuery = p.getProperty(TEIID_NATIVE_QUERY, false);
if (nativeQuery != null) {
List<Object> parts = parseNativeQueryParts(nativeQuery);
- this.prepared = !Boolean.valueOf(p.getProperties().get(TEIID_NON_PREPARED));
+ this.prepared = !Boolean.valueOf(p.getProperty(TEIID_NON_PREPARED, false));
if (this.prepared) {
this.preparedValues = new ArrayList<Object>();
}
@@ -425,7 +412,7 @@
@Override
protected void appendBaseName(NamedTable obj) {
if (obj.getMetadataObject() != null) {
- String nativeQuery = obj.getMetadataObject().getProperties().get(TEIID_NATIVE_QUERY);
+ String nativeQuery = obj.getMetadataObject().getProperty(TEIID_NATIVE_QUERY, false);
if (nativeQuery != null) {
buffer.append(Tokens.LPAREN).append(nativeQuery).append(Tokens.RPAREN);
if (obj.getCorrelationName() == null) {
Modified: branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -37,20 +37,7 @@
import java.util.Collection;
import java.util.List;
-import org.teiid.language.Call;
-import org.teiid.language.ColumnReference;
-import org.teiid.language.Command;
-import org.teiid.language.DerivedColumn;
-import org.teiid.language.Expression;
-import org.teiid.language.ExpressionValueSource;
-import org.teiid.language.Function;
-import org.teiid.language.Insert;
-import org.teiid.language.LanguageObject;
-import org.teiid.language.Limit;
-import org.teiid.language.Literal;
-import org.teiid.language.NamedTable;
-import org.teiid.language.QueryExpression;
-import org.teiid.language.Select;
+import org.teiid.language.*;
import org.teiid.language.SQLConstants.Tokens;
import org.teiid.language.SetQuery.Operation;
import org.teiid.language.visitor.CollectorVisitor;
@@ -607,7 +594,7 @@
public List<?> translate(LanguageObject obj, ExecutionContext context) {
if (oracleSuppliedDriver && obj instanceof Call) {
Call call = (Call)obj;
- if (call.getReturnType() == null && call.getMetadataObject() != null && call.getMetadataObject().getProperties().get(SQLConversionVisitor.TEIID_NATIVE_QUERY) == null) {
+ if (call.getReturnType() == null && call.getMetadataObject() != null && call.getMetadataObject().getProperty(SQLConversionVisitor.TEIID_NATIVE_QUERY, false) == null) {
//oracle returns the resultset as a parameter
call.setReturnType(RefCursorType.class);
}
Modified: branches/7.7.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
===================================================================
--- branches/7.7.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -80,7 +80,6 @@
import java.util.Date;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
@@ -458,15 +457,11 @@
// MPW: 3-11-07: Added support for java.lang.Integer conversion.
if(TypeFacility.RUNTIME_TYPES.TIMESTAMP.equals(modelAttrClass)) {
- Map<String, String> p = modelElement.getProperties();
-
- String timestampFormat = p.get("Format"); //$NON-NLS-1$
- SimpleDateFormat dateFormat;
+ String timestampFormat = modelElement.getFormat();
if(timestampFormat == null) {
timestampFormat = LDAPConnectorConstants.ldapTimestampFormat;
-
}
- dateFormat = new SimpleDateFormat(timestampFormat);
+ SimpleDateFormat dateFormat = new SimpleDateFormat(timestampFormat);
try {
if(strResult != null) {
Date dateResult = dateFormat.parse(strResult);
Modified: branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Constants.java
===================================================================
--- branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Constants.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Constants.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -40,12 +40,14 @@
public static final String EMAIL_TYPE = "email"; //$NON-NLS-1$
+ public static final String EXTENSION_URI = "{http://www.teiid.org/translator/salesforce/2012}"; //$NON-NLS-1$
+
public static final String RESTRICTED_PICKLIST_TYPE = "restrictedpicklist"; //$NON-NLS-1$
public static final String RESTRICTED_MULTISELECT_PICKLIST_TYPE = "restrictedmultiselectpicklist"; //$NON-NLS-1$
- public static final String SUPPORTS_QUERY = "Supports Query";//$NON-NLS-1$
+ public static final String SUPPORTS_QUERY = EXTENSION_URI +"Supports Query";//$NON-NLS-1$
- public static final String SUPPORTS_RETRIEVE = "Supports Retrieve";//$NON-NLS-1$
+ public static final String SUPPORTS_RETRIEVE = EXTENSION_URI +"Supports Retrieve";//$NON-NLS-1$
}
Modified: branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
===================================================================
--- branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -37,6 +37,7 @@
import org.teiid.metadata.RuntimeMetadata;
import org.teiid.metadata.Table;
import org.teiid.translator.TranslatorException;
+import org.teiid.translator.salesforce.Constants;
import org.teiid.translator.salesforce.SalesForcePlugin;
import org.teiid.translator.salesforce.Util;
@@ -365,7 +366,7 @@
protected void loadColumnMetadata( NamedTable group ) throws TranslatorException {
table = group.getMetadataObject();
- String supportsQuery = table.getProperties().get("Supports Query"); //$NON-NLS-1$
+ String supportsQuery = table.getProperty(Constants.SUPPORTS_QUERY, true);
if (!Boolean.valueOf(supportsQuery)) {
throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported")); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
===================================================================
--- branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -115,8 +115,8 @@
public void visit(NamedTable obj) {
try {
table = obj.getMetadataObject();
- String supportsQuery = table.getProperties().get(Constants.SUPPORTS_QUERY);
- objectSupportsRetrieve = Boolean.valueOf(table.getProperties().get(Constants.SUPPORTS_RETRIEVE));
+ String supportsQuery = table.getProperty(Constants.SUPPORTS_QUERY, true);
+ objectSupportsRetrieve = Boolean.valueOf(table.getProperty(Constants.SUPPORTS_RETRIEVE, true));
if (!Boolean.valueOf(supportsQuery)) {
throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported")); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: branches/7.7.x/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- branches/7.7.x/documentation/reference/src/main/docbook/en-US/content/translators.xml 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/documentation/reference/src/main/docbook/en-US/content/translators.xml 2012-02-02 16:22:09 UTC (rev 3842)
@@ -547,15 +547,15 @@
<section>
<title>Native Queries</title>
<para>Both physical tables and procedures may optionally have native queries associated with them. No validation of the native query is performed, it is simply used in a straight-forward manner to generate the source SQL.
- For a physical table setting the teiid:native-query extension metadata to the desired query string will have Teiid execute the native query as an inline view in the source query.
- This feature should only be used against sources that support inline views. For example on a physical table y with nameInSource=x and teiid:native-query=select c from g, the Teiid source query
+ For a physical table setting the {http://www.teiid.org/ext/relational/2012}native-query extension metadata to the desired query string will have Teiid execute the native query as an inline view in the source query.
+ This feature should only be used against sources that support inline views. For example on a physical table y with nameInSource="x" and {http://www.teiid.org/ext/relational/2012}native-query="select c from g", the Teiid source query
"SELECT c FROM y" would generate the SQL query "SELECT c FROM (select c from g) as x". Note that the column names in the native query must match the nameInSource of the physical table columns for the resulting SQL
to be valid.</para>
- <para>For physical procedures you may also set the teiid:native-query extension metadata to a desired query string with the added ability to positionally reference IN parameters. A parameter reference has the form
+ <para>For physical procedures you may also set the {http://www.teiid.org/ext/relational/2012}native-query extension metadata to a desired query string with the added ability to positionally reference IN parameters. A parameter reference has the form
$integer, e.g. $1. Note that 1 based indexing is used and that only IN parameters may be referenced. Dollar-sign integer is reserved in physical procedure native queries. To use a $integer directly, it must be escaped with another $, e.g. $$1.
- By default bind values will be used for parameter values. In some situations you may wish to bind values directly into the resulting SQL. The teiid:non-prepared extension metadata property may be set to false to turn off
+ By default bind values will be used for parameter values. In some situations you may wish to bind values directly into the resulting SQL. The {http://www.teiid.org/ext/relational/2012}non-prepared extension metadata property may be set to false to turn off
parameter binding. Note this option should be used with caution as inbound may allow for SQL injection attacks if not properly validated. The native query does not need to call a stored procedure. Any SQL that returns
- a result set positionally matching the result set expected by the physical stored procedure metadata will work. For example on a stored procedure x with teiid:native-query=select c from g where c1 = $1 and c2 = '$$1', the Teiid source query
+ a result set positionally matching the result set expected by the physical stored procedure metadata will work. For example on a stored procedure x with {http://www.teiid.org/ext/relational/2012}native-query="select c from g where c1 = $1 and c2 = '$$1'", the Teiid source query
"CALL x(?)" would generate the SQL query "select c from g where c1 = ? and c2 = '$1'". Note that ? in this example will be replaced with the actual value bound to parameter 1.
</para>
</section>
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CapabilitiesUtil.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -236,7 +236,7 @@
if (!caps.supportsFunction(function.getFunctionDescriptor().getName())) {
return false;
}
- } else if (!schema.getFullName().equalsIgnoreCase(metadata.getFullName(modelID))) {
+ } else if (!isSameConnector(modelID, schema, metadata, capFinder)) {
return false; //not the right schema
}
Modified: branches/7.7.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- branches/7.7.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -47,18 +47,9 @@
import org.teiid.core.index.IEntryResult;
import org.teiid.core.util.StringUtil;
import org.teiid.internal.core.index.Index;
-import org.teiid.metadata.AbstractMetadataRecord;
-import org.teiid.metadata.Column;
-import org.teiid.metadata.ColumnSet;
-import org.teiid.metadata.Datatype;
-import org.teiid.metadata.ForeignKey;
-import org.teiid.metadata.KeyRecord;
-import org.teiid.metadata.MetadataStore;
-import org.teiid.metadata.Procedure;
-import org.teiid.metadata.ProcedureParameter;
-import org.teiid.metadata.Schema;
-import org.teiid.metadata.Table;
-import org.teiid.metadata.VdbConstants;
+import org.teiid.metadata.*;
+import org.teiid.metadata.FunctionMethod.Determinism;
+import org.teiid.metadata.FunctionMethod.PushDown;
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.metadata.TransformationMetadata.Resource;
@@ -500,6 +491,35 @@
if(transformRecord != null) {
procedureRecord.setQueryPlan(transformRecord.getTransformation());
}
+ } else if (procedureRecord.isFunction()) {
+ boolean deterministic = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "deterministic", true)); //$NON-NLS-1$
+ FunctionParameter outputParam = null;
+ List<FunctionParameter> args = new ArrayList<FunctionParameter>(procedureRecord.getParameters().size() - 1);
+ boolean valid = true;
+ for (ProcedureParameter param : procedureRecord.getParameters()) {
+ FunctionParameter fp = new FunctionParameter();
+ fp.setName(param.getName());
+ fp.setDescription(param.getAnnotation());
+ fp.setType(param.getRuntimeType());
+ switch (param.getType()) {
+ case ReturnValue:
+ if (outputParam != null) {
+ valid = false;
+ }
+ outputParam = fp;
+ break;
+ case In:
+ args.add(fp);
+ break;
+ default:
+ valid = false;
+ }
+ }
+ if (valid && outputParam != null) {
+ model.addFunction(new FunctionMethod(procedureRecord.getName(), procedureRecord.getAnnotation(), model.getName(), PushDown.MUST_PUSHDOWN,
+ null, null, args.toArray(new FunctionParameter[args.size()]), outputParam, false, deterministic?Determinism.DETERMINISTIC:Determinism.NONDETERMINISTIC));
+ continue;
+ }
}
model.addProcedure(procedureRecord);
}
Modified: branches/7.7.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
===================================================================
--- branches/7.7.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -27,9 +27,11 @@
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Collection;
+import java.util.Map;
import org.junit.Test;
import org.teiid.core.util.UnitTestUtil;
+import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
import org.teiid.query.metadata.TransformationMetadata;
@@ -63,4 +65,13 @@
assertNotNull(schema.getFunctions());
}
+ @Test public void testFunctionMetadata() throws Exception {
+ TransformationMetadata tm = VDBMetadataFactory.getVDBMetadata(UnitTestUtil.getTestDataPath() + "/TEIIDDES992_VDB.vdb");
+ Map<String, FunctionMethod> functions = tm.getMetadataStore().getSchema("TEIIDDES992").getFunctions();
+ assertEquals(1, functions.size());
+ FunctionMethod fm = functions.values().iterator().next();
+ assertEquals("sampleFunction", fm.getName());
+ assertEquals(1, fm.getInputParameters().size());
+ }
+
}
Copied: branches/7.7.x/metadata/src/test/resources/TEIIDDES992_VDB.vdb (from rev 3381, branches/7.4.x/metadata/src/test/resources/TEIIDDES992_VDB.vdb)
===================================================================
(Binary files differ)
Modified: branches/7.7.x/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
===================================================================
--- branches/7.7.x/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2012-02-01 22:01:48 UTC (rev 3841)
+++ branches/7.7.x/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2012-02-02 16:22:09 UTC (rev 3842)
@@ -174,7 +174,6 @@
mergedUDF.addFunctions(this.udf);
}
if (this.stores != null) {
- //schema scoped source functions - this is only a dynamic vdb concept
for(MetadataStore store:this.stores.getStores()) {
for (Schema schema:store.getSchemas().values()) {
Collection<FunctionMethod> funcs = schema.getFunctions().values();
12 years, 11 months
teiid SVN: r3841 - in trunk/build/kits/jboss-as7/docs/teiid/examples: dynamicvdb-portfolio/data-roles-ext and 1 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-02-01 17:01:48 -0500 (Wed, 01 Feb 2012)
New Revision: 3841
Added:
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-ds.xml
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml.dodeploy
Modified:
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/README.txt
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/customer-schema.sql
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/README.txt
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/portfolio-vdb.xml
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/marketdata-file-ds.xml
trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml
trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.bat
trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.sh
Log:
TEIID-1901: updated for AS7 and H2 database
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/README.txt
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/README.txt 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/README.txt 2012-02-01 22:01:48 UTC (rev 3841)
@@ -1,31 +1,31 @@
Dynamicvdb-portfolio demonstrates how to federate data from a relational data source with a
-text file-based data source. This example uses the HSQL database which is referenced as
-the PortfolioDS data source in the server, but the creation SQL could be adapted to another
+text file-based data source. This example uses the H2 database which is referenced as
+the "accouts-ds" data source in the server, but the creation SQL could be adapted to another
database if you choose.
Data Source(s) setup:
-- Start the server (if not already started)
-- go to the JMX console (http://localhost:8080/jmx-console/) and select: database=localDB,service=Hypersonic
-to present bean options. Now invoke "startDatabaseManager" to bring up HSQL Database Manager.
-- Use the File/Open Script menu option to load the teiid-examples/dynamicvdb-portfolio/customer-schema.sql script and and then click Execute SQL to create the required tables and insert the example data.
+- Edit the contents of "standalone-teiid.xml" file, and add contents of following files to create H2, CSV data sources
-
+ (1) portfolio-ds.xml.xml - under "datasources" subsystem element
+ (2) marketdata-file-ds.xml - under "resource-adapter" subsystem
+
Teiid Deployment:
+Copy the following files to the "<jboss.home>/standalone/deployments" directory
-Copy the following files to the <jboss.home>/server/default/deploy directory.
+ (1) portfolio-vdb.xml
+ (2) portfolio-vdb.xml.dodeploy
- (1) portfolio-vdb.xml
- (2) marketdata-file-ds.xml
+
+make sure the VDB is deloyed in the AS7 console.
-
Query Demonstrations:
==== Using the simpleclient example ====
-1) Change your working directory to teiid-examples/simpleclient
+1) Change your working directory to "<jboss-install>/docs/teiid/examples/simpleclient"
2) Use the simpleclient example run script, using the following format
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/customer-schema.sql
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/customer-schema.sql 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/customer-schema.sql 2012-02-01 22:01:48 UTC (rev 3841)
@@ -69,25 +69,24 @@
INSERT INTO CUSTOMER (SSN,FIRSTNAME,LASTNAME,ST_ADDRESS,APT_NUMBER,CITY,STATE,ZIPCODE,PHONE) VALUES ('CST01035','Henry','Thomas','345 Hilltop Parkway',null,'San Francisco','California','94129','(415)555-2093');
INSERT INTO CUSTOMER (SSN,FIRSTNAME,LASTNAME,ST_ADDRESS,APT_NUMBER,CITY,STATE,ZIPCODE,PHONE) VALUES ('CST01036','James','Drew','876 Lakefront Lane',null,'Cleveland','Ohio','44107','(216)555-6523');
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980002,'CST01002','Personal ','Active ', '1998-02-01 00:00:00.000', NULL);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980003,'CST01003','Personal ','Active ','1998-03-06 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980004,'CST01004','Personal ','Active ','1998-03-07 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980005,'CST01005','Personal ','Active ','1998-06-15 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980006,'CST01006','Personal ','Active ','1998-09-15 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990007,'CST01007','Personal ','Active ','1999-01-20 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990008,'CST01008','Personal ','Active ','1999-04-16 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990009,'CST01009','Business ','Active ','1999-06-25 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000015,'CST01015','Personal ','Closed ','2000-04-20 00:00:00.000','2001-06-22 00:00:00.000');
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000019,'CST01019','Personal ','Active ','2000-10-08 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000020,'CST01020','Personal ','Active ','2000-10-20 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000021,'CST01021','Personal ','Active ','2000-12-05 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20010022,'CST01022','Personal ','Active ','2001-01-05 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20010027,'CST01027','Personal ','Active ','2001-08-22 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020034,'CST01034','Business ','Active ','2002-01-22 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020035,'CST01035','Personal ','Active ','2002-02-12 00:00:00.000',null);
+INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020036,'CST01036','Personal ','Active ','2002-03-22 00:00:00.000',null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980002,'CST01002','Personal ','Active ',{ts '1998-02-01 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980003,'CST01003','Personal ','Active ',{ts '1998-03-06 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980004,'CST01004','Personal ','Active ',{ts '1998-03-07 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980005,'CST01005','Personal ','Active ',{ts '1998-06-15 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19980006,'CST01006','Personal ','Active ',{ts '1998-09-15 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990007,'CST01007','Personal ','Active ',{ts '1999-01-20 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990008,'CST01008','Personal ','Active ',{ts '1999-04-16 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (19990009,'CST01009','Business ','Active ',{ts '1999-06-25 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000015,'CST01015','Personal ','Closed ',{ts '2000-04-20 00:00:00.000'},{ts '2001-06-22 00:00:00.000'});
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000019,'CST01019','Personal ','Active ',{ts '2000-10-08 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000020,'CST01020','Personal ','Active ',{ts '2000-10-20 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20000021,'CST01021','Personal ','Active ',{ts '2000-12-05 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20010022,'CST01022','Personal ','Active ',{ts '2001-01-05 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20010027,'CST01027','Personal ','Active ',{ts '2001-08-22 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020034,'CST01034','Business ','Active ',{ts '2002-01-22 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020035,'CST01035','Personal ','Active ',{ts '2002-02-12 00:00:00.000'},null);
-INSERT INTO ACCOUNT (ACCOUNT_ID,SSN,STATUS,TYPE,DATEOPENED,DATECLOSED) VALUES (20020036,'CST01036','Personal ','Active ',{ts '2002-03-22 00:00:00.000'},null);
-
INSERT INTO PRODUCT (ID,SYMBOL,COMPANY_NAME) VALUES(1002,'BA','The Boeing Company');
INSERT INTO PRODUCT (ID,SYMBOL,COMPANY_NAME) VALUES(1003,'MON','Monsanto Company');
INSERT INTO PRODUCT (ID,SYMBOL,COMPANY_NAME) VALUES(1004,'PNRA','Panera Bread Company');
@@ -114,47 +113,46 @@
INSERT INTO PRODUCT (ID,SYMBOL,COMPANY_NAME) VALUES(1034,'SAP','SAP AG');
INSERT INTO PRODUCT (ID,SYMBOL,COMPANY_NAME) VALUES(1036,'TM','Toyota Motor Corporation');
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980002,1008,{ts '1998-02-01 00:00:00.000'},50);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980002,1036,{ts '1998-02-01 00:00:00.000'},25);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1002,{ts '1998-03-06 00:00:00.000'},100);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1029,{ts '1998-03-06 00:00:00.000'},25);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1016,{ts '1998-03-06 00:00:00.000'},51);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980004,1011,{ts '1998-03-07 00:00:00.000'},30);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1024,{ts '1998-06-15 00:00:00.000'},18);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980006,1033,{ts '1998-09-15 00:00:00.000'},200);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990007,1031,{ts '1999-01-20 00:00:00.000'},65);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1012,{ts '1999-04-16 00:00:00.000'},102);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990007,1008,{ts '1999-05-11 00:00:00.000'},85);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1005,{ts '1999-05-21 00:00:00.000'},105);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1004,{ts '1999-06-25 00:00:00.000'},120);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1024,{ts '1999-07-22 00:00:00.000'},150);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000015,1018,{ts '2000-04-20 00:00:00.000'},135);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980006,1030,{ts '2000-06-12 00:00:00.000'},91);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1029,{ts '2000-10-08 00:00:00.000'},351);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1030,{ts '2000-10-20 00:00:00.000'},127);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1018,{ts '2000-11-14 00:00:00.000'},100);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1031,{ts '2000-11-15 00:00:00.000'},125);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1028,{ts '2000-12-05 00:00:00.000'},400);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010022,1006,{ts '2001-01-05 00:00:00.000'},237);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1015,{ts '2001-01-23 00:00:00.000'},180);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1025,{ts '2001-03-23 00:00:00.000'},125);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1024,{ts '2001-08-22 00:00:00.000'},70);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1006,{ts '2001-11-14 00:00:00.000'},125);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1029,{ts '2001-11-15 00:00:00.000'},100);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1011,{ts '2001-12-18 00:00:00.000'},44);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1028,{ts '2001-12-19 00:00:00.000'},115);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020034,1024,{ts '2002-01-22 00:00:00.000'},189);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1029,{ts '2002-01-24 00:00:00.000'},30);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020035,1013,{ts '2002-02-12 00:00:00.000'},110);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020035,1034,{ts '2002-02-13 00:00:00.000'},70);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020034,1003,{ts '2002-02-22 00:00:00.000'},25);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1013,{ts '2002-02-26 00:00:00.000'},195);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980004,1007,{ts '2002-03-05 00:00:00.000'},250);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1014,{ts '2002-03-12 00:00:00.000'},300);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1024,{ts '2002-03-14 00:00:00.000'},136);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020036,1012,{ts '2002-03-22 00:00:00.000'},54);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020036,1010,{ts '2002-03-26 00:00:00.000'},189);
-INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1010,{ts '2002-04-01 00:00:00.000'},26);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980002,1008,'1998-02-01 00:00:00.000',50);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980002,1036,'1998-02-01 00:00:00.000',25);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1002,'1998-03-06 00:00:00.000',100);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1029,'1998-03-06 00:00:00.000',25);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1016,'1998-03-06 00:00:00.000',51);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980004,1011,'1998-03-07 00:00:00.000',30);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1024,'1998-06-15 00:00:00.000',18);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980006,1033,'1998-09-15 00:00:00.000',200);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990007,1031,'1999-01-20 00:00:00.000',65);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1012,'1999-04-16 00:00:00.000',102);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990007,1008,'1999-05-11 00:00:00.000',85);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1005,'1999-05-21 00:00:00.000',105);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1004,'1999-06-25 00:00:00.000',120);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1024,'1999-07-22 00:00:00.000',150);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000015,1018,'2000-04-20 00:00:00.000',135);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980006,1030,'2000-06-12 00:00:00.000',91);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1029,'2000-10-08 00:00:00.000',351);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1030,'2000-10-20 00:00:00.000',127);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1018,'2000-11-14 00:00:00.000',100);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1031,'2000-11-15 00:00:00.000',125);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1028,'2000-12-05 00:00:00.000',400);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010022,1006,'2001-01-05 00:00:00.000',237);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990008,1015,'2001-01-23 00:00:00.000',180);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1025,'2001-03-23 00:00:00.000',125);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1024,'2001-08-22 00:00:00.000',70);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000020,1006,'2001-11-14 00:00:00.000',125);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980003,1029,'2001-11-15 00:00:00.000',100);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1011,'2001-12-18 00:00:00.000',44);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1028,'2001-12-19 00:00:00.000',115);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020034,1024,'2002-01-22 00:00:00.000',189);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19990009,1029,'2002-01-24 00:00:00.000',30);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020035,1013,'2002-02-12 00:00:00.000',110);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020035,1034,'2002-02-13 00:00:00.000',70);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020034,1003,'2002-02-22 00:00:00.000',25);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000019,1013,'2002-02-26 00:00:00.000',195);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980004,1007,'2002-03-05 00:00:00.000',250);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20000021,1014,'2002-03-12 00:00:00.000',300);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20010027,1024,'2002-03-14 00:00:00.000',136);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020036,1012,'2002-03-22 00:00:00.000',54);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (20020036,1010,'2002-03-26 00:00:00.000',189);
+INSERT INTO HOLDINGS (ACCOUNT_ID,PRODUCT_ID,PURCHASE_DATE,SHARES_COUNT) VALUES (19980005,1010,'2002-04-01 00:00:00.000',26);
-
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/README.txt
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/README.txt 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/README.txt 2012-02-01 22:01:48 UTC (rev 3841)
@@ -14,7 +14,7 @@
To deploy the VDB, follow same steps as before in the previous example.
To define the new users and their roles to be used with this example,copy both the teiid-security-user.properties,
-teiid-security-roles.properties into "<jboss-as>/server/<profile>/conf/props" directory. Server restart is required after this
+teiid-security-roles.properties into "<jboss-as>/modules/org/jboss/teiid/conf" directory. Server restart is required after this
operation.
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/portfolio-vdb.xml
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/portfolio-vdb.xml 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/data-roles-ext/portfolio-vdb.xml 2012-02-01 22:01:48 UTC (rev 3841)
@@ -3,47 +3,15 @@
<description>A Dynamic VDB</description>
- <!--
- Setting to use connector supplied metadata. Can be "true" or "cached".
- "true" will obtain metadata once for every launch of Teiid.
- "cached" will save a file containing the metadata into
- the deploy/<vdb name>/<vdb version/META-INF directory
- -->
<property name="UseConnectorMetadata" value="true" />
-
- <!--
- Each model represents a access to one or more sources.
- The name of the model will be used as a top level schema name
- for all of the metadata imported from the connector.
-
- NOTE: Multiple model, with different import settings, can be bound to
- the same connector binding and will be treated as the same source at
- runtime.
- -->
<model name="MarketData">
- <!--
- Each source represents a translator and data source. There are
- pre-defined translators, or you can create one. ConnectionFactories
- or DataSources in JBoss AS they are typically defined using "xxx-ds.xml" files.
- -->
- <source name="text-connector" translator-name="file" connection-jndi-name="java:marketdata-file"/>
+ <source name="text-connector" translator-name="file" connection-jndi-name="java:/marketdata-file"/>
</model>
<model name="Accounts">
- <!--
- JDBC Import settings
-
- importer.useFullSchemaName directs the importer to drop the source
- schema from the Teiid object name, so that the Teiid fully qualified name
- will be in the form of <model name>.<table name>
- -->
<property name="importer.useFullSchemaName" value="false"/>
-
- <!--
- This connector is defined to reference the HSQL localDS"
- -->
- <source name="hsql-connector" translator-name="hsql" connection-jndi-name="java:DefaultDS"/>
+ <source name="hsql-connector" translator-name="hsql" connection-jndi-name="java:/accounts-ds"/>
</model>
<!-- For detailed description about data roles please refer to Reference Guide's Data Roles chapter -->
@@ -91,7 +59,7 @@
<!--
This role must defined in the JAAS security domain, the sample UserRolesLoginModules based roles file provided
in this sample directory. copy these "teiid-security-roles.properties" and "teiid-security-users.proeprties"
- into "servers/default/conf/props" directory and replace the old ones.
+ into "<jboss-install>/modules/org/jboss/teiid/conf" directory and replace the old ones.
-->
<mapped-role-name>supervisor</mapped-role-name>
</data-role>
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/marketdata-file-ds.xml
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/marketdata-file-ds.xml 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/marketdata-file-ds.xml 2012-02-01 22:01:48 UTC (rev 3841)
@@ -1,20 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<connection-factories>
-
- <no-tx-connection-factory>
- <jndi-name>marketdata-file</jndi-name>
- <rar-name>teiid-connector-file.rar</rar-name>
- <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
- <!--
- All the available properties for this connector are defined inside the "ra.xml" defined inside the rar
- file mentioned above.
- -->
-
- <config-property name="ParentDirectory" type="java.lang.String">${jboss.server.home.dir}/teiid-examples/dynamicvdb-portfolio/data</config-property>
-
- <max-pool-size>20</max-pool-size>
-
- </no-tx-connection-factory>
-
-</connection-factories>
\ No newline at end of file
+<!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
+<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
+ <resource-adapters>
+ <resource-adapter>
+ <archive>teiid-connector-file.rar</archive>
+ <transaction-support>NoTransaction</transaction-support>
+ <connection-definitions>
+ <connection-definition class-name="org.teiid.resource.adapter.file.FileManagedConnectionFactory"
+ jndi-name="java:/marketdata-file"
+ enabled="true"
+ use-java-context="true"
+ pool-name="marketdata-file">
+
+ <!-- Directory where the data files are stored -->
+ <config-property name="ParentDirectory" type="java.lang.String">../docs/teiid/examples/dynamicvdb-portfolio/data</config-property>
+
+ <!-- Set AllowParentPaths to false to disallow .. in paths.
+ This prevent requesting files that are not contained in the parent directory -->
+ <config-property name="AllowParentPaths">true</config-property>
+ </connection-definition>
+ </connection-definitions>
+ </resource-adapter>
+ </resource-adapters>
+</subsystem>
Added: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-ds.xml
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-ds.xml (rev 0)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-ds.xml 2012-02-01 22:01:48 UTC (rev 3841)
@@ -0,0 +1,10 @@
+<datasources>
+ <datasource jndi-name="java:/accounts-ds" pool-name="accounts-ds" enabled="true" use-java-context="true">
+ <connection-url> jdbc:h2:mem:accounts;INIT=RUNSCRIPT FROM '../docs/teiid/examples/dynamicvdb-portfolio/customer-schema.sql'\;</connection-url>
+ <driver>h2</driver>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+</datasources>
\ No newline at end of file
Property changes on: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-ds.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml 2012-02-01 22:01:48 UTC (rev 3841)
@@ -27,7 +27,7 @@
pre-defined translators, or you can create one. ConnectionFactories
or DataSources in JBoss AS they are typically defined using "xxx-ds.xml" files.
-->
- <source name="text-connector" translator-name="file" connection-jndi-name="java:marketdata-file"/>
+ <source name="text-connector" translator-name="file" connection-jndi-name="java:/marketdata-file"/>
</model>
<model name="Accounts">
@@ -41,9 +41,9 @@
<property name="importer.useFullSchemaName" value="false"/>
<!--
- This connector is defined to reference the HSQL localDS"
+ This connector is defined to reference the H2 localDS"
-->
- <source name="hsql-connector" translator-name="hsql" connection-jndi-name="java:DefaultDS"/>
+ <source name="h2-connector" translator-name="h2" connection-jndi-name="java:/accounts-ds"/>
</model>
</vdb>
\ No newline at end of file
Added: trunk/build/kits/jboss-as7/docs/teiid/examples/dynamicvdb-portfolio/portfolio-vdb.xml.dodeploy
===================================================================
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.bat
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.bat 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.bat 2012-02-01 22:01:48 UTC (rev 3841)
@@ -2,7 +2,7 @@
set CLIENT_PATH=.
rem Second one adds the Teiid client
-set TEIID_PATH=../../lib/teiid-${pom.version}-client.jar
+set TEIID_PATH=../../../modules/org/jboss/teiid/common-core/main/teiid-common-core-${pom.version}.jar;../../../modules/org/jboss/teiid/client/main/teiid-client-${pom.version}.jar
java -cp %CLIENT_PATH%;%TEIID_PATH% JDBCClient %*
Modified: trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.sh
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.sh 2012-02-01 21:56:42 UTC (rev 3840)
+++ trunk/build/kits/jboss-as7/docs/teiid/examples/simpleclient/run.sh 2012-02-01 22:01:48 UTC (rev 3841)
@@ -4,6 +4,6 @@
CLIENT_PATH=.
#Second one for the Teiid client jar
-TEIID_PATH=../../lib/teiid-${pom.version}-client.jar
+TEIID_PATH=../../../modules/org/jboss/teiid/common-core/main/teiid-common-core-${pom.version}.jar:../../../modules/org/jboss/teiid/client/main/teiid-client-${pom.version}.jar
java -cp ${CLIENT_PATH}:${TEIID_PATH} JDBCClient "$@"
12 years, 11 months
teiid SVN: r3840 - trunk/engine/src/main/java/org/teiid/query/resolver/util.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-02-01 16:56:42 -0500 (Wed, 01 Feb 2012)
New Revision: 3840
Modified:
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
Log:
TEIID-1889 fix for exception change
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-02-01 18:02:36 UTC (rev 3839)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-02-01 21:56:42 UTC (rev 3840)
@@ -307,7 +307,7 @@
try {
resolveFunction(obj, this.metadata.getFunctionLibrary());
} catch(QueryResolverException e) {
- if ("ERR.015.008.0036".equals(e.getCode()) || "ERR.015.008.0035".equals(e.getCode())) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (QueryPlugin.Event.TEIID30069.name().equals(e.getCode()) || QueryPlugin.Event.TEIID30067.name().equals(e.getCode())) {
if (unresolvedFunctions == null) {
unresolvedFunctions = new LinkedHashMap<Function, QueryResolverException>();
}
12 years, 11 months
teiid SVN: r3839 - branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-02-01 13:02:36 -0500 (Wed, 01 Feb 2012)
New Revision: 3839
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
Log:
TEIID-1921 fix for using the local connection
Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2012-02-01 16:55:53 UTC (rev 3838)
+++ branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2012-02-01 18:02:36 UTC (rev 3839)
@@ -909,11 +909,16 @@
// global txn
public ResultsFuture<?> start(final XidImpl xid, final int flags, final int timeout)
throws XATransactionException {
+ final DQPWorkContext workContext = DQPWorkContext.getWorkContext();
+ if (workContext.getSession().isEmbedded()) {
+ //must be a synch call regardless since the txn should be associated with the thread.
+ getTransactionService().start(workContext.getSessionId(), xid, flags, timeout, true);
+ return ResultsFuture.NULL_FUTURE;
+ }
Callable<Void> processor = new Callable<Void>() {
@Override
public Void call() throws Exception {
- DQPWorkContext workContext = DQPWorkContext.getWorkContext();
- getTransactionService().start(workContext.getSessionId(), xid, flags, timeout, workContext.getSession().isEmbedded());
+ getTransactionService().start(workContext.getSessionId(), xid, flags, timeout, false);
return null;
}
};
Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
+++ branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2012-02-01 18:02:36 UTC (rev 3839)
@@ -239,7 +239,12 @@
tc.setTransactionType(TransactionContext.Scope.GLOBAL);
if (singleTM) {
tc.setTransaction(transactionManager.getTransaction());
- assert tc.getTransaction() != null;
+ if (tc.getTransaction() == null) {
+ //the current code currently does not handle the case of embedded connections where
+ //someone is manually initiating txns - that is there is no thread bound txn.
+ //in theory we could inflow the txn and then change all of the methods to check singleTM off of the context
+ throw new XATransactionException(XAException.XAER_INVAL, "Transaction Is null"); //$NON-NLS-1$
+ }
} else {
FutureWork<Transaction> work = new FutureWork<Transaction>(new Callable<Transaction>() {
@Override
12 years, 11 months
teiid SVN: r3838 - in trunk: admin/src/main/resources/org/teiid/adminapi and 89 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-02-01 11:55:53 -0500 (Wed, 01 Feb 2012)
New Revision: 3838
Modified:
trunk/admin/src/main/java/org/teiid/adminapi/AdminComponentException.java
trunk/admin/src/main/java/org/teiid/adminapi/AdminException.java
trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
trunk/admin/src/main/java/org/teiid/adminapi/AdminPlugin.java
trunk/admin/src/main/java/org/teiid/adminapi/AdminProcessingException.java
trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties
trunk/api/src/main/java/org/teiid/connector/DataPlugin.java
trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java
trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
trunk/api/src/main/java/org/teiid/translator/TranslatorException.java
trunk/api/src/main/resources/org/teiid/connector/i18n.properties
trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
trunk/client/src/main/java/org/teiid/client/ProcedureErrorInstructionException.java
trunk/client/src/main/java/org/teiid/client/RequestMessage.java
trunk/client/src/main/java/org/teiid/client/plan/PlanNode.java
trunk/client/src/main/java/org/teiid/client/security/InvalidSessionException.java
trunk/client/src/main/java/org/teiid/client/security/LogonException.java
trunk/client/src/main/java/org/teiid/client/security/TeiidSecurityException.java
trunk/client/src/main/java/org/teiid/client/xa/XATransactionException.java
trunk/client/src/main/java/org/teiid/gss/MakeGSS.java
trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
trunk/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
trunk/client/src/main/java/org/teiid/net/CommunicationException.java
trunk/client/src/main/java/org/teiid/net/ConnectionException.java
trunk/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java
trunk/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
trunk/client/src/main/java/org/teiid/netty/handler/codec/serialization/CompactObjectOutputStream.java
trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
trunk/client/src/test/java/org/teiid/client/TestBatchSerializer.java
trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java
trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java
trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java
trunk/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java
trunk/common-core/src/main/java/org/teiid/core/CorePlugin.java
trunk/common-core/src/main/java/org/teiid/core/TeiidComponentException.java
trunk/common-core/src/main/java/org/teiid/core/TeiidException.java
trunk/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java
trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
trunk/common-core/src/main/java/org/teiid/core/crypto/CryptoException.java
trunk/common-core/src/main/java/org/teiid/core/crypto/DhKeyGenerator.java
trunk/common-core/src/main/java/org/teiid/core/crypto/SymmetricCryptor.java
trunk/common-core/src/main/java/org/teiid/core/types/BlobType.java
trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java
trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
trunk/common-core/src/main/java/org/teiid/core/types/Transform.java
trunk/common-core/src/main/java/org/teiid/core/types/TransformationException.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/BlobToBinaryTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/ObjectToAnyTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToSQLXMLTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
trunk/common-core/src/main/java/org/teiid/core/util/ApplicationInfo.java
trunk/common-core/src/main/java/org/teiid/core/util/FileUtils.java
trunk/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java
trunk/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java
trunk/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java
trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java
trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java
trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java
trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCPlugin.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties
trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
trunk/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java
trunk/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java
trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java
trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java
trunk/engine/src/main/java/org/teiid/common/buffer/STree.java
trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/RuntimeMetadataImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
trunk/engine/src/main/java/org/teiid/dqp/service/SessionServiceException.java
trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/TextAgg.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java
trunk/engine/src/main/java/org/teiid/query/function/source/XMLSystemFunctions.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
trunk/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java
trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCollapseSource.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java
trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
trunk/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
trunk/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/ArrayTableNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/TupleSourceValueIterator.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/CriteriaCondition.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/DocumentInProgress.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLValueTranslator.java
trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/AlterResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/DynamicCommandResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupContext.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/SetQuery.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java
trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java
trunk/engine/src/main/java/org/teiid/query/xquery/saxon/XQueryEvaluator.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java
trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java
trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
trunk/jboss-integration/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportService.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/jboss-integration/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java
trunk/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java
trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
trunk/runtime/src/main/java/org/teiid/deployers/VirtualDatabaseException.java
trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java
trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java
Log:
TEIID-1889: All the exceptions are now added with the event id and corresponding i18N messages are modified also with event id.
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminComponentException.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminComponentException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminComponentException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,9 @@
package org.teiid.adminapi;
+import org.teiid.core.BundleUtil;
+
/**
* An <code>AdminComponentException</code> is thrown when an error occurs as a
* result of an internal component error.
@@ -58,7 +60,7 @@
* @param msg the error message.
* @since 4.3
*/
- public AdminComponentException(String code, String msg) {
+ public AdminComponentException(BundleUtil.Event code, String msg) {
super(code, msg);
}
@@ -66,8 +68,11 @@
super(msg, cause);
}
- public AdminComponentException(String code, String msg, Throwable cause) {
- super(code, msg, cause);
+ public AdminComponentException(BundleUtil.Event code, Throwable cause, String msg) {
+ super(code, cause, msg);
}
-
+
+ public AdminComponentException(BundleUtil.Event code, Throwable cause) {
+ super(code, cause);
+ }
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminException.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -26,6 +26,7 @@
import java.util.Collections;
import java.util.List;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
@@ -74,7 +75,7 @@
* @param msg the error message.
* @since 4.3
*/
- AdminException(String code, String msg) {
+ AdminException(BundleUtil.Event code, String msg) {
super(code, msg);
}
@@ -82,9 +83,13 @@
super(cause, msg);
}
- AdminException(String code, String msg, Throwable cause) {
- super(cause, code,msg);
+ AdminException(BundleUtil.Event code, Throwable cause, String msg) {
+ super(code, cause, msg);
}
+
+ AdminException(BundleUtil.Event code, Throwable cause) {
+ super(code, cause);
+ }
/**
* Determine whether this exception is representing
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -108,9 +108,9 @@
+ host + ":" + port); //$NON-NLS-1$
return new AdminImpl(newClient);
}
- System.out.println("The controller is not available at " + host + ":" + port); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println(AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70051, host, port)); //$NON-NLS-1$ //$NON-NLS-2$
} catch (UnknownHostException e) {
- throw new AdminProcessingException("Failed to resolve host '" + host + "': " + e.getLocalizedMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70000, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70000, host, e.getLocalizedMessage()));
}
return null;
}
@@ -298,7 +298,7 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70001, Util.getFailureDescription(outcome));
}
List<String> drivers = getList(outcome, new AbstractMetadatMapper() {
@Override
@@ -311,7 +311,7 @@
});
return drivers;
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70002, e);
}
}
@@ -321,7 +321,7 @@
Collection<String> dsNames = getDataSourceNames();
if (dsNames.contains(deploymentName)) {
- throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_exists", deploymentName));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70003, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70003, deploymentName));
}
Set<String> resourceAdapters = getAvailableResourceAdapterNames();
@@ -332,7 +332,7 @@
List<String> drivers = getInstalledJDBCDrivers();
if (!drivers.contains(templateName)) {
- throw new AdminProcessingException(AdminPlugin.Util.getString("driver_not_defined", templateName));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70004, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70004, templateName));
}
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
@@ -364,7 +364,7 @@
}
}
else {
- throw new AdminProcessingException(AdminPlugin.Util.getString("connection_url_required"));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70005, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70005));
}
request = builder.buildRequest();
@@ -393,10 +393,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70006, Util.getFailureDescription(outcome));
}
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70007, e);
}
}
@@ -406,7 +406,7 @@
Collection<String> dsNames = getDataSourceNames();
if (!dsNames.contains(deployedName)) {
- throw new AdminProcessingException(AdminPlugin.Util.getString("datasource_doesnot_exists", deployedName));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70008, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70008, deployedName));
}
boolean deleted = deleteDS(deployedName, false, "datasources", "data-source");
@@ -463,7 +463,7 @@
}
return true;
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70009, e);
}
}
@@ -473,7 +473,7 @@
try {
request = buildUndeployRequest(deployedName);
} catch (OperationFormatException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70010, e);
}
execute(request);
}
@@ -564,9 +564,9 @@
}
return composite;
} catch (OperationFormatException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70011, e);
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70012, e);
}
}
@@ -583,7 +583,7 @@
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70013, e);
}
return null;
}
@@ -601,7 +601,7 @@
return Util.getList(outcome);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70014, e);
}
return Collections.emptyList();
}
@@ -614,7 +614,7 @@
return Util.getList(outcome);
}
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70015, e);
}
return Collections.emptyList();
@@ -671,9 +671,9 @@
}
}
} catch (OperationFormatException e) {
- throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70016, e, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70016));
} catch (IOException e) {
- throw new AdminProcessingException("Failed to build operation", e); //$NON-NLS-1$
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70017, e, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70017));
}
}
return datasourceNames;
@@ -695,7 +695,7 @@
return templates;
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70018, e);
}
return Collections.emptySet();
}
@@ -722,7 +722,7 @@
}
}
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70019, e);
}
return templates;
}
@@ -748,7 +748,7 @@
}
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70020, e);
}
}
return null;
@@ -764,10 +764,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70021, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70022, e);
}
}
@@ -781,7 +781,7 @@
return getList(outcome, RequestMetadataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70023, e);
}
}
return Collections.emptyList();
@@ -797,7 +797,7 @@
return getList(outcome, RequestMetadataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70024, e);
}
}
return Collections.emptyList();
@@ -813,7 +813,7 @@
return getList(outcome, SessionMetadataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70025, e);
}
}
return Collections.emptyList();
@@ -839,11 +839,11 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70026, Util.getFailureDescription(outcome));
}
result = outcome.get("result");
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70027, e);
}
}
else {
@@ -974,7 +974,7 @@
return getList(outcome, TransactionMetadataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70028, e);
}
}
return Collections.emptyList();
@@ -989,10 +989,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70029, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70030, e);
}
}
@@ -1005,10 +1005,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70031, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70032, e);
}
}
@@ -1028,7 +1028,7 @@
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70033, e);
}
return null;
}
@@ -1042,7 +1042,7 @@
return getList(outcome, VDBMetadataMapper.VDBTranslatorMetaDataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70034, e);
}
return Collections.emptyList();
@@ -1111,7 +1111,7 @@
}
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70035, e);
}
return null;
}
@@ -1125,7 +1125,7 @@
return getSet(outcome, VDBMetadataMapper.INSTANCE);
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70036, e);
}
return Collections.emptySet();
@@ -1143,10 +1143,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70037, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70038, e);
}
}
@@ -1160,10 +1160,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70039, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70040, e);
}
}
@@ -1177,10 +1177,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70041, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70042, e);
}
}
@@ -1200,10 +1200,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70043, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70044, e);
}
}
@@ -1216,10 +1216,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70045, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70046, e);
}
}
@@ -1236,10 +1236,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70047, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70048, e);
}
}
@@ -1249,10 +1249,10 @@
try {
ModelNode outcome = this.connection.execute(request);
if (!Util.isSuccess(outcome)) {
- throw new AdminProcessingException(Util.getFailureDescription(outcome));
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70049, Util.getFailureDescription(outcome));
}
} catch (Exception e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(AdminPlugin.Event.TEIID70050, e);
}
}
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminPlugin.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -29,4 +29,59 @@
public class AdminPlugin {
public static final String PLUGIN_ID = "org.teiid.adminapi" ; //$NON-NLS-1$
public static final BundleUtil Util = new BundleUtil(PLUGIN_ID, PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static enum Event implements BundleUtil.Event {
+ TEIID70000,
+ TEIID70001,
+ TEIID70002,
+ TEIID70003,
+ TEIID70004,
+ TEIID70005,
+ TEIID70006,
+ TEIID70007,
+ TEIID70008,
+ TEIID70009,
+ TEIID70010,
+ TEIID70011,
+ TEIID70012,
+ TEIID70013,
+ TEIID70014,
+ TEIID70015,
+ TEIID70016,
+ TEIID70017,
+ TEIID70018,
+ TEIID70019,
+ TEIID70020,
+ TEIID70021,
+ TEIID70022,
+ TEIID70023,
+ TEIID70024,
+ TEIID70025,
+ TEIID70026,
+ TEIID70027,
+ TEIID70028,
+ TEIID70029,
+ TEIID70030,
+ TEIID70031,
+ TEIID70032,
+ TEIID70033,
+ TEIID70034,
+ TEIID70035,
+ TEIID70036,
+ TEIID70037,
+ TEIID70038,
+ TEIID70039,
+ TEIID70040,
+ TEIID70041,
+ TEIID70042,
+ TEIID70043,
+ TEIID70044,
+ TEIID70045,
+ TEIID70046,
+ TEIID70047,
+ TEIID70048,
+ TEIID70049,
+ TEIID70050,
+ TEIID70051,
+ }
}
Modified: trunk/admin/src/main/java/org/teiid/adminapi/AdminProcessingException.java
===================================================================
--- trunk/admin/src/main/java/org/teiid/adminapi/AdminProcessingException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/java/org/teiid/adminapi/AdminProcessingException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,9 @@
package org.teiid.adminapi;
+import org.teiid.core.BundleUtil;
+
/**
* An <code>AdminProcessingException</code> indicates that an error occured during processing as a result
* of user input. This exception is the result of handling an invalid user
@@ -63,7 +65,7 @@
* @param msg the error message.
* @since 4.3
*/
- public AdminProcessingException(String code, String msg) {
+ public AdminProcessingException(BundleUtil.Event code, String msg) {
super(code, msg);
}
@@ -71,8 +73,11 @@
super(msg, cause);
}
- public AdminProcessingException(String code, String msg, Throwable cause) {
- super(code, msg, cause);
+ public AdminProcessingException(BundleUtil.Event code, Throwable cause, String msg) {
+ super(code, cause, msg);
}
+ public AdminProcessingException(BundleUtil.Event code, Throwable cause) {
+ super(code, cause);
+ }
}
Modified: trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties
===================================================================
--- trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/admin/src/main/resources/org/teiid/adminapi/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -72,10 +72,14 @@
allow-execute.describe = execute allowed
allow-alter.describe = alter allowed
-driver_not_defined=Driver {0} is not configured in the system, install the JDBC driver first
-connection_url_required=connection-url is required property
-datasource_exists=Data source with name {0} already exists; choose a different deployment name
-datasource_doesnot_exists=Data Source with name {0} does not exists in the system. Check the deployment name.
+TEIID70051=The controller is not available at {0}:{1}
+TEIID70000=Failed to resolve host '{0}' due to : {1}
+TEIID70004=Driver {0} is not configured in the system, install the JDBC driver first
+TEIID70005=connection-url is required property
+TEIID70003=Data source with name {0} already exists; choose a different deployment name
+TEIID70008=Data Source with name {0} does not exists in the system. Check the deployment name.
+TEIID70016=Failed to build operation
+TEIID70017=Failed to build operation
unexpected_element1=Unexpected Element {0} encountered, expecting one of {1}
unexpected_element2=Unexpected Element {0} encountered, expecting one of {1} {2}
unexpected_element3=Unexpected Element {0} encountered, expecting one of {1} {2} {3}
Modified: trunk/api/src/main/java/org/teiid/connector/DataPlugin.java
===================================================================
--- trunk/api/src/main/java/org/teiid/connector/DataPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/java/org/teiid/connector/DataPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -26,11 +26,25 @@
import org.teiid.core.BundleUtil;
-public class DataPlugin { // extends Plugin {
+public class DataPlugin {
public static final String PLUGIN_ID = DataPlugin.class.getPackage().getName();
public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+ public static enum Event implements BundleUtil.Event {
+ TEIID60000,
+ TEIID60001,
+ TEIID60002,
+ TEIID60003,
+ TEIID60004,
+ TEIID60005,
+ TEIID60006,
+ TEIID60007,
+ TEIID60008,
+ TEIID60009,
+ TEIID60010,
+ TEIID60011,
+ }
}
Modified: trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -97,7 +97,7 @@
name.replace(AbstractMetadataRecord.NAME_DELIM_CHAR, '_');
} else if (name.indexOf(AbstractMetadataRecord.NAME_DELIM_CHAR) != -1) {
//TODO: for now this is not used
- throw new TranslatorException(DataPlugin.Util.getString("MetadataFactory.invalid_name", name)); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60008, DataPlugin.Util.gs(DataPlugin.Event.TEIID60008, name));
}
Column column = new Column();
column.setName(name);
@@ -115,7 +115,7 @@
BaseColumn column) throws TranslatorException {
Datatype datatype = dataTypes.get(type);
if (datatype == null) {
- throw new TranslatorException(DataPlugin.Util.getString("MetadataFactory.unknown_datatype", type)); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60009, DataPlugin.Util.gs(DataPlugin.Event.TEIID60009, type));
}
column.setDatatype(datatype);
column.setDatatypeUUID(datatype.getUUID());
@@ -200,7 +200,7 @@
foreignKey.setName(name);
setUUID(foreignKey);
if (pkTable.getPrimaryKey() == null) {
- throw new TranslatorException("No primary key defined for table " + pkTable); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60010, DataPlugin.Util.gs(DataPlugin.Event.TEIID60010, pkTable));
}
foreignKey.setPrimaryKey(pkTable.getPrimaryKey());
foreignKey.setUniqueKeyID(pkTable.getPrimaryKey().getUUID());
@@ -276,7 +276,7 @@
}
}
if (!match) {
- throw new TranslatorException(DataPlugin.Util.getString("MetadataFactory.no_column_found", columnName)); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60011, DataPlugin.Util.gs(DataPlugin.Event.TEIID60011, columnName));
}
}
}
Modified: trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/java/org/teiid/translator/DataNotAvailableException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -21,6 +21,7 @@
*/
package org.teiid.translator;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidRuntimeException;
/**
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -30,6 +30,7 @@
import javax.resource.cci.Connection;
import javax.resource.cci.ConnectionFactory;
+import org.teiid.connector.DataPlugin;
import org.teiid.core.TeiidException;
import org.teiid.core.util.ReflectionHelper;
import org.teiid.language.BatchedUpdates;
@@ -151,7 +152,7 @@
try {
return (C) ((ConnectionFactory)factory).getConnection();
} catch (ResourceException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(DataPlugin.Event.TEIID60000, e);
}
}
throw new AssertionError("A connection factory was supplied, but no implementation was provided getConnection"); //$NON-NLS-1$
@@ -247,17 +248,17 @@
@SuppressWarnings("unused")
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException {
- throw new TranslatorException("Unsupported Execution"); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60001, DataPlugin.Util.gs(DataPlugin.Event.TEIID60001));
}
@SuppressWarnings("unused")
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException {
- throw new TranslatorException("Unsupported Execution");//$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60002, DataPlugin.Util.gs(DataPlugin.Event.TEIID60002));
}
@SuppressWarnings("unused")
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException {
- throw new TranslatorException("Unsupported Execution");//$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60003, DataPlugin.Util.gs(DataPlugin.Event.TEIID60003));
}
/**
@@ -807,17 +808,17 @@
try {
if (className == null) {
if (defaultClass == null) {
- throw new TranslatorException("Neither class name nor default class specified to create an instance"); //$NON-NLS-1$
+ throw new TranslatorException(DataPlugin.Event.TEIID60004, DataPlugin.Util.gs(DataPlugin.Event.TEIID60004));
}
return expectedType.cast(defaultClass.newInstance());
}
return expectedType.cast(ReflectionHelper.create(className, ctorObjs, Thread.currentThread().getContextClassLoader()));
} catch (TeiidException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(DataPlugin.Event.TEIID60005, e);
} catch (IllegalAccessException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(DataPlugin.Event.TEIID60006, e);
} catch(InstantiationException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(DataPlugin.Event.TEIID60007, e);
}
}
Modified: trunk/api/src/main/java/org/teiid/translator/TranslatorException.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/TranslatorException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/java/org/teiid/translator/TranslatorException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.translator;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
/**
@@ -48,17 +49,6 @@
super( message );
}
- public TranslatorException( String errorCode, String message ) {
- super( errorCode, message);
- }
-
- public TranslatorException( int errorCode, String message ) {
- super(message, Integer.toString(errorCode));
- }
-
- public TranslatorException(Throwable e, int errorCode, String message ) {
- super(e, Integer.toString(errorCode), message);
- }
/**
* Construct an instance from a message and an exception to chain to this one.
@@ -75,8 +65,19 @@
*
* @param e An exception to chain to this exception
*/
- public TranslatorException( Throwable e ) {
- super( e );
+ public TranslatorException(Throwable e) {
+ super(e);
}
+ public TranslatorException(BundleUtil.Event event, Throwable e) {
+ super(event, e);
+ }
+
+ public TranslatorException(BundleUtil.Event event, Throwable e, String message) {
+ super(event, e, message);
+ }
+
+ public TranslatorException(BundleUtil.Event event, String message) {
+ super(event, message);
+ }
}
Modified: trunk/api/src/main/resources/org/teiid/connector/i18n.properties
===================================================================
--- trunk/api/src/main/resources/org/teiid/connector/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/api/src/main/resources/org/teiid/connector/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -28,10 +28,16 @@
-MetadataFactory.unknown_datatype=Unknown datatype {0}
-MetadataFactory.no_column_found=No column found with name {0}
-MetadataFactory.invalid_name=Invalid column name ''{0}'', cannot contain the . character.
+TEIID60009=Unknown datatype {0}
+TEIID60011=No column found with name {0}
+TEIID60008=Invalid column name ''{0}'', cannot contain the . character.
Schema.duplicate_table=Duplicate table {0}
Schema.duplicate_procedure=Duplicate procedure {0}
-Schema.duplicate_function=Duplicate function {0}
\ No newline at end of file
+Schema.duplicate_function=Duplicate function {0}
+
+TEIID60003=Unsupported Execution
+TEIID60002=Unsupported Execution
+TEIID60001=Unsupported Execution
+TEIID60010=No primary key defined for table {0}
+TEIID60004=Neither class name nor default class specified to create an instance
Modified: trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -600,7 +600,7 @@
break objectSearch;
}
}
- throw new TeiidRuntimeException(JDBCPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
+ throw new TeiidRuntimeException(JDBCPlugin.Event.TEIID20001, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20001, new Object[] {types[i], new Integer(i), objectClass}));
}
}
}
Modified: trunk/client/src/main/java/org/teiid/client/ProcedureErrorInstructionException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/ProcedureErrorInstructionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/ProcedureErrorInstructionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.client;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
@@ -31,7 +32,9 @@
*/
public class ProcedureErrorInstructionException extends TeiidProcessingException {
- /**
+ private static final long serialVersionUID = 895480748445855790L;
+
+ /**
*
* @since 4.3
*/
@@ -47,4 +50,7 @@
super(message);
}
+ public ProcedureErrorInstructionException(BundleUtil.Event event, String message) {
+ super(event, message);
+ }
}
Modified: trunk/client/src/main/java/org/teiid/client/RequestMessage.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/RequestMessage.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/RequestMessage.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -237,7 +237,7 @@
if (!(txnAutoWrapMode.equals(TXN_WRAP_OFF)
|| txnAutoWrapMode.equals(TXN_WRAP_ON)
|| txnAutoWrapMode.equals(TXN_WRAP_DETECT))) {
- throw new TeiidProcessingException(JDBCPlugin.Util.getString("RequestMessage.invalid_txnAutoWrap", txnAutoWrapMode)); //$NON-NLS-1$
+ throw new TeiidProcessingException(JDBCPlugin.Event.TEIID20000, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20000, txnAutoWrapMode));
}
}
this.txnAutoWrapMode = txnAutoWrapMode;
Modified: trunk/client/src/main/java/org/teiid/client/plan/PlanNode.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/plan/PlanNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/plan/PlanNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,11 @@
package org.teiid.client.plan;
-import java.io.*;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.StringWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
@@ -39,6 +43,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ExternalizeUtil;
+import org.teiid.jdbc.JDBCPlugin;
/**
@@ -176,9 +181,9 @@
writer.writeEndDocument();
return stringWriter.toString();
} catch (FactoryConfigurationError e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(JDBCPlugin.Event.TEIID20002, e);
} catch (XMLStreamException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(JDBCPlugin.Event.TEIID20003, e);
}
}
Modified: trunk/client/src/main/java/org/teiid/client/security/InvalidSessionException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/security/InvalidSessionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/security/InvalidSessionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,10 +22,12 @@
package org.teiid.client.security;
+import org.teiid.core.BundleUtil;
+
public class InvalidSessionException extends TeiidSecurityException {
-
-
- /**
+ private static final long serialVersionUID = 594047711693346844L;
+
+ /**
* No-Arg Constructor
*/
public InvalidSessionException( ) {
@@ -63,8 +65,8 @@
* @param message The error message
* @param code The error code
*/
- public InvalidSessionException( String code, String message ) {
- super( code, message );
+ public InvalidSessionException( BundleUtil.Event event, String message ) {
+ super(event, message);
}
/**
* Construct an instance with a linked exception, and an error code and
@@ -74,8 +76,13 @@
* @param message The error message
* @param code The error code
*/
- public InvalidSessionException( Throwable e, String code, String message ) {
- super(e, code, message );
+ public InvalidSessionException( BundleUtil.Event event, Throwable t, String message ) {
+ super(event, t, message);
}
+
+ public InvalidSessionException(BundleUtil.Event event) {
+ super();
+ setCode(event.toString());
+ }
}
Modified: trunk/client/src/main/java/org/teiid/client/security/LogonException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/security/LogonException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/security/LogonException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,9 @@
package org.teiid.client.security;
+import org.teiid.core.BundleUtil;
+
/**
* This exception is thrown when an attempt to log in to obtain a session has failed.
* Possible reasons include but are not limited to:
@@ -33,7 +35,9 @@
*/
public class LogonException extends TeiidSecurityException {
- /**
+ private static final long serialVersionUID = -4407245748107257061L;
+
+ /**
* No-Arg Constructor
*/
public LogonException( ) {
@@ -54,9 +58,13 @@
* @param message A message describing the exception
* @param code The error code
*/
- public LogonException( String code, String message ) {
- super( code, message );
+ public LogonException( BundleUtil.Event event, String message ) {
+ super(event, message);
}
+
+ public LogonException( BundleUtil.Event event, Throwable t, String message ) {
+ super(event, t, message );
+ }
/**
* Construct an instance from a message and an exception to chain to this one.
@@ -67,17 +75,5 @@
public LogonException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public LogonException( Throwable e, String code, String message ) {
- super( e, code, message );
- }
}
Modified: trunk/client/src/main/java/org/teiid/client/security/TeiidSecurityException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/security/TeiidSecurityException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/security/TeiidSecurityException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.client.security;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
public class TeiidSecurityException extends TeiidProcessingException {
@@ -41,8 +42,8 @@
* @param message The error message
* @param code The error code
*/
- public TeiidSecurityException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public TeiidSecurityException(BundleUtil.Event code, Throwable t, String message ) {
+ super(code, t, message);
}
/**
* Construct an instance with an error code and message specified.
@@ -50,7 +51,7 @@
* @param message The error message
* @param code The error code
*/
- public TeiidSecurityException( String code, String message ) {
+ public TeiidSecurityException(BundleUtil.Event code, String message ) {
super( code, message );
}
/**
Modified: trunk/client/src/main/java/org/teiid/client/xa/XATransactionException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/xa/XATransactionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/client/xa/XATransactionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -24,6 +24,7 @@
import javax.transaction.xa.XAException;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
@@ -35,69 +36,33 @@
private static final long serialVersionUID = 5685144848609237877L;
private int errorCode = XAException.XAER_RMERR;
- /**
- * No-Arg Constructor
- */
- public XATransactionException( ) {
- super( );
- }
- /**
- * Construct an instance with the message specified.
- *
- * @param message A message describing the exception
- */
- public XATransactionException( String message ) {
- super( message );
- }
-
- /**
- * Construct an instance with a linked exception specified.
- *
- * @param e An exception to chain to this exception
- */
- public XATransactionException( Throwable e ) {
- super( e );
- }
-
- /**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public XATransactionException( int code, String message ) {
- super( message );
+ public XATransactionException(Throwable e) {
+ super(e);
+ }
+
+ public XATransactionException(BundleUtil.Event event, int code, Throwable e) {
+ super( event, e);
this.errorCode = code;
- }
-
- /**
- * Construct an instance from a message and an exception to chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- */
- public XATransactionException( Throwable e, String message ) {
- super( e, message );
- }
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public XATransactionException( Throwable e, int code, String message ) {
- super( e, message );
+ }
+
+ public XATransactionException(BundleUtil.Event event, int code, Throwable e, String msg) {
+ super(event, e, msg);
this.errorCode = code;
}
- public XATransactionException( Throwable e, int code ) {
- super( e );
- this.errorCode = code;
+ public XATransactionException(BundleUtil.Event event, Throwable e) {
+ super(event, e);
}
+ public XATransactionException(BundleUtil.Event event, int code, String msg) {
+ super(event, msg);
+ this.errorCode = code;
+ }
+
+ public XATransactionException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
+
public XAException getXAException() {
Throwable actualException = getCause();
if (actualException instanceof XAException) {
Modified: trunk/client/src/main/java/org/teiid/gss/MakeGSS.java
===================================================================
--- trunk/client/src/main/java/org/teiid/gss/MakeGSS.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/gss/MakeGSS.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -100,7 +100,7 @@
}
if (errors.length() > 0) {
- throw new LogonException(errors.toString());
+ throw new LogonException(JDBCPlugin.Event.TEIID20004, errors.toString());
}
String user = props.getProperty(TeiidURL.CONNECTION.USER_NAME);
@@ -114,7 +114,7 @@
PrivilegedAction action = new GssAction(logon, kerberosPrincipalName, props);
result = Subject.doAs(sub, action);
} catch (Exception e) {
- throw new LogonException(e, JDBCPlugin.Util.getString("gss_auth_failed")); //$NON-NLS-1$
+ throw new LogonException(JDBCPlugin.Event.TEIID20005, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005));
}
if (result instanceof LogonException)
@@ -124,7 +124,7 @@
else if (result instanceof CommunicationException)
throw (CommunicationException)result;
else if (result instanceof Exception)
- throw new LogonException((Exception)result, JDBCPlugin.Util.getString("gss_auth_failed")); //$NON-NLS-1$
+ throw new LogonException(JDBCPlugin.Event.TEIID20006, (Exception)result, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20006));
return (LogonResult)result;
}
Modified: trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/jdbc/EmbeddedProfile.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -73,7 +73,7 @@
Thread.currentThread().setContextClassLoader(module.getClassLoader());
return (ServerConnection)ReflectionHelper.create("org.teiid.transport.LocalServerConnection", Arrays.asList(info, PropertiesUtils.getBooleanProperty(info, USE_CALLING_THREAD, true)), Thread.currentThread().getContextClassLoader()); //$NON-NLS-1$
} catch (ModuleLoadException e) {
- throw new TeiidRuntimeException(JDBCPlugin.Util.gs("teiid_module_load_failed")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(JDBCPlugin.Event.TEIID20008, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20008));
}
} finally {
Thread.currentThread().setContextClassLoader(tccl);
Modified: trunk/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -37,4 +37,34 @@
public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+ public static enum Event implements BundleUtil.Event {
+ TEIID20000,
+ TEIID20001,
+ TEIID20002,
+ TEIID20003,
+ TEIID20004,
+ TEIID20005,
+ TEIID20006,
+ TEIID20007,
+ TEIID20008,
+ TEIID20009,
+ TEIID20010,
+ TEIID20011,
+ TEIID20012,
+ TEIID20013,
+ TEIID20014,
+ TEIID20015,
+ TEIID20016,
+ TEIID20017,
+ TEIID20018,
+ TEIID20019,
+ TEIID20020,
+ TEIID20021,
+ TEIID20022,
+ TEIID20023,
+ TEIID20024,
+ TEIID20025,
+ TEIID20026,
+ TEIID20027,
+ }
}
Modified: trunk/client/src/main/java/org/teiid/net/CommunicationException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/CommunicationException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/CommunicationException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.net;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
/**
@@ -30,7 +31,9 @@
* transport should be able to tell the difference and recover if possible.
*/
public class CommunicationException extends TeiidException {
- /**
+ private static final long serialVersionUID = -8352601998078723446L;
+
+ /**
* No-Arg Constructor
*/
public CommunicationException( ) {
@@ -58,4 +61,16 @@
public CommunicationException(Throwable e, String message) {
super(e, message);
}
+
+ public CommunicationException(BundleUtil.Event event, Throwable t, String message) {
+ super(event, t, message);
+ }
+
+ public CommunicationException(BundleUtil.Event event, Throwable t) {
+ super(event, t);
+ }
+
+ public CommunicationException(BundleUtil.Event event, String message) {
+ super(event, message);
+ }
}
Modified: trunk/client/src/main/java/org/teiid/net/ConnectionException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/ConnectionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/ConnectionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.net;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
/**
@@ -30,7 +31,9 @@
* connection parameters.
*/
public class ConnectionException extends TeiidException {
- /**
+ private static final long serialVersionUID = -5647655775983865084L;
+
+ /**
* No-Arg Constructor
*/
public ConnectionException( ) {
@@ -58,4 +61,8 @@
public ConnectionException(Throwable e, String message) {
super(e, message);
}
+
+ public ConnectionException(BundleUtil.Event event, Throwable e, String message) {
+ super(event, e, message);
+ }
}
Modified: trunk/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/socket/OioOjbectChannelFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -39,6 +39,7 @@
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.util.PropertiesUtils;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.CommunicationException;
import org.teiid.net.socket.SocketUtil.SSLSocketFactory;
import org.teiid.netty.handler.codec.serialization.ObjectDecoderInputStream;
@@ -159,7 +160,7 @@
try {
sslSocketFactory = SocketUtil.getSSLSocketFactory(props);
} catch (GeneralSecurityException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20027, e, e.getMessage());
}
}
socket = sslSocketFactory.getSocket();
Modified: trunk/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/socket/SingleInstanceCommunicationException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.net.socket;
+import org.teiid.core.BundleUtil;
import org.teiid.net.CommunicationException;
@@ -60,4 +61,8 @@
public SingleInstanceCommunicationException(Throwable e, String message) {
super(e, message);
}
+
+ public SingleInstanceCommunicationException(BundleUtil.Event event, Throwable e, String message) {
+ super(event, e, message);
+ }
}
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -103,7 +103,7 @@
public synchronized SocketServerInstance selectServerInstance(boolean logoff)
throws CommunicationException, ConnectionException {
if (closed) {
- throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerConnection.closed")); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20016, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20016));
}
if (this.serverInstance != null && (!failOver || this.serverInstance.isOpen())) {
return this.serverInstance;
@@ -138,12 +138,12 @@
} catch (LogonException e) {
// Propagate the original message as it contains the message we want
// to give to the user
- throw new ConnectionException(e, e.getMessage());
+ throw new ConnectionException(JDBCPlugin.Event.TEIID20017, e, e.getMessage());
} catch (TeiidComponentException e) {
if (e.getCause() instanceof CommunicationException) {
throw (CommunicationException)e.getCause();
}
- throw new CommunicationException(e, JDBCPlugin.Util.getString("PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to")); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20018, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20018));
}
}
return this.serverInstance;
@@ -155,13 +155,13 @@
this.serverDiscovery.markInstanceAsBad(hostInfo);
if (knownHosts == 1) { //just a single host, use the exception
if (ex instanceof UnknownHostException) {
- throw new SingleInstanceCommunicationException(ex, JDBCPlugin.Util.getString("SocketServerInstance.Connection_Error.Unknown_Host", hostInfo.getHostName())); //$NON-NLS-1$
+ throw new SingleInstanceCommunicationException(JDBCPlugin.Event.TEIID20019, ex, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20019, hostInfo.getHostName()));
}
- throw new SingleInstanceCommunicationException(ex,JDBCPlugin.Util.getString("SocketServerInstance.Connection_Error.Connect_Failed", hostInfo.getHostName(), String.valueOf(hostInfo.getPortNumber()), ex.getMessage())); //$NON-NLS-1$
+ throw new SingleInstanceCommunicationException(JDBCPlugin.Event.TEIID20020, ex,JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20020, hostInfo.getHostName(), String.valueOf(hostInfo.getPortNumber()), ex.getMessage()));
}
log.log(Level.FINE, "Unable to connect to host", ex); //$NON-NLS-1$
}
- throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerInstancePool.No_valid_host_available", hostCopy.toString())); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20021, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20021, hostCopy.toString()));
}
private void logon(ILogon newLogon, boolean logoff) throws LogonException,
@@ -232,7 +232,7 @@
try {
return selectServerInstance(false);
} catch (ConnectionException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20022, e, e.getMessage());
}
}
@@ -299,7 +299,7 @@
private synchronized ResultsFuture<?> isOpen() throws CommunicationException, InvalidSessionException, TeiidComponentException {
if (this.closed) {
- throw new CommunicationException();
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20023, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20023));
}
return logon.ping();
}
@@ -332,7 +332,7 @@
try {
return selectServerInstance(false).getHostInfo().equals(((SocketServerConnection)otherService).selectServerInstance(false).getHostInfo());
} catch (ConnectionException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20024, e, e.getMessage());
}
}
@@ -358,9 +358,9 @@
try {
this.logon(logonInstance, true);
} catch (LogonException e) {
- throw new ConnectionException(e);
+ throw new ConnectionException(JDBCPlugin.Event.TEIID20025, e, e.getMessage());
} catch (TeiidComponentException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20026, e, e.getMessage());
}
}
}
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnectionFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -55,6 +55,7 @@
import org.teiid.core.TeiidException;
import org.teiid.core.util.PropertiesUtils;
import org.teiid.core.util.ReflectionHelper;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
import org.teiid.net.HostInfo;
@@ -298,7 +299,7 @@
try {
url = new TeiidURL(connectionProperties.getProperty(TeiidURL.CONNECTION.SERVER_URL));
} catch (MalformedURLException e1) {
- throw new ConnectionException(e1);
+ throw new ConnectionException(JDBCPlugin.Event.TEIID20014, e1, e1.getMessage());
}
String discoveryStrategyName = connectionProperties.getProperty(TeiidURL.CONNECTION.DISCOVERY_STRATEGY, URL);
@@ -311,7 +312,7 @@
try {
discovery = (ServerDiscovery)ReflectionHelper.create(discoveryStrategyName, null, this.getClass().getClassLoader());
} catch (TeiidException e) {
- throw new ConnectionException(e);
+ throw new ConnectionException(JDBCPlugin.Event.TEIID20015, e, e.getMessage());
}
}
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -113,12 +113,12 @@
Object obj = this.socketChannel.read();
if (!(obj instanceof Handshake)) {
- throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerInstanceImpl.handshake_error")); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20009, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20009));
}
handshake = (Handshake)obj;
break;
} catch (ClassNotFoundException e1) {
- throw new CommunicationException(e1);
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20010, e1, e1.getMessage());
} catch (SocketTimeoutException e) {
if (i == HANDSHAKE_RETRIES - 1) {
throw e;
@@ -128,7 +128,7 @@
try {
/*if (!getVersionInfo().equals(handshake.getVersion())) {
- throw new CommunicationException(NetPlugin.Util.getString("SocketServerInstanceImpl.version_mismatch", getVersionInfo(), handshake.getVersion())); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20011, NetPlugin.Util.getString(JDBCPlugin.Event.TEIID20011, getVersionInfo(), handshake.getVersion()));
}*/
serverVersion = handshake.getVersion();
authType = handshake.getAuthType();
@@ -146,8 +146,8 @@
}
this.socketChannel.write(handshake);
- } catch (CryptoException err) {
- throw new CommunicationException(err);
+ } catch (CryptoException e) {
+ throw new CommunicationException(JDBCPlugin.Event.TEIID20012, e, e.getMessage());
}
}
@@ -172,7 +172,7 @@
writeFuture.get(); //client writes are blocking to ensure proper failure handling
success = true;
} catch (ExecutionException e) {
- throw new SingleInstanceCommunicationException(e);
+ throw new SingleInstanceCommunicationException(JDBCPlugin.Event.TEIID20013, e, e.getMessage());
} finally {
if (!success) {
asynchronousListeners.remove(messageKey);
Modified: trunk/client/src/main/java/org/teiid/netty/handler/codec/serialization/CompactObjectOutputStream.java
===================================================================
--- trunk/client/src/main/java/org/teiid/netty/handler/codec/serialization/CompactObjectOutputStream.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/java/org/teiid/netty/handler/codec/serialization/CompactObjectOutputStream.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -55,15 +55,15 @@
import org.teiid.client.security.InvalidSessionException;
import org.teiid.client.security.LogonException;
import org.teiid.client.security.LogonResult;
+import org.teiid.client.security.SessionToken;
import org.teiid.client.security.TeiidSecurityException;
-import org.teiid.client.security.SessionToken;
import org.teiid.client.util.ExceptionHolder;
import org.teiid.client.xa.XATransactionException;
import org.teiid.client.xa.XidImpl;
import org.teiid.core.ComponentNotFoundException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.BaseLob;
import org.teiid.core.types.BlobImpl;
@@ -71,11 +71,12 @@
import org.teiid.core.types.ClobImpl;
import org.teiid.core.types.ClobType;
import org.teiid.core.types.InputStreamFactory;
+import org.teiid.core.types.InputStreamFactory.StreamFactoryReference;
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.core.types.Streamable;
import org.teiid.core.types.XMLType;
-import org.teiid.core.types.InputStreamFactory.StreamFactoryReference;
import org.teiid.core.util.ReaderInputStream;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.socket.Handshake;
import org.teiid.net.socket.Message;
import org.teiid.net.socket.ServiceInvocationStruct;
@@ -102,7 +103,7 @@
public static void addKnownClass(Class<?> clazz, byte code) {
KNOWN_CLASSES.put(clazz, Integer.valueOf(code));
if (KNOWN_CODES.put(Integer.valueOf(code), clazz) != null) {
- throw new TeiidRuntimeException("Duplicate class"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(JDBCPlugin.Event.TEIID20007, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20007));
}
}
Modified: trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
===================================================================
--- trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -125,20 +125,20 @@
StatementImpl.set_result_set=SET does not return a result set.
StreamImpl.Unable_to_read_data_from_stream=Unable to read data from the stream: {0}
-RequestMessage.invalid_txnAutoWrap=''{0}'' is an invalid transaction autowrap mode.
+TEIID20000=''{0}'' is an invalid transaction autowrap mode.
LocalTransportHandler.Transport_shutdown=Tranport has been shutdown.
-PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to=Unable to find a component used authenticate on to Teiid
+TEIID20018=Unable to find a component used authenticate on to Teiid
admin_conn_closed = The Admin connection has been closed.
invalid_parameter = The user parameter may not be null or empty.
-SocketServerInstance.Connection_Error.Unknown_Host = Error establishing socket. Unknown host: {0}
-SocketServerInstance.Connection_Error.Connect_Failed = Error establishing socket to host and port: {0}:{1}. Reason: {2}
-SocketServerInstancePool.No_valid_host_available=No valid host available. Attempted connections to: {0}
-SocketServerInstanceImpl.handshake_error=Handshake error
+TEIID20019=Error establishing socket. Unknown host: {0}
+TEIID20020=Error establishing socket to host and port: {0}:{1}. Reason: {2}
+TEIID20021=No valid host available. Attempted connections to: {0}
+TEIID20009=Handshake error
-SocketServerConnection.closed=Server connection is closed
+TEIID20016=Server connection is closed
SocketHelper.keystore_not_found=Key store ''{0}'' was not found.
SocketUtil.anon_not_available=The anonymous cipher suite TLS_DH_anon_WITH_AES_128_CBC_SHA could not be added. Anonymous SSL connections will fail.
@@ -148,11 +148,13 @@
TeiidURL.non_numeric_port=The port ''{0}'' is a non-numeric value.
TeiidURL.port_out_of_range=The port ''{0}'' is out of range.
-BatchSerializer.datatype_mismatch=The modeled datatype {0} for column {1} doesn''t match the runtime type "{2}". Please ensure that the column''s modeled datatype matches the expected data.
+TEIID20001=The modeled datatype {0} for column {1} doesn''t match the runtime type "{2}". Please ensure that the column''s modeled datatype matches the expected data.
no_krb_ticket=No cached kerberos ticket found and/or no password supplied
-gss_auth_failed=GSS Authentication failed
+TEIID20006=GSS Authentication failed
+TEIID20005=GSS Authentication failed
+TEIID20007=Duplicate class
setup_failed=Protocol error. Session setup failed.
client_prop_missing=Client URL connection property missing "{0}". Please add the property to connection URL.
system_prop_missing=System property "{0}" missing, please add using -D option on the VM startup script.
@@ -166,4 +168,6 @@
<xa-datasource-class>org.teiid.jdbc.TeiidDataSource</xa-datasource-class>\
</driver> \
</drivers>
-teiid_module_load_failed=Failed to load "org.jboss.teiid" module.
\ No newline at end of file
+TEIID20008=Failed to load "org.jboss.teiid" module.
+TEIID20023=connection closed
+TEIID20007=Duplicate Class
\ No newline at end of file
Modified: trunk/client/src/test/java/org/teiid/client/TestBatchSerializer.java
===================================================================
--- trunk/client/src/test/java/org/teiid/client/TestBatchSerializer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/test/java/org/teiid/client/TestBatchSerializer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -141,7 +141,7 @@
try {
helpTestSerialization(new String[] {DataTypeManager.DefaultDataTypes.DOUBLE}, new List[] {Arrays.asList(new Object[] {"Hello!"})}); //$NON-NLS-1$
} catch (RuntimeException e) {
- assertEquals("The modeled datatype double for column 0 doesn't match the runtime type \"java.lang.String\". Please ensure that the column's modeled datatype matches the expected data.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID20001 The modeled datatype double for column 0 doesn't match the runtime type \"java.lang.String\". Please ensure that the column's modeled datatype matches the expected data.", e.getMessage()); //$NON-NLS-1$
}
}
}
Modified: trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java
===================================================================
--- trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -100,7 +100,7 @@
rm.setTxnAutoWrapMode("foo"); //$NON-NLS-1$
fail("exception expected"); //$NON-NLS-1$
} catch (TeiidProcessingException e) {
- assertEquals("'FOO' is an invalid transaction autowrap mode.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID20000 Message:TEIID20000 'FOO' is an invalid transaction autowrap mode.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java
===================================================================
--- trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/test/java/org/teiid/jdbc/TestSQLException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -35,6 +35,7 @@
import org.junit.Test;
import org.teiid.client.ProcedureErrorInstructionException;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidRuntimeException;
@@ -214,9 +215,12 @@
assertEquals(exception.getNextException().getMessage(), sqlexception.getMessage());
assertEquals(exception.getNextException().getNextException().getMessage(), nested.getMessage());
}
-
+ public static enum Event implements BundleUtil.Event {
+ T21,
+ }
@Test public void testCodeAsSQLState() {
- TeiidException sqlexception = new TeiidException("foo", "21"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ TeiidException sqlexception = new TeiidException(Event.T21, "foo"); //$NON-NLS-1$
String message = "top level message"; //$NON-NLS-1$
Modified: trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java
===================================================================
--- trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -148,7 +148,7 @@
new SocketServerConnection(instanceFactory, false, discovery, p);
fail("exception expected"); //$NON-NLS-1$
} catch (CommunicationException e) {
- assertEquals("No valid host available. Attempted connections to: [host1:1, host2:2]", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID20021 Message:TEIID20021 No valid host available. Attempted connections to: [host1:1, host2:2]", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/ComponentNotFoundException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -45,15 +45,9 @@
super( message );
}
- /**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public ComponentNotFoundException( String code, String message ) {
- super( code, message );
- }
+ public ComponentNotFoundException(BundleUtil.Event code, final String message) {
+ super(code, message);
+ }
/**
* Construct an instance from a message and an exception to chain to this one.
@@ -73,8 +67,8 @@
* @param message A message describing the exception
* @param code A code denoting the exception
*/
- public ComponentNotFoundException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public ComponentNotFoundException(BundleUtil.Event code, Throwable e, String message ) {
+ super(code, e, message);
}
} // END CLASS
Modified: trunk/common-core/src/main/java/org/teiid/core/CorePlugin.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/CorePlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/CorePlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -39,4 +39,89 @@
public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static enum Event implements BundleUtil.Event {
+ TEIID10000,
+ TEIID10001,
+ TEIID10002,
+ TEIID10003,
+ TEIID10004,
+ TEIID10005,
+ TEIID10006,
+ TEIID10007,
+ TEIID10008,
+ TEIID10009,
+ TEIID10010,
+ TEIID10011,
+ TEIID10012,
+ TEIID10013,
+ TEIID10014,
+ TEIID10015,
+ TEIID10016,
+ TEIID10017,
+ TEIID10018,
+ TEIID10019,
+ TEIID10020,
+ TEIID10021,
+ TEIID10022,
+ TEIID10023,
+ TEIID10024,
+ TEIID10025,
+ TEIID10026,
+ TEIID10027,
+ TEIID10028,
+ TEIID10029,
+ TEIID10030,
+ TEIID10031,
+ TEIID10032,
+ TEIID10033,
+ TEIID10034,
+ TEIID10035,
+ TEIID10036,
+ TEIID10037,
+ TEIID10038,
+ TEIID10039,
+ TEIID10040,
+ TEIID10041,
+ TEIID10042,
+ TEIID10043,
+ TEIID10044,
+ TEIID10045,
+ TEIID10046,
+ TEIID10047,
+ TEIID10048,
+ TEIID10049,
+ TEIID10050,
+ TEIID10051,
+ TEIID10052,
+ TEIID10053,
+ TEIID10054,
+ TEIID10055,
+ TEIID10056,
+ TEIID10057,
+ TEIID10058,
+ TEIID10059,
+ TEIID10060,
+ TEIID10061,
+ TEIID10062,
+ TEIID10063,
+ TEIID10064,
+ TEIID10065,
+ TEIID10066,
+ TEIID10067,
+ TEIID10068,
+ TEIID10069,
+ TEIID10070,
+ TEIID10071,
+ TEIID10072,
+ TEIID10073,
+ TEIID10074,
+ TEIID10075,
+ TEIID10076,
+ TEIID10077,
+ TEIID10078,
+ TEIID10079,
+ TEIID10080,
+ TEIID10081,
+ }
}
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidComponentException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidComponentException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidComponentException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -32,9 +32,6 @@
private static final long serialVersionUID = 5853804556425201591L;
- /**
- * No-arg CTOR
- */
public TeiidComponentException( ) {
super( );
}
@@ -56,37 +53,21 @@
super( e );
}
- /**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public TeiidComponentException( String code, String message ) {
- super( code, message );
- }
+ public TeiidComponentException(BundleUtil.Event code, final String message) {
+ super(code, message);
+ }
+
+ public TeiidComponentException(BundleUtil.Event code, Throwable e, final String message) {
+ super(code, e, message);
+ }
+
+ public TeiidComponentException(BundleUtil.Event code, Throwable e) {
+ super(code, e);
+ }
- /**
- * Construct an instance from a message and an exception to chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- */
public TeiidComponentException( Throwable e, String message ) {
super( e, message );
}
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public TeiidComponentException( Throwable e, String code, String message ) {
- super( e, code, message );
- }
-
} // END CLASS
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -46,11 +46,21 @@
public TeiidException(String message) {
super(message);
}
-
- public TeiidException(String errorCode, String message) {
+
+ public TeiidException(BundleUtil.Event code, final String message) {
super(message);
- this.code = errorCode;
- }
+ setCode(code.toString());
+ }
+
+ public TeiidException(BundleUtil.Event code, Throwable t, final String message) {
+ super(message, t);
+ setCode(code.toString());
+ }
+
+ public TeiidException(BundleUtil.Event code, Throwable t) {
+ super(t);
+ setCode(code.toString());
+ }
public TeiidException(Throwable e) {
this(e, e != null? e.getMessage() : null);
@@ -61,11 +71,6 @@
setCode(getCode(e));
}
- public TeiidException(Throwable e, String errorCode, String message) {
- super(message, e);
- this.code = errorCode;
- }
-
public String getCode() {
return this.code;
}
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidProcessingException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -63,9 +63,17 @@
* @param message A message describing the exception
* @param code The error code
*/
- public TeiidProcessingException( String code, String message ) {
- super( code, message );
+ public TeiidProcessingException(BundleUtil.Event code, Throwable t, String message ) {
+ super(code, t, message );
}
+
+ public TeiidProcessingException(BundleUtil.Event code, final String message) {
+ super(code, message);
+ }
+
+ public TeiidProcessingException(BundleUtil.Event code, Throwable t) {
+ super(code, t);
+ }
/**
* Construct an instance from a message and an exception to chain to this one.
@@ -77,17 +85,5 @@
super( e, message );
}
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public TeiidProcessingException( Throwable e, String code, String message ) {
- super( e, code, message );
- }
-
} // END CLASS
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -71,6 +71,23 @@
setCode(code);
}
+ public TeiidRuntimeException(BundleUtil.Event code, final String message) {
+ super(message);
+ // The following setCode call should be executed after setting the message
+ setCode(code.toString());
+ }
+
+ public TeiidRuntimeException(BundleUtil.Event code, final Throwable t) {
+ super(t);
+ // The following setCode call should be executed after setting the message
+ setCode(code.toString());
+ }
+
+ public TeiidRuntimeException(BundleUtil.Event code) {
+ super();
+ setCode(code.toString());
+ }
+
public TeiidRuntimeException(final String[] message) {
super(message[1]);
// The following setCode call should be executed after setting the message
@@ -108,10 +125,10 @@
* @param code The error code
* @param message The error message
*/
- public TeiidRuntimeException(final Throwable e, final String code, final String message) {
+ public TeiidRuntimeException(BundleUtil.Event event, final Throwable e, final String message) {
super(message, e);
// Overwrite code set in other ctor from exception.
- setCode(code);
+ setCode(event.toString());
}
Modified: trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -75,13 +75,13 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( "ERR.003.030.0071", CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(), e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10006, CorePlugin.Util.gs(CorePlugin.Event.TEIID10006, e.getClass().getName(), e.getMessage()));
}
}
public String decrypt( String ciphertext ) throws CryptoException {
if ( ciphertext == null ) {
- throw new CryptoException( "ERR.003.030.0074", CorePlugin.Util.getString("ERR.003.030.0074")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10007, CorePlugin.Util.gs(CorePlugin.Event.TEIID10007));
}
ciphertext = stripEncryptionPrefix(ciphertext);
@@ -91,7 +91,7 @@
try {
cipherBytes = Base64.decode(ciphertext);
} catch ( IllegalArgumentException e ) {
- throw new CryptoException( "ERR.003.030.0075", CorePlugin.Util.getString("ERR.003.030.0075", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10008, CorePlugin.Util.gs(CorePlugin.Event.TEIID10008, e.getMessage()));
}
// Perform standard decryption
byte[] cleartext = decrypt( cipherBytes );
@@ -120,11 +120,11 @@
decryptCipher = Cipher.getInstance( cipherAlgorithm);
decryptCipher.init( Cipher.DECRYPT_MODE, decryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, "ERR.003.030.0076", CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10009, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10009, cipherAlgorithm ));
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException( "ERR.003.030.0077", CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm, e.getClass().getName(), e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10010, CorePlugin.Util.gs(CorePlugin.Event.TEIID10010, cipherAlgorithm, e.getClass().getName(), e.getMessage() ));
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, "ERR.003.030.0079", CorePlugin.Util.getString("ERR.003.030.0079", e.getClass().getName(), e.getMessage()) ); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10011, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10011, e.getClass().getName(), e.getMessage()) );
}
}
@@ -144,7 +144,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( "ERR.003.030.0071", CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(), e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10012, CorePlugin.Util.gs(CorePlugin.Event.TEIID10012, e.getClass().getName(), e.getMessage()));
}
}
@@ -162,17 +162,17 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10013, CorePlugin.Util.gs(CorePlugin.Event.TEIID10013, e.getMessage()));
}
}
public String encrypt( String cleartext ) throws CryptoException {
if ( cleartext == null ) {
- throw new CryptoException( "ERR.003.030.0072", CorePlugin.Util.getString("ERR.003.030.0072")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10014, CorePlugin.Util.gs(CorePlugin.Event.TEIID10014));
}
String clearString = new String(cleartext);
if ( clearString.trim().length() == 0 && clearString.length() == 0 ) {
- throw new CryptoException( "ERR.003.030.0073", CorePlugin.Util.getString("ERR.003.030.0073")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10015, CorePlugin.Util.gs(CorePlugin.Event.TEIID10015));
}
// Turn char array into string and get its bytes using "standard" encoding
byte[] clearBytes = clearString.getBytes();
@@ -196,17 +196,17 @@
encryptCipher = Cipher.getInstance( cipherAlgorithm );
encryptCipher.init( Cipher.ENCRYPT_MODE, encryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, "ERR.003.030.0076", CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10016, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10016, cipherAlgorithm ));
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException(e, "ERR.003.030.0072", CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm , e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10017, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10017, cipherAlgorithm , e.getMessage() ));
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, "ERR.003.030.0078", CorePlugin.Util.getString("ERR.003.030.0078", e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10018, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10018, e.getMessage() ));
}
}
public synchronized Object sealObject(Object object) throws CryptoException {
if (object != null && !(object instanceof Serializable)) {
- throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", "not Serializable")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new CryptoException(CorePlugin.Event.TEIID10019, CorePlugin.Util.gs(CorePlugin.Event.TEIID10019));
}
try {
return new SealedObject((Serializable)object, encryptCipher);
@@ -216,7 +216,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new CryptoException(CorePlugin.Event.TEIID10020, CorePlugin.Util.gs(CorePlugin.Event.TEIID10020, e.getMessage()));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/crypto/CryptoException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/crypto/CryptoException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/crypto/CryptoException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.core.crypto;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidException;
/**
@@ -60,7 +61,7 @@
* @param message A message describing the exception
* @param code The error code
*/
- public CryptoException( String code, String message ) {
+ public CryptoException(BundleUtil.Event code, String message ) {
super( code, message );
}
@@ -82,8 +83,12 @@
* @param message A message describing the exception
* @param code A code denoting the exception
*/
- public CryptoException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public CryptoException(BundleUtil.Event code, Throwable e, String message ) {
+ super(code, e, message);
}
+
+ public CryptoException(BundleUtil.Event code, Throwable e) {
+ super(code, e);
+ }
} // END CLASS
Modified: trunk/common-core/src/main/java/org/teiid/core/crypto/DhKeyGenerator.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/crypto/DhKeyGenerator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/crypto/DhKeyGenerator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -43,6 +43,7 @@
import javax.crypto.KeyAgreement;
import javax.crypto.spec.DHParameterSpec;
+import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
@@ -64,7 +65,7 @@
is = DhKeyGenerator.class.getResourceAsStream("dh.properties"); //$NON-NLS-1$
props.load(is);
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10000, e);
} finally {
try {
if (is != null) {
@@ -97,9 +98,9 @@
return publicKey.getEncoded();
} catch (NoSuchAlgorithmException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10001, e);
} catch (InvalidAlgorithmParameterException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10002, e);
}
}
@@ -126,11 +127,11 @@
System.arraycopy(hash, 0, symKey, 0, symKey.length);
return SymmetricCryptor.getSymmectricCryptor(symKey);
} catch (NoSuchAlgorithmException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10003, e);
} catch (InvalidKeySpecException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10004, e);
} catch (InvalidKeyException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10005, e);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/crypto/SymmetricCryptor.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/crypto/SymmetricCryptor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/crypto/SymmetricCryptor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -34,6 +34,7 @@
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
+import org.teiid.core.CorePlugin;
import org.teiid.core.util.ArgCheck;
@@ -72,7 +73,7 @@
return keyGen.generateKey();
}
} catch (GeneralSecurityException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10021, e);
}
}
@@ -93,7 +94,7 @@
Key key = store.getKey(DEFAULT_ALIAS, DEFAULT_STORE_PASSWORD.toCharArray());
return new SymmetricCryptor(key);
} catch (GeneralSecurityException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10022, e);
} finally {
stream.close();
}
@@ -125,7 +126,7 @@
store.setKeyEntry(DEFAULT_ALIAS, key, DEFAULT_STORE_PASSWORD.toCharArray(),null);
store.store(fos, DEFAULT_STORE_PASSWORD.toCharArray());
} catch (GeneralSecurityException e) {
- throw new CryptoException(e);
+ throw new CryptoException(CorePlugin.Event.TEIID10023, e);
} finally {
fos.close();
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/BlobType.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/BlobType.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/BlobType.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -32,6 +32,7 @@
import javax.sql.rowset.serial.SerialBlob;
+import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ObjectConverterUtil;
@@ -131,7 +132,7 @@
try {
return new SerialBlob(bytes);
} catch (SQLException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10047, e);
}
}
@@ -187,9 +188,9 @@
}
return Long.signum(len1 - len2);
} catch (SQLException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10048, e);
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10049, e);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -35,6 +35,7 @@
import javax.sql.rowset.serial.SerialClob;
+import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ObjectConverterUtil;
@@ -164,10 +165,10 @@
try {
result = ClobType.this.length();
} catch (SQLException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10051, err);
}
if (((int)result) != result) {
- throw new TeiidRuntimeException("Clob value is not representable by CharSequence"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10052, CorePlugin.Util.gs(CorePlugin.Event.TEIID10052));
}
return (int)result;
}
@@ -180,7 +181,7 @@
}
return buffer.charAt(index - beginPosition);
} catch (SQLException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10053, err);
}
}
@@ -189,7 +190,7 @@
try {
return ClobType.this.getSubString(start + 1, end - start);
} catch (SQLException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10054, err);
}
}
@@ -208,7 +209,7 @@
try {
return new SerialClob(chars);
} catch (SQLException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10055, e);
}
}
@@ -278,9 +279,9 @@
}
return Long.signum(len1 - len2);
} catch (SQLException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10056, e);
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10057, e);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -847,7 +847,7 @@
targetClass);
if (transform == null) {
Object[] params = new Object[] { sourceType, targetClass, value};
- throw new TransformationException(CorePlugin.Util.getString("ObjectToAnyTransform.Invalid_value", params)); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10050, CorePlugin.Util.gs(CorePlugin.Event.TEIID10050, params));
}
T result = (T) transform.transform(value);
return getCanonicalValue(result);
Modified: trunk/common-core/src/main/java/org/teiid/core/types/Transform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/Transform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/Transform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -109,7 +109,7 @@
protected void checkValueRange(Object value, Number min, Number max)
throws TransformationException {
if (((Comparable)value).compareTo(DataTypeManager.transformValue(min, getSourceType())) < 0 || ((Comparable)value).compareTo(DataTypeManager.transformValue(max, getSourceType())) > 0) {
- throw new TransformationException(CorePlugin.Util.getString("transform.value_out_of_range", value, getSourceType().getSimpleName(), getTargetType().getSimpleName())); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10058, CorePlugin.Util.gs(CorePlugin.Event.TEIID10058, value, getSourceType().getSimpleName(), getTargetType().getSimpleName()));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/TransformationException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/TransformationException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/TransformationException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.core.types;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
/**
@@ -30,7 +31,9 @@
*/
public class TransformationException extends TeiidProcessingException {
- /**
+ private static final long serialVersionUID = -4112567582638012800L;
+
+ /**
* No-Arg Constructor
*/
public TransformationException( ) {
@@ -42,18 +45,9 @@
* @param message A message describing the exception
*/
public TransformationException( String message ) {
- super( message );
+ super(message);
}
- /**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public TransformationException( String code, String message ) {
- super( code, message );
- }
/**
* Construct an instance from a message and an exception to chain to this one.
@@ -64,17 +58,12 @@
public TransformationException( Exception e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public TransformationException( Exception e, String code, String message ) {
- super( e, code, message );
+ public TransformationException(BundleUtil.Event event, String message) {
+ super(event, message);
}
+ public TransformationException(BundleUtil.Event event, Throwable t, String message) {
+ super(event, t, message);
+ }
+
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/BlobToBinaryTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/BlobToBinaryTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/BlobToBinaryTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -51,9 +51,9 @@
byte[] bytes = ObjectConverterUtil.convertToByteArray(source.getBinaryStream(), DataTypeManager.MAX_LOB_MEMORY_BYTES, true);
return new BinaryType(bytes);
} catch (SQLException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10079, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10079, new Object[] {getSourceType().getName(), getTargetType().getName()}));
} catch(IOException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10080, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10080, new Object[] {getSourceType().getName(), getTargetType().getName()}));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -61,9 +61,9 @@
}
return contents.toString();
} catch (SQLException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10064, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10064, new Object[] {getSourceType().getName(), getTargetType().getName()}));
} catch(IOException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10065, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10065, new Object[] {getSourceType().getName(), getTargetType().getName()}));
} finally {
if (reader != null) {
try {
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/ObjectToAnyTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/ObjectToAnyTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/ObjectToAnyTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -56,14 +56,14 @@
if (transform == null || transform instanceof ObjectToAnyTransform) {
Object[] params = new Object[] { getSourceType(), targetClass, value};
- throw new TransformationException(CorePlugin.Util.getString("ObjectToAnyTransform.Invalid_value", params)); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10075, CorePlugin.Util.gs(CorePlugin.Event.TEIID10075, params));
}
try {
return transform.transform(value);
} catch (TransformationException e) {
Object[] params = new Object[] { getSourceType(), targetClass, value};
- throw new TransformationException(e, CorePlugin.Util.getString("ObjectToAnyTransform.Invalid_value", params)); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10076, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10076, params));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -56,9 +56,9 @@
int read = reader.read(result);
return new String(result, 0, read);
} catch (SQLException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10066, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10066, new Object[] {getSourceType().getName(), getTargetType().getName()}));
} catch (IOException e) {
- throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10067, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10067, new Object[] {getSourceType().getName(), getTargetType().getName()}));
} finally {
try {
if (reader != null) {
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -44,7 +44,7 @@
try {
return new BigDecimal(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0014", CorePlugin.Util.getString("ERR.003.029.0014", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10063, CorePlugin.Util.gs(CorePlugin.Event.TEIID10063, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -43,7 +43,7 @@
try {
return new BigInteger(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0015", CorePlugin.Util.getString("ERR.003.029.0015", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10081, CorePlugin.Util.gs(CorePlugin.Event.TEIID10081, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Byte.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0016", CorePlugin.Util.getString("ERR.003.029.0016", value));
+ throw new TransformationException(CorePlugin.Event.TEIID10074, CorePlugin.Util.gs(CorePlugin.Event.TEIID10074, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -45,10 +45,10 @@
try {
result = Date.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, "ERR.003.029.0018", CorePlugin.Util.getString("ERR.003.029.0018", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10061, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10061, value));
}
if (!result.toString().equals(value)) {
- throw new TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date", value, getTargetType().getSimpleName())); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10062, CorePlugin.Util.gs(CorePlugin.Event.TEIID10062, value, getTargetType().getSimpleName()));
}
return result;
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Double.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0019", CorePlugin.Util.getString("ERR.003.029.0019", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10078, CorePlugin.Util.gs(CorePlugin.Event.TEIID10078, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Float.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0020", CorePlugin.Util.getString("ERR.003.029.0020", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10077, CorePlugin.Util.gs(CorePlugin.Event.TEIID10077, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Integer.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0021", CorePlugin.Util.getString("ERR.003.029.0021", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10072, CorePlugin.Util.gs(CorePlugin.Event.TEIID10072, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Long.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0022", CorePlugin.Util.getString("ERR.003.029.0022", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10073, CorePlugin.Util.gs(CorePlugin.Event.TEIID10073, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToSQLXMLTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToSQLXMLTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToSQLXMLTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -71,7 +71,7 @@
xmlReader.next();
}
} catch (Exception e){
- throw new TransformationException(e, CorePlugin.Util.getString("invalid_string")); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10070, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10070));
} finally {
try {
reader.close();
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,7 +40,7 @@
try {
return Short.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException("ERR.003.029.0023", CorePlugin.Util.getString("ERR.003.029.0023", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10071, CorePlugin.Util.gs(CorePlugin.Event.TEIID10071, value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -45,10 +45,10 @@
try {
result = Time.valueOf((String)value);
} catch(Exception e) {
- throw new TransformationException(e, "ERR.003.029.0025", CorePlugin.Util.getString("ERR.003.029.0025", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10068, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10068, value));
}
if (!result.toString().equals(value)) {
- throw new TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date", value, getTargetType().getSimpleName())); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10069, CorePlugin.Util.gs(CorePlugin.Event.TEIID10069, value, getTargetType().getSimpleName()));
}
return result;
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -45,11 +45,11 @@
try {
result = Timestamp.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, "ERR.003.029.0024", CorePlugin.Util.getString("ERR.003.029.0024", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TransformationException(CorePlugin.Event.TEIID10059, e, CorePlugin.Util.gs(CorePlugin.Event.TEIID10059, value));
}
//validate everything except for fractional seconds
if (!((String)value).startsWith(result.toString().substring(0, 19))) {
- throw new TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date", value, getTargetType().getSimpleName())); //$NON-NLS-1$
+ throw new TransformationException(CorePlugin.Event.TEIID10060, CorePlugin.Util.gs(CorePlugin.Event.TEIID10060, value, getTargetType().getSimpleName()));
}
return result;
}
Modified: trunk/common-core/src/main/java/org/teiid/core/util/ApplicationInfo.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/ApplicationInfo.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/ApplicationInfo.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -38,6 +38,7 @@
import java.util.Properties;
import java.util.StringTokenizer;
+import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
@@ -62,7 +63,7 @@
is.close();
}
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10045, e);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/util/FileUtils.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/FileUtils.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/FileUtils.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -670,7 +670,7 @@
os.write(contents);
return temp;
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10024, e);
} finally {
if (os != null) {
try {
@@ -767,20 +767,20 @@
}
if (!success) {
final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_create_file_in", dirPath); //$NON-NLS-1$
- throw new TeiidException(msg);
+ throw new TeiidException(CorePlugin.Event.TEIID10025, msg);
}
//test if file can be written to
if (!tmpFile.canWrite()) {
final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_write_file_in", dirPath); //$NON-NLS-1$
- throw new TeiidException(msg);
+ throw new TeiidException(CorePlugin.Event.TEIID10026, msg);
}
//test if file can be read
if (!tmpFile.canRead()) {
final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_read_file_in", dirPath); //$NON-NLS-1$
- throw new TeiidException(msg);
+ throw new TeiidException(CorePlugin.Event.TEIID10027, msg);
}
//test if file can be renamed
@@ -792,7 +792,7 @@
}
if (!success) {
final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_rename_file_in", dirPath); //$NON-NLS-1$
- throw new TeiidException(msg);
+ throw new TeiidException(CorePlugin.Event.TEIID10028, msg);
}
//test if file can be deleted
@@ -803,7 +803,7 @@
}
if (!success) {
final String msg = CorePlugin.Util.getString("FileUtils.Unable_to_delete_file_in", dirPath); //$NON-NLS-1$
- throw new TeiidException(msg);
+ throw new TeiidException(CorePlugin.Event.TEIID10029, msg);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/ObjectConverterUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -56,10 +56,10 @@
return convertToByteArray(l_blobStream);
} catch (IOException ioe) {
final Object[] params = new Object[]{data.getClass().getName()};
- throw new TeiidException(ioe,CorePlugin.Util.getString("ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._1",params)); //$NON-NLS-1$
+ throw new TeiidException(CorePlugin.Event.TEIID10030, ioe,CorePlugin.Util.gs(CorePlugin.Event.TEIID10030,params));
} catch (SQLException sqe) {
final Object[] params = new Object[]{data.getClass().getName()};
- throw new TeiidException(sqe,CorePlugin.Util.getString("ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._2",params)); //$NON-NLS-1$
+ throw new TeiidException(CorePlugin.Event.TEIID10031, sqe,CorePlugin.Util.gs(CorePlugin.Event.TEIID10031,params));
}
}
@@ -74,7 +74,7 @@
return convertFileToByteArray((File)data);
}
final Object[] params = new Object[]{data.getClass().getName()};
- throw new TeiidException(CorePlugin.Util.getString("ObjectConverterUtil.Object_type_not_supported_for_object_conversion._3",params)); //$NON-NLS-1$
+ throw new TeiidException(CorePlugin.Event.TEIID10032, CorePlugin.Util.gs(CorePlugin.Event.TEIID10032,params));
}
public static byte[] convertToByteArray(final InputStream is) throws IOException {
Modified: trunk/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -41,6 +41,7 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.core.BundleUtil;
import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
@@ -53,11 +54,12 @@
public final class PropertiesUtils {
public static class InvalidPropertyException extends TeiidRuntimeException {
-
- public InvalidPropertyException(String propertyName, String value, Class<?> expectedType, Throwable cause) {
- super(cause, CorePlugin.Util.getString("InvalidPropertyException.message", propertyName, value, expectedType.getSimpleName())); //$NON-NLS-1$
- }
+ private static final long serialVersionUID = 1586068295007497776L;
+ public InvalidPropertyException(BundleUtil.Event event, String propertyName, String value, Class<?> expectedType, Throwable cause) {
+ super(event, cause, CorePlugin.Util.getString("InvalidPropertyException.message", propertyName, value, expectedType.getSimpleName())); //$NON-NLS-1$
+ }
+
}
/**
@@ -236,7 +238,7 @@
try {
return Integer.parseInt(stringVal);
} catch(NumberFormatException e) {
- throw new InvalidPropertyException(propName, stringVal, Integer.class, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10037, propName, stringVal, Integer.class, e);
}
}
@@ -252,7 +254,7 @@
try {
return Long.parseLong(stringVal);
} catch(NumberFormatException e) {
- throw new InvalidPropertyException(propName, stringVal, Long.class, e);
+ throw new InvalidPropertyException( CorePlugin.Event.TEIID10038, propName, stringVal, Long.class, e);
}
}
@@ -268,7 +270,7 @@
try {
return Float.parseFloat(stringVal);
} catch(NumberFormatException e) {
- throw new InvalidPropertyException(propName, stringVal, Float.class, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10039, propName, stringVal, Float.class, e);
}
}
@@ -284,7 +286,7 @@
try {
return Double.parseDouble(stringVal);
} catch(NumberFormatException e) {
- throw new InvalidPropertyException(propName, stringVal, Double.class, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10040, propName, stringVal, Double.class, e);
}
}
@@ -300,7 +302,7 @@
try {
return Boolean.valueOf(stringVal);
} catch(NumberFormatException e) {
- throw new InvalidPropertyException(propName, stringVal, Float.class, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10041, propName, stringVal, Float.class, e);
}
}
@@ -708,7 +710,7 @@
// this will handle case where we did not resolve, mark it blank
if (nestedvalue == null) {
- throw new TeiidRuntimeException(CorePlugin.Util.getString("PropertiesUtils.failed_to_resolve_property", nestedkey)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10042, CorePlugin.Util.gs(CorePlugin.Event.TEIID10042, nestedkey));
}
value = value.substring(0,start)+nestedvalue+value.substring(end+1);
modified = true;
@@ -883,7 +885,7 @@
final Object[] params = new Object[] {StringUtil.valueOf(propertyValue, argType)};
method.invoke(bean, params);
} catch (Throwable e) {
- throw new InvalidPropertyException(propertyName, propertyValue, argType, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10043, propertyName, propertyValue, argType, e);
}
}
}
@@ -914,7 +916,7 @@
}
method.invoke(bean, params);
} catch (Throwable e) {
- throw new InvalidPropertyException(propertyName, value.toString(), argType, e);
+ throw new InvalidPropertyException(CorePlugin.Event.TEIID10044, propertyName, value.toString(), argType, e);
}
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -289,7 +289,7 @@
}
return create(className, objArray, names, classLoader);
} catch (Exception e) {
- throw new TeiidException(e);
+ throw new TeiidException(CorePlugin.Event.TEIID10033, e);
}
}
@@ -299,7 +299,7 @@
try {
cls = loadClass(className,classLoader);
} catch(Exception e) {
- throw new TeiidException(e);
+ throw new TeiidException(CorePlugin.Event.TEIID10034, e);
}
Constructor<?> ctor = null;
try {
@@ -320,13 +320,13 @@
}
if (ctor == null) {
- throw new TeiidException(className + " Args: " + Arrays.toString(argTypes)); //$NON-NLS-1$
+ throw new TeiidException(CorePlugin.Event.TEIID10035, className + CorePlugin.Event.TEIID10035 + Arrays.toString(argTypes));
}
try {
return ctor.newInstance(ctorObjs);
} catch (Exception e) {
- throw new TeiidException(e);
+ throw new TeiidException(CorePlugin.Event.TEIID10036, e);
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -1021,7 +1021,7 @@
line = reader.readLine();
}
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(CorePlugin.Event.TEIID10046, e);
}
return result.toArray(new String[result.size()]);
}
Modified: trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
===================================================================
--- trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -60,9 +60,9 @@
UUIDFactory.Description=An universally unique identifier that is composed of a 36-character formatted string.
ParsedObjectID.The_stringified_ObjectID_does_not_have_a_protocol=The stringified ObjectID does not have a protocol
ParsedObjectID.The_stringified_ObjectID_does_not_have_the_required_protocol_{0}=The stringified ObjectID does not have the required protocol {0}
-ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._1=Error translating results from data type {0} to a byte[].
-ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._2=Error translating results from data type {0} to a byte[].
-ObjectConverterUtil.Object_type_not_supported_for_object_conversion._3=Object type {0} not supported for object conversion.
+TEIID10030=Error translating results from data type {0} to a byte[].
+TEIID10031=Error translating results from data type {0} to a byte[].
+TEIID10032=Object type {0} not supported for object conversion.
FileUtils.File_does_not_exist._1=File {0} does not exist.
FileUtils.Not_a_directory=\"{0}\" is not a directory.
RuntimeException.Caused_by=Caused by:
@@ -84,44 +84,48 @@
stream_closed=The stream already closed
-failed_convert=Failed to convert {0} into {1}
-invalid_string=Value is not valid XML
+TEIID10080=Failed to convert {0} into {1}
+TEIID10070=Value is not valid XML
Streamable.isNUll=Streamable object argument can not be null
-ObjectToAnyTransform.Invalid_value=Invalid conversion from type {0} with value ''{2}'' to type {1}
+TEIID10076=Invalid conversion from type {0} with value ''{2}'' to type {1}
InvalidPropertyException.message=Property ''{0}'' with value ''{1}'' is not a valid {2}.
# types (029)
ERR.003.029.0002=Types cannot be null: (source={0}, target={1})
ERR.003.029.0003=Type names cannot be null: (source={0}, target={1})
-ERR.003.029.0014=Invalid BigDecimal format in String: {0}
-ERR.003.029.0015=Invalid BigInteger format in String: {0}
-ERR.003.029.0016=Invalid Byte format in String: {0}
-ERR.003.029.0018=Failed to transform String to Date. Expected format = yyyy-mm-dd for {0}
-ERR.003.029.0019=Invalid double format in String: {0}
-ERR.003.029.0020=Invalid float format in String: {0}
-ERR.003.029.0021=Invalid integer format in String: {0}
-ERR.003.029.0022=Invalid long format in String: {0}
-ERR.003.029.0023=Invalid short format in String: {0}
-ERR.003.029.0024=Failed to transform String to Timestamp. Expected format = yyyy-mm-dd hh:mm:ss.fffffffff for {0}
-ERR.003.029.0025=Failed to transform String to Time. Expected format = hh:mm:ss for {0}
+TEIID10063=Invalid BigDecimal format in String: {0}
+TEIID10081=Invalid BigInteger format in String: {0}
+TEIID10074=Invalid Byte format in String: {0}
+TEIID10061=Failed to transform String to Date. Expected format = yyyy-mm-dd for {0}
+TEIID10078=Invalid double format in String: {0}
+TEIID10077=Invalid float format in String: {0}
+TEIID10072=Invalid integer format in String: {0}
+TEIID10073=Invalid long format in String: {0}
+TEIID10071=Invalid short format in String: {0}
+TEIID10059=Failed to transform String to Timestamp. Expected format = yyyy-mm-dd hh:mm:ss.fffffffff for {0}
+TEIID10068=Failed to transform String to Time. Expected format = hh:mm:ss for {0}
#CM_UTIL_ERR
-ERR.003.030.0071=Decryption failed: {0} {1}
-ERR.003.030.0072=Attempt to encrypt null cleartext.
-ERR.003.030.0073=Attempt to encrypt zero-length cleartext.
-ERR.003.030.0074=Attempt to decrypt null ciphertext.
-ERR.003.030.0075=Could not decode Base-64 ciphertext. {0}
-ERR.003.030.0076=Could not get instance of cipher for encryption, invalid algorithm specified: {0}
-ERR.003.030.0077=Could not get instance of cipher for encryption, invalid padding specified: {0} {1} {2}
-ERR.003.030.0078=Could not initialize cipher for decryption, invalid key specified: {0} {1}
-ERR.003.030.0079=Could not get encrypt cipher''s encoded algorithm parameters due to encoding error: {0} {1}
-ERR.003.030.0081=Encryption failed: {0}
-
+TEIID10006=Decryption failed: {0} {1}
+TEIID10014=Attempt to encrypt null cleartext.
+TEIID10015=Attempt to encrypt zero-length cleartext.
+TEIID10007=Attempt to decrypt null ciphertext.
+TEIID10008=Could not decode Base-64 ciphertext. {0}
+TEIID10009=Could not get instance of cipher for encryption, invalid algorithm specified: {0}
+TEIID10010=Could not get instance of cipher for encryption, invalid padding specified: {0} {1} {2}
+TEIID10018=Could not initialize cipher for decryption, invalid key specified: {0} {1}
+TEIID10011=Could not get encrypt cipher''s encoded algorithm parameters due to encoding error: {0} {1}
+TEIID10012=Decryption failed: {0} {1}
+TEIID10013=Encryption failed: {0}
+TEIID10016=Could not get instance of cipher for encryption, invalid algorithm specified: {0}
+TEIID10017=Attempt to encrypt null cleartext.
+TEIID10019=Encryption failed: {0}
+TEIID10020=Encryption failed: {0}
# PROPERTIES_ERR
@@ -130,12 +134,14 @@
#JDBCUTIL
ExceptionHolder.converted_exception=Remote {1}: {0}
-PropertiesUtils.failed_to_resolve_property=failed to completely resolve the property value for key {0}
+TEIID10042=failed to completely resolve the property value for key {0}
+TEIID10069=The string representation ''{0}'' of a {1} value is not valid.
+TEIID10058=The {1} value ''{0}'' is outside the of range for {2}
-transform.invalid_string_for_date=The string representation ''{0}'' of a {1} value is not valid.
-transform.value_out_of_range=The {1} value ''{0}'' is outside the of range for {2}
-
MMClob_MMBlob.0=Invalid column index: {0}
MMClob_MMBlob.1=Invalid length argument to getSubString(): {0}
MMClob_MMBlob.2=Invalid argument for start position, {0}, must be > 0.
MMClob_MMBlob.3=Invalid length argument to getBytes(): {0}
+
+TEIID10052=Clob value is not representable by CharSequence
+TEIID10060=The string representation ''{0}'' of a {1} value is not valid.
\ No newline at end of file
Modified: trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -71,17 +71,21 @@
assertEquals("Test", err.getMessage()); //$NON-NLS-1$
}
-
+ public static enum Event implements BundleUtil.Event {
+ Code,
+ propertyValuePhrase,
+ }
public void testMetaMatrixExceptionWithCodeAndMessage() {
- final TeiidException err = new TeiidException("Code", "Test"); //$NON-NLS-1$ //$NON-NLS-2$
+ final TeiidException err = new TeiidException(Event.Code, "Test"); //$NON-NLS-1$
assertNull(err.getChild());
assertEquals("Code", err.getCode()); //$NON-NLS-1$
assertEquals("Error Code:Code Message:Test", err.getMessage()); //$NON-NLS-1$
}
+
public void testMetaMatrixExceptionWithExceptionAndMessage() {
- final TeiidException child = new TeiidException("propertyValuePhrase", "Child"); //$NON-NLS-1$ //$NON-NLS-2$
+ final TeiidException child = new TeiidException(Event.propertyValuePhrase, "Child"); //$NON-NLS-1$
final TeiidException err = new TeiidException(child, "Test"); //$NON-NLS-1$
assertSame(child, err.getChild());
assertEquals("propertyValuePhrase", err.getCode()); //$NON-NLS-1$
@@ -90,8 +94,8 @@
}
public void testMetaMatrixExceptionWithExceptionAndCodeAndMessage() {
- final TeiidException child = new TeiidException("propertyValuePhrase", "Child"); //$NON-NLS-1$ //$NON-NLS-2$
- final TeiidException err = new TeiidException(child, "Code", "Test"); //$NON-NLS-1$ //$NON-NLS-2$
+ final TeiidException child = new TeiidException(Event.propertyValuePhrase, "Child"); //$NON-NLS-1$
+ final TeiidException err = new TeiidException(Event.Code,child, "Test"); //$NON-NLS-1$
assertSame(child, err.getChild());
assertEquals("Code", err.getCode()); //$NON-NLS-1$
assertEquals("Error Code:Code Message:Test", err.getMessage()); //$NON-NLS-1$
Modified: trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixRuntimeException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -95,11 +95,13 @@
assertEquals("Test", err.getMessage()); //$NON-NLS-1$
}
-
+ public static enum Event implements BundleUtil.Event {
+ Code,
+ }
public void testMetaMatrixRuntimeExceptionWithExceptionAndCodeAndMessage() {
final String code = "1234"; //$NON-NLS-1$
final TeiidRuntimeException child = new TeiidRuntimeException(code, "Child"); //$NON-NLS-1$
- final TeiidRuntimeException err = new TeiidRuntimeException(child, "Code", "Test"); //$NON-NLS-1$ //$NON-NLS-2$
+ final TeiidRuntimeException err = new TeiidRuntimeException(Event.Code, child,"Test"); //$NON-NLS-1$
assertSame(child, err.getCause());
assertEquals("Code", err.getCode()); //$NON-NLS-1$
assertEquals("Test", err.getMessage()); //$NON-NLS-1$
Modified: trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -161,7 +161,7 @@
cryptor.encrypt( "" ); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch ( CryptoException e ) {
- assertEquals("Error Code:ERR.003.030.0073 Message:Attempt to encrypt zero-length cleartext.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID10015 Message:TEIID10015 Attempt to encrypt zero-length cleartext.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -175,7 +175,7 @@
cryptor.encrypt( (String)null );
fail("expected exception"); //$NON-NLS-1$
} catch ( CryptoException e ) {
- assertEquals("Error Code:ERR.003.030.0072 Message:Attempt to encrypt null cleartext.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID10014 Message:TEIID10014 Attempt to encrypt null cleartext.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,10 @@
package org.teiid.core.types.basic;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -33,14 +36,13 @@
import org.junit.Test;
import org.teiid.core.types.ClobType;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.types.DataTypeManager.DefaultDataClasses;
+import org.teiid.core.types.DataTypeManager.DefaultDataTypes;
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.core.types.TestDataTypeManager;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
import org.teiid.core.types.XMLType;
-import org.teiid.core.types.DataTypeManager.DefaultDataClasses;
-import org.teiid.core.types.DataTypeManager.DefaultDataTypes;
-import org.teiid.core.types.basic.StringToSQLXMLTransform;
import org.teiid.query.unittest.TimestampUtil;
@@ -203,7 +205,7 @@
transform.transform("1"); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch (TransformationException e) {
- assertEquals("Error Code:ERR.003.029.0025 Message:Invalid conversion from type class java.lang.Object with value '1' to type class java.sql.Time", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID10076 Message:TEIID10076 Invalid conversion from type class java.lang.Object with value '1' to type class java.sql.Time", e.getMessage()); //$NON-NLS-1$
}
}
@@ -225,7 +227,7 @@
}
@Test public void testStringToTimestampOutOfRange() throws Exception {
- helpTransformException("2005-13-01 11:13:01", DefaultDataClasses.TIMESTAMP, "The string representation '2005-13-01 11:13:01' of a Timestamp value is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTransformException("2005-13-01 11:13:01", DefaultDataClasses.TIMESTAMP, "Error Code:TEIID10060 Message:TEIID10060 The string representation '2005-13-01 11:13:01' of a Timestamp value is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testStringToTimeTimestampWithWS() throws Exception {
@@ -241,11 +243,11 @@
}
@Test public void testRangeCheck() throws Exception {
- helpTransformException(300, DataTypeManager.DefaultDataClasses.BYTE, "The Integer value '300' is outside the of range for Byte"); //$NON-NLS-1$
+ helpTransformException(300, DataTypeManager.DefaultDataClasses.BYTE, "Error Code:TEIID10058 Message:TEIID10058 The Integer value '300' is outside the of range for Byte"); //$NON-NLS-1$
}
@Test public void testRangeCheck1() throws Exception {
- helpTransformException(new Double("1E11"), DataTypeManager.DefaultDataClasses.INTEGER, "The Double value '100,000,000,000' is outside the of range for Integer"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTransformException(new Double("1E11"), DataTypeManager.DefaultDataClasses.INTEGER, "Error Code:TEIID10058 Message:TEIID10058 The Double value '100,000,000,000' is outside the of range for Integer"); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,6 +25,7 @@
import java.sql.SQLException;
import java.util.Arrays;
+import org.teiid.core.BundleUtil;
import org.teiid.translator.TranslatorException;
@@ -32,9 +33,8 @@
private static final long serialVersionUID = 1758087499488916573L;
- public JDBCExecutionException(SQLException error,
- TranslatedCommand... commands) {
- super(error, error.getErrorCode(), commands == null || commands.length == 0 ? error.getMessage() : JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", //$NON-NLS-1$
- error.getMessage(), Arrays.toString(commands)));
+ public JDBCExecutionException(BundleUtil.Event event, SQLException error,TranslatedCommand... commands) {
+ super(error, commands == null || commands.length == 0 ? event.toString()+":"+error.getMessage() : event.toString()+":"+JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", error.getMessage(), Arrays.toString(commands))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ setCode(String.valueOf(error.getErrorCode()));
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -235,7 +235,7 @@
try {
return ds.getConnection();
} catch (SQLException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11009, e);
}
}
@@ -258,7 +258,7 @@
PropertiesUtils.setBeanProperties(metadataProcessor, metadataFactory.getImportProperties(), "importer"); //$NON-NLS-1$
metadataProcessor.getConnectorMetadata(conn, metadataFactory);
} catch (SQLException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11010, e);
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCMetdataProcessor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -127,7 +127,7 @@
getProcedures(metadataFactory, metadata);
}
} catch (DuplicateRecordException e) {
- throw new TranslatorException(e, JDBCPlugin.Util.getString("JDBCMetadataProcessor.not_unique")); //$NON-NLS-1$
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11006, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID11006));
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCPlugin.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -41,5 +41,18 @@
TEIID11001, // connection details
TEIID11002, // connection creation failed
TEIID11003, // invalid hint
+ TEIID11004,
+ TEIID11005,
+ TEIID11006,
+ TEIID11008,
+ TEIID11009,
+ TEIID11010,
+ TEIID11011,
+ TEIID11012,
+ TEIID11013,
+ TEIID11014,
+ TEIID11015,
+ TEIID11016,
+ TEIID11017,
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -67,7 +67,7 @@
this.results = this.executionFactory.executeStoredProcedure(cstmt, translatedComm, procedure.getReturnType());
addStatementWarnings();
}catch(SQLException e){
- throw new TranslatorException(e, JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", sql)); //$NON-NLS-1$
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11004, e, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID11004, sql));
}
}
@@ -105,7 +105,7 @@
}
return result;
} catch (SQLException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11005, e);
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -87,7 +87,7 @@
}
addStatementWarnings();
} catch (SQLException e) {
- throw new JDBCExecutionException(e, translatedComm);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11008, e, translatedComm);
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -126,7 +126,7 @@
}
succeeded = true;
} catch (SQLException e) {
- throw new JDBCExecutionException(e, tCommand);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11011, e, tCommand);
} finally {
if (commitType) {
restoreAutoCommit(!succeeded, null);
@@ -147,7 +147,7 @@
}
commands.clear();
} catch (SQLException err) {
- throw new JDBCExecutionException(err, commands.toArray(new TranslatedCommand[commands.size()]));
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11012, err, commands.toArray(new TranslatedCommand[commands.size()]));
}
}
@@ -210,7 +210,7 @@
}
return new int[] {updateCount};
} catch (SQLException err) {
- throw new JDBCExecutionException(err, translatedComm);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11013, err, translatedComm);
} finally {
if (commitType) {
restoreAutoCommit(!succeeded, translatedComm);
@@ -227,7 +227,7 @@
try {
return connection.getAutoCommit();
} catch (SQLException err) {
- throw new JDBCExecutionException(err, tCommand);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11014, err, tCommand);
}
}
@@ -245,13 +245,13 @@
connection.rollback();
}
} catch (SQLException err) {
- throw new JDBCExecutionException(err, tCommand);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11015, err, tCommand);
} finally {
try {
connection.commit(); // in JbossAs setAutocommit = true does not trigger the commit.
connection.setAutoCommit(true);
} catch (SQLException err) {
- throw new JDBCExecutionException(err, tCommand);
+ throw new JDBCExecutionException(JDBCPlugin.Event.TEIID11016, err, tCommand);
}
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -259,7 +259,7 @@
int delimiterIndex = sequence.indexOf(Tokens.DOT);
if (delimiterIndex == -1) {
- throw new TranslatorException("Invalid name in source sequence format. Expected <element name>" + SEQUENCE + "<sequence name>.<sequence value>, but was " + name); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TranslatorException(JDBCPlugin.Event.TEIID11017, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID11017, SEQUENCE, name));
}
String sequenceGroupName = sequence.substring(0, delimiterIndex);
String sequenceElementName = sequence.substring(delimiterIndex + 1);
Modified: trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties
===================================================================
--- trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,9 +25,10 @@
-JDBCQueryExecution.Error_executing_query__1 = ''{0}'' error executing statement(s): {1}
+TEIID11004=''{0}'' error executing statement(s): {1}
SQLConversionVisitor.invalid_parameter=Invalid parameter {0}. Must be between 1 and {1}.
SQLConversionVisitor.not_in_parameter=Invalid parameter {0}. Native query procedures cannot use non IN parameters.
TEIID11003=Not using oracle execution payload {0} as hint, since it apprears to contain more than just a single comment.
TEIID11002=Failed to report the JDBC driver and connection information
-JDBCMetadataProcessor.not_unique=Teiid runtime names, which are case insensitive, for the imported metadata are not unique. If not already set, use the setting importer.useFullSchemaName to create Teiid names that include the source schema.
\ No newline at end of file
+TEIID11006=Teiid runtime names, which are case insensitive, for the imported metadata are not unique. If not already set, use the setting importer.useFullSchemaName to create Teiid names that include the source schema.
+TEIID11017=Invalid name in source sequence format. Expected <element name> {0} <sequence name>.<sequence value>, but was {1}
\ No newline at end of file
Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -157,7 +157,7 @@
String ctxName = searchDetails.getContextName();
String filter = searchDetails.getContextFilter();
if (ctxName == null || filter == null || ctrls == null) {
- throw new TranslatorException(LogConstants.CTX_CONNECTOR, "Search context, filter, or controls were null. Cannot execute search."); //$NON-NLS-1$
+ throw new TranslatorException("Search context, filter, or controls were null. Cannot execute search."); //$NON-NLS-1$
}
setRequestControls(null);
// Execute the search.
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/ExpressionEvaluationException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
/**
@@ -29,7 +30,9 @@
*/
public class ExpressionEvaluationException extends TeiidProcessingException {
- /**
+ private static final long serialVersionUID = 4955469005442543688L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public ExpressionEvaluationException() {
@@ -44,18 +47,8 @@
public ExpressionEvaluationException( String message ) {
super( message );
}
-
+
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public ExpressionEvaluationException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -65,15 +58,15 @@
super( e, message );
}
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public ExpressionEvaluationException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public ExpressionEvaluationException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public ExpressionEvaluationException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public ExpressionEvaluationException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionExecutionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,12 +22,16 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
+
/**
* During processing, an invalid function was detected.
*/
public class FunctionExecutionException extends ExpressionEvaluationException {
- /**
+ private static final long serialVersionUID = -4421419169341759699L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public FunctionExecutionException() {
@@ -44,16 +48,6 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public FunctionExecutionException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -62,16 +56,15 @@
public FunctionExecutionException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public FunctionExecutionException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public FunctionExecutionException(BundleUtil.Event event, Throwable e, String message ) {
+ super( event, e, message );
}
+
+ public FunctionExecutionException(BundleUtil.Event event, String message ) {
+ super( event, message );
+ }
+ public FunctionExecutionException(BundleUtil.Event event, Throwable e) {
+ super(event,e);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/FunctionMetadataException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,12 +22,16 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
+
/**
* Detected invalid function metadata during validation.
*/
public class FunctionMetadataException extends QueryProcessingException {
- /**
+ private static final long serialVersionUID = -3315048240596850619L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public FunctionMetadataException() {
@@ -42,18 +46,8 @@
public FunctionMetadataException( String message ) {
super( message );
}
-
+
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public FunctionMetadataException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -62,16 +56,16 @@
public FunctionMetadataException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public FunctionMetadataException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public FunctionMetadataException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public FunctionMetadataException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public FunctionMetadataException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/InvalidFunctionException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,12 +22,16 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
+
/**
* During processing, an invalid function was detected.
*/
public class InvalidFunctionException extends ExpressionEvaluationException {
- /**
+ private static final long serialVersionUID = -1743553921704505430L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public InvalidFunctionException() {
@@ -44,16 +48,6 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public InvalidFunctionException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -62,16 +56,21 @@
public InvalidFunctionException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public InvalidFunctionException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public InvalidFunctionException(BundleUtil.Event event) {
+ super();
+ setCode(event.toString());
+ }
+
+ public InvalidFunctionException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public InvalidFunctionException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public InvalidFunctionException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryMetadataException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidComponentException;
/**
@@ -32,7 +33,9 @@
*/
public class QueryMetadataException extends TeiidComponentException {
- /**
+ private static final long serialVersionUID = -2109331443434830452L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public QueryMetadataException() {
@@ -49,16 +52,6 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryMetadataException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -67,16 +60,14 @@
public QueryMetadataException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryMetadataException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public QueryMetadataException(BundleUtil.Event event, Throwable e, String message ) {
+ super( event, e, message );
}
+ public QueryMetadataException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+ public QueryMetadataException(BundleUtil.Event event, String message ) {
+ super( event, message );
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryParserException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
import org.teiid.query.parser.ParseException;
@@ -31,6 +32,7 @@
*/
public class QueryParserException extends QueryProcessingException {
+ private static final long serialVersionUID = 7565287582917117432L;
private ParseException parseException;
/**
@@ -50,16 +52,6 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryParserException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -69,17 +61,6 @@
super( e, message );
}
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryParserException( Throwable e, String code, String message ) {
- super( e, code, message );
- }
public ParseException getParseException() {
return parseException;
@@ -88,4 +69,16 @@
public void setParseException(ParseException parseException) {
this.parseException = parseException;
}
+
+ public QueryParserException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public QueryParserException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
+ }
+
+ public QueryParserException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryPlannerException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,8 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
+
/**
* This exception is thrown when an error occurs while planning the query. This
* probably indicates a problem with the query that could not be determined during
@@ -29,7 +31,9 @@
*/
public class QueryPlannerException extends QueryProcessingException {
- /**
+ private static final long serialVersionUID = -4209763837004780184L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public QueryPlannerException() {
@@ -44,18 +48,8 @@
public QueryPlannerException( String message ) {
super( message );
}
-
+
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryPlannerException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -64,16 +58,16 @@
public QueryPlannerException( Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryPlannerException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public QueryPlannerException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public QueryPlannerException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public QueryPlannerException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryProcessingException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,6 +22,7 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
/**
@@ -30,7 +31,9 @@
*/
public class QueryProcessingException extends TeiidProcessingException {
- /**
+ private static final long serialVersionUID = -1976946369356781737L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public QueryProcessingException() {
@@ -47,34 +50,25 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryProcessingException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
* @param e An exception to nest within this one
*/
- public QueryProcessingException( Throwable e, String message ) {
+ public QueryProcessingException(Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryProcessingException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public QueryProcessingException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public QueryProcessingException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public QueryProcessingException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
+
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryResolverException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -24,12 +24,15 @@
import java.util.*;
+import org.teiid.core.BundleUtil;
+
/**
* This exception represents the case where the query submitted could not resolved
* when it is checked against the metadata
*/
public class QueryResolverException extends QueryProcessingException {
+ private static final long serialVersionUID = 752912934870580744L;
private transient List problems;
/**
@@ -49,16 +52,6 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryResolverException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
@@ -68,18 +61,18 @@
super( e, message );
}
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryResolverException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public QueryResolverException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public QueryResolverException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
-
+
+ public QueryResolverException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
+
/**
* Set the list of unresolved symbols during QueryResolution
* @param unresolvedSymbols List of <UnresolvedSymbolDescription> objects
@@ -106,7 +99,4 @@
public List getUnresolvedSymbols() {
return this.problems;
}
-
-
-
}
Modified: trunk/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/api/exception/query/QueryValidatorException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,13 +22,17 @@
package org.teiid.api.exception.query;
+import org.teiid.core.BundleUtil;
+
/**
* This exception is thrown if an error is discovered while validating the query. Validation
* checks a number of aspects of a query to ensure that the query is semantically valid.
*/
public class QueryValidatorException extends QueryProcessingException {
- /**
+ private static final long serialVersionUID = 7003393883967513820L;
+
+ /**
* No-arg constructor required by Externalizable semantics.
*/
public QueryValidatorException() {
@@ -45,34 +49,24 @@
}
/**
- * Construct an instance with the message and error code specified.
- *
- * @param message A message describing the exception
- * @param code The error code
- */
- public QueryValidatorException( String code, String message ) {
- super( code, message );
- }
-
- /**
* Construct an instance from a message and an exception to chain to this one.
*
* @param message A message describing the exception
* @param e An exception to nest within this one
*/
- public QueryValidatorException( Throwable e, String message ) {
+ public QueryValidatorException(Throwable e, String message ) {
super( e, message );
}
-
- /**
- * Construct an instance from a message and a code and an exception to
- * chain to this one.
- *
- * @param e An exception to nest within this one
- * @param message A message describing the exception
- * @param code A code denoting the exception
- */
- public QueryValidatorException( Throwable e, String code, String message ) {
- super( e, code, message );
+
+ public QueryValidatorException(BundleUtil.Event event, Throwable e) {
+ super( event, e);
+ }
+
+ public QueryValidatorException(BundleUtil.Event event, Throwable e, String msg) {
+ super(event, e, msg);
}
+
+ public QueryValidatorException(BundleUtil.Event event, String msg) {
+ super(event, msg);
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,6 +25,7 @@
import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
public class DefaultCacheFactory implements CacheFactory, Serializable {
@@ -52,7 +53,7 @@
if (!destroyed) {
return cacheRoot.addChild(location);
}
- throw new TeiidRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30562, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30562));
}
@Override
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -141,14 +141,14 @@
case ATTACH:
if (lob.getReference() == null) {
if (lobHolder == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30033, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30033));
}
lob.setReference(lobHolder.lob.getReference());
}
break;
case CREATE:
if (lob.getReference() == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30034, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30034));
}
if (lobHolder == null) {
this.lobReferences.put(id, new LobHolder(lob));
@@ -162,7 +162,7 @@
public Streamable<?> getLobReference(String id) throws TeiidComponentException {
LobHolder lob = this.lobReferences.get(id);
if (lob == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30035, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30035));
}
return lob.lob;
}
@@ -225,7 +225,7 @@
OutputStream fsos = store.createOutputStream();
length = ObjectConverterUtil.write(fsos, is, bytes, -1);
} catch (IOException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30036, e);
}
// re-construct the new lobs based on the file store
@@ -256,7 +256,7 @@
((XMLType)persistedLob).setType(((XMLType)lob).getType());
}
} catch (SQLException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30037, e);
}
return persistedLob;
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/SPage.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -36,6 +36,7 @@
import org.teiid.client.ResizingArrayList;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
/**
* A linked list Page entry in the tree
@@ -124,7 +125,7 @@
}
return clone;
} catch (CloneNotSupportedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30038, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/STree.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/STree.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/STree.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -40,6 +40,7 @@
import org.teiid.common.buffer.SPage.SearchResult;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.relational.ListNestedSortComparator;
/**
@@ -132,7 +133,7 @@
}
return clone;
} catch (CloneNotSupportedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30039, e);
} finally {
updateLock.unlock();
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -290,7 +290,7 @@
public Streamable<?> getLobReference(String id) throws TeiidComponentException {
if (lobManager == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30032, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30032));
}
return lobManager.getLobReference(id);
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BlockStore.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -32,6 +32,7 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
/**
* Represents a FileStore that holds blocks of a fixed size.
@@ -59,7 +60,7 @@
int getAndSetNextClearBit(PhysicalInfo info) {
int result = blocksInUse.getAndSetNextClearBit();
if (result == -1) {
- throw new TeiidRuntimeException("Out of blocks of size " + blockSize); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30059, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30059, blockSize));
}
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
LogManager.logDetail(LogConstants.CTX_BUFFER_MGR, "Allocating storage data block", result, "of size", blockSize, "to", info); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -159,7 +159,7 @@
private int getOrUpdateDataBlockIndex(int index, int value, Mode mode) {
if (index >= MAX_DOUBLE_INDIRECT) {
- throw new TeiidRuntimeException("Max block number exceeded. You could try making the processor batch size smaller."); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30045, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30045));
}
int dataBlock = 0;
int position = 0;
@@ -447,7 +447,7 @@
} catch (IOException e) {
LogManager.logWarning(LogConstants.CTX_BUFFER_MGR, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30022));
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30046, e);
}
}
}
@@ -724,11 +724,11 @@
CacheEntry ce = new CacheEntry(new CacheKey(oid, 1, 1), sizeEstimate, serializer.deserialize(dis), ref, true);
return ce;
} catch(IOException e) {
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30047, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30047, oid));
} catch (ClassNotFoundException e) {
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", oid)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30048, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30048, oid));
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30049, e);
} finally {
synchronized (info) {
info.pinned = false;
@@ -1028,7 +1028,7 @@
}
}
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30050, e);
} finally {
if (writeLocked) {
memoryEvictionLock.writeLock().unlock();
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -119,7 +119,7 @@
try {
Thread.sleep(100); //we don't want to evict too fast, because the processing threads are more than capable of evicting
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30051, e);
}
}
}
@@ -219,7 +219,7 @@
try {
lobManager.updateReferences(list, ReferenceMode.ATTACH);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30052, e);
}
}
}
@@ -625,7 +625,7 @@
try {
batchesFreed.await(100, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30053, e);
}
if (reserveBatchSample >= this.reserveBatchBytes.get()) {
waitCount >>= 3;
@@ -985,9 +985,9 @@
ObjectOutputStream out = new ObjectOutputStream(ostream);
getTupleBufferState(out, buffer);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30054, e);
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30055, e);
}
}
}
@@ -1014,11 +1014,11 @@
ObjectInputStream in = new ObjectInputStream(istream);
setTupleBufferState(state_id, in);
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30056, e);
} catch(ClassNotFoundException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30057, e);
} catch(TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30058, e);
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -204,7 +204,7 @@
*/
public void initialize() throws TeiidComponentException {
if(this.directory == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.no_directory")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30040, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30040));
}
dirFile = new File(this.directory);
@@ -218,10 +218,10 @@
private static void makeDir(File file) throws TeiidComponentException {
if(file.exists()) {
if(! file.isDirectory()) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.not_a_directory", file.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30041, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30041, file.getAbsoluteFile()));
}
} else if(! file.mkdirs()) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.error_creating", file.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30042, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30042, file.getAbsoluteFile()));
}
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,6 +25,7 @@
import org.teiid.common.buffer.BaseCacheEntry;
import org.teiid.common.buffer.CacheKey;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
/**
* Represents the memory buffer and storage state of an object.
@@ -74,7 +75,7 @@
try {
wait();
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30043, e);
}
}
}
@@ -84,7 +85,7 @@
try {
wait();
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30044, e);
}
}
loading = true;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -113,7 +113,7 @@
try {
unwrapped = ((WrappedConnection)connection).unwrap();
} catch (ResourceException e) {
- throw new TranslatorException(QueryPlugin.Util.getString("failed_to_unwrap_connection")); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30480, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30480));
}
}
@@ -255,7 +255,7 @@
}
}
} catch (Exception e) {
- throw new TranslatorException(e, QueryPlugin.Util.getString("connection_factory_not_found", this.connectionName)); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30481, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30481, this.connectionName));
}
}
return null;
@@ -263,7 +263,7 @@
private void checkStatus() throws TeiidComponentException {
if (stopped) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ConnectorManager.not_in_valid_state", this.translatorName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30482, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30482, this.translatorName));
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -192,7 +192,7 @@
public AtomicResultsMessage execute() throws TranslatorException {
if(isCancelled()) {
- throw new TranslatorException("Request canceled"); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30476, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30476));
}
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.requestMsg.getAtomicRequestID(), "Processing NEW request:", this.requestMsg.getCommand()}); //$NON-NLS-1$
@@ -205,7 +205,7 @@
try {
unwrapped = ((WrappedConnection)connection).unwrap();
} catch (ResourceException e) {
- throw new TranslatorException(QueryPlugin.Util.getString("failed_to_unwrap_connection")); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30477, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30477));
}
}
@@ -316,7 +316,7 @@
break;
} else if (this.rowCount > this.requestMsg.getMaxResultRows() && this.requestMsg.isExceptionOnMaxRows()) {
String msg = QueryPlugin.Util.getString("ConnectorWorker.MaxResultRowsExceed", this.requestMsg.getMaxResultRows()); //$NON-NLS-1$
- throw new TranslatorException(msg);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30478, msg);
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/LanguageBridgeFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,16 @@
package org.teiid.dqp.internal.datamgr;
-import java.util.*;
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.RandomAccess;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.client.metadata.ParameterInfo;
@@ -32,32 +41,92 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidRuntimeException;
-import org.teiid.language.*;
+import org.teiid.language.AggregateFunction;
+import org.teiid.language.AndOr;
+import org.teiid.language.Argument;
+import org.teiid.language.Argument.Direction;
+import org.teiid.language.BatchedCommand;
+import org.teiid.language.BatchedUpdates;
+import org.teiid.language.Call;
+import org.teiid.language.ColumnReference;
+import org.teiid.language.Comparison;
+import org.teiid.language.Comparison.Operator;
+import org.teiid.language.Condition;
import org.teiid.language.DerivedColumn;
+import org.teiid.language.DerivedTable;
+import org.teiid.language.Exists;
+import org.teiid.language.ExpressionValueSource;
+import org.teiid.language.In;
+import org.teiid.language.InsertValueSource;
+import org.teiid.language.IsNull;
+import org.teiid.language.Join;
+import org.teiid.language.Like;
+import org.teiid.language.Literal;
+import org.teiid.language.NamedTable;
+import org.teiid.language.Not;
+import org.teiid.language.Parameter;
+import org.teiid.language.QueryExpression;
+import org.teiid.language.SearchedCase;
+import org.teiid.language.SearchedWhenClause;
import org.teiid.language.Select;
-import org.teiid.language.WindowSpecification;
-import org.teiid.language.Argument.Direction;
-import org.teiid.language.Comparison.Operator;
+import org.teiid.language.SortSpecification;
import org.teiid.language.SortSpecification.Ordering;
+import org.teiid.language.SubqueryComparison;
import org.teiid.language.SubqueryComparison.Quantifier;
+import org.teiid.language.SubqueryIn;
+import org.teiid.language.TableReference;
+import org.teiid.language.WindowSpecification;
+import org.teiid.language.With;
+import org.teiid.language.WithItem;
+import org.teiid.metadata.FunctionMethod.PushDown;
import org.teiid.metadata.Procedure;
import org.teiid.metadata.ProcedureParameter;
-import org.teiid.metadata.FunctionMethod.PushDown;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
-import org.teiid.query.sql.lang.*;
+import org.teiid.query.sql.lang.BatchedUpdateCommand;
import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.CompareCriteria;
+import org.teiid.query.sql.lang.CompoundCriteria;
+import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.lang.Delete;
+import org.teiid.query.sql.lang.DependentSetCriteria;
+import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.FromClause;
import org.teiid.query.sql.lang.GroupBy;
import org.teiid.query.sql.lang.Insert;
+import org.teiid.query.sql.lang.IsNullCriteria;
+import org.teiid.query.sql.lang.JoinPredicate;
+import org.teiid.query.sql.lang.JoinType;
import org.teiid.query.sql.lang.Limit;
+import org.teiid.query.sql.lang.MatchCriteria;
+import org.teiid.query.sql.lang.NotCriteria;
import org.teiid.query.sql.lang.OrderBy;
+import org.teiid.query.sql.lang.OrderByItem;
+import org.teiid.query.sql.lang.Query;
+import org.teiid.query.sql.lang.QueryCommand;
+import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.sql.lang.SetClause;
+import org.teiid.query.sql.lang.SetClauseList;
+import org.teiid.query.sql.lang.SetCriteria;
import org.teiid.query.sql.lang.SetQuery;
+import org.teiid.query.sql.lang.StoredProcedure;
+import org.teiid.query.sql.lang.SubqueryCompareCriteria;
+import org.teiid.query.sql.lang.SubqueryFromClause;
+import org.teiid.query.sql.lang.SubquerySetCriteria;
+import org.teiid.query.sql.lang.UnaryFromClause;
import org.teiid.query.sql.lang.Update;
-import org.teiid.query.sql.symbol.*;
+import org.teiid.query.sql.lang.WithQueryCommand;
+import org.teiid.query.sql.symbol.AggregateSymbol;
+import org.teiid.query.sql.symbol.AliasSymbol;
+import org.teiid.query.sql.symbol.Constant;
+import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.ExpressionSymbol;
import org.teiid.query.sql.symbol.Function;
+import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.ScalarSubquery;
+import org.teiid.query.sql.symbol.SearchedCaseExpression;
+import org.teiid.query.sql.symbol.Symbol;
import org.teiid.query.sql.symbol.WindowFunction;
import org.teiid.translator.TranslatorException;
@@ -78,7 +147,7 @@
try {
return tb.getBatch(index+1).getTuple(index+1);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30483, e);
}
}
@@ -102,9 +171,9 @@
try {
nextRow = ts.nextTuple();
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30484, e);
} catch (TeiidProcessingException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30485, e);
}
}
return nextRow != null;
@@ -727,7 +796,7 @@
try {
proc = this.metadataFactory.getProcedure(sp.getGroup().getName());
} catch (TranslatorException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30486, e);
}
}
Class<?> returnType = null;
@@ -778,9 +847,9 @@
try {
group.setMetadataObject(metadataFactory.getGroup(symbol.getMetadataID()));
} catch (QueryMetadataException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30487, e);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30488, e);
}
return group;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -67,7 +67,7 @@
List<?> padRow(List<?> row) throws TranslatorException {
if (row.size() != resultSetCols) {
- throw new TranslatorException(QueryPlugin.Util.getString("ConnectorWorker.ConnectorWorker_result_set_unexpected_columns", new Object[] {proc, new Integer(resultSetCols), new Integer(row.size())})); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30479, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30479, proc, new Integer(resultSetCols), new Integer(row.size())));
}
if (paramCols == 0) {
return row;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/RuntimeMetadataImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/RuntimeMetadataImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/RuntimeMetadataImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -32,7 +32,9 @@
import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.RuntimeMetadata;
import org.teiid.metadata.Table;
-import org.teiid.query.metadata.*;
+import org.teiid.query.QueryPlugin;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.metadata.StoredProcedureInfo;
import org.teiid.query.sql.lang.SPParameter;
import org.teiid.translator.TranslatorException;
@@ -53,9 +55,9 @@
Object metadataId = metadata.getElementID(fullName);
return getElement(metadataId);
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30464, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30465, e);
}
}
@@ -72,9 +74,9 @@
Object groupId = metadata.getGroupID(fullName);
return getGroup(groupId);
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30466, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30467, e);
}
}
@@ -91,9 +93,9 @@
StoredProcedureInfo sp = metadata.getStoredProcedureInfoForProcedure(fullName);
return getProcedure(sp);
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30468, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30469, e);
}
}
@@ -115,9 +117,9 @@
try {
return metadata.getBinaryVDBResource(resourcePath);
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30470, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30471, e);
}
}
@@ -125,9 +127,9 @@
try {
return metadata.getCharacterVDBResource(resourcePath);
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30472, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30473, e);
}
}
@@ -135,9 +137,9 @@
try {
return metadata.getVDBResourcePaths();
} catch (QueryMetadataException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30474, e);
} catch (TeiidComponentException e) {
- throw new TranslatorException(e);
+ throw new TranslatorException(QueryPlugin.Event.TEIID30475, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -76,7 +76,7 @@
try {
ConnectorManager mgr = this.connectorRepo.getConnectorManager(sourceName);
if (mgr == null) {
- throw new TranslatorException(QueryPlugin.Util.getString("CachedFinder.no_connector_found", sourceName, modelName, sourceName)); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Event.TEIID30497, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30497, sourceName, modelName, sourceName));
}
caps = mgr.getCapabilities();
break;
@@ -88,11 +88,11 @@
}
if (exception != null) {
- throw new TeiidComponentException(exception);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30498, exception);
}
if (caps == null) {
- throw new TeiidRuntimeException("No sources were given for the model " + modelName); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30499, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30499, modelName));
}
userCache.put(modelName, caps);
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -502,7 +502,7 @@
RequestWorkItem getRequestWorkItem(RequestID reqID) throws TeiidProcessingException {
RequestWorkItem result = this.requests.get(reqID);
if (result == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("DQPCore.The_request_has_been_closed.", reqID));//$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30495, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30495, reqID));
}
return result;
}
@@ -662,7 +662,7 @@
try {
this.bufferManager.initialize();
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30496, e);
}
this.userRequestSourceConcurrency = config.getUserRequestSourceConcurrency();
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -135,7 +135,7 @@
public static int getLevel(String level) throws TeiidProcessingException {
Integer intLevel = levelMap.get(level);
if (intLevel == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("FunctionMethods.unknown_level", level, levelMap.keySet())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30546, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30546, level, levelMap.keySet()));
}
return intLevel;
}
@@ -320,7 +320,7 @@
try {
clobValue = new ClobType(new SerialClob(value.toCharArray()));
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30547, e);
}
}
rows.add(Arrays.asList(entry.getKey(), entry.getValue(), record.getUUID(), oid++, clobValue));
@@ -410,13 +410,13 @@
String result = null;
if (value != null) {
if (value.length() > MAX_VALUE_LENGTH) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("DataTierManagerImpl.max_value_length", MAX_VALUE_LENGTH)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30548, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30548, MAX_VALUE_LENGTH));
}
strVal = ObjectConverterUtil.convertToString(value.getCharacterStream());
}
AbstractMetadataRecord target = getByUuid(metadata, uuid);
if (target == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("DataTierManagerImpl.unknown_uuid", uuid)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30549, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30549, uuid));
}
if (this.metadataRepository != null) {
this.metadataRepository.setProperty(vdbName, vdbVersion, target, key, strVal);
@@ -434,9 +434,9 @@
}
return new CollectionTupleSource(rows.iterator());
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30550, e);
} catch (IOException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30551, e);
}
}
Table table = indexMetadata.getGroupID((String)((Constant)proc.getParameter(1).getExpression()).getValue());
@@ -451,7 +451,7 @@
}
}
if (c == null) {
- throw new TeiidProcessingException(columnName + TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30552, columnName + TransformationMetadata.NOT_EXISTS_MESSAGE);
}
Integer distinctVals = (Integer)((Constant)proc.getParameter(3).getExpression()).getValue();
Integer nullVals = (Integer)((Constant)proc.getParameter(4).getExpression()).getValue();
@@ -497,7 +497,7 @@
rows.add(Arrays.asList(new XMLType(schema)));
}
} catch (QueryMetadataException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30553, e);
}
break;
}
@@ -571,7 +571,7 @@
List<String> bindings = model.getSourceNames();
if (bindings == null || bindings.size() != 1) {
// this should not happen, but it did occur when setting up the SystemAdmin models
- throw new TeiidComponentException(QueryPlugin.Util.getString("DataTierManager.could_not_obtain_connector_binding", new Object[]{modelName, workItem.getDqpWorkContext().getVdbName(), workItem.getDqpWorkContext().getVdbVersion() })); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30554, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30554, modelName, workItem.getDqpWorkContext().getVdbName(), workItem.getDqpWorkContext().getVdbVersion()));
}
connectorBindingId = bindings.get(0);
Assertion.isNotNull(connectorBindingId, "could not obtain connector id"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -58,6 +58,7 @@
import org.teiid.dqp.message.AtomicResultsMessage;
import org.teiid.events.EventDistributor;
import org.teiid.metadata.Table;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.source.XMLSystemFunctions;
import org.teiid.query.processor.relational.RelationalNodeUtil;
import org.teiid.query.sql.lang.BatchedUpdateCommand;
@@ -188,7 +189,7 @@
try {
ObjectConverterUtil.write(fsisf.getOuputStream(), ((DataSource)value).getInputStream(), -1);
} catch (IOException e) {
- throw new TransformationException(e, e.getMessage());
+ throw new TransformationException(QueryPlugin.Event.TEIID30500, e, e.getMessage());
}
return new BlobType(new BlobImpl(fsisf));
}
@@ -201,9 +202,9 @@
try {
sqlxml = XMLSystemFunctions.saveToBufferManager(dtm.getBufferManager(), sxt);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30501, e);
} catch (TeiidProcessingException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30502, e);
}
return new XMLType(sqlxml);
}
@@ -310,7 +311,7 @@
addWork();
}
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30503, e);
} catch (ExecutionException e) {
if (e.getCause() instanceof TeiidProcessingException) {
throw (TeiidProcessingException)e.getCause();
@@ -413,7 +414,7 @@
if (exception.getCause() instanceof TeiidProcessingException) {
throw (TeiidProcessingException)exception.getCause();
}
- throw new TeiidProcessingException(exception, this.getConnectorName() + ": " + exception.getMessage()); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30504, exception, this.getConnectorName() + ": " + exception.getMessage()); //$NON-NLS-1$
}
void receiveResults(AtomicResultsMessage response) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/MetaDataProcessor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -44,6 +44,7 @@
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
import org.teiid.dqp.message.RequestID;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -57,6 +58,7 @@
import org.teiid.query.sql.lang.SPParameter;
import org.teiid.query.sql.lang.StoredProcedure;
import org.teiid.query.sql.symbol.AggregateSymbol;
+import org.teiid.query.sql.symbol.AggregateSymbol.Type;
import org.teiid.query.sql.symbol.AliasSymbol;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
@@ -65,7 +67,6 @@
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.symbol.Symbol;
import org.teiid.query.sql.symbol.WindowFunction;
-import org.teiid.query.sql.symbol.AggregateSymbol.Type;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
import org.teiid.query.tempdata.TempTableStore;
@@ -225,7 +226,7 @@
try {
columnMetadata[i] = createColumnMetadata(shortColumnName, symbol);
} catch(QueryMetadataException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30559, e);
}
}
return columnMetadata;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -187,7 +187,7 @@
TeiidComponentException, QueryResolverException, QueryPlannerException, QueryValidatorException {
List<List<?>> paramValues = (List<List<?>>) requestMsg.getParameterValues();
if (paramValues.isEmpty()) {
- throw new QueryValidatorException("No batch values sent for prepared batch update"); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30555, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30555));
}
boolean supportPreparedBatchUpdate = false;
Command command = null;
@@ -261,7 +261,7 @@
//the size of the values must be the same as that of the parameters
if (params.size() != values.size()) {
String msg = QueryPlugin.Util.getString("QueryUtil.wrong_number_of_values", new Object[] {new Integer(values.size()), new Integer(params.size())}); //$NON-NLS-1$
- throw new QueryResolverException(msg);
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30556, msg);
}
//the type must be the same, or the type of the value can be implicitly converted
@@ -277,10 +277,10 @@
value = Evaluator.evaluate(expr);
} catch (ExpressionEvaluationException e) {
String msg = QueryPlugin.Util.getString("QueryUtil.Error_executing_conversion_function_to_convert_value", new Integer(i + 1), value, DataTypeManager.getDataTypeName(param.getType())); //$NON-NLS-1$
- throw new QueryResolverException(msg);
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30557, msg);
} catch (QueryResolverException e) {
String msg = QueryPlugin.Util.getString("QueryUtil.Error_executing_conversion_function_to_convert_value", new Integer(i + 1), value, DataTypeManager.getDataTypeName(param.getType())); //$NON-NLS-1$
- throw new QueryResolverException(msg);
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30558, msg);
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -189,7 +189,7 @@
globalTables = vdbMetadata.getAttachment(GlobalTableStore.class);
if (metadata == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}", this.vdbName, this.vdbVersion)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30489, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30489, this.vdbName, this.vdbVersion));
}
// Check for multi-source models and further wrap the metadata interface
@@ -209,7 +209,7 @@
this.returnsUpdateCount = !(command instanceof StoredProcedure) && !returnsResultSet;
if ((this.requestMsg.getResultsMode() == ResultsMode.UPDATECOUNT && !returnsUpdateCount)
|| (this.requestMsg.getResultsMode() == ResultsMode.RESULTSET && !returnsResultSet)) {
- throw new QueryValidatorException(QueryPlugin.Util.getString(this.requestMsg.getResultsMode()==ResultsMode.RESULTSET?"Request.no_result_set":"Request.result_set")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30490, QueryPlugin.Util.getString(this.requestMsg.getResultsMode()==ResultsMode.RESULTSET?"Request.no_result_set":"Request.result_set")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Create command context, used in rewriting, planning, and processing
@@ -275,7 +275,7 @@
static void referenceCheck(List<Reference> references) throws QueryValidatorException {
if (references != null && !references.isEmpty()) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("Request.Invalid_character_in_query")); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30491, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30491));
}
}
@@ -326,7 +326,7 @@
ValidatorReport report = Validator.validate(command, metadata, visitor);
if (report.hasItems()) {
ValidatorFailure firstFailure = report.getItems().iterator().next();
- throw new QueryValidatorException(firstFailure.getMessage());
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30492, firstFailure.getMessage());
}
}
@@ -353,7 +353,7 @@
try {
transactionService.begin(tc);
} catch (XATransactionException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30493, err);
}
}
}
@@ -440,7 +440,7 @@
}
LogManager.logDetail(LogConstants.CTX_DQP, new Object[] { QueryPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
} catch (QueryMetadataException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.", requestId)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30494, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30494, requestId));
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -45,6 +45,7 @@
import org.teiid.common.buffer.TupleBatch;
import org.teiid.common.buffer.TupleBuffer;
import org.teiid.common.buffer.BufferManager.TupleSourceType;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
@@ -231,7 +232,7 @@
try {
requestCancel();
} catch (TeiidComponentException e1) {
- throw new TeiidRuntimeException(e1);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30543, e1);
}
}
}
@@ -319,7 +320,7 @@
}
private void setCanceledException() {
- this.processingException = new TeiidProcessingException(SQLStates.QUERY_CANCELED, QueryPlugin.Util.getString("QueryProcessor.request_cancelled", this.requestID)); //$NON-NLS-1$
+ this.processingException = new TeiidProcessingException(QueryPlugin.Event.TEIID30563, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30563, this.requestID));
}
private void handleThrowable(Throwable e) {
@@ -762,7 +763,7 @@
return exception;
}
}
- return new TeiidProcessingException(exception, SQLStates.QUERY_CANCELED, exception.getMessage());
+ return new TeiidProcessingException(exception, SQLStates.QUERY_CANCELED);
}
private static List<ParameterInfo> getParameterInfo(StoredProcedure procedure) {
@@ -819,7 +820,7 @@
try {
transactionService.cancelTransactions(requestID.getConnectionID(), true);
} catch (XATransactionException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30544, err);
}
}
} finally {
@@ -893,7 +894,7 @@
Command getOriginalCommand() throws TeiidProcessingException {
if (this.originalCommand == null) {
if (this.processingException != null) {
- throw new TeiidProcessingException(this.processingException);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30545, this.processingException);
}
throw new IllegalStateException("Original command is not available"); //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -136,7 +136,7 @@
public int prepare(final String threadId, XidImpl xid, boolean singleTM) throws XATransactionException {
TransactionContext tc = checkXAState(threadId, xid, true, false);
if (!tc.getSuspendedBy().isEmpty()) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.suspended_exist", xid)); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30505, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30505, xid));
}
// In the container this pass though
@@ -147,7 +147,7 @@
try {
return this.xaTerminator.prepare(tc.getXid());
} catch (XAException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30506, e);
}
}
@@ -163,7 +163,7 @@
//TODO: we have no way of knowing for sure if we can safely use the onephase optimization
this.xaTerminator.commit(tc.getXid(), false);
} catch (XAException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30507, e);
} finally {
this.transactions.removeTransactionContext(tc);
}
@@ -180,7 +180,7 @@
this.xaTerminator.rollback(tc.getXid());
}
} catch (XAException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30508, e);
} finally {
this.transactions.removeTransactionContext(tc);
}
@@ -198,7 +198,7 @@
try {
return this.xaTerminator.recover(flag);
} catch (XAException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30509, e);
}
}
@@ -213,7 +213,7 @@
}
this.xaTerminator.forget(xid);
} catch (XAException err) {
- throw new XATransactionException(err);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30510, err);
} finally {
this.transactions.removeTransactionContext(tc);
}
@@ -232,7 +232,7 @@
checkXAState(threadId, xid, false, false);
tc = transactions.getOrCreateTransactionContext(threadId);
if (tc.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30511, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30511));
}
tc.setTransactionTimeout(timeout);
tc.setXid(xid);
@@ -251,15 +251,15 @@
tc.setTransaction(work.get());
}
} catch (NotSupportedException e) {
- throw new XATransactionException(e, XAException.XAER_INVAL);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30512, XAException.XAER_INVAL, e);
} catch (WorkException e) {
- throw new XATransactionException(e, XAException.XAER_INVAL);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30513, XAException.XAER_INVAL, e);
} catch (InterruptedException e) {
- throw new XATransactionException(e, XAException.XAER_INVAL);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30514, XAException.XAER_INVAL, e);
} catch (ExecutionException e) {
- throw new XATransactionException(e, XAException.XAER_INVAL);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30515, XAException.XAER_INVAL, e);
} catch (SystemException e) {
- throw new XATransactionException(e, XAException.XAER_INVAL);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30516, XAException.XAER_INVAL, e);
}
break;
}
@@ -268,16 +268,16 @@
tc = checkXAState(threadId, xid, true, false);
TransactionContext threadContext = transactions.getOrCreateTransactionContext(threadId);
if (threadContext.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30517, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30517));
}
if (flags == XAResource.TMRESUME && !tc.getSuspendedBy().remove(threadId)) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.resume_failed", new Object[] {xid, threadId})); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30518, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30518, new Object[] {xid, threadId}));
}
break;
}
default:
- throw new XATransactionException(XAException.XAER_INVAL, QueryPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30519, XAException.XAER_INVAL, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30519));
}
tc.setThreadId(threadId);
@@ -304,7 +304,7 @@
break;
}
default:
- throw new XATransactionException(XAException.XAER_INVAL, QueryPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30520, XAException.XAER_INVAL, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30520));
}
} finally {
tc.setThreadId(null);
@@ -316,15 +316,15 @@
TransactionContext tc = transactions.getTransactionContext(xid);
if (transactionExpected && tc == null) {
- throw new XATransactionException(XAException.XAER_NOTA, QueryPlugin.Util.getString("TransactionServer.no_global_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30521, XAException.XAER_NOTA, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30521, xid));
} else if (!transactionExpected) {
if (tc != null) {
- throw new XATransactionException(XAException.XAER_DUPID, QueryPlugin.Util.getString("TransactionServer.existing_global_transaction", new Object[] {xid})); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30522, XAException.XAER_DUPID, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30522, new Object[] {xid}));
}
if (!threadBound) {
tc = transactions.getOrCreateTransactionContext(threadId);
if (tc.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction", new Object[] {xid, threadId})); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30523, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30523, new Object[] {xid, threadId}));
}
}
return null;
@@ -332,10 +332,10 @@
if (threadBound) {
if (!threadId.equals(tc.getThreadId())) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.wrong_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30524, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30524, xid));
}
} else if (tc.getThreadId() != null) {
- throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.concurrent_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30525, XAException.XAER_PROTO, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30525, xid));
}
return tc;
@@ -359,9 +359,9 @@
throw new InvalidTransactionException(QueryPlugin.Util.getString("TransactionServer.no_transaction", threadId)); //$NON-NLS-1$
}
} catch (InvalidTransactionException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30526, e);
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30527, e);
}
return tc;
}
@@ -373,9 +373,9 @@
tc.setTransaction(tx);
tc.setCreationTime(System.currentTimeMillis());
} catch (javax.transaction.NotSupportedException err) {
- throw new XATransactionException(err);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30528, err);
} catch (SystemException err) {
- throw new XATransactionException(err);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30529, err);
}
}
@@ -384,15 +384,15 @@
try {
transactionManager.commit();
} catch (SecurityException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30530, e);
} catch (RollbackException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30531, e);
} catch (HeuristicMixedException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30532, e);
} catch (HeuristicRollbackException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30533, e);
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30534, e);
} finally {
transactions.removeTransactionContext(context);
}
@@ -403,9 +403,9 @@
try {
this.transactionManager.rollback();
} catch (SecurityException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30535, e);
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30536, e);
} finally {
transactions.removeTransactionContext(tc);
}
@@ -415,7 +415,7 @@
try {
this.transactionManager.suspend();
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30537, e);
}
}
@@ -423,9 +423,9 @@
try {
this.transactionManager.resume(context.getTransaction());
} catch (InvalidTransactionException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30538, e);
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30539, e);
}
}
@@ -464,7 +464,7 @@
*/
public void begin(TransactionContext context) throws XATransactionException{
if (context.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Event.TEIID30540, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30540));
}
beginDirect(context);
context.setTransactionType(TransactionContext.Scope.REQUEST);
@@ -497,7 +497,7 @@
try {
tc.getTransaction().setRollbackOnly();
} catch (SystemException e) {
- throw new XATransactionException(e);
+ throw new XATransactionException(QueryPlugin.Event.TEIID30541, e);
}
}
@@ -531,7 +531,7 @@
try {
cancelTransactions(threadId, false);
} catch (XATransactionException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(QueryPlugin.Event.TEIID30542, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/multisource/MultiSourcePlanToProcessConverter.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -109,7 +109,7 @@
try {
return multiSourceModify((AccessNode)node);
} catch (TeiidProcessingException e) {
- throw new QueryPlannerException(e, e.getMessage());
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30560, e, e.getMessage());
}
} else if (node instanceof ProjectIntoNode) {
throw new AssertionError("Multisource insert with query expression not allowed not allowed, should have been caught in validation."); //$NON-NLS-1$
@@ -170,7 +170,7 @@
}
if (hasOutParams && accessNodes.size() != 1) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("MultiSource.out_procedure", accessNode.getCommand())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30561, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30561, accessNode.getCommand()));
}
switch(accessNodes.size()) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/service/SessionServiceException.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/service/SessionServiceException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/dqp/service/SessionServiceException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -23,10 +23,13 @@
package org.teiid.dqp.service;
import org.teiid.client.security.TeiidSecurityException;
+import org.teiid.core.BundleUtil;
public class SessionServiceException extends TeiidSecurityException {
- /**
+ private static final long serialVersionUID = 7354291430587008894L;
+
+ /**
* No-Arg Constructor
*/
public SessionServiceException( ) {
@@ -64,9 +67,10 @@
* @param message The error message
* @param code The error code
*/
- public SessionServiceException( String code, String message ) {
- super( code, message );
+ public SessionServiceException(BundleUtil.Event code, String message ) {
+ super(code, message );
}
+
/**
* Construct an instance with a linked exception, and an error code and
* message, specified.
@@ -75,7 +79,7 @@
* @param message The error message
* @param code The error code
*/
- public SessionServiceException( Throwable e, String code, String message ) {
- super( e, code, message );
+ public SessionServiceException(BundleUtil.Event code, Throwable e, String message ) {
+ super(code, e, message );
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -75,7 +75,541 @@
TEIID30029, // unexpected format
TEIID30030, // unexpected exp1
TEIID30031, // unexpected exp2
- TEIID30032, // invalid collation locale
- TEIID30033, // using collation locale
+ TEIID30032,
+ TEIID30033,
+ TEIID30034,
+ TEIID30035,
+ TEIID30036,
+ TEIID30037,
+ TEIID30038,
+ TEIID30039,
+ TEIID30040,
+ TEIID30041,
+ TEIID30042,
+ TEIID30043,
+ TEIID30044,
+ TEIID30045,
+ TEIID30046,
+ TEIID30047,
+ TEIID30048,
+ TEIID30049,
+ TEIID30050,
+ TEIID30051,
+ TEIID30052,
+ TEIID30053,
+ TEIID30054,
+ TEIID30055,
+ TEIID30056,
+ TEIID30057,
+ TEIID30058,
+ TEIID30059,
+ TEIID30060,
+ TEIID30061,
+ TEIID30062,
+ TEIID30063,
+ TEIID30064,
+ TEIID30065,
+ TEIID30066,
+ TEIID30067,
+ TEIID30068,
+ TEIID30069,
+ TEIID30070,
+ TEIID30071,
+ TEIID30072,
+ TEIID30073,
+ TEIID30074,
+ TEIID30075,
+ TEIID30076,
+ TEIID30077,
+ TEIID30078,
+ TEIID30079,
+ TEIID30080,
+ TEIID30081,
+ TEIID30082,
+ TEIID30083,
+ TEIID30084,
+ TEIID30085,
+ TEIID30086,
+ TEIID30087,
+ TEIID30088,
+ TEIID30089,
+ TEIID30090,
+ TEIID30091,
+ TEIID30092,
+ TEIID30093,
+ TEIID30094,
+ TEIID30095,
+ TEIID30096,
+ TEIID30097,
+ TEIID30098,
+ TEIID30099,
+ TEIID30100,
+ TEIID30101,
+ TEIID30102,
+ TEIID30103,
+ TEIID30104,
+ TEIID30105,
+ TEIID30106,
+ TEIID30107,
+ TEIID30108,
+ TEIID30109,
+ TEIID30110,
+ TEIID30111,
+ TEIID30112,
+ TEIID30113,
+ TEIID30114,
+ TEIID30115,
+ TEIID30116,
+ TEIID30117,
+ TEIID30118,
+ TEIID30119,
+ TEIID30120,
+ TEIID30121,
+ TEIID30122,
+ TEIID30123,
+ TEIID30124,
+ TEIID30125,
+ TEIID30126,
+ TEIID30127,
+ TEIID30128,
+ TEIID30129,
+ TEIID30130,
+ TEIID30131,
+ TEIID30132,
+ TEIID30133,
+ TEIID30134,
+ TEIID30135,
+ TEIID30136,
+ TEIID30137,
+ TEIID30138,
+ TEIID30139,
+ TEIID30140,
+ TEIID30141,
+ TEIID30142,
+ TEIID30143,
+ TEIID30144,
+ TEIID30145,
+ TEIID30146,
+ TEIID30147,
+ TEIID30148,
+ TEIID30149,
+ TEIID30150,
+ TEIID30151,
+ TEIID30152,
+ TEIID30153,
+ TEIID30154,
+ TEIID30155,
+ TEIID30156,
+ TEIID30157,
+ TEIID30158,
+ TEIID30159,
+ TEIID30160,
+ TEIID30161,
+ TEIID30162,
+ TEIID30163,
+ TEIID30164,
+ TEIID30165,
+ TEIID30166,
+ TEIID30167,
+ TEIID30168,
+ TEIID30169,
+ TEIID30170,
+ TEIID30171,
+ TEIID30172,
+ TEIID30173,
+ TEIID30174,
+ TEIID30175,
+ TEIID30176,
+ TEIID30177,
+ TEIID30178,
+ TEIID30179,
+ TEIID30180,
+ TEIID30181,
+ TEIID30182,
+ TEIID30183,
+ TEIID30184,
+ TEIID30185,
+ TEIID30186,
+ TEIID30187,
+ TEIID30188,
+ TEIID30189,
+ TEIID30190,
+ TEIID30191,
+ TEIID30192,
+ TEIID30193,
+ TEIID30194,
+ TEIID30195,
+ TEIID30196,
+ TEIID30197,
+ TEIID30198,
+ TEIID30199,
+ TEIID30200,
+ TEIID30201,
+ TEIID30202,
+ TEIID30203,
+ TEIID30204,
+ TEIID30205,
+ TEIID30206,
+ TEIID30207,
+ TEIID30208,
+ TEIID30209,
+ TEIID30210,
+ TEIID30211,
+ TEIID30212,
+ TEIID30213,
+ TEIID30214,
+ TEIID30215,
+ TEIID30216,
+ TEIID30217,
+ TEIID30218,
+ TEIID30219,
+ TEIID30220,
+ TEIID30221,
+ TEIID30222,
+ TEIID30223,
+ TEIID30224,
+ TEIID30225,
+ TEIID30226,
+ TEIID30227,
+ TEIID30228,
+ TEIID30229,
+ TEIID30230,
+ TEIID30231,
+ TEIID30232,
+ TEIID30233,
+ TEIID30234,
+ TEIID30235,
+ TEIID30236,
+ TEIID30237,
+ TEIID30238,
+ TEIID30239,
+ TEIID30240,
+ TEIID30241,
+ TEIID30242,
+ TEIID30243,
+ TEIID30244,
+ TEIID30245,
+ TEIID30246,
+ TEIID30247,
+ TEIID30248,
+ TEIID30249,
+ TEIID30250,
+ TEIID30251,
+ TEIID30252,
+ TEIID30253,
+ TEIID30254,
+ TEIID30255,
+ TEIID30256,
+ TEIID30257,
+ TEIID30258,
+ TEIID30259,
+ TEIID30260,
+ TEIID30261,
+ TEIID30262,
+ TEIID30263,
+ TEIID30264,
+ TEIID30265,
+ TEIID30266,
+ TEIID30267,
+ TEIID30268,
+ TEIID30269,
+ TEIID30270,
+ TEIID30271,
+ TEIID30272,
+ TEIID30273,
+ TEIID30274,
+ TEIID30275,
+ TEIID30276,
+ TEIID30277,
+ TEIID30278,
+ TEIID30279,
+ TEIID30280,
+ TEIID30281,
+ TEIID30282,
+ TEIID30283,
+ TEIID30284,
+ TEIID30285,
+ TEIID30286,
+ TEIID30287,
+ TEIID30288,
+ TEIID30289,
+ TEIID30290,
+ TEIID30291,
+ TEIID30292,
+ TEIID30293,
+ TEIID30294,
+ TEIID30295,
+ TEIID30296,
+ TEIID30297,
+ TEIID30298,
+ TEIID30299,
+ TEIID30300,
+ TEIID30301,
+ TEIID30302,
+ TEIID30303,
+ TEIID30304,
+ TEIID30305,
+ TEIID30306,
+ TEIID30307,
+ TEIID30308,
+ TEIID30309,
+ TEIID30310,
+ TEIID30311,
+ TEIID30312,
+ TEIID30313,
+ TEIID30314,
+ TEIID30315,
+ TEIID30316,
+ TEIID30317,
+ TEIID30318,
+ TEIID30319,
+ TEIID30320,
+ TEIID30321,
+ TEIID30322,
+ TEIID30323,
+ TEIID30324,
+ TEIID30325,
+ TEIID30326,
+ TEIID30327,
+ TEIID30328,
+ TEIID30329,
+ TEIID30330,
+ TEIID30331,
+ TEIID30332,
+ TEIID30333,
+ TEIID30334,
+ TEIID30335,
+ TEIID30336,
+ TEIID30337,
+ TEIID30338,
+ TEIID30339,
+ TEIID30340,
+ TEIID30341,
+ TEIID30342,
+ TEIID30343,
+ TEIID30344,
+ TEIID30345,
+ TEIID30346,
+ TEIID30347,
+ TEIID30348,
+ TEIID30349,
+ TEIID30350,
+ TEIID30351,
+ TEIID30352,
+ TEIID30353,
+ TEIID30354,
+ TEIID30355,
+ TEIID30356,
+ TEIID30357,
+ TEIID30358,
+ TEIID30359,
+ TEIID30360,
+ TEIID30361,
+ TEIID30362,
+ TEIID30363,
+ TEIID30364,
+ TEIID30365,
+ TEIID30366,
+ TEIID30367,
+ TEIID30368,
+ TEIID30369,
+ TEIID30370,
+ TEIID30371,
+ TEIID30372,
+ TEIID30373,
+ TEIID30374,
+ TEIID30375,
+ TEIID30376,
+ TEIID30377,
+ TEIID30378,
+ TEIID30379,
+ TEIID30380,
+ TEIID30381,
+ TEIID30382,
+ TEIID30383,
+ TEIID30384,
+ TEIID30385,
+ TEIID30386,
+ TEIID30387,
+ TEIID30388,
+ TEIID30389,
+ TEIID30390,
+ TEIID30391,
+ TEIID30392,
+ TEIID30393,
+ TEIID30394,
+ TEIID30395,
+ TEIID30396,
+ TEIID30397,
+ TEIID30398,
+ TEIID30399,
+ TEIID30400,
+ TEIID30401,
+ TEIID30402,
+ TEIID30403,
+ TEIID30404,
+ TEIID30405,
+ TEIID30406,
+ TEIID30407,
+ TEIID30408,
+ TEIID30409,
+ TEIID30410,
+ TEIID30411,
+ TEIID30412,
+ TEIID30413,
+ TEIID30414,
+ TEIID30415,
+ TEIID30416,
+ TEIID30417,
+ TEIID30418,
+ TEIID30419,
+ TEIID30420,
+ TEIID30421,
+ TEIID30422,
+ TEIID30423,
+ TEIID30424,
+ TEIID30425,
+ TEIID30426,
+ TEIID30427,
+ TEIID30428,
+ TEIID30429,
+ TEIID30430,
+ TEIID30431,
+ TEIID30432,
+ TEIID30433,
+ TEIID30434,
+ TEIID30435,
+ TEIID30436,
+ TEIID30437,
+ TEIID30438,
+ TEIID30439,
+ TEIID30440,
+ TEIID30441,
+ TEIID30442,
+ TEIID30443,
+ TEIID30444,
+ TEIID30445,
+ TEIID30446,
+ TEIID30447,
+ TEIID30448,
+ TEIID30449,
+ TEIID30450,
+ TEIID30451,
+ TEIID30452,
+ TEIID30453,
+ TEIID30454,
+ TEIID30455,
+ TEIID30456,
+ TEIID30457,
+ TEIID30458,
+ TEIID30459,
+ TEIID30460,
+ TEIID30461,
+ TEIID30462,
+ TEIID30463,
+ TEIID30464,
+ TEIID30465,
+ TEIID30466,
+ TEIID30467,
+ TEIID30468,
+ TEIID30469,
+ TEIID30470,
+ TEIID30471,
+ TEIID30472,
+ TEIID30473,
+ TEIID30474,
+ TEIID30475,
+ TEIID30476,
+ TEIID30477,
+ TEIID30478,
+ TEIID30479,
+ TEIID30480,
+ TEIID30481,
+ TEIID30482,
+ TEIID30483,
+ TEIID30484,
+ TEIID30485,
+ TEIID30486,
+ TEIID30487,
+ TEIID30488,
+ TEIID30489,
+ TEIID30490,
+ TEIID30491,
+ TEIID30492,
+ TEIID30493,
+ TEIID30494,
+ TEIID30495,
+ TEIID30496,
+ TEIID30497,
+ TEIID30498,
+ TEIID30499,
+ TEIID30500,
+ TEIID30501,
+ TEIID30502,
+ TEIID30503,
+ TEIID30504,
+ TEIID30505,
+ TEIID30506,
+ TEIID30507,
+ TEIID30508,
+ TEIID30509,
+ TEIID30510,
+ TEIID30511,
+ TEIID30512,
+ TEIID30513,
+ TEIID30514,
+ TEIID30515,
+ TEIID30516,
+ TEIID30517,
+ TEIID30518,
+ TEIID30519,
+ TEIID30520,
+ TEIID30521,
+ TEIID30522,
+ TEIID30523,
+ TEIID30524,
+ TEIID30525,
+ TEIID30526,
+ TEIID30527,
+ TEIID30528,
+ TEIID30529,
+ TEIID30530,
+ TEIID30531,
+ TEIID30532,
+ TEIID30533,
+ TEIID30534,
+ TEIID30535,
+ TEIID30536,
+ TEIID30537,
+ TEIID30538,
+ TEIID30539,
+ TEIID30540,
+ TEIID30541,
+ TEIID30542,
+ TEIID30543,
+ TEIID30544,
+ TEIID30545,
+ TEIID30546,
+ TEIID30547,
+ TEIID30548,
+ TEIID30549,
+ TEIID30550,
+ TEIID30551,
+ TEIID30552,
+ TEIID30553,
+ TEIID30554,
+ TEIID30555,
+ TEIID30556,
+ TEIID30557,
+ TEIID30558,
+ TEIID30559,
+ TEIID30560,
+ TEIID30561,
+ TEIID30562,
+ TEIID30563,
+ TEIID30564,
+ TEIID30565,
+ TEIID30574,
+
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -103,7 +103,7 @@
try {
QueryResult.serialize(row, result, SaxonXQueryExpression.DEFAULT_OUTPUT_PROPERTIES);
} catch (XPathException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30310, e);
}
}
}
@@ -223,7 +223,7 @@
} else if (criteria instanceof ExpressionCriteria) {
return (Boolean)evaluate(((ExpressionCriteria)criteria).getExpression(), tuple);
} else {
- throw new ExpressionEvaluationException("ERR.015.006.0010", QueryPlugin.Util.getString("ERR.015.006.0010", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30311, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30311, criteria));
}
}
@@ -273,7 +273,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[] {"left", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30312, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30312, "left", criteria)); //$NON-NLS-1$
}
// Shortcut if null
@@ -286,7 +286,7 @@
try {
rightValue = evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30313, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30313, "right", criteria)); //$NON-NLS-1$
}
// Shortcut if null
@@ -307,7 +307,7 @@
try {
value = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"left", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30315, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30315, "left", criteria)); //$NON-NLS-1$
}
// Shortcut if null
@@ -323,7 +323,7 @@
try {
leftValue = ((Sequencable)value).getCharSequence();
} catch (SQLException err) {
- throw new ExpressionEvaluationException(err, err.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30316, err, err.getMessage());
}
}
@@ -332,7 +332,7 @@
try {
rightValue = (String) evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30317, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30317, "right", criteria)); //$NON-NLS-1$
}
// Shortcut if null
@@ -375,7 +375,7 @@
try {
leftValue = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30318, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30318, criteria));
}
// Shortcut if null
@@ -406,7 +406,7 @@
try {
values = vis.getCachedSet(ref.getValueExpression());
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30319, e, e.getMessage());
}
if (values != null) {
return values.contains(leftValue);
@@ -419,7 +419,7 @@
try {
valueIter = evaluateSubquery((SubquerySetCriteria)criteria, tuple);
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30320, e, e.getMessage());
}
} else {
throw new AssertionError("unknown set criteria type"); //$NON-NLS-1$
@@ -431,7 +431,7 @@
try {
value = evaluate((Expression) possibleValue, tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", possibleValue)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30321, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30321, possibleValue));
}
} else {
value = possibleValue;
@@ -461,7 +461,7 @@
try {
value = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30322, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30322, criteria));
}
return (value == null ^ criteria.isNegated());
@@ -475,7 +475,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30323, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30323, criteria));
}
// Shortcut if null
@@ -497,7 +497,7 @@
try {
valueIter = evaluateSubquery(criteria, tuple);
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30324, e, e.getMessage());
}
while(valueIter.hasNext()) {
Object value = valueIter.next();
@@ -517,7 +517,7 @@
}
break;
default:
- throw new ExpressionEvaluationException("ERR.015.006.0057", QueryPlugin.Util.getString("ERR.015.006.0057", criteria.getPredicateQuantifier())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30326, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30326, criteria.getPredicateQuantifier()));
}
} else { // value is null
@@ -567,7 +567,7 @@
try {
valueIter = evaluateSubquery(criteria, tuple);
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30327, e, e.getMessage());
}
if(valueIter.hasNext()) {
return !criteria.isNegated();
@@ -581,7 +581,7 @@
try {
return internalEvaluate(expression, tuple);
} catch (ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, QueryPlugin.Util.getString("ExpressionEvaluator.Eval_failed", new Object[] {expression, e.getMessage()})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30328, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30328, new Object[] {expression, e.getMessage()}));
}
}
@@ -641,7 +641,7 @@
} else if (expression instanceof XMLParse){
return evaluateXMLParse(tuple, (XMLParse)expression);
} else {
- throw new TeiidComponentException("ERR.015.006.0016", QueryPlugin.Util.getString("ERR.015.006.0016", expression.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30329, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30329, expression.getClass().getName()));
}
}
@@ -672,9 +672,9 @@
}
}
} catch (TransformationException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30330, e, e.getMessage());
} catch (SQLException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30331, e, e.getMessage());
}
if (!xp.isDocument()) {
type = Type.CONTENT;
@@ -767,9 +767,9 @@
}
return xmlQuery.getXQueryExpression().createXMLType(result.iter, this.context.getBufferManager(), emptyOnEmpty);
} catch (TeiidProcessingException e) {
- throw new FunctionExecutionException(e, QueryPlugin.Util.getString("Evaluator.xmlquery", e.getMessage())); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30332, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30332, e.getMessage()));
} catch (XPathException e) {
- throw new FunctionExecutionException(e, QueryPlugin.Util.getString("Evaluator.xmlquery", e.getMessage())); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30333, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30333, e.getMessage()));
} finally {
if (result != null) {
result.close();
@@ -796,11 +796,11 @@
return serialize(xs, value);
}
} catch (SQLException e) {
- throw new FunctionExecutionException(e, e.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30334, e);
} catch (TransformationException e) {
- throw new FunctionExecutionException(e, e.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30335, e);
}
- throw new FunctionExecutionException(QueryPlugin.Util.getString("Evaluator.xmlserialize")); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30336, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30336));
}
private Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
@@ -822,7 +822,7 @@
}
}, function.getDelimiter(), function.getQuote());
} catch (TransformationException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30337, e, e.getMessage());
}
}
@@ -835,7 +835,7 @@
try {
return XMLSystemFunctions.xmlForest(context, namespaces(function.getNamespaces()), nameValuePairs);
} catch (TeiidProcessingException e) {
- throw new FunctionExecutionException(e, e.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30338, e, e.getMessage());
}
}
@@ -854,7 +854,7 @@
}
return XMLSystemFunctions.xmlElement(context, function.getName(), namespaces(function.getNamespaces()), attributes, values);
} catch (TeiidProcessingException e) {
- throw new FunctionExecutionException(e, e.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30339, e, e.getMessage());
}
}
@@ -937,7 +937,7 @@
return internalEvaluate(expr.getThenExpression(i), tuple);
}
} catch (ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", "CASE", expr.getWhenCriteria(i))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30340, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30340, "CASE", expr.getWhenCriteria(i))); //$NON-NLS-1$
}
}
if (expr.getElseExpression() != null) {
@@ -972,13 +972,13 @@
// Check for function we can't evaluate
if(fd.getPushdown() == PushDown.MUST_PUSHDOWN) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ExpressionEvaluator.Must_push", fd.getName())); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30341, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30341, fd.getName()));
}
// Check for special lookup function
if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
if(dataMgr == null) {
- throw new ComponentNotFoundException("ERR.015.006.0055", QueryPlugin.Util.getString("ERR.015.006.0055")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ComponentNotFoundException(QueryPlugin.Event.TEIID30342, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30342));
}
String codeTableName = (String) values[0];
@@ -988,7 +988,7 @@
try {
return dataMgr.lookupCodeValue(context, codeTableName, returnElementName, keyElementName, values[3]);
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30343, e, e.getMessage());
}
}
@@ -1010,14 +1010,14 @@
try {
valueIter = evaluateSubquery(scalarSubquery, tuple);
} catch (TeiidProcessingException e) {
- throw new ExpressionEvaluationException(e, e.getMessage());
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30344, e, e.getMessage());
}
if(valueIter.hasNext()) {
result = valueIter.next();
if(valueIter.hasNext()) {
// The subquery should be scalar, but has produced
// more than one result value - this is an exception case
- throw new ExpressionEvaluationException("ERR.015.006.0058", QueryPlugin.Util.getString("ERR.015.006.0058", scalarSubquery.getCommand())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30345, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30345, scalarSubquery.getCommand()));
}
}
return result;
@@ -1038,7 +1038,7 @@
private CommandContext getContext(LanguageObject expression) throws TeiidComponentException {
if (context == null) {
- throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30346, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30346, expression, "No value was available")); //$NON-NLS-1$
}
return context;
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -146,7 +146,7 @@
try {
return super.clone();
} catch (CloneNotSupportedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30381, e);
}
}
@@ -187,7 +187,7 @@
// If descriptor is missing invokable method, find this VM's descriptor
// give name and types from fd
if(invocationMethod == null) {
- throw new FunctionExecutionException("ERR.015.001.0002", QueryPlugin.Util.getString("ERR.015.001.0002", getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30382, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30382, getName()));
}
// Invoke the method and return the result
@@ -209,13 +209,13 @@
Object result = invocationMethod.invoke(null, values);
return importValue(result, getReturnType());
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e, "ERR.015.001.0003", QueryPlugin.Util.getString("ERR.015.001.0003", getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30383, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30383, getName()));
} catch(InvocationTargetException e) {
- throw new FunctionExecutionException(e.getTargetException(), "ERR.015.001.0003", QueryPlugin.Util.getString("ERR.015.001.0003", getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30384, e.getTargetException(), QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30384, getName()));
} catch(IllegalAccessException e) {
- throw new FunctionExecutionException(e, "ERR.015.001.0004", QueryPlugin.Util.getString("ERR.015.001.0004", method.toString())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30385, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30385, method.toString()));
} catch (TransformationException e) {
- throw new FunctionExecutionException(e, e.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30386, e, e.getMessage());
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionLibrary.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -35,6 +35,7 @@
import org.teiid.core.types.Transform;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.FunctionParameter;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.resolver.util.ResolverUtil;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.Expression;
@@ -301,7 +302,7 @@
}
if (ambiguous || result == null) {
- throw new InvalidFunctionException();
+ throw new InvalidFunctionException(QueryPlugin.Event.TEIID30418);
}
return getConverts(result, types);
@@ -333,7 +334,7 @@
Transform result = DataTypeManager.getTransform(sourceType, targetType);
//Else see if an implicit conversion is possible.
if(result == null){
- throw new InvalidFunctionException();
+ throw new InvalidFunctionException(QueryPlugin.Event.TEIID30419);
}
return result;
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -245,14 +245,14 @@
return new Double(context.getNextRand(((Integer)seed).longValue()));
}
}
- throw new FunctionExecutionException("ERR.015.001.0069", QueryPlugin.Util.getString("ERR.015.001.0069", "rand", seed)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30393, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30393, "rand", seed)); //$NON-NLS-1$
}
public static Object rand(CommandContext context) throws FunctionExecutionException {
if(context != null) {
return new Double(context.getNextRand());
}
- throw new FunctionExecutionException("ERR.015.001.0069", QueryPlugin.Util.getString("ERR.015.001.0069", "rand")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30394, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30394, "rand"));//$NON-NLS-1$
}
// ================== Function = mod =====================
@@ -467,8 +467,7 @@
int month = getField(date, Calendar.MONTH);
if (month > 11) {
- throw new FunctionExecutionException("ERR.015.001.0066", QueryPlugin.Util.getString("ERR.015.001.0066", //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"quarter", date.getClass().getName()})); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30395, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30395, "quarter", date.getClass().getName())); //$NON-NLS-1$
}
return Integer.valueOf(month/3 + 1);
}
@@ -654,7 +653,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException("ERR.015.001.0017", QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30396, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30396, countValue));
}
if(string.length() < countValue) {
return string;
@@ -668,7 +667,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException("ERR.015.001.0017", QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30397, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30397, countValue));
} else if(string.length() < countValue) {
return string;
} else {
@@ -711,7 +710,7 @@
public static String trim(String trimSpec, String trimChar, String string) throws FunctionExecutionException {
if (trimChar.length() != 1) {
- throw new FunctionExecutionException(QueryPlugin.Util.getString("SQLParser.Invalid_char", "trim char", trimChar)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30398, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30398, "trim char", trimChar));//$NON-NLS-1$
}
if (!trimSpec.equalsIgnoreCase(SQLConstants.Reserved.LEADING)) {
string = rightTrim(string, trimChar.charAt(0));
@@ -820,11 +819,11 @@
// Check some invalid cases
if(startValue < 1 || (startValue-1) > string1.length()) {
- throw new FunctionExecutionException("ERR.015.001.0061", QueryPlugin.Util.getString("ERR.015.001.0061", start, string1)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30399, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30399, start, string1));
} else if (len < 0) {
- throw new FunctionExecutionException("ERR.015.001.0062", QueryPlugin.Util.getString("ERR.015.001.0062", len)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30400, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30400, len));
} else if (string1.length() == 0 && (startValue > 1 || len >0) ) {
- throw new FunctionExecutionException("ERR.015.001.0063", QueryPlugin.Util.getString("ERR.015.001.0063")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30401, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30401));
}
StringBuffer result = new StringBuffer();
@@ -906,7 +905,7 @@
throws FunctionExecutionException {
int length = padLength.intValue();
if(length < 1) {
- throw new FunctionExecutionException("ERR.015.001.0025", QueryPlugin.Util.getString("ERR.015.001.0025")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30402, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30402));
}
if(length < str.length()) {
return new String(str.substring(0, length));
@@ -916,7 +915,7 @@
}
// Get pad character
if(padStr.length() == 0) {
- throw new FunctionExecutionException("ERR.015.001.0027", QueryPlugin.Util.getString("ERR.015.001.0027")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30403, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30403));
}
// Pad string
StringBuffer outStr = new StringBuffer(str);
@@ -961,7 +960,7 @@
public static Object translate(String str, String in, String out)
throws FunctionExecutionException {
if(in.length() != out.length()) {
- throw new FunctionExecutionException("ERR.015.001.0031", QueryPlugin.Util.getString("ERR.015.001.0031")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30404, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30404));
}
if(in.length() == 0 || str.length() == 0) {
@@ -988,7 +987,7 @@
try {
return DataTypeManager.transformValue(src, DataTypeManager.getDataTypeClass(type));
} catch(TransformationException e) {
- throw new FunctionExecutionException(e, "ERR.015.001.0033", QueryPlugin.Util.getString("ERR.015.001.0033", new Object[]{src, DataTypeManager.getDataTypeName(src.getClass()), type})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30405, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30405, new Object[]{src, DataTypeManager.getDataTypeName(src.getClass()), type}));
}
}
@@ -1005,7 +1004,7 @@
public static Object context(Object context, Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException("ERR.015.001.0035", QueryPlugin.Util.getString("ERR.015.001.0035")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30406, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30406));
}
/**
@@ -1019,7 +1018,7 @@
public static Object rowlimit(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException("ERR.015.001.0035a", QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30407, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30407));
}
/**
@@ -1033,7 +1032,7 @@
public static Object rowlimitexception(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException("ERR.015.001.0035a", QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30408, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30408));
}
// ================== Function = lookup =====================
@@ -1081,8 +1080,7 @@
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException("ERR.015.001.0042", QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
- iae.getMessage()));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30409, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30409,iae.getMessage()));
}
}
@@ -1093,8 +1091,7 @@
try {
return df.parse(date);
} catch (ParseException e) {
- throw new FunctionExecutionException("ERR.015.001.0043", QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
- date, format));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30410, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30410, date, format));
}
}
@@ -1110,8 +1107,7 @@
DecimalFormat df = new DecimalFormat(format);
return df.format(number);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException("ERR.015.001.0042", QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
- iae.getMessage()));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30411, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30411, iae.getMessage()));
}
}
@@ -1160,8 +1156,7 @@
try {
return df.parse(number);
} catch (ParseException e) {
- throw new FunctionExecutionException("ERR.015.001.0043", QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
- number,format));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30412, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30412,number,format));
}
}
@@ -1271,7 +1266,7 @@
return ((Properties)payload).getProperty(param);
}
// Payload was bad
- throw new ExpressionEvaluationException(QueryPlugin.Util.getString("ExpressionEvaluator.Expected_props_for_payload_function", "commandPayload", payload.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30413, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30413, "commandPayload", payload.getClass().getName())); //$NON-NLS-1$
}
// ================= Function - ENV ========================
@@ -1433,9 +1428,9 @@
return Array.get(((java.sql.Array)array).getArray(index, 1), 0);
}
} catch (ArrayIndexOutOfBoundsException e) {
- throw new FunctionExecutionException(QueryPlugin.Util.getString("FunctionMethods.array_index", index)); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30415, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30415, index));
}
- throw new FunctionExecutionException(QueryPlugin.Util.getString("FunctionMethods.not_array_value", array.getClass())); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30416, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30416, array.getClass()));
}
public static int array_length(Object array) throws FunctionExecutionException, SQLException {
@@ -1445,7 +1440,7 @@
if (array instanceof java.sql.Array) {
return Array.getLength(((java.sql.Array)array).getArray());
}
- throw new FunctionExecutionException(QueryPlugin.Util.getString("FunctionMethods.not_array_value", array.getClass())); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30417, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30417, array.getClass()));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -317,28 +317,28 @@
requiresContext = true;
}
} catch (ClassNotFoundException e) {
- throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.no_class", method.getName(), method.getInvocationClass())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30387, e,QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30387, method.getName(), method.getInvocationClass()));
} catch (NoSuchMethodException e) {
- throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.no_method", method, method.getInvocationClass(), method.getInvocationMethod())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30388, e,QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30388, method, method.getInvocationClass(), method.getInvocationMethod()));
} catch (Exception e) {
- throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("ERR.015.001.0047", method, method.getInvocationClass(), method.getInvocationMethod())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30389, e,QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30389, method, method.getInvocationClass(), method.getInvocationMethod()));
}
if (invocationMethod != null) {
// Check return type is non void
Class<?> methodReturn = invocationMethod.getReturnType();
if(methodReturn.equals(Void.TYPE)) {
- throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_void", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30390, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30390, method.getName(), invocationMethod));
}
// Check that method is public
int modifiers = invocationMethod.getModifiers();
if(! Modifier.isPublic(modifiers)) {
- throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_public", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30391, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30391, method.getName(), invocationMethod));
}
// Check that method is static
if(! Modifier.isStatic(modifiers)) {
- throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("FunctionTree.not_static", method.getName(), invocationMethod)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30392, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30392, method.getName(), invocationMethod));
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -88,7 +88,7 @@
try {
return FunctionMethods.divide((BigDecimal)sum, new BigDecimal(count));
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e, "ERR.015.001.0048", QueryPlugin.Util.getString("ERR.015.001.0048", sum, count)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30424, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30424, sum, count));
}
default:
throw new AssertionError("unknown accumulator type"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -56,7 +56,7 @@
maxValue = valueComp;
}
} else {
- throw new FunctionExecutionException("ERR.015.001.0050", QueryPlugin.Util.getString("ERR.015.001.0050", "MAX", value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30425, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30425, "MAX", value.getClass().getName()));//$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -56,7 +56,7 @@
minValue = valueComp;
}
} else {
- throw new FunctionExecutionException("ERR.015.001.0050", QueryPlugin.Util.getString("ERR.015.001.0050", "MIN", value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30426, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30426, "MIN", value.getClass().getName())); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/TextAgg.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/TextAgg.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/TextAgg.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -31,13 +31,14 @@
import javax.sql.rowset.serial.SerialBlob;
import org.teiid.common.buffer.FileStore;
+import org.teiid.common.buffer.FileStore.FileStoreOutputStream;
import org.teiid.common.buffer.FileStoreInputStreamFactory;
-import org.teiid.common.buffer.FileStore.FileStoreOutputStream;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.BlobImpl;
import org.teiid.core.types.BlobType;
import org.teiid.core.types.Streamable;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.DerivedColumn;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.TextLine;
@@ -75,7 +76,7 @@
w.flush();
return fisf;
} catch (IOException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30420, e);
}
}
@@ -98,7 +99,7 @@
w.write(in);
w.flush();
} catch (IOException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30421, e);
}
}
@@ -119,9 +120,9 @@
}
return new BlobType(new SerialBlob(Arrays.copyOf(fs.getBuffer(), fs.getCount())));
} catch (IOException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30422, e);
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30423, e);
}
}
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -127,7 +127,7 @@
*/
public static final void validateFunctionParameter(FunctionParameter param) throws FunctionMetadataException {
if(param == null) {
- throw new FunctionMetadataException("ERR.015.001.0053", QueryPlugin.Util.getString("ERR.015.001.0053")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30427, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30427));
}
// Validate attributes
@@ -166,7 +166,7 @@
validateIsNotNull(type, "Type"); //$NON-NLS-1$
if(DataTypeManager.getDataTypeClass(type) == null) {
- throw new FunctionMetadataException("ERR.015.001.0054", QueryPlugin.Util.getString("ERR.015.001.0054", type)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30428, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30428, type));
}
}
@@ -227,7 +227,7 @@
*/
private static final void validateIsNotNull(Object object, String objName) throws FunctionMetadataException {
if(object == null) {
- throw new FunctionMetadataException("ERR.015.001.0052", QueryPlugin.Util.getString("ERR.015.001.0052", objName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30429, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30429, objName));
}
}
@@ -241,7 +241,7 @@
*/
private static final void validateLength(String string, int maxLength, String strName) throws FunctionMetadataException {
if(string.length() > maxLength) {
- throw new FunctionMetadataException("ERR.015.001.0055", QueryPlugin.Util.getString("ERR.015.001.0055",strName, new Integer(maxLength))); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30430, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30430,strName, new Integer(maxLength)));
}
}
@@ -254,7 +254,7 @@
*/
private static final void validateNameCharacters(String name, String strName) throws FunctionMetadataException {
if (name.indexOf('.') > 0) {
- throw new FunctionMetadataException("ERR.015.001.0057", QueryPlugin.Util.getString("ERR.015.001.0057",strName, '.')); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30431, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30431,strName, '.'));
}
}
@@ -271,7 +271,7 @@
if(identifier.length() > 0) {
char firstChar = identifier.charAt(0);
if(! Character.isJavaIdentifierStart(firstChar)) {
- throw new FunctionMetadataException("ERR.015.001.0056", QueryPlugin.Util.getString("ERR.015.001.0056",strName, new Character(firstChar))); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30432, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30432,strName, new Character(firstChar)));
}
// Then check the rest of the characters
@@ -279,13 +279,13 @@
char ch = identifier.charAt(i);
if(! Character.isJavaIdentifierPart(ch)) {
if(! allowMultiple || ! (ch == '.')) {
- throw new FunctionMetadataException("ERR.015.001.0057", QueryPlugin.Util.getString("ERR.015.001.0057",strName, new Character(ch))); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30433, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30433,strName, new Character(ch)));
}
}
}
if(identifier.charAt(identifier.length()-1) == '.') {
- throw new FunctionMetadataException("ERR.015.001.0058", QueryPlugin.Util.getString("ERR.015.001.0058",strName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new FunctionMetadataException(QueryPlugin.Event.TEIID30434, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30434,strName));
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/source/SecuritySystemFunctions.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -24,6 +24,7 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.SecurityFunctionEvaluator;
import org.teiid.query.util.CommandContext;
@@ -41,7 +42,7 @@
try {
return eval.hasRole(SecurityFunctionEvaluator.DATA_ROLE, roleName);
} catch (TeiidComponentException err) {
- throw new FunctionExecutionException(err, err.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30435, err, err.getMessage());
}
}
@@ -56,7 +57,7 @@
try {
return eval.hasRole(roleType, roleName);
} catch (TeiidComponentException err) {
- throw new FunctionExecutionException(err, err.getMessage());
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30436, err, err.getMessage());
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/source/XMLSystemFunctions.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/source/XMLSystemFunctions.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/function/source/XMLSystemFunctions.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -90,6 +90,7 @@
import org.teiid.core.types.XMLTranslator;
import org.teiid.core.types.XMLType;
import org.teiid.core.types.XMLType.Type;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.function.CharsetUtils;
import org.teiid.query.util.CommandContext;
@@ -433,7 +434,7 @@
eventWriter = factory.createXMLEventWriter(writer);
} catch (XMLStreamException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30437, e);
}
eventFactory = XMLEventFactory.newInstance();
}
@@ -450,13 +451,13 @@
convertValue(writer, eventWriter, eventFactory, object);
} catch (IOException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30438, e);
} catch (XMLStreamException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30439, e);
} catch (TransformerException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30440, e);
}
}
@@ -470,10 +471,10 @@
writer.close();
} catch (XMLStreamException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30441, e);
} catch (IOException e) {
fs.remove();
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30442, e);
}
XMLType result = new XMLType(new SQLXMLImpl(fsisf));
if (type == null) {
@@ -614,7 +615,7 @@
return new StreamSource(new StringReader((String)value));
}
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30443, e);
}
throw new AssertionError("Unknown type"); //$NON-NLS-1$
}
@@ -789,9 +790,9 @@
success = true;
return new SQLXMLImpl(fsisf);
} catch(IOException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30444, e);
} catch(TransformerException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30445, e);
} finally {
if (!success && lobBuffer != null) {
lobBuffer.remove();
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingBaseNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -88,7 +88,7 @@
if (parent != null) {
return parent.getRecursiveRootNode(elem);
}
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("invalid_recurive_node", elem)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30457, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30457, elem));
}
/**
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -86,22 +86,22 @@
}
public MappingAllNode addAllNode(MappingAllNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingChoiceNode addChoiceNode(MappingChoiceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30453, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30453));
}
public MappingSequenceNode addSequenceNode(MappingSequenceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30454, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30454));
}
public MappingElement addChildElement(MappingElement elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30455, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30455));
}
public MappingSourceNode addSourceNode(MappingSourceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30456, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30456));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -120,20 +120,20 @@
}
public MappingAllNode addAllNode(MappingAllNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30458, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30458));
}
public MappingChoiceNode addChoiceNode(MappingChoiceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30459, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30459));
}
public MappingSequenceNode addSequenceNode(MappingSequenceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("WrongTypeChild")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30460, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30460));
}
public MappingElement addChildElement(MappingElement elem) {
if (elem == null) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("root_cannotbe_null")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30461, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30461));
}
fixCardinality(elem);
setRoot(elem);
@@ -142,7 +142,7 @@
public MappingSourceNode addSourceNode(MappingSourceNode elem) {
if (elem == null) {
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("root_cannotbe_null")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30462, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30462));
}
setRoot(elem);
return elem;
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -487,7 +487,7 @@
}
return clone;
} catch (CloneNotSupportedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30463, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -35,6 +35,7 @@
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
import org.teiid.metadata.Table.Type;
+import org.teiid.query.QueryPlugin;
/**
@@ -62,7 +63,7 @@
throws QueryMetadataException {
Schema result = getSchemas().get(fullName);
if (result == null) {
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30352, fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
return result;
}
@@ -71,12 +72,12 @@
throws QueryMetadataException {
int index = fullName.indexOf(TransformationMetadata.DELIMITER_STRING);
if (index == -1) {
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30353, fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
String schema = fullName.substring(0, index);
Table result = getSchema(schema).getTables().get(fullName.substring(index + 1));
if (result == null) {
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30354, fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
return result;
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TempMetadataAdapter.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -128,7 +128,7 @@
}
Object[] params = new Object[]{elementName};
String msg = QueryPlugin.Util.getString("TempMetadataAdapter.Element_____{0}_____not_found._1", params); //$NON-NLS-1$
- throw new QueryMetadataException(msg);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30350, msg);
}
/**
@@ -153,7 +153,7 @@
}
Object[] params = new Object[]{groupName};
String msg = QueryPlugin.Util.getString("TempMetadataAdapter.Group_____{0}_____not_found._1", params); //$NON-NLS-1$
- throw new QueryMetadataException(msg);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30351, msg);
}
@Override
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -201,7 +201,7 @@
public Column getElementID(final String elementName) throws TeiidComponentException, QueryMetadataException {
int columnIndex = elementName.lastIndexOf(TransformationMetadata.DELIMITER_STRING);
if (columnIndex == -1) {
- throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30355, elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
Table table = this.store.findGroup(elementName.substring(0, columnIndex));
String shortElementName = elementName.substring(columnIndex + 1);
@@ -210,7 +210,7 @@
return column;
}
}
- throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30356, elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
public Table getGroupID(final String groupName) throws TeiidComponentException, QueryMetadataException {
@@ -306,7 +306,7 @@
StoredProcedureInfo result = getStoredProcInfoDirect(name);
if (result == null) {
- throw new QueryMetadataException(name+NOT_EXISTS_MESSAGE);
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30357, name+NOT_EXISTS_MESSAGE);
}
return result;
@@ -383,7 +383,7 @@
Schema schema = (Schema)storedProcedureInfo.getModelID();
if(name.equalsIgnoreCase(storedProcedureInfo.getProcedureCallableName()) || vdbMetaData == null || vdbMetaData.isVisible(schema.getName())){
if (result != null) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("ambiguous_procedure", name)); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30358, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30358, name));
}
result = storedProcedureInfo;
}
@@ -478,7 +478,7 @@
Table tableRecord = (Table) groupID;
if (!tableRecord.isVirtual()) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6")+tableRecord.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecord.getFullName()));
}
LiveTableQueryNode queryNode = new LiveTableQueryNode(tableRecord);
@@ -497,7 +497,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30360, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30360, tableRecordImpl.getFullName()));
}
return tableRecordImpl.isInsertPlanEnabled()?tableRecordImpl.getInsertPlan():null;
}
@@ -506,7 +506,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30361, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30361,tableRecordImpl.getFullName()));
}
return tableRecordImpl.isUpdatePlanEnabled()?tableRecordImpl.getUpdatePlan():null;
}
@@ -515,7 +515,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30362, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30362,tableRecordImpl.getFullName()));
}
return tableRecordImpl.isDeletePlanEnabled()?tableRecordImpl.getDeletePlan():null;
}
@@ -743,7 +743,7 @@
mappingDoc = reader.loadDocument(inputStream);
mappingDoc.setName(groupName);
} catch (Exception e){
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30363, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30363, groupName, mappingDoc));
} finally {
try {
inputStream.close();
@@ -835,7 +835,7 @@
}
if (schema == null) {
- throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Event.TEIID30364, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30364,groupName));
}
schemas.add(schema);
}
@@ -959,7 +959,7 @@
try {
return ObjectConverterUtil.convertToByteArray(f.openStream());
} catch (IOException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30365, e);
}
}
@@ -1010,7 +1010,7 @@
}
return ObjectConverterUtil.convertToString(new ByteArrayInputStream(bytes));
} catch (IOException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30366, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -194,7 +194,7 @@
} else if (type == Command.TYPE_DELETE) {
return ((Delete)command).getGroup();
}
- throw new TeiidRuntimeException(QueryPlugin.Util.getString("BatchedUpdatePlanner.unrecognized_command", command)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30244, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30244, command));
}
/**
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -297,7 +297,7 @@
break;
}
default:
- throw new QueryPlannerException(QueryPlugin.Util.getString("ProcedurePlanner.bad_stmt", stmtType)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30243, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30243, stmtType));
}
return instruction;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/QueryOptimizer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -33,8 +33,9 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.id.IDGenerator;
import org.teiid.dqp.internal.process.PreparedPlan;
+import org.teiid.metadata.FunctionMethod.Determinism;
import org.teiid.metadata.Procedure;
-import org.teiid.metadata.FunctionMethod.Determinism;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempCapabilitiesFinder;
@@ -187,7 +188,7 @@
result = planner.optimize(command);
}
} catch (QueryResolverException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30245, e);
}
}
@@ -210,7 +211,7 @@
try {
command = QueryRewriter.rewrite(command, metadata, context);
} catch (TeiidProcessingException e) {
- throw new QueryPlannerException(e, e.getMessage());
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30246, e, e.getMessage());
}
result = PROCEDURE_PLANNER.optimize(command, idGenerator, metadata, capFinder, analysisRecord, context);
return result;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -178,7 +178,7 @@
}
}
} catch(QueryMetadataException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30247, e);
}
} else {
@@ -308,7 +308,7 @@
processNode = correctProjectionInternalTables(node, aNode);
}
} catch (QueryMetadataException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30248, err);
}
aNode.setShouldEvaluateExpressions(EvaluatableVisitor.needsProcessingEvaluation(command));
}
@@ -320,7 +320,7 @@
boolean aliasColumns = modelID != null && CapabilitiesUtil.supports(Capability.QUERY_SELECT_EXPRESSION, modelID, metadata, capFinder);
command.acceptVisitor(new AliasGenerator(aliasGroups, !aliasColumns));
} catch (QueryMetadataException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30249, err);
}
}
aNode.setCommand(command);
@@ -479,7 +479,7 @@
break;
default:
- throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0007", NodeConstants.getNodeTypeString(node.getType()))); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30250, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30250, NodeConstants.getNodeTypeString(node.getType())));
}
if(processNode != null) {
@@ -571,7 +571,7 @@
accessNode.setModelName(cbName);
accessNode.setModelId(modelID);
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0009")); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30251, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30251));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -179,7 +179,7 @@
try {
plan = generatePlan(command, true);
} catch (TeiidProcessingException e) {
- throw new QueryPlannerException(e, e.getMessage());
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30252, e, e.getMessage());
}
if(debug) {
@@ -602,12 +602,12 @@
//do a workaround of row-by-row processing for update/delete
if (metadata.getUniqueKeysInGroup(container.getGroup().getMetadataID()).isEmpty()
|| !CapabilitiesUtil.supports(Capability.CRITERIA_COMPARE_EQ, metadata.getModelID(container.getGroup().getMetadataID()), metadata, capFinder)) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30253, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30253, container));
}
try {
if (planningLoop.get()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_expression", container)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30254, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30254, container));
}
planningLoop.set(Boolean.TRUE);
@@ -633,10 +633,10 @@
} else if (subqueryContainer instanceof ExistsCriteria) {
((ExistsCriteria) subqueryContainer).setShouldEvaluate(true);
} else {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30255, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30255, container));
}
} else {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30256, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30256, container));
}
}
ProcessorPlan plan = QueryOptimizer.optimizePlan(subqueryContainer.getCommand(), metadata, null, capFinder, analysisRecord, context);
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -536,7 +536,7 @@
}
}
} catch(QueryMetadataException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30271, e);
}
// Found no reason why this node is not eligible
@@ -558,7 +558,7 @@
return null;
}
} catch(QueryMetadataException e) {
- throw new TeiidComponentException(e, QueryPlugin.Util.getString("RulePushSelectCriteria.Error_getting_modelID")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30272, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30272));
}
return critNodeModelID;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -298,9 +298,9 @@
}
}
} catch(TeiidProcessingException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0023", ses)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30260, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30260, ses));
} catch (TeiidComponentException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0023", ses)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30261, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30261, ses));
}
}
@@ -337,9 +337,9 @@
try {
return QueryRewriter.rewriteCriteria(criteria, null, metadata);
} catch(TeiidProcessingException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0023", criteria)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30262, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30262, criteria));
} catch (TeiidComponentException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0023", criteria)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30263, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30263, criteria));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -112,7 +112,7 @@
}
Object groups = node.getGroups();
- throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0012", new Object[] {groups, accessPatterns})); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30278, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30278, new Object[] {groups, accessPatterns}));
}
public String toString() {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAssignOutputElements.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -157,7 +157,7 @@
Object modelId = RuleRaiseAccess.getModelIDFromAccess(root, metadata);
for (Expression symbol : outputElements) {
if(!RuleRaiseAccess.canPushSymbol(symbol, true, modelId, metadata, capFinder, analysisRecord)) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.couldnt_push_expression", symbol, modelId)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30258, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30258, symbol, modelId));
}
}
}
@@ -330,7 +330,7 @@
SymbolMap symbolMap = (SymbolMap) root.getProperty(NodeConstants.Info.SYMBOL_MAP);
if (!symbolMap.asMap().keySet().containsAll(outputElements)) {
outputElements.removeAll(symbolMap.asMap().keySet());
- throw new QueryPlannerException(QueryPlugin.Util.getString("RuleAssignOutputElements.cannot_introduce_expressions", outputElements)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30259, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30259, outputElements));
}
return symbolMap.getKeys();
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -26,6 +26,7 @@
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.common.buffer.BlockedException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.metadata.QueryMetadataInterface;
@@ -33,9 +34,9 @@
import org.teiid.query.optimizer.relational.OptimizerRule;
import org.teiid.query.optimizer.relational.RuleStack;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.visitor.EvaluatableVisitor;
import org.teiid.query.util.CommandContext;
@@ -104,9 +105,9 @@
}
//none of the following exceptions should ever occur
} catch(BlockedException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30273, e);
} catch (ExpressionEvaluationException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30274, e);
}
return false;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCollapseSource.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCollapseSource.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCollapseSource.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -38,6 +38,7 @@
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -46,17 +47,36 @@
import org.teiid.query.optimizer.relational.OptimizerRule;
import org.teiid.query.optimizer.relational.RuleStack;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.processor.ProcessorPlan;
import org.teiid.query.processor.relational.AccessNode;
import org.teiid.query.processor.relational.RelationalPlan;
import org.teiid.query.resolver.util.ResolverUtil;
import org.teiid.query.rewriter.QueryRewriter;
-import org.teiid.query.sql.lang.*;
+import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.CompoundCriteria;
+import org.teiid.query.sql.lang.Criteria;
+import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.From;
+import org.teiid.query.sql.lang.FromClause;
+import org.teiid.query.sql.lang.GroupBy;
+import org.teiid.query.sql.lang.Insert;
+import org.teiid.query.sql.lang.JoinPredicate;
+import org.teiid.query.sql.lang.JoinType;
+import org.teiid.query.sql.lang.Limit;
+import org.teiid.query.sql.lang.OrderBy;
+import org.teiid.query.sql.lang.OrderByItem;
+import org.teiid.query.sql.lang.Query;
+import org.teiid.query.sql.lang.QueryCommand;
+import org.teiid.query.sql.lang.Select;
+import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.lang.SetQuery.Operation;
+import org.teiid.query.sql.lang.SubqueryContainer;
+import org.teiid.query.sql.lang.SubqueryFromClause;
+import org.teiid.query.sql.lang.UnaryFromClause;
import org.teiid.query.sql.navigator.DeepPostOrderNavigator;
import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.Constant;
@@ -601,7 +621,7 @@
try {
outerQuery = QueryRewriter.createInlineViewQuery(new GroupSymbol("X"), query, metadata, query.getSelect().getProjectedSymbols()); //$NON-NLS-1$
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30257, err);
}
Iterator<Expression> iter = outerQuery.getSelect().getProjectedSymbols().iterator();
HashMap<Expression, Expression> expressionMap = new HashMap<Expression, Expression>();
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -141,7 +141,7 @@
//quick check for satisfiability
if (!joinRegion.isSatisfiable()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30275, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30275, joinRegion.getUnsatisfiedAccessPatterns()));
}
planForDependencies(joinRegion);
@@ -376,7 +376,7 @@
private void planForDependencies(JoinRegion joinRegion) throws QueryPlannerException {
if (joinRegion.getJoinSourceNodes().isEmpty()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30276, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30276, joinRegion.getUnsatisfiedAccessPatterns()));
}
HashSet<GroupSymbol> currentGroups = new HashSet<GroupSymbol>();
@@ -435,7 +435,7 @@
}
if (!dependentNodes.isEmpty()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30277, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30277, joinRegion.getUnsatisfiedAccessPatterns()));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -118,7 +118,7 @@
defaults.add(defaultValue);
if (defaultValue == null && !coveredParams.contains(symbol)) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanProcedures.no_values", symbol)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30270, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30270, symbol));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,7 +22,19 @@
package org.teiid.query.optimizer.relational.rules;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
@@ -31,6 +43,7 @@
import org.teiid.core.id.IDGenerator;
import org.teiid.core.types.DataTypeManager;
import org.teiid.language.SQLConstants.NonReserved;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.metadata.QueryMetadataInterface;
@@ -42,10 +55,10 @@
import org.teiid.query.optimizer.relational.RelationalPlanner;
import org.teiid.query.optimizer.relational.RuleStack;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.resolver.util.ResolverUtil;
import org.teiid.query.resolver.util.ResolverVisitor;
import org.teiid.query.rewriter.QueryRewriter;
@@ -57,8 +70,17 @@
import org.teiid.query.sql.lang.OrderBy;
import org.teiid.query.sql.lang.Select;
import org.teiid.query.sql.lang.SetQuery.Operation;
-import org.teiid.query.sql.symbol.*;
+import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.AggregateSymbol.Type;
+import org.teiid.query.sql.symbol.AliasSymbol;
+import org.teiid.query.sql.symbol.Constant;
+import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.ExpressionSymbol;
+import org.teiid.query.sql.symbol.Function;
+import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.sql.symbol.SearchedCaseExpression;
+import org.teiid.query.sql.symbol.Symbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.AggregateSymbolCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
@@ -109,7 +131,7 @@
try {
pushGroupNodeOverUnion(metadata, capFinder, groupNode, child, groupingExpressions, setOp, context, analysisRecord);
} catch (QueryResolverException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30264, e);
}
continue;
}
@@ -511,7 +533,7 @@
try {
group.setMetadataID(ResolverUtil.addTempGroup(tma, group, virtualElements, false));
} catch (QueryResolverException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30265, e);
}
List<ElementSymbol> projectedSymbols = ResolverUtil.resolveElementsInGroup(group, metadata);
SymbolMap symbolMap = SymbolMap.createSymbolMap(projectedSymbols,
@@ -698,7 +720,7 @@
try {
aggMap = buildAggregateMap(aggregates, metadata, newAggs);
} catch (QueryResolverException e) {
- throw new QueryPlannerException(e, e.getMessage());
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30266, e);
}
updateParentAggs(groupNode, context, aggMap, metadata);
return newAggs;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushLimit.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -34,6 +34,7 @@
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.function.FunctionLibrary;
@@ -42,10 +43,10 @@
import org.teiid.query.optimizer.relational.OptimizerRule;
import org.teiid.query.optimizer.relational.RuleStack;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.sql.lang.CompareCriteria;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.lang.SetQuery;
@@ -277,7 +278,7 @@
try {
return new Constant(Evaluator.evaluate(newExpr), newExpr.getType());
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e, "Unexpected Exception"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30269, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30269));
}
}
return newExpr;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -319,7 +319,7 @@
return currentNode.getFirstChild();
}
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0020", currentNode.getGroups())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30267, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30267, currentNode.getGroups()));
}
} else if(currentNode.getType() == NodeConstants.Types.JOIN) {
//pushing below a join is not necessary under an access node
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -71,7 +71,7 @@
if(CapabilitiesUtil.requiresCriteria(modelID, metadata, capFinder)
&& hasNoCriteria((Command) node.getProperty(NodeConstants.Info.ATOMIC_REQUEST))) {
String modelName = metadata.getFullName(modelID);
- throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0024", modelName)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30268, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30268, modelName));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -90,7 +90,7 @@
if (context == null) {
context = otherContext;
} else if (context != otherContext){
- throw new QueryPlannerException("ERR.015.004.0068", QueryPlugin.Util.getString("ERR.015.004.0068", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30300, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30300, criteria));
}
}
@@ -142,7 +142,7 @@
MappingSourceNode elementRsNode = node.getSourceNode();
if (elementRsNode == null) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.invalid_element", elementSymbol)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30301, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30301, elementSymbol));
}
String elementRsFullName = elementRsNode.getFullyQualifiedName();
@@ -159,7 +159,7 @@
continue;
}
- throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.invalid_context", elementSymbol, context.getFullyQualifiedName())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30302, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30302, elementSymbol, context.getFullyQualifiedName()));
}
return resultSets;
}
@@ -187,7 +187,7 @@
if (criteriaResultSets.size() != 1) {
//TODO: this assumption could be relaxed if we allow context to be from a document perspective, rather than from a result set
- throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.no_context", criteria)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30303, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30303, criteria));
}
return (MappingSourceNode)criteriaResultSets.iterator().next();
}
@@ -261,7 +261,7 @@
MappingSourceNode sourceNode = node.getSourceNode();
if (sourceNode == null) {
String msg = QueryPlugin.Util.getString("XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class", fullyQualifiedNodeName); //$NON-NLS-1$
- throw new QueryPlannerException(msg);
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30304, msg);
}
ResultSetInfo criteriaRsInfo = sourceNode.getResultSetInfo();
@@ -270,7 +270,7 @@
int existingLimit = criteriaRsInfo.getUserRowLimit();
if (existingLimit > 0 && existingLimit != rowLimit) {
String msg = QueryPlugin.Util.getString("XMLPlanner.Criteria_{0}_contains_conflicting_row_limits", wholeCrit); //$NON-NLS-1$
- throw new QueryPlannerException(msg);
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30305, msg);
}
criteriaRsInfo.setUserRowLimit(rowLimit, exceptionOnRowLimit);
@@ -301,13 +301,13 @@
//assumes that all non-xml group elements are temp elements
boolean hasTempElement = !metadata.isXMLGroup(group.getMetadataID());
if(!first && hasTempElement && resultSet == null) {
- throw new QueryPlannerException("ERR.015.004.0035", QueryPlugin.Util.getString("ERR.015.004.0035", conjunct)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30306, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30306, conjunct));
}
if (hasTempElement) {
String currentResultSet = metadata.getFullName(element.getGroupSymbol().getMetadataID());
if (resultSet != null && !resultSet.equalsIgnoreCase(currentResultSet)) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.multiple_staging", conjunct)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30307, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30307, conjunct));
}
resultSet = currentResultSet;
}
@@ -317,7 +317,7 @@
if (resultSet != null) {
Collection<Function> functions = ContextReplacerVisitor.replaceContextFunctions(conjunct);
if (!functions.isEmpty()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.staging_context")); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30308, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30308));
}
//should also throw an exception if it contains a row limit function
@@ -336,7 +336,7 @@
MappingNode contextNode = MappingNode.findNode(planEnv.mappingDoc, targetContext.getName());
if (contextNode == null){
- throw new QueryPlannerException("ERR.015.004.0037", QueryPlugin.Util.getString("ERR.015.004.0037", targetContext)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30309, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30309, targetContext));
}
return contextNode;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -31,6 +31,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.MappingAttribute;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingElement;
@@ -117,9 +118,9 @@
symbol.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(symbol.getMetadataID())));
return symbol;
} catch (QueryMetadataException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30279, e);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30280, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -87,7 +87,7 @@
query = QueryParser.getQueryParser().parseCommand(queryNode.getQuery());
QueryResolver.resolveWithBindingMetadata(query, env.getGlobalMetadata().getDesignTimeMetadata(), queryNode, true);
} catch (TeiidException e) {
- throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0054", new Object[]{groupName, queryNode.getQuery()})); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30281, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30281, new Object[]{groupName, queryNode.getQuery()}));
}
}
return query;
@@ -106,7 +106,7 @@
try {
return QueryRewriter.rewrite(query, metadata, context);
} catch(TeiidProcessingException e) {
- throw new QueryPlannerException(e, e.getMessage());
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30282, e, e.getMessage());
}
}
@@ -129,7 +129,7 @@
ResolverUtil.resolveGroup(gs, metadata);
queryNode = metadata.getVirtualPlan(gs.getMetadataID());
} catch (QueryResolverException e) {
- throw new QueryPlannerException(e, "ERR.015.004.0029", QueryPlugin.Util.getString("ERR.015.004.0029", groupName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30283, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30283, groupName));
}
return queryNode;
}
@@ -157,7 +157,7 @@
ResolverUtil.resolveGroup(group, metadata);
return group;
} catch (QueryResolverException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30284, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -33,6 +33,7 @@
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingNode;
@@ -183,7 +184,7 @@
baseQuery.setCriteria(inputSetCriteria);
rsInfo.setCriteriaRaised(true);
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30289, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -28,6 +28,7 @@
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.MappingCriteriaNode;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingRecursiveElement;
@@ -75,7 +76,7 @@
ResolverVisitor.resolveLanguageObject(crit, null, planEnv.getGlobalMetadata());
return crit;
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30290, e);
}
}
return null;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -109,7 +109,7 @@
ElementSymbol es = msn.getMappedSymbol(new ElementSymbol(symbolName));
return es;
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30285, err);
}
}
@@ -140,12 +140,12 @@
throw (TeiidComponentException)child;
}
- throw new TeiidComponentException(child);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30286, child);
}
Collection unmappedSymbols = mappingVisitor.getUnmappedSymbols();
if (unmappedSymbols != null && unmappedSymbols.size() > 0){
- throw new QueryPlannerException("ERR.015.004.0046", QueryPlugin.Util.getString("ERR.015.004.0046", new Object[] {unmappedSymbols, object})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30287, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30287, new Object[] {unmappedSymbols, object}));
}
return object;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -294,7 +294,7 @@
if (elementNode.getNameInSource() == null){
Object[] params = new Object[] {elementNode, orderBy};
String msg = QueryPlugin.Util.getString("XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1", params); //$NON-NLS-1$
- throw new QueryPlannerException(msg);
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30288, msg);
}
MappingSourceNode sourceNode = elementNode.getSourceNode();
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -31,6 +31,7 @@
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.mapping.xml.MappingAttribute;
import org.teiid.query.mapping.xml.MappingCriteriaNode;
@@ -48,9 +49,9 @@
import org.teiid.query.sql.lang.Select;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.ExpressionSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
-import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
@@ -103,7 +104,7 @@
MappingSourceNode parent = element.getParentSourceNode();
collectElementSymbols(element, bindings, parent);
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30298, e);
}
}
@@ -175,7 +176,7 @@
}
}
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30299, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -106,7 +106,7 @@
}
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30292, e);
}
}
@@ -132,7 +132,7 @@
ProcessorPlan queryPlan = optimizePlan(cmd, planEnv);
rsInfo.setPlan(queryPlan);
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30293, e);
}
}
};
@@ -179,7 +179,7 @@
planQueryWithCriteria(sourceNode, planEnv);
}
} catch (QueryResolverException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30294, e);
}
if (rsInfo.getUserRowLimit() != -1) {
@@ -318,7 +318,7 @@
}
if (!singleParentage) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("XMLQueryPlanner.cannot_plan", rsInfo.getCriteria())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30295, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30295, rsInfo.getCriteria()));
}
Query subQuery = QueryUtil.wrapQuery(new SubqueryFromClause(inlineViewName, command), inlineViewName);
@@ -399,10 +399,10 @@
MappingSourceNode childMsn = findMappingSourceNode(planEnv, groupSymbol);
while (childMsn != parentMsn) {
if (childMsn == null) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("XMLQueryPlanner.invalid_relationship", crit, parentMsn)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30296, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30296, crit, parentMsn));
}
if (!childMsn.getResultSetInfo().isCriteriaRaised()) {
- throw new QueryPlannerException(QueryPlugin.Util.getString("XMLQueryPlanner.non_simple_relationship", crit, childMsn)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30297, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30297, crit, childMsn));
}
Query parentQuery = (Query)childMsn.getResultSetInfo().getCommand();
if (parentQuery.getCriteria() != null
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -38,6 +38,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.mapping.xml.MappingBaseNode;
import org.teiid.query.mapping.xml.MappingDocument;
@@ -65,10 +66,10 @@
import org.teiid.query.sql.lang.UnaryFromClause;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.ExpressionSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
-import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
@@ -86,7 +87,7 @@
try {
stagePlannedQuery(sourceNode, planEnv);
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30291, e);
}
}
};
Modified: trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -129,7 +129,7 @@
public Command parseCommand(String sql, ParseInfo parseInfo, boolean designerCommands) throws QueryParserException {
if(sql == null || sql.length() == 0) {
- throw new QueryParserException(QueryPlugin.Util.getString("QueryParser.emptysql")); //$NON-NLS-1$
+ throw new QueryParserException(QueryPlugin.Event.TEIID30377, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30377));
}
Command result = null;
@@ -142,12 +142,12 @@
result.setCacheHint(SQLParserUtil.getQueryCacheOption(sql));
} catch(ParseException pe) {
if(sql.startsWith(XML_OPEN_BRACKET) || sql.startsWith(XQUERY_DECLARE)) {
- throw new QueryParserException(pe, QueryPlugin.Util.getString("QueryParser.xqueryCompilation", sql)); //$NON-NLS-1$
+ throw new QueryParserException(QueryPlugin.Event.TEIID30378, pe, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30378, sql));
}
throw convertParserException(pe);
} catch(TokenMgrError tme) {
if(sql.startsWith(XML_OPEN_BRACKET) || sql.startsWith(XQUERY_DECLARE)) {
- throw new QueryParserException(tme, QueryPlugin.Util.getString("QueryParser.xqueryCompilation", sql)); //$NON-NLS-1$
+ throw new QueryParserException(QueryPlugin.Event.TEIID30379, tme, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30379, sql));
}
throw handleTokenMgrError(tme);
}
@@ -156,7 +156,7 @@
public CacheHint parseCacheHint(String sql) throws QueryParserException {
if(sql == null || sql.length() == 0) {
- throw new QueryParserException(QueryPlugin.Util.getString("QueryParser.emptysql")); //$NON-NLS-1$
+ throw new QueryParserException(QueryPlugin.Event.TEIID30380, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30380));
}
return SQLParserUtil.getQueryCacheOption(sql);
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/DdlPlan.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/DdlPlan.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -92,14 +92,14 @@
if (obj.getEnabled() == null) {
if (obj.isCreate()) {
if (getPlanForEvent(t, event) != null) {
- throw new TeiidRuntimeException(new TeiidProcessingException(QueryPlugin.Util.getString("DdlPlan.event_already_exists", t.getName(), obj.getEvent()))); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30156, new TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30156, t.getName(), obj.getEvent())));
}
} else if (getPlanForEvent(t, event) == null) {
- throw new TeiidRuntimeException(new TeiidProcessingException(QueryPlugin.Util.getString("DdlPlan.event_not_exists", t.getName(), obj.getEvent()))); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30157, new TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30157, t.getName(), obj.getEvent())));
}
sql = obj.getDefinition().toString();
} else if (getPlanForEvent(t, event) == null) {
- throw new TeiidRuntimeException(new TeiidProcessingException(QueryPlugin.Util.getString("DdlPlan.event_not_exists", t.getName(), obj.getEvent()))); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30158, new TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30158, t.getName(), obj.getEvent())));
}
if (pdm.getMetadataRepository() != null) {
if (sql != null) {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -113,7 +113,7 @@
try {
Thread.sleep(wait);
} catch (InterruptedException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30159, err);
}
}
}
@@ -133,10 +133,10 @@
while(currentTime < context.getTimeSliceEnd() || context.isNonBlocking()) {
if (requestCanceled) {
- throw new TeiidProcessingException(SQLStates.QUERY_CANCELED, QueryPlugin.Util.getString("QueryProcessor.request_cancelled", getProcessID())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30160, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30160, getProcessID()));
}
if (currentTime > context.getTimeoutEnd()) {
- throw new TeiidProcessingException("Query timed out"); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30161, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30161));
}
result = processPlan.nextBatch();
@@ -172,7 +172,7 @@
if (e instanceof TeiidComponentException) {
throw (TeiidComponentException)e;
}
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30162, e);
}
if(done) {
closeProcessing();
@@ -265,7 +265,7 @@
try {
Thread.sleep(wait);
} catch (InterruptedException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30163, err);
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,13 +22,14 @@
package org.teiid.query.processor.proc;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_EXPRESSION;
import org.teiid.client.ProcedureErrorInstructionException;
import org.teiid.client.plan.PlanNode;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.Expression;
@@ -75,9 +76,8 @@
public void process(ProcedurePlan env) throws TeiidComponentException,
TeiidProcessingException {
Object value = env.evaluateExpression(expression);
- LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP,
- new Object[] {"Processing RaiseErrorInstruction with the value :", value}); //$NON-NLS-1$
- throw new ProcedureErrorInstructionException(ERROR_PREFIX + (value != null ? value.toString() : "")); //$NON-NLS-1$
+ LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, new Object[] {"Processing RaiseErrorInstruction with the value :", value}); //$NON-NLS-1$
+ throw new ProcedureErrorInstructionException(QueryPlugin.Event.TEIID30167, ERROR_PREFIX + (value != null ? value.toString() : ""));
}
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -216,7 +216,7 @@
procEnv.push(dynamicProgram);
} catch (TeiidProcessingException e) {
Object[] params = {dynamicCommand, dynamicCommand.getSql(), e.getMessage()};
- throw new QueryProcessingException(e, QueryPlugin.Util.getString("ExecDynamicSqlInstruction.couldnt_execute", params)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30168, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30168, params));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -251,7 +251,7 @@
throws TeiidComponentException, QueryMetadataException,
QueryValidatorException {
if (value == null && !metadata.elementSupports(param.getMetadataID(), SupportConstants.Element.NULL)) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("ProcedurePlan.nonNullableParam", param)); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param));
}
}
@@ -589,7 +589,7 @@
ts.rollback(tc);
}
} catch (XATransactionException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30165, e);
}
}
}
@@ -647,7 +647,7 @@
private CursorState getCursorState(String rsKey) throws TeiidComponentException {
CursorState state = this.cursorStates.get(rsKey);
if (state == null) {
- throw new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0037", rsKey)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30166, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30166, rsKey));
}
return state;
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -228,7 +228,7 @@
// Defect 16059 - Rewrite the command to replace references, etc. with values.
QueryRewriter.evaluateAndRewrite(atomicCommand, eval, context, metadata);
} catch (QueryValidatorException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("AccessNode.rewrite_failed", atomicCommand)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30174, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30174, atomicCommand));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/ArrayTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/ArrayTableNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/ArrayTableNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -97,10 +97,10 @@
try {
array = ((java.sql.Array)array).getArray();
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30188, e);
}
} else {
- throw new FunctionExecutionException(QueryPlugin.Util.getString("FunctionMethods.not_array_value", array.getClass())); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30189, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30189, array.getClass()));
}
}
@@ -110,9 +110,9 @@
Object val = Array.get(array, output);
tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
} catch (TransformationException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("ArrayTableNode.conversion_error", col.getName())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30190, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30190, col.getName()));
} catch (ArrayIndexOutOfBoundsException e) {
- throw new FunctionExecutionException(QueryPlugin.Util.getString("FunctionMethods.array_index", output + 1)); //$NON-NLS-1$
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30191, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30191, output + 1));
}
}
addBatchRow(tuple);
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -135,7 +135,7 @@
addBatchRow(Arrays.asList(new Object[] {tuple.get(0)}));
} else {
// Should never happen since the number of expected results is known
- throw new TeiidComponentException(QueryPlugin.Util.getString("BatchedUpdateNode.unexpected_end_of_batch", commandCount, numExpectedCounts)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30192, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30192, commandCount, numExpectedCounts));
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -227,7 +227,7 @@
try {
tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
} catch (TransformationException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30176, col.getName(), textLine, systemId));
}
}
addBatchRow(tuple);
@@ -254,7 +254,7 @@
}
if (table.isUsingRowDelimiter()) {
if (exact && sb.length() < lineWidth) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.invalid_width", sb.length(), lineWidth, textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30177, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30177, sb.length(), lineWidth, textLine, systemId));
}
return sb.toString();
}
@@ -273,7 +273,7 @@
}
return sb.toString();
}
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.line_too_long", textLine+1, systemId, maxLength)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30178, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30178, textLine+1, systemId, maxLength));
}
}
}
@@ -302,7 +302,7 @@
}
return (char)c;
} catch (IOException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30179, e);
}
}
@@ -331,7 +331,7 @@
reader = (BufferedReader)r;
}
} catch (SQLException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30180, e);
}
//process the skip field
@@ -367,7 +367,7 @@
for (TextColumn col : table.getColumns()) {
Integer index = nameIndexes.get(col.getName().toUpperCase());
if (index == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.header_missing", col.getName(), systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30181, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30181, col.getName(), systemId));
}
nameIndexes.put(col.getName(), index);
}
@@ -405,7 +405,7 @@
}
line = readLine(lineWidth, false);
if (line == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.unclosed", systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30182, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30182, systemId));
}
}
char[] chars = line.toCharArray();
@@ -435,7 +435,7 @@
builder.append(chr);
} else {
if (builder.toString().trim().length() != 0) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30183, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30183, textLine, systemId));
}
qualified = true;
builder = new StringBuilder(); //start the entry over
@@ -446,11 +446,11 @@
} else {
if (escaped) {
//don't understand other escape sequences yet
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.unknown_escape", chr, textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30184, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30184, chr, textLine, systemId));
}
if (wasQualified && !qualified) {
if (!Character.isWhitespace(chr)) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30185, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30185, textLine, systemId));
}
//else just ignore
} else {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/TupleSourceValueIterator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/TupleSourceValueIterator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/TupleSourceValueIterator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,6 +25,7 @@
import org.teiid.common.buffer.IndexedTupleSource;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.util.ValueIterator;
@@ -53,7 +54,7 @@
try {
return tupleSourceIterator.hasNext();
} catch (TeiidProcessingException err) {
- throw new TeiidComponentException(err, err.getMessage());
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30186, err, err.getMessage());
}
}
@@ -65,7 +66,7 @@
try {
return tupleSourceIterator.nextTuple().get(columnIndex);
} catch (TeiidProcessingException err) {
- throw new TeiidComponentException(err, err.getMessage());
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30187, err, err.getMessage());
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -153,7 +153,7 @@
try {
this.wait();
} catch (InterruptedException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30169, e);
}
}
unwrapException(asynchException);
@@ -168,7 +168,7 @@
try {
item = result.iter.next();
} catch (XPathException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("XMLTableNode.error", e.getMessage())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30170, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30170, e.getMessage()));
}
rowCount++;
if (item == null) {
@@ -271,7 +271,7 @@
continue;
}
if (pathIter.next() != null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("XMLTableName.multi_value", proColumn.getName())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30171, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30171, proColumn.getName()));
}
Object value = colItem;
if (value instanceof AtomicValue) {
@@ -293,7 +293,7 @@
value = FunctionDescriptor.importValue(value, proColumn.getSymbol().getType());
tuple.add(value);
} catch (XPathException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("XMLTableNode.path_error", proColumn.getName())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30172, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30172, proColumn.getName()));
}
}
}
@@ -332,7 +332,7 @@
this.notifyAll();
}
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30173, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -59,7 +59,7 @@
throws BlockedException, TeiidComponentException, TeiidProcessingException{
LogManager.logTrace(org.teiid.logging.LogConstants.CTX_XML_PLAN, "ABORT processing now."); //$NON-NLS-1$
- throw new TeiidComponentException(DEFAULT_MESSAGE);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30210, DEFAULT_MESSAGE);
}
public String toString() {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -147,7 +147,7 @@
String elem = (isElement ? QueryPlugin.Util.getString("AddNodeInstruction.element__1" ) : QueryPlugin.Util.getString("AddNodeInstruction.attribute__2")); //$NON-NLS-1$ //$NON-NLS-2$
Object[] params = new Object[]{elem, this.descriptor.getQName(), this.descriptor.getNamespaceURI(), this.descriptor.getNamespaceURIs()};
String msg = QueryPlugin.Util.getString("AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3", params); //$NON-NLS-1$
- throw new TeiidComponentException(msg);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30206, msg);
}
env.incrementCurrentProgramCounter();
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/CriteriaCondition.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/CriteriaCondition.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/CriteriaCondition.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -31,6 +31,7 @@
import org.teiid.api.exception.query.ExpressionEvaluationException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.symbol.ElementSymbol;
@@ -81,7 +82,7 @@
try {
return new Evaluator(elementMap, env.getDataManager(), env.getProcessorContext()).evaluate(this.criteria, data);
} catch (ExpressionEvaluationException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30207, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/DocumentInProgress.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/DocumentInProgress.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/DocumentInProgress.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -38,6 +38,7 @@
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.MappingNodeConstants;
import org.xml.sax.SAXException;
@@ -65,7 +66,7 @@
handler = factory.newTransformerHandler();
handler.setResult(new StreamResult(fsisf.getOuputStream()));
} catch (Exception e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30204, e);
}
transformer = handler.getTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
@@ -263,7 +264,7 @@
try {
endDocument();
} catch (SAXException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30205, e);
}
finished = true;
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -62,7 +62,7 @@
try {
doc.moveToParent();
} catch (SAXException err) {
- throw new TeiidComponentException(err, "Failed to move UP in document"); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30193, err, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30193));
}
break;
case DOWN:
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -288,7 +288,7 @@
uri = MappingNodeConstants.INSTANCES_NAMESPACE;
}else {
String msg = QueryPlugin.Util.getString("XMLPlanner.no_uri", new Object[] {namespacePrefix, name}); //$NON-NLS-1$
- throw new TeiidComponentException(msg);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30213, msg);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -92,7 +92,7 @@
//handle the case of exception on recursion limit reached
if (terminate && this.exceptionOnRecursionLimit){
- throw new TeiidComponentException("ERR.015.006.0039", QueryPlugin.Util.getString("ERR.015.006.0039")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30212, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30212));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -181,7 +181,7 @@
// check if we walked over the row limit
if (this.currentRow != null && this.resultInfo.getUserRowLimit() > 0 && this.currentRowNumber > this.resultInfo.getUserRowLimit()) {
if (this.resultInfo.exceptionOnRowlimit()) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("row_limit_passed", new Object[] { new Integer(this.resultInfo.getUserRowLimit()), this.resultInfo.getResultSetName()})); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30211, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30211, new Object[] { new Integer(this.resultInfo.getUserRowLimit()), this.resultInfo.getResultSetName()}));
}
// well, we did not throw a exception, that means we need to limit it to current row
this.currentRow = null;
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -82,7 +82,7 @@
if (this.parentContext != null) {
return this.parentContext.getCurrentRow(aliasResultName);
}
- throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30214, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30214, aliasResultName));
}
return executor.currentRow();
}
@@ -99,7 +99,7 @@
if (this.parentContext != null) {
return this.parentContext.getNextRow(aliasResultName);
}
- throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30215, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30215, aliasResultName));
}
return executor.nextRow();
}
@@ -137,7 +137,7 @@
if (this.parentContext != null) {
return this.parentContext.getOutputElements(resultName);
}
- throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", resultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30216, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30216, resultName));
}
return executor.getOutputElements();
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -173,7 +173,7 @@
try {
reader = xml.getCharacterStream();
} catch (SQLException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30194, e);
}
try {
validateDoc(reader);
@@ -226,7 +226,7 @@
if (xmlSchemas == null || xmlSchemas.isEmpty()){
// if there is no schema no need to validate
// return a warning saying there is no schema
- TeiidException noSchema = new TeiidComponentException("ERR.015.006.0042", QueryPlugin.Util.getString("ERR.015.006.0042")); //$NON-NLS-1$ //$NON-NLS-2$
+ TeiidException noSchema = new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0042")); //$NON-NLS-1$
addWarning(noSchema);
return;
}
@@ -254,9 +254,9 @@
parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", nameSpaceMap.keySet().toArray()); //$NON-NLS-1$
reader = parser.getXMLReader();
} catch (SAXException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30195, err);
} catch (ParserConfigurationException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30196, err);
}
// place the schema into the customized entity resolver so that we can
@@ -275,9 +275,9 @@
try{
reader.parse(source);
} catch(SAXException se){
- throw new TeiidComponentException(se);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30197, se);
} catch(IOException io){
- throw new TeiidComponentException(io);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30198, io);
}
// determine if we have any warnings, errors, or fatal errors and report as necessary
@@ -329,9 +329,9 @@
try {
parser = spf.newSAXParser();
} catch (ParserConfigurationException err) {
- throw new TeiidException(err);
+ throw new TeiidException(QueryPlugin.Event.TEIID30199, err);
} catch (SAXException err) {
- throw new TeiidException(err);
+ throw new TeiidException(QueryPlugin.Event.TEIID30200, err);
}
PeekContentHandler pch = new PeekContentHandler();
@@ -340,16 +340,16 @@
try {
is = schema.getBinaryStream();
} catch (SQLException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30201, e);
}
InputSource source = new InputSource(is);
pch.targetNameSpace = null;
try {
parser.parse(source, pch);
} catch (SAXException err) {
- throw new TeiidException(err);
+ throw new TeiidException(QueryPlugin.Event.TEIID30202, err);
} catch (IOException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30203, err);
} finally {
try {
is.close();
@@ -438,13 +438,13 @@
}
public void error(SAXParseException ex){
- addException(new TeiidComponentException("ERR.015.006.0049", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
+ addException(new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$
}
public void fatalError(SAXParseException ex){
- addException(new TeiidComponentException("ERR.015.006.0048", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
+ addException(new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$
}
public void warning(SAXParseException ex){
- addException(new TeiidComponentException("ERR.015.006.0049", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
+ addException(new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLValueTranslator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLValueTranslator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLValueTranslator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -35,6 +35,7 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.TransformationException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionMethods;
import org.teiid.query.function.source.XMLSystemFunctions;
@@ -125,7 +126,7 @@
try {
valueStr = XMLSystemFunctions.convertToAtomicValue(value).getStringValue();
} catch (TransformerException e) {
- throw new TransformationException(e, e.getMessage());
+ throw new TransformationException(QueryPlugin.Event.TEIID30208, e, e.getMessage());
}
break;
case DOUBLE_CODE:
@@ -151,7 +152,7 @@
try {
dtv = ((DateTimeValue)XMLSystemFunctions.convertToAtomicValue(value));
} catch (TransformerException e) {
- throw new TransformationException(e, e.getMessage());
+ throw new TransformationException(QueryPlugin.Event.TEIID30209, e, e.getMessage());
}
valueStr = new GYearMonthValue(dtv.getYear(), dtv.getMonth(), dtv.getTimezoneInMinutes()).getStringValue();
break;
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -95,7 +95,7 @@
try {
subCommand = parser.parseUpdateProcedure(plan);
} catch(QueryParserException e) {
- throw new QueryResolverException(e, "ERR.015.008.0045", QueryPlugin.Util.getString("ERR.015.008.0045", group, procCommand.getClass().getSimpleName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30060, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30060, group, procCommand.getClass().getSimpleName()));
}
return subCommand;
@@ -173,7 +173,7 @@
} else if (type == Command.TYPE_INSERT) {
name = "Insert"; //$NON-NLS-1$
}
- throw new QueryResolverException("ERR.015.008.0009", QueryPlugin.Util.getString("ERR.015.008.0009", group, name)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30061, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30061, group, name));
}
return info;
}
@@ -187,7 +187,7 @@
try {
return QueryResolver.resolveView(group, metadata.getVirtualPlan(group.getMetadataID()), SQLConstants.Reserved.SELECT, metadata).getUpdateInfo();
} catch (QueryValidatorException e) {
- throw new QueryResolverException(e, e.getMessage());
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30062, e, e.getMessage());
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/QueryResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -238,7 +238,7 @@
Expression binding = QueryParser.getQueryParser().parseSelectExpression(bindings.next());
parsedBindings.add(binding);
} catch (QueryParserException err) {
- throw new TeiidComponentException(err);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30063, err);
}
}
return parsedBindings;
@@ -276,7 +276,7 @@
// Resolve this command
resolver.resolveCommand(currentCommand, resolverMetadata, resolveNullLiterals);
} catch(QueryMetadataException e) {
- throw new QueryResolverException(e, e.getMessage());
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30064, e, e.getMessage());
}
// Flag that this command has been resolved.
@@ -429,7 +429,7 @@
try {
result = QueryParser.getQueryParser().parseCommand(qnode.getQuery());
} catch(QueryParserException e) {
- throw new QueryResolverException(e, "ERR.015.008.0011", QueryPlugin.Util.getString("ERR.015.008.0011", virtualGroup)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30065, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30065, virtualGroup));
}
bindings = qnode.getBindings();
@@ -475,7 +475,7 @@
List<Expression> projectedSymbols)
throws QueryValidatorException {
if (symbols.size() != projectedSymbols.size()) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("QueryResolver.wrong_view_symbols", virtualGroup, symbols.size(), projectedSymbols.size())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30066, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30066, virtualGroup, symbols.size(), projectedSymbols.size()));
}
for (int i = 0; i < projectedSymbols.size(); i++) {
Expression projectedSymbol = projectedSymbols.get(i);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/AlterResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/AlterResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/AlterResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -64,7 +64,7 @@
viewTarget = false;
}
if (viewTarget && !QueryResolver.isView(alter.getTarget(), metadata)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("AlterResolver.not_a_view", alter.getTarget())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30116, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30116, alter.getTarget()));
}
if (alter.getDefinition() != null) {
QueryResolver.resolveCommand(alter.getDefinition(), alter.getTarget(), type, metadata.getDesignTimeMetadata());
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/DynamicCommandResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/DynamicCommandResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/DynamicCommandResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -78,7 +78,7 @@
String targetType = DataTypeManager.DefaultDataTypes.STRING;
if (!targetType.equals(sqlType) && !DataTypeManager.isImplicitConversion(sqlType, targetType)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("DynamicCommandResolver.SQL_String", sqlType)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30100, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30100, sqlType));
}
if (dynamicCmd.getUsing() != null && !dynamicCmd.getUsing().isEmpty()) {
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -122,7 +122,7 @@
}
if (namedParameters && param.getParameterType() != SPParameter.RETURN_VALUE) {
if (namedExpressions.put(param.getName(), param.getExpression()) != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ExecResolver.duplicate_named_params", param.getName().toUpperCase())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30138, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30138, param.getName().toUpperCase()));
}
} else {
postionalExpressions.put(param.getIndex() + adjustIndex, param.getExpression());
@@ -158,11 +158,11 @@
}
if (storedProcedureCommand.isCalledWithReturn() && !hasReturnValue) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ExecResolver.return_expected", storedProcedureCommand.getGroup())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30139, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30139, storedProcedureCommand.getGroup()));
}
if(!namedParameters && (inputParams > postionalExpressions.size())) {
- throw new QueryResolverException("ERR.015.008.0007", QueryPlugin.Util.getString("ERR.015.008.0007", inputParams, origInputs, storedProcedureCommand.getGroup())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30140, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30140, inputParams, origInputs, storedProcedureCommand.getGroup()));
}
// Walk through the resolved parameters and set the expressions from the
@@ -202,10 +202,10 @@
// Check for leftovers, i.e. params entered by user w/ wrong/unknown names
if (!namedExpressions.isEmpty()) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ExecResolver.invalid_named_params", namedExpressions.keySet(), expected)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30141, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30141, namedExpressions.keySet(), expected));
}
if (!postionalExpressions.isEmpty()) {
- throw new QueryResolverException("ERR.015.008.0007", QueryPlugin.Util.getString("ERR.015.008.0007", inputParams, origInputs, storedProcedureCommand.getGroup().toString())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30142, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30142, inputParams, origInputs, storedProcedureCommand.getGroup().toString()));
}
// Create temporary metadata that defines a group based on either the stored proc
@@ -254,7 +254,7 @@
// and add implicit conversion if necessary
Class<?> exprType = expr.getType();
if(paramType == null || exprType == null) {
- throw new QueryResolverException("ERR.015.008.0061", QueryPlugin.Util.getString("ERR.015.008.0061", storedProcedureCommand.getProcedureName(), param.getName())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30143, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30143, storedProcedureCommand.getProcedureName(), param.getName()));
}
String tgtType = DataTypeManager.getDataTypeName(paramType);
String srcType = DataTypeManager.getDataTypeName(exprType);
@@ -262,13 +262,13 @@
if (param.getParameterType() == SPParameter.RETURN_VALUE || param.getParameterType() == SPParameter.OUT) {
if (!ResolverUtil.canImplicitlyConvert(tgtType, srcType)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ExecResolver.out_type_mismatch", param.getParameterSymbol(), tgtType, srcType)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30144, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30144, param.getParameterSymbol(), tgtType, srcType));
}
} else {
try {
result = ResolverUtil.convertExpression(expr, tgtType, metadata);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString("ExecResolver.Param_convert_fail", new Object[] { srcType, tgtType})); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30145, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30145, new Object[] { srcType, tgtType}));
}
param.setExpression(result);
}
@@ -294,7 +294,7 @@
QueryNode plan = storedProcedureInfo.getQueryPlan();
if (plan.getQuery() == null) {
- throw new QueryResolverException("ERR.015.008.0009", QueryPlugin.Util.getString("ERR.015.008.0009", group, "Stored Procedure")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30146, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30146));
}
return plan.getQuery();
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -146,7 +146,7 @@
try {
resolveList(insert.getVariables(), metadata, null, groups);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString("ERR.015.012.0054", insert.getGroup(), e.getUnresolvedSymbols())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30126, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30126, insert.getGroup(), e.getUnresolvedSymbols()));
}
}
@@ -171,7 +171,7 @@
// check that # of variables == # of values
if(values.size() != insert.getVariables().size()) {
- throw new QueryResolverException("ERR.015.008.0010", QueryPlugin.Util.getString("ERR.015.008.0010", insert.getVariables().size(), values.size())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30127, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30127, insert.getVariables().size(), values.size()));
}
Iterator valueIter = values.iterator();
@@ -193,7 +193,7 @@
&& !DataTypeManager.isImplicitConversion(DataTypeManager.getDataTypeName(expression.getType()),
DataTypeManager.getDataTypeName(element.getType()))) {
//TODO: a special case here is a projected literal
- throw new QueryResolverException(QueryPlugin.Util.getString("InsertResolver.cant_convert_query_type", new Object[] {expression, expression.getType().getName(), element, element.getType().getName()})); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30128, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30128, new Object[] {expression, expression.getType().getName(), element, element.getType().getName()}));
}
} else if (element.getType() == null && expression.getType() != null) {
element.setType(expression.getType());
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -72,7 +72,7 @@
QueryResolver.resolveCommand(rightCommand, metadata.getMetadata(), false);
if (firstProject.size() != rightCommand.getProjectedSymbols().size()) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0035", setQuery.getOperation())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30147, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30147, setQuery.getOperation()));
}
checkSymbolTypes(firstProjectTypes, rightCommand.getProjectedSymbols());
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -118,12 +118,12 @@
QueryResolver.resolveCommand(queryExpression, metadata.getMetadata(), false);
if (!discoveredGroups.add(obj.getGroupSymbol())) {
- throw new QueryResolverException(QueryPlugin.Util.getString("SimpleQueryResolver.duplicate_with", obj.getGroupSymbol())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30101, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30101, obj.getGroupSymbol()));
}
List<? extends Expression> projectedSymbols = obj.getCommand().getProjectedSymbols();
if (obj.getColumns() != null && !obj.getColumns().isEmpty()) {
if (obj.getColumns().size() != projectedSymbols.size()) {
- throw new QueryResolverException(QueryPlugin.Util.getString("SimpleQueryResolver.mismatched_with_columns", obj.getGroupSymbol())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30102, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30102, obj.getGroupSymbol()));
}
Iterator<ElementSymbol> iter = obj.getColumns().iterator();
for (Expression singleElementSymbol : projectedSymbols) {
@@ -190,7 +190,7 @@
try {
visitor.throwException(false);
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30103, e);
}
}
@@ -210,7 +210,7 @@
try {
ResolverUtil.resolveGroup(obj, metadata);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30104, err);
}
}
@@ -223,7 +223,7 @@
try {
QueryResolver.resolveCommand(command, metadata.getMetadata(), false);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30105, err);
}
}
@@ -240,7 +240,7 @@
}
obj.setElementSymbols(elementSymbols);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30106, err);
}
}
@@ -288,7 +288,7 @@
try {
obj.setFile(ResolverUtil.convertExpression(obj.getFile(), DataTypeManager.DefaultDataTypes.CLOB, metadata));
} catch (QueryResolverException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30107, e);
}
postTableFunctionReference(obj, saved);
//set to fixed width if any column has width specified
@@ -324,7 +324,7 @@
column.setDefaultExpression(ex);
}
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30108, e);
}
}
@@ -357,7 +357,7 @@
try {
ResolverUtil.addTempGroup(metadata, obj.getGroupSymbol(), obj.getProjectedSymbols(), false);
} catch (QueryResolverException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30109, err);
}
obj.getGroupSymbol().setMetadataID(metadata.getMetadataStore().getTempGroupID(obj.getGroupSymbol().getName()));
//now resolve the projected symbols
@@ -367,7 +367,7 @@
try {
ResolverVisitor.resolveLanguageObject(symbol, groups, null, metadata);
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30110, e);
}
}
}
@@ -383,7 +383,7 @@
try {
ResolverUtil.addTempGroup(metadata, obj.getGroupSymbol(), obj.getCommand().getProjectedSymbols(), false);
} catch (QueryResolverException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30111, err);
}
obj.getGroupSymbol().setMetadataID(metadata.getMetadataStore().getTempGroupID(obj.getGroupSymbol().getName()));
}
@@ -393,14 +393,14 @@
visitNode(group);
try {
if (!group.isProcedure() && metadata.isXMLGroup(group.getMetadataID())) {
- throw new QueryResolverException("ERR.015.008.0003", QueryPlugin.Util.getString("ERR.015.008.0003")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30112, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30112));
}
discoveredGroup(group);
if (group.isProcedure()) {
createProcRelational(obj);
}
} catch(TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30113, e);
}
}
@@ -468,7 +468,7 @@
for (Expression ses : projectedSymbols) {
if (!foundNames.add(Symbol.getShortName(ses))) {
- throw new QueryResolverException(QueryPlugin.Util.getString("SimpleQueryResolver.Proc_Relational_Name_conflict", fullName)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30114, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30114, fullName));
}
}
@@ -524,9 +524,9 @@
for (GroupSymbol group : discoveredGroups) {
if (!this.currentGroups.add(group)) {
String msg = QueryPlugin.Util.getString("ERR.015.008.0046", group.getName()); //$NON-NLS-1$
- QueryResolverException qre = new QueryResolverException("ERR.015.008.0046", msg); //$NON-NLS-1$
+ QueryResolverException qre = new QueryResolverException(msg);
qre.addUnresolvedSymbol(new UnresolvedSymbolDescription(group.toString(), msg));
- throw new TeiidRuntimeException(qre);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30115, qre);
}
}
discoveredGroups.clear();
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -64,22 +64,22 @@
//assuming that all temp table creates are local, the user must use a local name
if (group.getName().indexOf(Symbol.SEPARATOR) != -1) {
- throw new QueryResolverException(QueryPlugin.Util.getString("TempTableResolver.unqualified_name_required", group.getName())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30117, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30117, group.getName()));
}
//this will only check non-temp groups
Collection exitsingGroups = metadata.getMetadata().getGroupsForPartialName(group.getName());
if(!exitsingGroups.isEmpty()) {
- throw new QueryResolverException(QueryPlugin.Util.getString("TempTableResolver.table_already_exists", group.getName())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30118, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30118, group.getName()));
}
if (metadata.getMetadata().hasProcedure(group.getName())) {
- throw new QueryResolverException(QueryPlugin.Util.getString("TempTableResolver.table_already_exists", group.getName())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30119, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30119, group.getName()));
}
//now we will be more specific for temp groups
TempMetadataID id = metadata.getMetadataStore().getTempGroupID(group.getName());
if (id != null && !metadata.isTemporaryTable(id)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("TempTableResolver.table_already_exists", group.getName())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30120, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30120, group.getName()));
}
//if we get here then either the group does not exist or has already been defined as a temp table
//if it has been defined as a temp table, that's ok we'll use this as the new definition and throw an
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -140,7 +140,7 @@
case ParameterInfo.OUT:
case ParameterInfo.RETURN_VALUE:
if (param.getExpression() != null && !isAssignable(metadata, param)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("UpdateProcedureResolver.only_variables", param.getExpression())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30121, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30121, param.getExpression()));
}
sp.setCallableStatement(true);
break;
@@ -203,7 +203,7 @@
AssignmentStatement assStmt = (AssignmentStatement)statement;
ResolverVisitor.resolveLanguageObject(assStmt.getVariable(), null, externalGroups, metadata);
if (!metadata.elementSupports(assStmt.getVariable().getMetadataID(), SupportConstants.Element.UPDATE)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("UpdateProcedureResolver.only_variables", assStmt.getVariable())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30122, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30122, assStmt.getVariable()));
}
//don't allow variable assignments to be external
assStmt.getVariable().setIsExternalReference(false);
@@ -214,7 +214,7 @@
Class<?> varType = exprStmt.getExpectedType();
Class<?> exprType = exprStmt.getExpression().getType();
if (exprType == null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolveVariablesVisitor.datatype_for_the_expression_not_resolvable")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30123, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30123));
}
String varTypeName = DataTypeManager.getDataTypeName(varType);
exprStmt.setExpression(ResolverUtil.convertExpression(exprStmt.getExpression(), varTypeName, metadata));
@@ -234,13 +234,13 @@
String groupName = loopStmt.getCursorName();
if (metadata.getMetadataStore().getTempGroupID(groupName) != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0065")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30124, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30124));
}
//check - cursor name should not start with #
if(GroupSymbol.isTempGroupName(loopStmt.getCursorName())){
String errorMsg = QueryPlugin.Util.getString("ResolveVariablesVisitor.reserved_word_for_temporary_used", loopStmt.getCursorName()); //$NON-NLS-1$
- throw new QueryResolverException(errorMsg);
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30125, errorMsg);
}
Command cmd = loopStmt.getCommand();
resolveEmbeddedCommand(metadata, externalGroups, cmd);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -205,7 +205,7 @@
}
if (subQuery && group.getDefinition() != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("XMLQueryResolver.aliased_subquery", group)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30129, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30129, group));
}
//external groups
@@ -266,11 +266,11 @@
//we throw exceptions in these cases, since the clauses will not be resolved
if (query.getGroupBy() != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0031")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30130, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30130));
}
if (query.getHaving() != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0032")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30131, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30131));
}
}
@@ -295,7 +295,7 @@
try {
ResolverUtil.addTempGroup(metadata, new GroupSymbol(baseNode.getFullyQualifiedName()), Collections.EMPTY_LIST, false).setMetadataType(Type.XML);
} catch (QueryResolverException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30132, e);
}
}
}
@@ -341,7 +341,7 @@
String symbolName = es.getName();
if(!subquery && (symbolName.equalsIgnoreCase("xml") || symbolName.equalsIgnoreCase(group.getName() + ".xml"))) { //$NON-NLS-1$ //$NON-NLS-2$
if(elements.size() != 1) {
- throw new QueryResolverException(QueryPlugin.Util.getString("XMLQueryResolver.xml_only_valid_alone")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30133, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30133));
}
select.clearSymbols();
MultipleElementSymbol all = new MultipleElementSymbol();
@@ -370,9 +370,9 @@
List<ElementSymbol> elementsInNode = getElementsUnderNode(elementSymbol.getMetadataID(), validElements.values(), metadata);
all.setElementSymbols(elementsInNode);
} else if (ss instanceof ExpressionSymbol) {
- throw new QueryResolverException(QueryPlugin.Util.getString("XMLQueryResolver.no_expressions_in_select")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30134, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30134));
} else if (ss instanceof AliasSymbol) {
- throw new QueryResolverException("ERR.015.008.0070", QueryPlugin.Util.getString("ERR.015.008.0070")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30135, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30135));
}
}
@@ -487,7 +487,7 @@
ResolverVisitor.resolveLanguageObject(elem, Collections.EMPTY_LIST, externalGroups, metadata);
return;
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, "ERR.015.008.0019", QueryPlugin.Util.getString("ERR.015.008.0019", fullName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30136, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30136, fullName));
}
}
}
@@ -496,7 +496,7 @@
if (partialMatches.size() != 1) {
// Found multiple matches
- throw new QueryResolverException("ERR.015.008.0020", QueryPlugin.Util.getString("ERR.015.008.0020", fullName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30137, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30137, fullName));
}
ElementSymbol exactMatch = partialMatches.get(0);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -190,7 +190,7 @@
}
//Expression is wrong type and can't convert
- throw new QueryResolverException("ERR.015.008.0041", QueryPlugin.Util.getString("ERR.015.008.0041", new Object[] {targetTypeName, sourceExpression, sourceTypeName})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30082, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30082, new Object[] {targetTypeName, sourceExpression, sourceTypeName}));
}
public static Constant convertConstant(String sourceTypeName,
@@ -273,7 +273,7 @@
Reference ref = (Reference)expression;
if (ref.isPositional() && ref.getType() == null) {
if (targetType == null) {
- throw new QueryResolverException("ERR.015.008.0026", QueryPlugin.Util.getString("ERR.015.008.0026", surroundingExpression)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30083, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30083, surroundingExpression));
}
ref.setType(targetType);
}
@@ -351,7 +351,7 @@
// if we already have a matched symbol, matching again here means it is duplicate/ambiguous
if(matchedSymbol != null) {
if (!matchedSymbol.equals(knownElements.get(j))) {
- throw new QueryResolverException("ERR.015.008.0042", QueryPlugin.Util.getString("ERR.015.008.0042", symbolName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30084, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30084, symbolName));
}
continue;
}
@@ -374,27 +374,27 @@
int elementOrder = Integer.valueOf(c.getValue().toString()).intValue();
// adjust for the 1 based index.
if (elementOrder > knownElements.size() || elementOrder < 1) {
- throw new QueryResolverException(QueryPlugin.Util.getString("SQLParser.non_position_constant", c)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30085, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30085, c));
}
orderBy.setExpressionPosition(i, elementOrder - 1);
continue;
}
//handle order by expressions
if (command instanceof SetQuery) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.setquery_order_expression", sortKey)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30086, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30086, sortKey));
}
for (ElementSymbol symbol : ElementCollectorVisitor.getElements(sortKey, false)) {
try {
ResolverVisitor.resolveLanguageObject(symbol, fromClauseGroups, command.getExternalGroupContexts(), metadata);
} catch(QueryResolverException e) {
- throw new QueryResolverException(e, "ERR.015.008.0043", QueryPlugin.Util.getString("ERR.015.008.0043", symbol.getName()) );//$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30087, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30087, symbol.getName()) );
}
}
ResolverVisitor.resolveLanguageObject(sortKey, metadata);
int index = expressions.indexOf(SymbolMap.getExpression(sortKey));
if (index == -1 && !isSimpleQuery) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.invalid_unrelated", sortKey)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30088, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30088, sortKey));
}
orderBy.setExpressionPosition(i, index);
}
@@ -423,7 +423,7 @@
Object defaultValue = metadata.getDefaultValue(mid);
if (defaultValue == null && !metadata.elementSupports(mid, SupportConstants.Element.NULL)) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.required_param", symbol.getOutputName())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30089, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30089, symbol.getOutputName()));
}
return getProperlyTypedConstant(defaultValue, type);
@@ -447,7 +447,7 @@
Object newValue = DataTypeManager.transformValue(defaultValue, parameterType);
return new Constant(newValue, parameterType);
} catch (TransformationException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString("ResolverUtil.error_converting_value_type", defaultValue, defaultValue.getClass(), parameterType)); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30090, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30090, defaultValue, defaultValue.getClass(), parameterType));
}
}
@@ -560,7 +560,7 @@
Set<String> names = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (Expression ses : symbols) {
if (!names.add(Symbol.getShortName(ses))) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.duplicateName", symbol, Symbol.getShortName(ses))); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30091, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30091, symbol, Symbol.getShortName(ses)));
}
}
@@ -713,13 +713,13 @@
// single projected symbol of the subquery
Class exprType = expression.getType();
if(exprType == null) {
- throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", expression)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30092, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30092, expression));
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
Collection<Expression> projectedSymbols = crit.getCommand().getProjectedSymbols();
if (projectedSymbols.size() != 1){
- throw new QueryResolverException("ERR.015.008.0032", QueryPlugin.Util.getString("ERR.015.008.0032", crit.getCommand())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30093, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30093, crit.getCommand()));
}
Class<?> subqueryType = projectedSymbols.iterator().next().getType();
String subqueryTypeName = DataTypeManager.getDataTypeName(subqueryType);
@@ -727,7 +727,7 @@
try {
result = convertExpression(expression, exprTypeName, subqueryTypeName, metadata);
} catch (QueryResolverException qre) {
- throw new QueryResolverException(qre, "ERR.015.008.0033", QueryPlugin.Util.getString("ERR.015.008.0033", crit)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30094, qre, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30094, crit));
}
return result;
}
@@ -737,17 +737,17 @@
ResolvedLookup result = new ResolvedLookup();
// Special code to handle setting return type of the lookup function to match the type of the return element
if( !(args[0] instanceof Constant) || !(args[1] instanceof Constant) || !(args[2] instanceof Constant)) {
- throw new QueryResolverException("ERR.015.008.0063", QueryPlugin.Util.getString("ERR.015.008.0063")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30095, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30095));
}
// If code table name in lookup function refers to temp group throw exception
GroupSymbol groupSym = new GroupSymbol((String) ((Constant)args[0]).getValue());
try {
groupSym.setMetadataID(metadata.getGroupID((String) ((Constant)args[0]).getValue()));
if (groupSym.getMetadataID() instanceof TempMetadataID) {
- throw new QueryResolverException("ERR.015.008.0065", QueryPlugin.Util.getString("ERR.015.008.0065", ((Constant)args[0]).getValue())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30096, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30096, ((Constant)args[0]).getValue()));
}
} catch(QueryMetadataException e) {
- throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", ((Constant)args[0]).getValue())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30097, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30097, ((Constant)args[0]).getValue()));
}
result.setGroup(groupSym);
@@ -758,7 +758,7 @@
try {
ResolverVisitor.resolveLanguageObject(returnElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", returnElementName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30098, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30098, returnElementName));
}
result.setReturnElement(returnElement);
@@ -767,7 +767,7 @@
try {
ResolverVisitor.resolveLanguageObject(keyElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", keyElementName)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30099, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30099, keyElementName));
}
result.setKeyElement(keyElement);
args[3] = convertExpression(args[3], DataTypeManager.getDataTypeName(keyElement.getType()), metadata);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -454,7 +454,7 @@
types[i] = args[i].getType();
if(types[i] == null) {
if(!(args[i] instanceof Reference)){
- throw new QueryResolverException("ERR.015.008.0035", QueryPlugin.Util.getString("ERR.015.008.0035", new Object[] {args[i], function})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30067, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30067, new Object[] {args[i], function}));
}
hasArgWithoutType = true;
}
@@ -478,14 +478,14 @@
FunctionForm form = library.findFunctionForm(function.getName(), args.length);
if(form == null) {
// Unknown function form
- throw new QueryResolverException("ERR.015.008.0039", QueryPlugin.Util.getString("ERR.015.008.0039", function)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30068, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30068, function));
}
// Known function form - but without type information
if (hasArgWithoutType) {
- throw new QueryResolverException("ERR.015.008.0036", QueryPlugin.Util.getString("ERR.015.008.0036", function)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30069, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30069, function));
}
// Known function form - unable to find implicit conversions
- throw new QueryResolverException("ERR.015.008.0040", QueryPlugin.Util.getString("ERR.015.008.0040", function)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30070, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30070, function));
}
if(fd.getName().equalsIgnoreCase(FunctionLibrary.CONVERT) || fd.getName().equalsIgnoreCase(FunctionLibrary.CAST)) {
@@ -499,7 +499,7 @@
!srcTypeClass.equals(dataTypeClass) &&
!DataTypeManager.isTransformable(srcTypeClass, dataTypeClass)) {
- throw new QueryResolverException("ERR.015.008.0037", QueryPlugin.Util.getString("ERR.015.008.0037", new Object[] {DataTypeManager.getDataTypeName(srcTypeClass), dataType})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30071, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30071, new Object[] {DataTypeManager.getDataTypeName(srcTypeClass), dataType}));
}
} else if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
ResolverUtil.ResolvedLookup lookup = ResolverUtil.resolveLookup(function, metadata);
@@ -607,7 +607,7 @@
criteria.setUpperExpression(ResolverUtil.convertExpression(upper, upperTypeName, commonType, metadata));
} else {
// Couldn't find a common type to implicitly convert to
- throw new QueryResolverException("ERR.015.008.0027", QueryPlugin.Util.getString("ERR.015.008.0027", expTypeName, lowerTypeName, criteria)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30072, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30072, expTypeName, lowerTypeName, criteria));
}
// invariants: exp.getType() == lower.getType() == upper.getType()
}
@@ -668,7 +668,7 @@
if (commonType == null) {
// Neither are aggs, but types can't be reconciled
- throw new QueryResolverException("ERR.015.008.0027", QueryPlugin.Util.getString("ERR.015.008.0027", new Object[] { leftTypeName, rightTypeName, ccrit })); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30073, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30073, new Object[] { leftTypeName, rightTypeName, ccrit }));
}
ccrit.setLeftExpression(ResolverUtil.convertExpression(leftExpression, leftTypeName, commonType, metadata) );
ccrit.setRightExpression(ResolverUtil.convertExpression(rightExpression, rightTypeName, commonType, metadata) );
@@ -709,7 +709,7 @@
result = ResolverUtil.convertExpression(expr, type, DataTypeManager.DefaultDataTypes.CLOB, metadata);
} else {
- throw new QueryResolverException("ERR.015.008.0029", QueryPlugin.Util.getString("ERR.015.008.0029", mcrit)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30074, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30074, mcrit));
}
}
}
@@ -722,7 +722,7 @@
// Check that each of the values are the same type as expression
Class exprType = scrit.getExpression().getType();
if(exprType == null) {
- throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", scrit.getExpression())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30075, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30075, scrit.getExpression()));
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
@@ -763,9 +763,9 @@
while(valIter.hasNext()) {
Expression value = (Expression) valIter.next();
if(value.getType() == null) {
- throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", value)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30076, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30076, value));
} else if(! value.getType().equals(setType)) {
- throw new QueryResolverException("ERR.015.008.0031", QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30077, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30077, scrit));
}
}
@@ -773,7 +773,7 @@
scrit.setExpression(ResolverUtil.convertExpression(scrit.getExpression(), exprTypeName, setTypeName, metadata));
} else {
- throw new QueryResolverException("ERR.015.008.0031", QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30078, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30078, scrit));
}
}
@@ -847,11 +847,11 @@
// 3. Perform implicit type conversions
String whenTypeName = ResolverUtil.getCommonType((String[])whenTypeNames.toArray(new String[whenTypeNames.size()]));
if (whenTypeName == null) {
- throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "WHEN", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30079, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30079, "WHEN", obj));//$NON-NLS-1$
}
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30080, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30080, "THEN/ELSE", obj));//$NON-NLS-1$
}
obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), whenTypeName, metadata));
ArrayList whens = new ArrayList(whenCount);
@@ -937,7 +937,7 @@
// 3. Perform implicit type conversions
String thenTypeName = ResolverUtil.getCommonType(thenTypeNames.toArray(new String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30081, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30081, "THEN/ELSE", obj)); //$NON-NLS-1$
}
ArrayList thens = new ArrayList(whenCount);
for (int i = 0; i < whenCount; i++) {
Modified: trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -316,7 +316,7 @@
whileStatement.setCondition(crit);
if(crit.equals(TRUE_CRITERIA)) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("QueryRewriter.infinite_while")); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30367, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30367));
} else if(crit.equals(FALSE_CRITERIA) || crit.equals(UNKNOWN_CRITERIA)) {
return;
}
@@ -541,7 +541,7 @@
try {
return rewriteExpressionDirect(element);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30368, err);
}
}
};
@@ -624,9 +624,9 @@
insert.setQueryExpression(query);
return rewriteInsert(correctDatatypes(insert));
} catch (QueryMetadataException err) {
- throw new QueryValidatorException(err, err.getMessage());
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30369, err, err.getMessage());
} catch (TeiidComponentException err) {
- throw new QueryValidatorException(err, err.getMessage());
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30370, err, err.getMessage());
}
}
@@ -642,7 +642,7 @@
try {
insert.setQueryExpression(createInlineViewQuery(new GroupSymbol("X"), insert.getQueryExpression(), metadata, insert.getVariables())); //$NON-NLS-1$
} catch (TeiidException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30371, err);
}
}
return insert;
@@ -1087,7 +1087,7 @@
return getCriteria(eval);
} catch(ExpressionEvaluationException e) {
- throw new QueryValidatorException(e, "ERR.015.009.0001", QueryPlugin.Util.getString("ERR.015.009.0001", crit)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30372, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30372, crit));
}
}
@@ -1344,7 +1344,7 @@
Object result = descriptor.invokeFunction(new Object[] { const2.getValue(), const1.getValue() } );
combinedConst = new Constant(result, descriptor.getReturnType());
} catch(FunctionExecutionException e) {
- throw new QueryValidatorException(e, "ERR.015.009.0003", QueryPlugin.Util.getString("ERR.015.009.0003", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30373, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30373, e.getMessage()));
}
} else {
Function conversion = new Function(descriptor.getName(), new Expression[] { rightExpr, const1 });
@@ -1904,7 +1904,7 @@
try {
return new Constant(FunctionMethods.convert(((Constant)value).getValue(), DataTypeManager.getDataTypeName(type)), es.getType());
} catch (FunctionExecutionException e) {
- throw new QueryValidatorException(e, e.getMessage());
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30374, e, e.getMessage());
}
}
return new Reference(es);
@@ -2421,7 +2421,7 @@
//TODO: update error messages
UpdateMapping mapping = info.findInsertUpdateMapping(insert, true);
if (mapping == null) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.nonUpdatable", insert.getVariables())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30375, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30375, insert.getVariables()));
}
Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols();
List<ElementSymbol> mappedSymbols = new ArrayList<ElementSymbol>(insert.getVariables().size());
@@ -2576,7 +2576,7 @@
TeiidProcessingException {
UpdateMapping mapping = info.findUpdateMapping(update.getChangeList().getClauseMap().keySet(), false);
if (mapping == null) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.nonUpdatable", update.getChangeList().getClauseMap().keySet())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30376, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30376, update.getChangeList().getClauseMap().keySet()));
}
Map<ElementSymbol, ElementSymbol> symbolMap = mapping.getUpdatableViewSymbols();
if (info.isSimple()) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupContext.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupContext.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -27,6 +27,7 @@
import java.util.List;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.GroupSymbol;
@@ -86,7 +87,7 @@
try {
return super.clone();
} catch (CloneNotSupportedException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30446, err);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -248,7 +248,7 @@
p = Pattern.compile(newPattern, Pattern.DOTALL);
patternCache.put(key, p);
} catch(PatternSyntaxException e) {
- throw new ExpressionEvaluationException(e, "ERR.015.006.0014", QueryPlugin.Util.getString("ERR.015.006.0014", new Object[]{originalPattern, e.getMessage()})); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30448, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30448, new Object[]{originalPattern, e.getMessage()}));
}
}
return p;
@@ -327,7 +327,7 @@
}
} else {
if (escaped) {
- throw new ExpressionEvaluationException(QueryPlugin.Util.getString("MatchCriteria.invalid_escape", new Object[] {pattern, new Character(escape)})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30449, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30449, new Object[] {pattern, new Character(escape)}));
}
appendCharacter(newPattern, character);
}
@@ -335,7 +335,7 @@
}
if (escaped) {
- throw new ExpressionEvaluationException(QueryPlugin.Util.getString("MatchCriteria.invalid_escape", new Object[] {pattern, new Character(escape)})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30450, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30450, new Object[] {pattern, new Character(escape)}));
}
if (!endsWithMatchAny) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/SetQuery.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/SetQuery.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/SetQuery.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -32,6 +32,7 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.EquivalenceUtil;
import org.teiid.core.util.HashCodeUtil;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.resolver.util.ResolverUtil;
import org.teiid.query.sql.LanguageObject;
@@ -141,7 +142,7 @@
try {
symbol = ResolverUtil.convertExpression(symbol, DataTypeManager.getDataTypeName(type), metadata);
} catch (QueryResolverException err) {
- throw new TeiidRuntimeException(err);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30447, err);
}
if (originalSymbol instanceof Symbol) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -70,11 +70,11 @@
} else if (parts.length == 3) {
locale = new Locale(parts[0], parts[1], parts[2]);
} else {
- LogManager.logError(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30032, localeString));
+ LogManager.logError(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30564, localeString));
return getComparator(padSpace);
}
final Collator c = Collator.getInstance(locale);
- LogManager.logError(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30033, locale));
+ LogManager.logError(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30565, locale));
return new Comparator<Object>() {
@Override
public int compare(Object o1, Object o2) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -66,7 +66,7 @@
}
Object value = variableMap.get(variable);
if (value == null && !variableMap.containsKey(variable)) {
- throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", variable, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30451, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30451, variable, "No value was available")); //$NON-NLS-1$
}
return value;
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/GlobalTableStoreImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -47,6 +47,7 @@
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.ReplicatedObject;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
@@ -371,9 +372,9 @@
oos.writeObject(null);
oos.close();
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30217, e);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30218, e);
}
}
@@ -390,7 +391,7 @@
}
ois.close();
} catch (Exception e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30219, e);
}
}
@@ -401,9 +402,9 @@
sendTable(stateId, oos, false);
oos.close();
} catch (IOException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30220, e);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30221, e);
}
}
@@ -435,7 +436,7 @@
} catch (Exception e) {
MatTableInfo info = this.getMatTableInfo(stateId);
info.setState(MatState.FAILED_LOAD, null);
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30222, e);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -123,7 +123,7 @@
currentTuple = tuple;
for (int i : notNull) {
if (tuple.get(i) == null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.not_null", columns.get(i))); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30236, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30236, columns.get(i)));
}
}
insertTuple(tuple, addRowId);
@@ -366,7 +366,7 @@
clone.activeReaders = new AtomicInteger();
return clone;
} catch (CloneNotSupportedException e) {
- throw new TeiidRuntimeException();
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30237);
} finally {
lock.readLock().unlock();
}
@@ -685,7 +685,7 @@
private void insertTuple(List<?> list, boolean ordered) throws TeiidComponentException, TeiidProcessingException {
if (tree.insert(list, ordered?InsertMode.ORDERED:InsertMode.NEW, -1) != null) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTable.duplicate_key")); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30238, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30238));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -187,7 +187,7 @@
Create create = (Create)command;
String tempTableName = create.getTable().getName();
if (contextStore.hasTempTable(tempTableName)) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableStore.table_exist_error", tempTableName));//$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30229, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30229, tempTableName));
}
contextStore.addTempTable(tempTableName, create, bufferManager, true, context);
return CollectionTupleSource.createUpdateCountTupleSource(0);
@@ -286,11 +286,11 @@
Object pk = metadata.getPrimaryKey(groupID);
String matViewName = metadata.getFullName(groupID);
if (pk == null) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_pk", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30230, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30230, matViewName));
}
List<?> ids = metadata.getElementIDsInKey(pk);
if (ids.size() > 1) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_composite", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30231, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30231, matViewName));
}
String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
@@ -299,7 +299,7 @@
}
TempTable tempTable = globalStore.getTempTableStore().getTempTable(matTableName);
if (!tempTable.isUpdatable()) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_updatable", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30232, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30232, matViewName));
}
Constant key = (Constant)proc.getParameter(2).getExpression();
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30012, matViewName, key));
@@ -334,11 +334,11 @@
try {
Object groupID = metadata.getGroupID(viewName);
if (!metadata.hasMaterialization(groupID) || metadata.getMaterialization(groupID) != null) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.not_implicit_matview", viewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30233, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30233, viewName));
}
return groupID;
} catch (QueryMetadataException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30234, e);
}
}
@@ -391,7 +391,7 @@
try {
info.wait(30000);
} catch (InterruptedException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30235, e);
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -248,9 +248,9 @@
tc.getTransaction().registerSynchronization(synch);
success = true;
} catch (RollbackException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30223, e);
} catch (SystemException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30224, e);
} finally {
if (!success) {
synchronizations.remove(transactionId);
@@ -269,7 +269,7 @@
try {
removeTempTableByName(name, null);
} catch (TeiidProcessingException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30225, e);
}
}
}
@@ -300,7 +300,7 @@
}
}
if (columns == null) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableStore.table_doesnt_exist_error", tempTableID)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30226, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30226, tempTableID));
}
LogManager.logDetail(LogConstants.CTX_DQP, "Creating temporary table", tempTableID); //$NON-NLS-1$
Create create = new Create();
@@ -328,7 +328,7 @@
throw new AssertionError("Expected active transaction"); //$NON-NLS-1$
}
if (!tempTable.getActive().compareAndSet(0, 1)) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTableStore.pending_update", tempTableID)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30227, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30227, tempTableID));
}
synch.tables.put(tempTableID, tempTable.clone());
}
@@ -336,7 +336,7 @@
return tempTable;
}
} else if (tempTable.getActive().get() != 0) {
- throw new TeiidProcessingException(QueryPlugin.Util.getString("TempTableStore.pending_update", tempTableID)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30228, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30228, tempTableID));
}
}
} else if (transactionMode == TransactionMode.ISOLATE_READS) {
Modified: trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -340,7 +340,7 @@
if (recursionStack == null) {
recursionStack = new LinkedList<String>();
} else if (recursionStack.contains(value)) {
- throw new QueryProcessingException(QueryPlugin.Util.getString("ExecDynamicSqlInstruction.3", value)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Event.TEIID30347, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30347, value));
}
recursionStack.push(value);
@@ -416,11 +416,11 @@
public Object getFromContext(Expression expression) throws TeiidComponentException {
if (variableContext == null || !(expression instanceof ElementSymbol)) {
- throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30348, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30348,expression, "No value was available")); //$NON-NLS-1$
}
Object value = variableContext.getValue((ElementSymbol)expression);
if (value == null && !variableContext.containsVariable((ElementSymbol)expression)) {
- throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ throw new TeiidComponentException(QueryPlugin.Event.TEIID30349, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30349,expression, "No value was available"));//$NON-NLS-1$
}
return value;
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -173,7 +173,7 @@
}
if (insert.getQueryExpression() != null) {
//TODO: this could be done in a loop, see about adding a validation
- throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_qe_partition", insert.getGroup())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30239, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30239, insert.getGroup()));
}
int partition = -1;
List<ElementSymbol> filteredColumns = new LinkedList<ElementSymbol>();
@@ -194,13 +194,13 @@
if (partition == -1) {
partition = i;
} else if (partition != i) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_no_partition", insert.getGroup(), insert.getVariables())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30240, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30240, insert.getGroup(), insert.getVariables()));
}
}
}
}
if (partition == -1) {
- throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_no_partition", insert.getGroup(), insert.getVariables())); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30241, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30241, insert.getGroup(), insert.getVariables()));
}
UpdateInfo info = this;
if (partition > 0) {
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -92,7 +92,7 @@
@Override
public void validate(Object value) throws QueryValidatorException {
if (((Integer)value).intValue() < 0) {
- throw new QueryValidatorException(QueryPlugin.Util.getString(msgKey));
+ throw new QueryValidatorException(QueryPlugin.Event.TEIID30242, QueryPlugin.Util.getString(msgKey));
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/xquery/saxon/SaxonXQueryExpression.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -201,7 +201,7 @@
context.declareGlobalVariable(StructuredQName.fromClarkName(derivedColumn.getAlias()), SequenceType.ANY_SEQUENCE, null, true);
} catch (XPathException e) {
//this is always expected to work
- throw new TeiidRuntimeException(e, "Could not define global variable"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30153, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30153));
}
}
@@ -210,7 +210,7 @@
try {
this.xQuery = context.compileQuery(xQueryString);
} catch (XPathException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.compile_failed")); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30154, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30154));
}
}
@@ -470,7 +470,7 @@
try {
exp = eval.createExpression(path);
} catch (XPathException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.invalid_path", xmlColumn.getName(), xmlColumn.getPath())); //$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30155, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30155, xmlColumn.getName(), xmlColumn.getPath()));
}
xmlColumn.setPathExpression(exp);
}
Modified: trunk/engine/src/main/java/org/teiid/query/xquery/saxon/XQueryEvaluator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/xquery/saxon/XQueryEvaluator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/java/org/teiid/query/xquery/saxon/XQueryEvaluator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -86,7 +86,7 @@
dynamicContext.setParameter(entry.getKey(), value);
}
} catch (TransformerException e) {
- throw new TeiidProcessingException(e);
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30148, e);
}
if (context != null) {
Source source = XMLSystemFunctions.convertToSource(context);
@@ -121,9 +121,9 @@
builder.build(FAKE_IS);
return result;
} catch (ParsingException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_context")); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30149, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30149));
} catch (IOException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_context")); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30150, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30150));
} finally {
if (!isNonBlocking) {
commandContext.setNonBlocking(false);
@@ -135,7 +135,7 @@
try {
doc = xquery.config.buildDocument(source);
} catch (XPathException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_context")); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30151, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30151));
}
dynamicContext.setContextItem(doc);
}
@@ -143,7 +143,7 @@
result.iter = xquery.xQuery.iterator(dynamicContext);
return result;
} catch (TransformerException e) {
- throw new TeiidProcessingException(e, QueryPlugin.Util.getString("SaxonXQueryExpression.bad_xquery")); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30152, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30152));
}
} finally {
if (result.iter == null) {
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,136 +25,144 @@
#
# function (001)
-ERR.015.001.0002 = Cannot find implementation for known function {0}
-ERR.015.001.0003 = Error while evaluating function {0}
-ERR.015.001.0004 = Unable to access function implementation for [{0}]
-ERR.015.001.0005 = ERROR loading system functions: {0}
-ERR.015.001.0017 = Left count is invalid: {0}
-ERR.015.001.0025 = Pad length must be > 0.
-ERR.015.001.0027 = Pad string for lpad/rpad must have length greater than 0.
-ERR.015.001.0031 = Source and destination character lists must be the same length.
-ERR.015.001.0033 = Error converting [{0}] of type {1} to type {2}
-ERR.015.001.0035 = The context function may only be used in XML queries.
-ERR.015.001.0035a = The rowlimit and rowlimitexception functions may only be used in XML queries.
-ERR.015.001.0042 = Illegal argument for formating: {0}
-ERR.015.001.0043 = Parse Exception occurs for executing: {0} {1}
-ERR.015.001.0044 = Function metadata source is of invalid type: {0}
-TEIID30011 = The function "{0}" will not be added because a function with the same name and signature already exists.
-ERR.015.001.0047 = Unexpected exception while loading "{1}.{2}" for UDF "{0}"
-FunctionTree.not_void = UDF "{0}" method "{1}" must not return void.
-FunctionTree.not_public = UDF "{0}" method "{1}" must be public.
-FunctionTree.not_static = UDF "{0}" method "{1}" must be static.
-FunctionTree.no_class = Could not load UDF "{0}", since its invocation class "{1}" could not be found.
-FunctionTree.no_method = UDF "{0}" could not loaded, since no method on class "{1}" with name "{2}" has a matching type signature.
-ERR.015.001.0048 = Unable to represent average value from {0} / {1}
-ERR.015.001.0050 = Unable to compute aggregate function {0} on data of type {1}
-ERR.015.001.0052 = {0} must be non-null.
-ERR.015.001.0053 = Method parameter must be non-null.
-ERR.015.001.0054 = Type is unknown: {0}
-ERR.015.001.0055 = {0} exceeds maximum length of {1}
-ERR.015.001.0056 = {0} has invalid first character: {1}
-ERR.015.001.0057 = {0} has invalid character: {1}
-ERR.015.001.0058 = {0} cannot end with a ''.''
-ERR.015.001.0061 = <start> value of {0} is invalid, which should never be less than zero or bigger than the length of original string {1}
-ERR.015.001.0062 = <length> value of {0} is invalid, which should never less be than zero.
-ERR.015.001.0063 = Input String is an empty string but start value or/and length value is bigger than zero.
-ERR.015.001.0066 = Unknown type signature for evaluating function of: {0} ({1})
-ERR.015.001.0069 = Unknown type signature for evaluating function of: {0} ({1})
+TEIID30382=Cannot find implementation for known function {0}
+TEIID30384=Error while evaluating function {0}
+TEIID30385=Unable to access function implementation for [{0}]
+ERR.015.001.0005=ERROR loading system functions: {0}
+TEIID30397=Left count is invalid: {0}
+TEIID30402=Pad length must be > 0.
+TEIID30403=Pad string for lpad/rpad must have length greater than 0.
+TEIID30404=Source and destination character lists must be the same length.
+TEIID30405=Error converting [{0}] of type {1} to type {2}
+TEIID30406=The context function may only be used in XML queries.
+TEIID30408=The rowlimit and rowlimitexception functions may only be used in XML queries.
+TEIID30411=Illegal argument for formating: {0}
+TEIID30412=Parse Exception occurs for executing: {0} {1}
+ERR.015.001.0044=Function metadata source is of invalid type: {0}
+TEIID30011=The function "{0}" will not be added because a function with the same name and signature already exists.
+TEIID30389=Unexpected exception while loading "{1}.{2}" for UDF "{0}"
+FunctionTree.not_void=UDF "{0}" method "{1}" must not return void.
+FunctionTree.not_public=UDF "{0}" method "{1}" must be public.
+FunctionTree.not_static=UDF "{0}" method "{1}" must be static.
+TEIID30387=Could not load UDF "{0}", since its invocation class "{1}" could not be found.
+TEIID30388=UDF "{0}" could not loaded, since no method on class "{1}" with name "{2}" has a matching type signature.
+TEIID30424=Unable to represent average value from {0} / {1}
+TEIID30425=Unable to compute aggregate function {0} on data of type {1}
+TEIID30429={0} must be non-null.
+TEIID30427=Method parameter must be non-null.
+TEIID30428=Type is unknown: {0}
+TEIID30430={0} exceeds maximum length of {1}
+TEIID30432={0} has invalid first character: {1}
+TEIID30433={0} has invalid character: {1}
+TEIID30434={0} cannot end with a ''.''
+TEIID30399=<start> value of {0} is invalid, which should never be less than zero or bigger than the length of original string {1}
+TEIID30400=<length> value of {0} is invalid, which should never less be than zero.
+TEIID30401=Input String is an empty string but start value or/and length value is bigger than zero.
+ERR.015.001.0066=Unknown type signature for evaluating function of: {0} ({1})
+ERR.015.001.0069=Unknown type signature for evaluating function of: {0} ({1})
# mapping (002)
-ERR.015.002.0009 = Search direction arg ''{0}'' is not one of the search constants defined in MappingNodeConstants.
-ERR.015.002.0010 = Value for property ''{0}'' is null.
-ERR.015.002.0011 = Invalid type: {0}
+ERR.015.002.0009=Search direction arg ''{0}'' is not one of the search constants defined in MappingNodeConstants.
+ERR.015.002.0010=Value for property ''{0}'' is null.
+ERR.015.002.0011=Invalid type: {0}
# parser (005)
-QueryParser.emptysql=Parser cannot parse an empty sql statement.
+TEIID30380=Parser cannot parse an empty sql statement.
QueryParser.parsingError=Parsing error: {0}
QueryParser.nullSqlCrit=Parser cannot parse a null sql criteria.
-QueryParser.lexicalError= Lexical error: {0}
-QueryParser.nullSqlExpr= Parser cannot parse a null sql expression.
-QueryParser.xqueryCompilation= Direct usage of XQuery is no longer supported, use XMLQUERY instead.
+QueryParser.lexicalError=Lexical error: {0}
+QueryParser.nullSqlExpr=Parser cannot parse a null sql expression.
+TEIID30379=Direct usage of XQuery is no longer supported, use XMLQUERY instead.
# processor (006)
-ERR.015.006.0010= Unknown criteria type: {0}
-ERR.015.006.0011= Unable to evaluate {0} expression of {1}
-ERR.015.006.0014= Failed to create regular expression from match pattern: {0}. {1}
-ERR.015.006.0015= Unable to evaluate expression of {0}
-ERR.015.006.0016= Unknown expression type: {0}
-ERR.015.006.0033= Unable to evaluate {0}: {1}
-ERR.015.006.0055= Unable to evaluate LOOKUP function.
-ERR.015.006.0057= Unknown subquery comparison predicate quantifier: {0}
-ERR.015.006.0058= The command of this scalar subquery returned more than one value: {0}
+TEIID30311=Unknown criteria type: {0}
+ERR.015.006.0011=Unable to evaluate {0} expression of {1}
+TEIID30325=Unknown compare criteria operator: {0}
+TEIID30448=Failed to create regular expression from match pattern: {0}. {1}
+TEIID30323=Unable to evaluate expression of {0}
+TEIID30329=Unknown expression type: {0}
+ERR.015.006.0033=Unable to evaluate {0}: {1}
+TEIID30342=Unable to evaluate LOOKUP function.
+TEIID30326=Unknown subquery comparison predicate quantifier: {0}
+TEIID30345=The command of this scalar subquery returned more than one value: {0}
+
# resolver (008)
-ERR.015.008.0003= Only one XML document may be specified in the FROM clause of a query.
-ERR.015.008.0007= Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
-ERR.015.008.0009= {1} is not allowed on the view {0}: a procedure must be defined to handle the {1}.
-ERR.015.008.0010= INSERT statement must have the same number of elements and values specified. This statement has {0} elements and {1} values.
-ERR.015.008.0011= Error parsing query plan transformation for {0}
-ERR.015.008.0013= Error parsing query plan transformation for {0}
-ERR.015.008.0019= Unable to resolve element: {0}
-ERR.015.008.0020= Element is ambiguous and must be qualified: {0}
-ERR.015.008.0022= Failed parsing reference binding: {0}
-ERR.015.008.0025= Binding reference cannot be a function: {0}
-ERR.015.008.0026= Expression ''{0}'' has a parameter with non-determinable type information. The use of an explicit convert may be necessary.
-ERR.015.008.0027= The expressions in this criteria are being compared but are of differing types ({0} and {1}) and no implicit conversion is available: {2}
-ERR.015.008.0029= This criteria must have string or CLOB expressions on each side: {0}
-ERR.015.008.0030= Type cannot be null for expression: {0}
-ERR.015.008.0031= This criteria must have values only of the same type as the left expression: {0}
-ERR.015.008.0032= There must be exactly one projected symbol of the subquery: {0}
-ERR.015.008.0033= The left expression must have a type convertible to the type of the subquery projected symbol: {0}
-ERR.015.008.0035= Type was null for {0} in function {1}
-ERR.015.008.0036= The function ''{0}'' has more than one possible signature.
-ERR.015.008.0037= The conversion from {0} to {1} is not allowed.
-ERR.015.008.0039= The function ''{0}'' is an unknown form. Check that the function name and number of arguments is correct.
-ERR.015.008.0040= The function ''{0}'' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit type conversions.
-ERR.015.008.0041= Expected value of type ''{0}'' but ''{1}'' is of type ''{2}'' and no implicit conversion is available.
-ERR.015.008.0042= Element ''{0}'' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause.
-ERR.015.008.0043= Element ''{0}'' in ORDER BY was not found in the FROM clause.
-ERR.015.008.0045= Failed parsing {1} plan for {0}
-ERR.015.008.0046= The symbol {0} may only be used once in the FROM clause.
-ERR.015.008.0047= The symbol {0} refers to a group not defined in the FROM clause.
-ERR.015.008.0049= Bindings must be specified
-ERR.015.008.0051= Symbol {0} is specified with an unknown group context
-ERR.015.008.0053= Element "{0}" is ambiguous, it exists in two or more groups.
-ERR.015.008.0054= Element "{0}" is not defined by any relevant group.
-ERR.015.008.0055= Group specified is ambiguous, resubmit the query by fully qualifying the group name
-ambiguous_procedure= Procedure ''{0}'' is ambiguous, use the fully qualified name instead
-ERR.015.008.0056= Group does not exist
-ERR.015.008.0061= Unable to resolve stored procedure {0} the datatype for the parameter {1} is not specified.
-ERR.015.008.0062= Unable to resolve return element referred to by LOOKUP function: {0}
-ERR.015.008.0063= The first three arguments for the LOOKUP function must be specified as constants.
-ERR.015.008.0065= Group {0} is not allowed in LOOKUP function.
-ERR.015.008.0068= Could not find a common type to which all {0} expressions can be implicitly converted: {1}
-ERR.015.008.0070= Aliased Select Symbols are not valid in XML Queries.
-XMLQueryResolver.no_expressions_in_select=Expressions cannot be selected by XML Queries
-XMLQueryResolver.aliased_subquery=Aliased subquery contexts are not allowed: {0}
+TEIID30112=Only one XML document may be specified in the FROM clause of a query.
+TEIID30142=Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
+TEIID30061={1} is not allowed on the view {0}: a procedure must be defined to handle the {1}.
+TEIID30127=INSERT statement must have the same number of elements and values specified. This statement has {0} elements and {1} values.
+TEIID30065=Error parsing query plan transformation for {0}
+ERR.015.008.0013=Error parsing query plan transformation for {0}
+TEIID30136=Unable to resolve element: {0}
+TEIID30137=Element is ambiguous and must be qualified: {0}
+ERR.015.008.0022=Failed parsing reference binding: {0}
+ERR.015.008.0025=Binding reference cannot be a function: {0}
+TEIID30083=Expression ''{0}'' has a parameter with non-determinable type information. The use of an explicit convert may be necessary.
+TEIID30073=The expressions in this criteria are being compared but are of differing types ({0} and {1}) and no implicit conversion is available: {2}
+TEIID30074=This criteria must have string or CLOB expressions on each side: {0}
+TEIID30092=Type cannot be null for expression: {0}
+TEIID30078=This criteria must have values only of the same type as the left expression: {0}
+TEIID30093=There must be exactly one projected symbol of the subquery: {0}
+TEIID30094=The left expression must have a type convertible to the type of the subquery projected symbol: {0}
+TEIID30067=Type was null for {0} in function {1}
+TEIID30068=The function ''{0}'' is an unknown form. Check that the function name and number of arguments is correct.
+TEIID30069=The function ''{0}'' has more than one possible signature.
+TEIID30071=The conversion from {0} to {1} is not allowed.
+TEIID30068=The function ''{0}'' is an unknown form. Check that the function name and number of arguments is correct.
+TEIID30070=The function ''{0}'' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit type conversions.
+TEIID30082=Expected value of type ''{0}'' but ''{1}'' is of type ''{2}'' and no implicit conversion is available.
+TEIID30084=Element ''{0}'' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause.
+TEIID30087=Element ''{0}'' in ORDER BY was not found in the FROM clause.
+TEIID30060=Failed parsing {1} plan for {0}
+ERR.015.008.0046=The symbol {0} may only be used once in the FROM clause.
+ERR.015.008.0047=The symbol {0} refers to a group not defined in the FROM clause.
+ERR.015.008.0049=Bindings must be specified
+ERR.015.008.0051=Symbol {0} is specified with an unknown group context
+ERR.015.008.0053=Element "{0}" is ambiguous, it exists in two or more groups.
+ERR.015.008.0054=Element "{0}" is not defined by any relevant group.
+ERR.015.008.0055=Group specified is ambiguous, resubmit the query by fully qualifying the group name
+TEIID30358=Procedure ''{0}'' is ambiguous, use the fully qualified name instead
+ERR.015.008.0056=Group does not exist
+TEIID30143=Unable to resolve stored procedure {0} the datatype for the parameter {1} is not specified.
+TEIID30099=Unable to resolve return element referred to by LOOKUP function: {0}
+TEIID30095=The first three arguments for the LOOKUP function must be specified as constants.
+TEIID30096=Group {0} is not allowed in LOOKUP function.
+TEIID30079=Could not find a common type to which all {0} expressions can be implicitly converted: {1}
+TEIID30080=Could not find a common type to which all {0} expressions can be implicitly converted: {1}
+TEIID30081=Could not find a common type to which all {0} expressions can be implicitly converted: {1}
+TEIID30135=Aliased Select Symbols are not valid in XML Queries.
+TEIID30134=Expressions cannot be selected by XML Queries
+TEIID30129=Aliased subquery contexts are not allowed: {0}
+TEIID30075=Type cannot be null for expression: {0}
+TEIID30076=Type cannot be null for expression: {0}
+TEIID30077=This criteria must have values only of the same type as the left expression: {0}
# sql (010)
-ERR.015.010.0001= Invalid compare operator: {0}
+ERR.015.010.0001=Invalid compare operator: {0}
ERR.015.010.0002= Invalid logical operator: {0}
-ERR.015.010.0003= Cannot set null collection of elements on GroupBy
-ERR.015.010.0006= Invalid parameter type [{0}] must be IN, OUT, INOUT, RETURN_VALUE, RESULT_SET
-ERR.015.010.0009= No columns exist.
-ERR.015.010.0010= Invalid column index: {0}
-ERR.015.010.0011= Parameter cannot be null
-ERR.015.010.0014= Constant type should never be null
-ERR.015.010.0015= Unknown constant type: {0}
-ERR.015.010.0016= A group symbol may not resolve to a null metadata ID.
-ERR.015.010.0017= The name of a symbol may not be null.
-ERR.015.010.0018= Inconsistent number of elements in transformation projected symbols and virtual group.
-ERR.015.010.0021= Elements cannot be null
-ERR.015.010.0022= Functions cannot be null
-ERR.015.010.0023= Groups cannot be null
-ERR.015.010.0029= Cannot create AliasSymbol wrapping AliasSymbol
-ERR.015.010.0031= Illegal variable name ''{1}''. Variable names can only be prefixed with the special group name ''{0}''.
-ERR.015.010.0032= Variable {0} was previously declared.
-ERR.015.010.0035= The <expression> cannot be null in CASE <expression>
-ERR.015.010.0036= There must be at least one WHEN expression and one THEN expression. The number of WHEN and THEN expressions must be equal.
-ERR.015.010.0037= The WHEN part of the CASE expression must contain an expression.
-ERR.015.010.0038= The THEN part of the CASE expression must contain an expression
-ERR.015.010.0039= The WHEN part of the searched CASE expression must contain a criteria.
+ERR.015.010.0003=Cannot set null collection of elements on GroupBy
+ERR.015.010.0006=Invalid parameter type [{0}] must be IN, OUT, INOUT, RETURN_VALUE, RESULT_SET
+ERR.015.010.0009=No columns exist.
+ERR.015.010.0010=Invalid column index: {0}
+ERR.015.010.0011=Parameter cannot be null
+ERR.015.010.0014=Constant type should never be null
+ERR.015.010.0015=Unknown constant type: {0}
+ERR.015.010.0016=A group symbol may not resolve to a null metadata ID.
+ERR.015.010.0017=The name of a symbol may not be null.
+ERR.015.010.0018=Inconsistent number of elements in transformation projected symbols and virtual group.
+ERR.015.010.0021=Elements cannot be null
+ERR.015.010.0022=Functions cannot be null
+ERR.015.010.0023=Groups cannot be null
+ERR.015.010.0029=Cannot create AliasSymbol wrapping AliasSymbol
+ERR.015.010.0031=Illegal variable name ''{1}''. Variable names can only be prefixed with the special group name ''{0}''.
+ERR.015.010.0032=Variable {0} was previously declared.
+ERR.015.010.0035=The <expression> cannot be null in CASE <expression>
+ERR.015.010.0036=There must be at least one WHEN expression and one THEN expression. The number of WHEN and THEN expressions must be equal.
+ERR.015.010.0037=The WHEN part of the CASE expression must contain an expression.
+ERR.015.010.0038=The THEN part of the CASE expression must contain an expression
+ERR.015.010.0039=The WHEN part of the searched CASE expression must contain a criteria.
# util (011)
@@ -186,9 +194,9 @@
ValidationVisitor.union_insert = Select into is not allowed under a set operation: {0}.
ValidationVisitor.multisource_insert = A multi-source table, {0}, cannot be used in an INSERT with query expression or SELECT INTO statement.
ValidationVisitor.invalid_encoding = Invalid encoding: {0}.
-ValidationVisitor.nonUpdatable = The specified change set {0} against an inherently updatable view does not map to a key preserving group.
-ValidationVisitor.insert_qe_partition = Inserts with query expressions cannot be performed against a partitioned UNION view {0}.
-ValidationVisitor.insert_no_partition = Could not determine INSERT target for a partitioned UNION view {0} with values {1}.
+TEIID30376=The specified change set {0} against an inherently updatable view does not map to a key preserving group.
+TEIID30239=Inserts with query expressions cannot be performed against a partitioned UNION view {0}.
+TEIID30241=Could not determine INSERT target for a partitioned UNION view {0} with values {1}.
ValidationVisitor.multisource_constant = The multisource column or parameter {0} requires a literal value.
ValidationVisitor.duplicate_block_label = Duplicate label {0}.
ValidationVisitor.no_loop = CONTINUE/BREAK can only be used in a LOOP/WHILE statement.
@@ -196,11 +204,11 @@
ValidationVisitor.unknown_block_label = No label found in containing scope with name {0}.
ERR.015.012.0029 = INSERT, UPDATE, and DELETE not allowed on XML documents
ERR.015.012.0030 = Commands used in stored procedure language not allowed on XML documents
-ERR.015.012.0031 = Queries against XML documents can not have a GROUP By clause
-ERR.015.012.0032 = Queries against XML documents can not have a HAVING clause
+TEIID30130=Queries against XML documents can not have a GROUP By clause
+TEIID30131=Queries against XML documents can not have a HAVING clause
ERR.015.012.0033 = Metadata does not allow updates on the group: {0}
ERR.015.012.0034 = Queries involving UNIONs, INTERSECTs and EXCEPTs not allowed on XML documents
-ERR.015.012.0035 = Queries combined with the set operator {0} must have the same number of output elements.
+TEIID30147=Queries combined with the set operator {0} must have the same number of output elements.
ERR.015.012.0037 = {0} cannot be used outside of aggregate functions since they are not present in a GROUP BY clause.
ERR.015.012.0039 = Nested aggregate expressions are not allowed: {0}
ERR.015.012.0041 = The aggregate function {0} cannot be used with non-numeric expressions: {1}
@@ -211,37 +219,37 @@
AggregateValidationVisitor.invalid_distinct=The enhanced numeric aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP cannot have DISTINCT specified.
ERR.015.012.0052 = The element [{0}] is in an INSERT but does not support updates.
ERR.015.012.0053 = Element in the group {0}, for which value is not specified in the insert command is neither nullable nor has a default value: {1}
-ERR.015.012.0054 = Column variables do not reference columns on group "{0}": {1}
+TEIID30126=Column variables do not reference columns on group "{0}": {1}
ERR.015.012.0055 = Element {0} does not allow nulls.
ERR.015.012.0059 = Left side of update expression must be an element that supports update: {0}
ERR.015.012.0060 = Element {0} does not allow nulls.
ERR.015.012.0062 = Elements cannot appear more than once in a SET or USING clause. The following elements are duplicated: {0}
ERR.015.012.0063 = Multiple failures occurred during validation:
ERR.015.012.0064 = Validation succeeded
-ERR.015.012.0065 = Nested Loop can not use the same cursor name as that of its parent.
+TEIID30124=Nested Loop can not use the same cursor name as that of its parent.
ERR.015.012.0067 = No scalar subqueries are allowed in the SELECT with no FROM clause.
ERR.015.012.0069 = INTO clause can not be used in XML query.
# optimizer (004)
-ERR.015.004.0007= Can''t convert plan node of type {0}
-ERR.015.004.0009= Error finding connectorBindingID for command
+TEIID30250=Can''t convert plan node of type {0}
+TEIID30251=Error finding connectorBindingID for command
ERR.015.004.0010= Unknown group specified in OPTION MAKEDEP/MAKENOTDEP: {0}
-ERR.015.004.0012= Group has an access pattern which has not been met: group(s) {0}; access pattern(s) {1}
-ERR.015.004.0020= Error getting model for {0}
-ERR.015.004.0023= Error rewriting: {0}
-ERR.015.004.0024= Unable to create a query plan that sends a criteria to \"{0}\". This connection factory requires criteria set to true indicating that a query against this model requires criteria.
-ERR.015.004.0029= Could not resolve group symbol {0}
-ERR.015.004.0035= The criteria {0} has elements from the root staging table and the document nodes which is not allowed.
-ERR.015.004.0037= No mapping node found named, ''{0}', in use of ''context''
-ERR.015.004.0046= The XML document element(s) {0} are not mapped to data and cannot be used in the criteria \"{1}\".
-ERR.015.004.0054= Could not parse query transformation for {0}: {1}
-ERR.015.004.0068= Context functions within the same conjunct refer to different contexts: {0}
+TEIID30278=Group has an access pattern which has not been met: group(s) {0}; access pattern(s) {1}
+TEIID30267=Error getting model for {0}
+TEIID30263=Error rewriting: {0}
+TEIID30268=Unable to create a query plan that sends a criteria to \"{0}\". This connection factory requires criteria set to true indicating that a query against this model requires criteria.
+TEIID30283=Could not resolve group symbol {0}
+TEIID30306=The criteria {0} has elements from the root staging table and the document nodes which is not allowed.
+TEIID30309=No mapping node found named, ''{0}', in use of ''context''
+TEIID30287=The XML document element(s) {0} are not mapped to data and cannot be used in the criteria \"{1}\".
+TEIID30281=Could not parse query transformation for {0}: {1}
+TEIID30300=Context functions within the same conjunct refer to different contexts: {0}
# processor (006)
ERR.015.006.0001= XMLPlan toString couldn''t print entire Program.
ERR.015.006.0034= Unexpected symbol type while updating tuple: {0}
-ERR.015.006.0037= Tuple source does not exist: {0}
-ERR.015.006.0039= Instructed to abort processing when recursion limit reached.
+TEIID30166=Tuple source does not exist: {0}
+TEIID30212=Instructed to abort processing when recursion limit reached.
ERR.015.006.0042= No xml schema to validate document against
ERR.015.006.0048= Fatal Error: {0}
ERR.015.006.0049= Error: {0}
@@ -249,11 +257,10 @@
ERR.015.006.0054= Instructed to abort processing as default of choice.
# rewriter (009)
-ERR.015.009.0001= Error evaluating criteria: {0}
+TEIID30372=Error evaluating criteria: {0}
ERR.015.009.0002= Error translating criteria on the user''s command, the criteria translated to {0} is not valid
-ERR.015.009.0003= Error simplifying mathematical expression: {0}
+TEIID30373=Error simplifying mathematical expression: {0}
-
SQLParser.Unknown_join_type=Unknown join type: {0}
SQLParser.Aggregate_only_top_level=Aggregate functions are only allowed HAVING/SELECT/ORDER BY clauses. Window functions are only allowed in the SELECT/ORDER BY clauses: {0}. Both require a FROM clause to be present.
SQLParser.window_only_top_level=Window functions are not allowed in the HAVING clause: {0}
@@ -648,15 +655,15 @@
SystemSource.session_id_result=Returns the session id of the currently logged in user
TempMetadataAdapter.Element_____{0}_____not_found._1=Element ''{0}'' not found.
TempMetadataAdapter.Group_____{0}_____not_found._1=Group ''{0}'' not found.
-ExpressionEvaluator.Must_push=Function {0} is marked in the function metadata as a function that must be evaluated at the source.
-ExpressionEvaluator.Eval_failed=Unable to evaluate {0}: {1}
+TEIID30341=Function {0} is marked in the function metadata as a function that must be evaluated at the source.
+TEIID30328=Unable to evaluate {0}: {1}
XMLSerialize.resolvingError=XMLSerialize is valid only for XML expressions: {0}
-Evaluator.xmlserialize=XMLSerialize: data exception - not an xml document
-Evaluator.xmlquery=Error evaluating XMLQuery: {0}
-ExecResolver.Param_convert_fail=Unable to convert procedural parameter of type {0} to expected type {1}
-ExecResolver.return_expected=Procedure {0} does not have a return value.
-ExecResolver.out_type_mismatch=OUT/RETURN parameter {0} with type {1} cannot be converted to {2}
-DynamicCommandResolver.SQL_String=Expected dynamic command sql to be of type STRING instead of type {0}.
+TEIID30336=XMLSerialize: data exception - not an xml document
+TEIID30333=Error evaluating XMLQuery: {0}
+TEIID30145=Unable to convert procedural parameter of type {0} to expected type {1}
+TEIID30139=Procedure {0} does not have a return value.
+TEIID30144=OUT/RETURN parameter {0} with type {1} cannot be converted to {2}
+TEIID30100=Expected dynamic command sql to be of type STRING instead of type {0}.
UnionQueryResolver.type_conversion=The Expression {0} used in a nested UNION ORDER BY clause cannot be implicitly converted from type {1} to type {2}.
ValidationVisitor.select_into_no_implicit_conversion=There is no implicit conversion between the source element type ({0}) and the target element type ({1}) at position {2} of the query: {3}
ValidationVisitor.excpet_intersect_all=EXCEPT ALL and INTERSECT ALL are currently unsupported
@@ -668,11 +675,11 @@
ValidationVisitor.select_into_wrong_elements=Wrong number of elements being SELECTed INTO the target table. Expected {0} elements, but was {1}.
SimpleQueryResolver.Query_was_redirected_to_Mat_table=The query against {0} was redirected to the materialization table {1}.
SimpleQueryResolver.ambiguous_all_in_group=The symbol {0} refers to more than one group defined in the FROM clause.
-SimpleQueryResolver.Proc_Relational_Name_conflict=Cannot access procedure {0} using table semantics since the parameter and result set column names are not all unique.
-SimpleQueryResolver.duplicate_with=Duplicate WITH clause item name {0}
-SimpleQueryResolver.mismatched_with_columns=The number of WITH clause columns for item {0} do not match the query expression
+TEIID30114=Cannot access procedure {0} using table semantics since the parameter and result set column names are not all unique.
+TEIID30101=Duplicate WITH clause item name {0}
+TEIID30102=The number of WITH clause columns for item {0} do not match the query expression
QueryResolver.invalid_xpath=Invalid xpath value: {0}
-QueryResolver.wrong_view_symbols=The definition for {0} does not have the correct number of projected symbols. Expected {1}, but was {2}.
+TEIID30066=The definition for {0} does not have the correct number of projected symbols. Expected {1}, but was {2}.
QueryResolver.wrong_view_symbol_type=The definition for {0} has the wrong type for column {1}. Expected {2}, but was {3}.
ResolveVariablesVisitor.reserved_word_for_temporary_used=Cursor names cannot begin with "#" as that indicates the name of a temporary table: {0}.
SimpleQueryResolver.materialized_table_not_used=The query against {0} did not use materialization table {1} due to the use of OPTION NOCACHE.
@@ -694,17 +701,17 @@
ValidationVisitor.3=''Rowlimit'' and ''rowlimitexception'' functions can only be used within a compare criteria which is entirely a single conjunct.
ValidationVisitor.Context_function_nested=Context functions cannot be nested
ERR.015.004.0036= First argument in ''context'' must be the name of a node in the XML document model. Found Object {0} of Class {1}
-ExecResolver.invalid_named_params=Invalid param name(s): {0}. Name(s) of params without explicit values: {1}
-ExecResolver.duplicate_named_params=Duplicate named param ''{0}''
-ResolverUtil.required_param=Required parameter ''{0}'' has no value was set or is an invalid parameter.
-ResolverUtil.duplicateName=Cannot create group ''{0}'' with multiple columns named ''{1}''
-ResolverUtil.error_converting_value_type=Exception converting value {0} of type {1} to expected type {2}
-ResolverUtil.setquery_order_expression=ORDER BY expression ''{0}'' cannot be used with a set query.
-ResolverUtil.invalid_unrelated=Unrelated order by column {0} cannot be used in a SET query, with SELECT DISTINCT, or GROUP BY
-XMLQueryResolver.xml_only_valid_alone=If any symbol in SELECT clause is ''xml'' or group.''xml'' , then no other element is allowed.
-ResolveVariablesVisitor.datatype_for_the_expression_not_resolvable=The datatype for the expression was not resolvable.
-TempTableResolver.unqualified_name_required=Cannot create temporary table "{0}". Local temporary tables must be created with unqualified names.
-TempTableResolver.table_already_exists=Cannot create temporary table "{0}". An object with the same name already exists.
+TEIID30141=Invalid param name(s): {0}. Name(s) of params without explicit values: {1}
+TEIID30138=Duplicate named param ''{0}''
+TEIID30089=Required parameter ''{0}'' has no value was set or is an invalid parameter.
+TEIID30091=Cannot create group ''{0}'' with multiple columns named ''{1}''
+TEIID30090=Exception converting value {0} of type {1} to expected type {2}
+TEIID30086=ORDER BY expression ''{0}'' cannot be used with a set query.
+TEIID30088=Unrelated order by column {0} cannot be used in a SET query, with SELECT DISTINCT, or GROUP BY
+TEIID30133=If any symbol in SELECT clause is ''xml'' or group.''xml'' , then no other element is allowed.
+TEIID30123=The datatype for the expression was not resolvable.
+TEIID30117=Cannot create temporary table "{0}". Local temporary tables must be created with unqualified names.
+TEIID30120=Cannot create temporary table "{0}". An object with the same name already exists.
ValidationVisitor.drop_of_nontemptable=Cannot drop a non temporary table "{0}".
ValidationVisitor.orderby_expression_xml=XML queries cannot order by an expression.
ValidationVisitor.text_table_invalid_width=For a fixed width text table, all columns must have width set.
@@ -729,113 +736,109 @@
ValidationVisitor.xmlparse_type=XMLPARSE expects a STRING, CLOB, or BLOB value.
ValidationVisitor.invalid_encoding=Encoding {0} is not valid.
ValidationVisitor.subquery_insert=SELECT INTO should not be used in a subquery.
-UpdateProcedureResolver.only_variables=Variable "{0}" is read only and cannot be assigned a value.
+TEIID30122=Variable "{0}" is read only and cannot be assigned a value.
MappingLoader.unknown_node_type=Unknown Node Type "{0}" being loaded by the XML mapping document.
MappingLoader.invalid_criteria_node=Invalid criteria node found; A criteria node must have criteria specified or it must be a default node.
-WrongTypeChild=Wrong type of child node is being added.
+TEIID30460=Wrong type of child node is being added.
NoCriteria=Failed to add the node, because Criteria nodes must have "criteria" value set on them, or they need to be the default node.
-root_cannotbe_null=Root node assigned to a document can be null.
-invalid_recurive_node= Found recursive node {0} without recursive root node.
-SaxonXQueryExpression.bad_xquery=Failed to evaluate XQuery expression; Please check the query and correct errors in syntax or usage.
-SaxonXQueryExpression.compile_failed=Could not compile XQuery; Please check the query for syntax or usage errors.
-SaxonXQueryExpression.invalid_path=Column "{0}" has an invalid path expression: {1}
-SaxonXQueryExpression.bad_context=Error building Source for context item.
+TEIID30462=Root node assigned to a document can be null.
+TEIID30457=Found recursive node {0} without recursive root node.
+TEIID30152=Failed to evaluate XQuery expression; Please check the query and correct errors in syntax or usage.
+TEIID30154=Could not compile XQuery; Please check the query for syntax or usage errors.
+TEIID30155=Column "{0}" has an invalid path expression: {1}
+TEIID30151=Error building Source for context item.
MappingLoader.invalidName=Null or blank name found in the Mapping Document, Must have valid name. Re-build the VDB
-MatchCriteria.invalid_escape=Invalid escape sequence "{0}" with escape character "{1}"
+TEIID30450=Invalid escape sequence "{0}" with escape character "{1}"
QueryUtil.wrong_number_of_values=The number of bound values ''{0}'' does not match the number of parameters ''{1}'' in the prepared statement.
QueryUtil.Error_executing_conversion_function_to_convert_value=Error converting parameter number {0} with value "{1}" to expected type {2}.
-InsertResolver.cant_convert_query_type=Cannot convert insert query expression projected symbol ''{0}'' of type {1} to insert column ''{2}'' of type {3}
+TEIID30128=Cannot convert insert query expression projected symbol ''{0}'' of type {1} to insert column ''{2}'' of type {3}
SetClause.resolvingError=Cannot set symbol ''{1}'' with expected type {2} to expression ''{0}''
TEIID30029=Unexpected format encountered for max or min value
TEIID30009=Reached maximum thread count "{0}" for worker pool "{1}" with a queue size high of "{2}". Queued work waited {3} ms prior to executing. To avoid queuing of work you may consider increasing "max-threads" or decreasing the "max-active-plans" in the "standalone-teiid.xml" file.
TEIID30021=Uncaught exception processing work
-
-TempTable.duplicate_key=Duplicate key
-TempTable.not_null=Null value is not allowed for column {0}
+TEIID30238=Duplicate key
+TEIID30236=Null value is not allowed for column {0}
ValidationVisitor.group_in_both_dep=Table specified in both dependent and independent queries '{0}'
XMLQuery.resolvingError=Failed to resolve the query '{0}'
-SQLParser.non_position_constant=Invalid order by at {0}
+TEIID30085=Invalid order by at {0}
+TEIID30367=Infinite loop detected, procedure will not be executed.
-QueryRewriter.infinite_while=Infinite loop detected, procedure will not be executed.
-
-BatchedUpdatePlanner.unrecognized_command=The batch contained an unrecognized command: {0}
-ProcedurePlanner.bad_stmt=Error while planning update procedure, unknown statement type encountered: {0}
-RulePushSelectCriteria.Error_getting_modelID=Error getting modelID
+TEIID30244=The batch contained an unrecognized command: {0}
+TEIID30243=Error while planning update procedure, unknown statement type encountered: {0}
+TEIID30272=Error getting modelID
XMLPlanner.no_uri=Cannot find namespace URI for namespace {0} of element {1}
XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1=The XML document element {0} is not mapped to data and cannot be used in the ORDER BY clause: {1}
XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class=The ''rowlimit'' or ''rowlimitexception'' function parameter ''{0}'' is not an XML node within the scope of any mapping class.
XMLPlanner.Criteria_{0}_contains_conflicting_row_limits=The criteria ''{0}'' contains conflicting row limits for an XML mapping class.
-AccessNode.rewrite_failed=Failed to rewrite the command: {0}
-BatchedUpdateNode.unexpected_end_of_batch=Unexpectedly reached the end of the batched update counts at {0}, expected {1}.
-row_limit_passed=The row limit {0} has been exceeded for XML mapping class {1}.
+TEIID30174=Failed to rewrite the command: {0}
+TEIID30192=Unexpectedly reached the end of the batched update counts at {0}, expected {1}.
+TEIID30211=The row limit {0} has been exceeded for XML mapping class {1}.
AddNodeInstruction.element__1=element
AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3=Unable to add xml {0} {1}, namespace {2}, namespace declarations {3}
-QueryProcessor.request_cancelled=The request {0} has been cancelled.
+TEIID30160=The request {0} has been cancelled.
VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state=INPUT variables used in the expression should all have same CHANGING state: {0}
ExecDynamicSqlInstruction.0=Evaluated dynamic SQL expression value was null.
-ExecDynamicSqlInstruction.3=There is a recursive invocation of group ''{0}''. Please correct the SQL.
+TEIID30347=There is a recursive invocation of group ''{0}''. Please correct the SQL.
ExecDynamicSqlInstruction.4=The dynamic sql string contains an incorrect number of elements.
ExecDynamicSqlInstruction.6=The datatype ''{0}'' for element ''{1}'' in the dynamic SQL cannot be implicitly converted to ''{2}''.
-ExecDynamicSqlInstruction.couldnt_execute=Couldn''t execute the dynamic SQL command "{0}" with the SQL statement "{1}" due to: {2}
+TEIID30168=Couldn''t execute the dynamic SQL command "{0}" with the SQL statement "{1}" due to: {2}
-RulePlanJoins.cantSatisfy=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
-TempTableStore.table_exist_error=Temporary table "{0}" already exists.
-TempTableStore.table_doesnt_exist_error=Temporary table "{0}" does not exist.
-TempTableStore.pending_update=Table {0} is locked by pending transaction update.
+TEIID30277=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
+TEIID30229=Temporary table "{0}" already exists.
+TEIID30226=Temporary table "{0}" does not exist.
+TEIID30228=Table {0} is locked by pending transaction update.
-XMLQueryPlanner.cannot_plan=Cannot create a query for MappingClass with user criteria {0}
-XMLQueryPlanner.invalid_relationship=Conjunct "{0}" has no relationship with target context {1}.
-XMLQueryPlanner.non_simple_relationship=Conjunct "{0}" has a non-simple relationship to its parent through context {1}.
+TEIID30295=Cannot create a query for MappingClass with user criteria {0}
+TEIID30296=Conjunct "{0}" has no relationship with target context {1}.
+TEIID30297=Conjunct "{0}" has a non-simple relationship to its parent through context {1}.
-CriteriaPlanner.staging_context=Staging table criteria cannot contian context functions
-CriteriaPlanner.multiple_staging=Staging table criteria {0} was not specified against a single staging table
-CriteriaPlanner.invalid_context=Element {0} is not in the scope of the context {1}
-CriteriaPlanner.invalid_element=Element {0} is not a valid data node
-results_not_found=Results for the mapping class {0} are not found;
-RulePlanProcedures.no_values=No valid criteria specified for procedure parameter {0}
-ProcedurePlan.nonNullableParam=The procedure parameter {0} is not nullable, but is set to null.
-
-FileStoreageManager.error_creating=Error creating {0}
-FileStoreageManager.error_reading=Error reading {0}
-FileStoreageManager.no_directory=No directory specified for the file storage manager.
-FileStoreageManager.not_a_directory={0} is not a valid storage manager directory.
+TEIID30308=Staging table criteria cannot contian context functions
+TEIID30307=Staging table criteria {0} was not specified against a single staging table
+TEIID30302=Element {0} is not in the scope of the context {1}
+TEIID30301=Element {0} is not a valid data node
+TEIID30216=Results for the mapping class {0} are not found;
+TEIID30270=No valid criteria specified for procedure parameter {0}
+TEIID30164=The procedure parameter {0} is not nullable, but is set to null.
+
+TEIID30042=Error creating {0}
+TEIID30048=Error reading {0}
+TEIID30040=No directory specified for the file storage manager.
+TEIID30041={0} is not a valid storage manager directory.
FileStoreageManager.space_exhausted=Max buffer space of {0} bytes has been exceed. The current operation will be aborted.
-TextTableNode.no_value=No value found for column {0} in the row ending on text line {1} in {2}.
-TextTableNode.conversion_error=Could not convert value for column {0} in the row ending on text line {1} in {2}.
-TextTableNode.header_missing=HEADER entry missing for column name {0} in {1}.
-TextTableNode.unclosed=Text parse error: Unclosed qualifier at end of text in {0}.
-TextTableNode.character_not_allowed=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
-TextTableNode.unknown_escape=Text parse error: Unknown escape sequence \\{0} in text line {1} in {2}.
-TextTableNode.invalid_width=Text parse error: Fixed width line width {0} is smaller than the expected {1} on text line {2} in {3}.
-TextTableNode.line_too_long=Text parse error: Delimited line is longer than the expected max of {2} on text line {0} in {1}.
+TEIID30175=No value found for column {0} in the row ending on text line {1} in {2}.
+TEIID30176=Could not convert value for column {0} in the row ending on text line {1} in {2}.
+TEIID30181=HEADER entry missing for column name {0} in {1}.
+TEIID30182=Text parse error: Unclosed qualifier at end of text in {0}.
+TEIID30185=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
+TEIID30184=Text parse error: Unknown escape sequence \\{0} in text line {1} in {2}.
+TEIID30177=Text parse error: Fixed width line width {0} is smaller than the expected {1} on text line {2} in {3}.
+TEIID30178=Text parse error: Delimited line is longer than the expected max of {2} on text line {0} in {1}.
ValidationVisitor.fixed_option=NO ROW DELIMITER can only be used in fixed parsing mode.
-XMLTableNode.error=Error evaluating XQuery row context for XMLTable: {0}
-XMLTableNode.path_error=Error evaluating XMLTable column path expression for column: {0}
-XMLTableName.multi_value=Unexpected multi-valued result was returned for XMLTable column "{0}". Path expressions for non-XML type columns should return at most a single result.
+TEIID30170=Error evaluating XQuery row context for XMLTable: {0}
+TEIID30172=Error evaluating XMLTable column path expression for column: {0}
+TEIID30171=Unexpected multi-valued result was returned for XMLTable column "{0}". Path expressions for non-XML type columns should return at most a single result.
TEIID30015=Failed to load materialized view table {0}.
TEIID30014=Loaded materialized view table {0} with row count {1}.
TEIID30013=Loading materialized view table {0}
TempTableDataManager.cache_load=Loaded materialized view table {0} from cached contents from another clustered node.
-TempTableDataManager.not_implicit_matview={0} does not target an internal materialized view.
-TempTableDataManager.row_refresh_pk=Materialized view {0} cannot have a row refreshed since there is no primary key.
-TempTableDataManager.row_refresh_composite=Materialized view {0} cannot have a row refreshed because it uses a composite key.
-TempTableDataManager.row_refresh_updatable=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
+TEIID30233={0} does not target an internal materialized view.
+TEIID30230=Materialized view {0} cannot have a row refreshed since there is no primary key.
+TEIID30231=Materialized view {0} cannot have a row refreshed because it uses a composite key.
+TEIID30232=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
TEIID30012=Refreshing row {1} for materialized view {0}.
-CriteriaPlanner.no_context=No root node found.
+TEIID30303=No root node found.
BasicInterceptor.ProcessTree_for__4=ProcessTree for
-
-ConnectorManager.not_in_valid_state=Connector is not in OPEN state
-
+TEIID30482=Connector is not in OPEN state
ConnectorManagerImpl.Initializing_connector=Initializing connector {0}
Cancel_request_failed=AtomicRequest {0} failed to cancel.
@@ -843,19 +846,16 @@
TEIID30004=Connector returned a 0 row non-last batch: {0}.
TEIID30005=rollback failed for requestID={0}
ConnectorWorker.process_failed=Connector worker process failed for atomic-request={0}
-ConnectorWorker.ConnectorWorker_result_set_unexpected_columns=Could not process stored procedure results for {0}. Expected {1} result set columns, but was {2}. Please update your models to allow for stored procedure results batching.
-
-
-DataTierManager.could_not_obtain_connector_binding=Could not obtain connection factory for model {0} in VDB name= {1}, version {2}
-DataTierManagerImpl.max_value_length=Property value length exceeds max of {0}.
-DataTierManagerImpl.unknown_uuid=Could not find a metadata record with uuid {0}.
-
-DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}=Unable to load metadata for VDB name= {0}, version= {1}
-DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.=Unknown query metadata exception while registering query: {0}.
+TEIID30479=Could not process stored procedure results for {0}. Expected {1} result set columns, but was {2}. Please update your models to allow for stored procedure results batching.
+TEIID30554=Could not obtain connection factory for model {0} in VDB name
+TEIID30548=Property value length exceeds max of {0}.
+TEIID30549=Could not find a metadata record with uuid {0}.
+TEIID30489=Unable to load metadata for VDB name
+TEIID30494=Unknown query metadata exception while registering query: {0}.
DQPCore.Clearing_prepared_plan_cache=Clearing prepared plan cache
DQPCore.Clearing_prepared_plan_cache_for_vdb=Clearing prepared plan cache for vdb {0}.{1}
DQPCore.clearing_resultset_cache=Clearing the resultset cache for vdb {0}.{1}
-DQPCore.The_request_has_been_closed.=The request {0} has been closed.
+TEIID30495=The request {0} has been closed.
DQPCore.The_atomic_request_has_been_cancelled=The atomic request {0} has been canceled.
DQPCore.failed_to_cancel=Failed to Cancel request, as request already finished processing
TEIID30006=The maxActivePlan {0} setting should never be greater than the max processing threads {1}.
@@ -864,51 +864,50 @@
TEIID30019=Unexpected exception for request {0}
TEIID30020=Processing exception ''{0}'' for request {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
-
# #query (018.005)
ERR.018.005.0095 = User <{0}> is not entitled to action <{1}> for 1 or more of the groups/elements/procedures.
# services (003)
-
-Request.Invalid_character_in_query=Bind variables (represented as "?") were found but are allowed only in prepared or callable statements.
+TEIID30032=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+TEIID30033=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+TEIID30034=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+TEIID30035=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+TEIID30491=Bind variables (represented as "?") were found but are allowed only in prepared or callable statements.
Request.no_result_set=The query does not return a result set.
Request.result_set=The query does not return an update count.
-
-ProcessWorker.wrongdata=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+TEIID30035=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
TEIID30027=An error occurred during streaming of Lob Chunks to Client.
-TransactionServer.existing_transaction=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
+TEIID30540=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
TransactionServer.no_transaction=No transaction found for client {0}.
-TransactionServer.concurrent_transaction=Concurrent enlistment in global transaction {0} is not supported.
-TransactionServer.no_global_transaction=Expected an existing global transaction {0} but there was none for client {1}
-TransactionServer.unknown_flags=Unknown flags
-TransactionServer.no_global_transaction=No global transaction found for {0}.
-TransactionServer.wrong_transaction=Client is not currently enlisted in transaction {0}.
-TransactionServer.resume_failed=Cannot resume, transaction {0} was not suspended by client {1}.
-TransactionServer.existing_global_transaction=Global transaction {0} already exists.
-TransactionServer.suspended_exist=Suspended work still exists on transaction {0}.
-
+TEIID30525=Concurrent enlistment in global transaction {0} is not supported.
+TEIID30521=Expected an existing global transaction {0} but there was none for client {1}
+TEIID30520=Unknown flags
+TEIID30521=No global transaction found for {0}.
+TEIID30524=Client is not currently enlisted in transaction {0}.
+TEIID30518=Cannot resume, transaction {0} was not suspended by client {1}.
+TEIID30522=Global transaction {0} already exists.
+TEIID30505=Suspended work still exists on transaction {0}.
TransformationMetadata.does_not_exist._1=does not exist.
-TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TEIID30363=Error trying to read virtual document {0}, with body \n{1}
TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
-TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
-TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
-TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
+TEIID30359=QueryPlan could not be found for physical group {0}
+TEIID30360=InsertPlan could not be found for physical group {0}
+TEIID30361=InsertPlan could not be found for physical group {0}
+TEIID30362=DeletePlan could not be found for physical group {0}
+TEIID30364=Error trying to read schemas for the document/table : {0}
TransformationMetadata.Invalid_type=Invalid type: {0}.
TransformationMetadata.does_not_exist._1=does not exist.
TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
-TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TEIID30363=Error trying to read virtual document {0}, with body \n{1}
TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
-TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
-TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
-TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
+TEIID30359=QueryPlan could not be found for physical group
+TEIID30360=InsertPlan could not be found for physical group
+TEIID30361=InsertPlan could not be found for physical group
+TEIID30362=DeletePlan could not be found for physical group
+TEIID30364=Error trying to read schemas for the document/table :
TransformationMetadata.Invalid_type=Invalid type: {0}.
-
-CachedFinder.no_connector_found=No connector with jndi-name {0} found for Model {1} with source name {2}
+TEIID30497=No connector with jndi-name {0} found for Model {1} with source name {2}
translator_not_found=Translator {0} not accessible.
datasource_not_found=Data Source {0} not accessible.
@@ -916,33 +915,32 @@
not_found_cache=Failed to restore results, since batch entries were missing. The entry will be re-populated.
TEIID30025=Failed to restore results. The entry will be re-populated.
failed_to_cache=Failed to store the result set contents to disk.
-failed_to_unwrap_connection=Failed to unwrap the source connection.
-connection_factory_not_found=Failed to find the Connection Factory with JNDI name {0}. Please check the name or deploy the Connection Factory with specified name.
+TEIID30480=Failed to unwrap the source connection.
+TEIID30481=Failed to find the Connection Factory with JNDI name {0}. Please check the name or deploy the Connection Factory with specified name.
-RelationalPlanner.nonpushdown_command=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates.
-RelationalPlanner.nonpushdown_expression=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs that cannot be simplified into a compensating action.
+TEIID30256=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates.
+TEIID30254=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs that cannot be simplified into a compensating action.
Translate.error=Cannot translate criteria "{0}", it is not matched by selector "{1}"
-MultiSource.out_procedure=The multisource plan must execute a procedure returning parameter values exactly 1: {0}
+TEIID30561=The multisource plan must execute a procedure returning parameter values exactly 1: {0}
-FunctionMethods.not_array_value=Expected a java.sql.Array, or java array type, but got: {0}
-FunctionMethods.unknown_level=Unknown log level: {0}, expected one of {1}
-FunctionMethods.array_index=Array index out of range: {0}
-ArrayTableNode.conversion_error=Could not convert value for column: {0}
+TEIID30417=Expected a java.sql.Array, or java array type, but got: {0}
+TEIID30546=Unknown log level: {0}, expected one of {1}
+TEIID30415=Array index out of range: {0}
+TEIID30190=Could not convert value for column: {0}
-AlterResolver.not_a_view={0} is not a valid view.
+TEIID30116={0} is not a valid view.
ValidationVisitor.not_a_procedure={0} is not a valid virtual procedure.
-DdlPlan.event_not_exists={0} does not have an INSTEAD OF trigger defined for {1}.
-DdlPlan.event_already_exists={0} already has an INSTEAD OF trigger defined for {1}.
+TEIID30158={0} does not have an INSTEAD OF trigger defined for {1}.
+TEIID30156={0} already has an INSTEAD OF trigger defined for {1}.
error_refresh=error occurred during refreshing the materialized view entries for view {0}
-
TEIID30003=Without required support property {0}, pushdown will not be enabled for {1} on translator {2}.
full_state_not_supported=Full state transfer is not supported in the resultset cache distribution
-RuleAssignOutputElements.couldnt_push_expression=Expression(s) {0} cannot be pushed to source.
-RuleAssignOutputElements.cannot_introduce_expressions=Cannot introduce new expressions {1} in duplicate removal.
+TEIID30258=Expression(s) {0} cannot be pushed to source.
+TEIID30259=Cannot introduce new expressions {1} in duplicate removal.
TEIID30011=Not performing dependent join using source {0}, since the number of distinct rows for expression {1} exceeds {2}. You should ensure that your source statistics, including column distinct value counts, accurately reflect the source or use a MAKE_DEP hint to force the join.
TEIID30001=Max block number exceeded. Increase the maxStorageObjectSize to support larger storage objects. Alternatively you could make the processor batch size smaller.
@@ -955,6 +953,73 @@
TEIID30026=Failed to cancel {0}
TEIID30030=Unhandled exception disposing reusable execution
TEIID30031=Unhandled exception calling CommandListener
-TEIID30032=Invalid locale {0} for collation, using default collation
-TEIID30033=Using collator for locale {0}
+TEIID30562=Cache system has been shutdown
+TEIID30476=Request canceled
+TEIID30555=No batch values sent for prepared batch update
+TEIID30193=Failed to move UP in document
+TEIID30059=Out of blocks of size {0}
+TEIID30045=Max block number exceeded. You could try making the processor batch size smaller.
+TEIID30161=Query timed out
+TEIID30269=Unexpected Exception
+TEIID30153=Could not define global variable
+TEIID30072= The expressions in this criteria are being compared but are of differing types ({0} and {1}) and no implicit conversion is available: {2}
+TEIID30097= Unable to resolve return element referred to by LOOKUP function: {0}
+TEIID30098= Unable to resolve return element referred to by LOOKUP function: {0}
+TEIID30118=Cannot create temporary table "{0}". An object with the same name already exists.
+TEIID30119=Cannot create temporary table "{0}". An object with the same name already exists.
+TEIID30121=Variable "{0}" is read only and cannot be assigned a value.
+TEIID30140= Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
+TEIID30146= {1} is not allowed on the view {0}: a procedure must be defined to handle the {1}.
+TEIID30183=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
+TEIID30189=Expected a java.sql.Array, or java array type, but got: {0}
+TEIID30191=Array index out of range: {0}
+TEIID30214=Results for the mapping class {0} are not found;
+TEIID30215=Results for the mapping class {0} are not found;
+TEIID30227=Table {0} is locked by pending transaction update.
+TEIID30240=Could not determine INSERT target for a partitioned UNION view {0} with values {1}.
+TEIID30253=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates.
+TEIID30255=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates.
+TEIID30275=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
+TEIID30276=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
+TEIID30314=Unknown compare criteria operator: {0}
+TEIID30346=Unable to evaluate {0}: {1}
+TEIID30348=Unable to evaluate {0}: {1}
+TEIID30349=Unable to evaluate {0}: {1}
+TEIID30375=The specified change set {0} against an inherently updatable view does not map to a key preserving group.
+TEIID30377=Parser cannot parse an empty sql statement.
+TEIID30390=UDF "{0}" method "{1}" must not return void.
+TEIID30391=UDF "{0}" method "{1}" must be public.
+TEIID30392=UDF "{0}" method "{1}" must be static.
+TEIID30393=Unknown type signature for evaluating function of: {0} ({1})
+TEIID30394=Unknown type signature for evaluating function of: {0} ({1})
+TEIID30395=Unknown type signature for evaluating function of: {0} ({1})
+TEIID30396=Left count is invalid: {0}
+TEIID30398={0} value must be a single character: [{1}].
+TEIID30407=The rowlimit and rowlimitexception functions may only be used in XML queries.
+TEIID30409=Illegal argument for formating: {0}
+TEIID30410=Parse Exception occurs for executing: {0} {1}
+TEIID30413=Unable to evaluate {0}: expected Properties for command payload but got object of type {1}
+TEIID30416=Expected a java.sql.Array, or java array type, but got: {0}
+TEIID30425=Unable to compute aggregate function {0} on data of type {1}
+TEIID30426=Unable to compute aggregate function {0} on data of type {1}
+TEIID30431={0} has invalid character: {1}
+TEIID30449=Invalid escape sequence "{0}" with escape character "{1}"
+TEIID30451=Unable to evaluate {0}: {1}
+TEIID30452=Wrong type of child node is being added.
+TEIID30453=Wrong type of child node is being added.
+TEIID30454=Wrong type of child node is being added.
+TEIID30455=Wrong type of child node is being added.
+TEIID30456=Wrong type of child node is being added.
+TEIID30458=Wrong type of child node is being added.
+TEIID30459=Wrong type of child node is being added.
+TEIID30461=Root node assigned to a document can be null.
+TEIID30477=Failed to unwrap the source connection.
+TEIID30563=The request {0} has been cancelled.=======
+TEIID30564=Invalid locale {0} for collation, using default collation
+TEIID30565=Using collator for locale {0}
+TEIID30499=No sources were given for the model {0}
+TEIID30523=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
+TEIID30519=Unknown flags
+TransactionServer.existing_transaction=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
+TEIID30517=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -102,7 +102,7 @@
fail("Expected exception from resultset mismatch"); //$NON-NLS-1$
} catch (TranslatorException err) {
assertEquals(
- "Could not process stored procedure results for EXEC spTest8(1). Expected 2 result set columns, but was 1. Please update your models to allow for stored procedure results batching.", err.getMessage()); //$NON-NLS-1$
+ "Error Code:TEIID30479 Message:TEIID30479 Could not process stored procedure results for EXEC spTest8(1). Expected 2 result set columns, but was 1. Please update your models to allow for stored procedure results batching.", err.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -138,7 +138,7 @@
svc.addPermission(addResource(DataPolicy.PermissionType.READ, "pm1.sq1")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.READ, "pm1.xyz")); //$NON-NLS-1$
-
+ svc.setAllowCreateTemporaryTables(true);
return svc;
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -44,7 +44,7 @@
TestPreparedStatement.helpTestProcessing(sql, Collections.EMPTY_LIST, null, new HardcodedDataManager(), RealMetadataFactory.exampleBQTCached(), true, RealMetadataFactory.exampleBQTVDB());
fail();
} catch (QueryResolverException e) {
- assertEquals("Required parameter 'pm4.spTest9.inkey' has no value was set or is an invalid parameter.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30089 Message:TEIID30089 Required parameter 'pm4.spTest9.inkey' has no value was set or is an invalid parameter.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -307,7 +307,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache, SESSION_ID);
fail();
}catch(QueryResolverException qe){
- assertEquals("Error converting parameter number 1 with value \"x\" to expected type integer.", qe.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30558 Message:Error converting parameter number 1 with value \"x\" to expected type integer.", qe.getMessage()); //$NON-NLS-1$
}
assertEquals(0, prepCache.getCacheHitCount());
@@ -319,7 +319,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache, SESSION_ID);
fail();
}catch(QueryResolverException qe){
- assertEquals("The number of bound values '2' does not match the number of parameters '1' in the prepared statement.", qe.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30556 Message:The number of bound values '2' does not match the number of parameters '1' in the prepared statement.", qe.getMessage()); //$NON-NLS-1$
}
assertEquals(1, prepCache.getCacheHitCount());
@@ -332,7 +332,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache);
fail();
}catch(QueryResolverException qe){
- assertEquals("The number of bound values '2' does not match the number of parameters '1' in the prepared statement.", qe.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30556 Message:The number of bound values '2' does not match the number of parameters '1' in the prepared statement.", qe.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -77,7 +77,7 @@
server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100, false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30523 Message:TEIID30523 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -92,7 +92,7 @@
server.begin(THREAD1);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30526 Message:javax.transaction.InvalidTransactionException: Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -107,7 +107,7 @@
server.start(THREAD2, XID1, XAResource.TMNOFLAGS, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Global transaction Teiid-Xid global:1 branch:null format:0 already exists.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30522 Message:TEIID30522 Global transaction Teiid-Xid global:1 branch:null format:0 already exists.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -121,7 +121,7 @@
server.start(THREAD1, XID2, XAResource.TMNOFLAGS, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30523 Message:TEIID30523 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -136,7 +136,7 @@
server.begin(THREAD1);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30526 Message:javax.transaction.InvalidTransactionException: Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -153,7 +153,7 @@
server.start(THREAD1, XID2, XAResource.TMJOIN, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30517 Message:TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -167,7 +167,7 @@
try {
server.commit(THREAD1);
} catch (XATransactionException e) {
- assertEquals("No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30526 Message:javax.transaction.InvalidTransactionException: No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -187,7 +187,7 @@
try {
server.rollback(THREAD1);
} catch (XATransactionException e) {
- assertEquals("No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30526 Message:javax.transaction.InvalidTransactionException: No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -198,7 +198,7 @@
server.start(THREAD1, XID1, XAResource.TMJOIN, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Concurrent enlistment in global transaction Teiid-Xid global:1 branch:null format:0 is not supported.", //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30525 Message:TEIID30525 Concurrent enlistment in global transaction Teiid-Xid global:1 branch:null format:0 is not supported.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -211,7 +211,7 @@
server.end(THREAD1, XID1, XAResource.TMSUSPEND,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Client is not currently enlisted in transaction Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30524 Message:TEIID30524 Client is not currently enlisted in transaction Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -225,7 +225,7 @@
server.start(THREAD2, XID1, XAResource.TMRESUME, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Cannot resume, transaction Teiid-Xid global:1 branch:null format:0 was not suspended by client abc2.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30518 Message:TEIID30518 Cannot resume, transaction Teiid-Xid global:1 branch:null format:0 was not suspended by client abc2.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -234,7 +234,7 @@
server.start(THREAD1, XID1, Integer.MAX_VALUE, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Unknown flags", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30519 Message:TEIID30519 Unknown flags", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -243,7 +243,7 @@
server.end(THREAD1, XID1, XAResource.TMSUCCESS,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("No global transaction found for Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30521 Message:TEIID30521 No global transaction found for Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -255,7 +255,7 @@
server.prepare(THREAD1, XID1,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Suspended work still exists on transaction Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30505 Message:TEIID30505 Suspended work still exists on transaction Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -54,7 +54,7 @@
tm.getStoredProcedureInfoForProcedure("y"); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch (QueryMetadataException e) {
- assertEquals("Procedure 'y' is ambiguous, use the fully qualified name instead", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30358 Message:TEIID30358 Procedure 'y' is ambiguous, use the fully qualified name instead", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -147,7 +147,7 @@
} catch (QueryPlannerException err) {
//This SHOULD happen.
final String msg = err.getMessage();
- final String expected = "Group has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
+ final String expected = "Error Code:TEIID30278 Message:TEIID30278 Group has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
assertEquals("Did not fail with expected QueryPlannerException", expected, msg); //$NON-NLS-1$
}
}
@@ -167,7 +167,7 @@
} catch (QueryPlannerException err) {
//This SHOULD happen.
final String msg = err.getMessage();
- final String expected = "Group has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
+ final String expected = "Error Code:TEIID30278 Message:TEIID30278 Group has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
assertEquals("Did not fail with expected QueryPlannerException", expected, msg); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -582,7 +582,7 @@
TestProcessor.doProcess(plan, dataManager, expected, TestProcessor.createCommandContext());
fail("QueryPlannerException was expected."); //$NON-NLS-1$
} catch (QueryValidatorException e) {
- assertEquals("The procedure parameter pm1.vsp26.param2 is not nullable, but is set to null.",e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30164 Message:TEIID30164 The procedure parameter pm1.vsp26.param2 is not nullable, but is set to null.",e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -327,7 +327,7 @@
try {
helpTestMatch("abc", "a", 'a', true); //$NON-NLS-1$ //$NON-NLS-2$
} catch (ExpressionEvaluationException cee) {
- assertEquals("Invalid escape sequence \"a\" with escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30450 Message:TEIID30450 Invalid escape sequence \"a\" with escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
}
}
@@ -336,7 +336,7 @@
try {
helpTestMatch("abc", "ab", 'a', true); //$NON-NLS-1$ //$NON-NLS-2$
} catch (ExpressionEvaluationException cee) {
- assertEquals("Invalid escape sequence \"ab\" with escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30449 Message:TEIID30449 Invalid escape sequence \"ab\" with escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -176,7 +176,7 @@
fail("Exception expected"); //$NON-NLS-1$
} catch (TeiidComponentException e){
//this should be a componentexception, since it is unexpected
- assertEquals(e.getMessage(), "Error Code:ERR.015.006.0033 Message:Unable to evaluate e2: No value was available"); //$NON-NLS-1$
+ assertEquals(e.getMessage(), "Error Code:TEIID30346 Message:TEIID30346 Unable to evaluate e2: No value was available"); //$NON-NLS-1$
}
}
@@ -296,7 +296,7 @@
helpTestWithValueIterator(expr, values, null);
fail("Expected ExpressionEvaluationException but got none"); //$NON-NLS-1$
} catch (ExpressionEvaluationException e) {
- assertEquals("Error Code:ERR.015.006.0058 Message:Unable to evaluate (SELECT x FROM y): Error Code:ERR.015.006.0058 Message:The command of this scalar subquery returned more than one value: SELECT x FROM y", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to evaluate (SELECT x FROM y): Error Code:TEIID30345 Message:TEIID30345 The command of this scalar subquery returned more than one value: SELECT x FROM y", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -991,7 +991,7 @@
helpTestProcessFailure(plan,
dataMgr,
- "Couldn't execute the dynamic SQL command \"EXECUTE 'EXEC pm1.sq2(''First'')' AS e1 string, e2 integer\" with the SQL statement \"'EXEC pm1.sq2(''First'')'\" due to: There is a recursive invocation of group 'pm1.sq2'. Please correct the SQL.", metadata); //$NON-NLS-1$
+ "Error Code:TEIID30168 Message:TEIID30168 Couldn't execute the dynamic SQL command \"EXECUTE 'EXEC pm1.sq2(''First'')' AS e1 string, e2 integer\" with the SQL statement \"'EXEC pm1.sq2(''First'')'\" due to: Error Code:TEIID30347 Message:TEIID30347 There is a recursive invocation of group 'pm1.sq2'. Please correct the SQL.", metadata); //$NON-NLS-1$
}
@Test public void testDynamicCommandIncorrectProjectSymbolCount() throws Exception {
@@ -1012,7 +1012,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Couldn't execute the dynamic SQL command \"EXECUTE 'EXEC pm1.sq1(''First'')' AS e1 string, e2 integer\" with the SQL statement \"'EXEC pm1.sq1(''First'')'\" due to: The dynamic sql string contains an incorrect number of elements.", metadata); //$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30168 Message:TEIID30168 Couldn't execute the dynamic SQL command \"EXECUTE 'EXEC pm1.sq1(''First'')' AS e1 string, e2 integer\" with the SQL statement \"'EXEC pm1.sq1(''First'')'\" due to: The dynamic sql string contains an incorrect number of elements.", metadata); //$NON-NLS-1$
}
@Test public void testDynamicCommandPositional() throws Exception {
@@ -1045,7 +1045,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Couldn't execute the dynamic SQL command \"EXECUTE 'select e1 from pm1.g1'\" with the SQL statement \"'select e1 from pm1.g1'\" due to: The datatype 'string' for element 'e1' in the dynamic SQL cannot be implicitly converted to 'integer'.", metadata); //$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30168 Message:TEIID30168 Couldn't execute the dynamic SQL command \"EXECUTE 'select e1 from pm1.g1'\" with the SQL statement \"'select e1 from pm1.g1'\" due to: The datatype 'string' for element 'e1' in the dynamic SQL cannot be implicitly converted to 'integer'.", metadata); //$NON-NLS-1$
}
@Test public void testDynamicCommandWithTwoDynamicStatements() throws Exception {
@@ -1322,7 +1322,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Temporary table \"T1\" already exists.", metadata); //$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30229 Message:TEIID30229 Temporary table \"T1\" already exists.", metadata); //$NON-NLS-1$
}
/**
Modified: trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -247,7 +247,7 @@
Arrays.asList(new Object[] { "1" }), //$NON-NLS-1$
Arrays.asList(new Object[] { "2x" }) }; //$NON-NLS-1$
- String expectedMessage = "ERROR CODE:ERR.015.001.0003 MESSAGE:Unable to evaluate convert(e1, integer): ERROR CODE:ERR.015.001.0003 MESSAGE:Error while evaluating function convert"; //$NON-NLS-1$
+ String expectedMessage = "ERROR CODE:TEIID30328 MESSAGE:TEIID30328 Unable to evaluate convert(e1, integer): ERROR CODE:TEIID30384 MESSAGE:TEIID30384 Error while evaluating function convert"; //$NON-NLS-1$
helpTestProjectFails(projectElements, data, elements, expectedMessage);
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -3325,7 +3325,7 @@
"", metadata, dataMgr); //$NON-NLS-1$
fail("Should have failed with QueryPlannerException but didn't"); //$NON-NLS-1$
} catch (QueryPlannerException e) {
- String expectedMsg = "The XML document element [element] name='Suppliers' minOccurs=1 maxOccurs=1 is not mapped to data and cannot be used in the ORDER BY clause: ORDER BY Suppliers"; //$NON-NLS-1$
+ String expectedMsg = "Error Code:TEIID30288 Message:The XML document element [element] name='Suppliers' minOccurs=1 maxOccurs=1 is not mapped to data and cannot be used in the ORDER BY clause: ORDER BY Suppliers"; //$NON-NLS-1$
assertEquals(expectedMsg, e.getMessage());
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -48,7 +48,7 @@
ResolverVisitor.resolveLanguageObject(function, RealMetadataFactory.example1Cached());
fail("excpetion expected"); //$NON-NLS-1$
} catch (QueryResolverException err) {
- assertEquals("Error Code:ERR.015.008.0037 Message:The conversion from char to date is not allowed.", err.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30071 Message:TEIID30071 The conversion from char to date is not allowed.", err.getMessage()); //$NON-NLS-1$
}
}
@@ -80,7 +80,7 @@
ResolverVisitor.resolveLanguageObject(function, RealMetadataFactory.example1Cached());
fail("excpetion expected"); //$NON-NLS-1$
} catch (QueryResolverException err) {
- assertEquals("Error Code:ERR.015.008.0036 Message:The function 'LCASE(?)' has more than one possible signature.", err.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30069 Message:TEIID30069 The function 'LCASE(?)' has more than one possible signature.", err.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -738,7 +738,7 @@
String userQuery = "UPDATE vm1.g3 SET x='x' where e3= 1"; //$NON-NLS-1$
helpFailUpdateProcedure(procedure, userQuery,
- Table.TriggerEvent.UPDATE, "Column variables do not reference columns on group \"pm1.g1\": [Unable to resolve 'var1': Element \"var1\" is not defined by any relevant group.]"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "Error Code:TEIID30126 Message:TEIID30126 Column variables do not reference columns on group \"pm1.g1\": [Unable to resolve 'var1': Element \"var1\" is not defined by any relevant group.]"); //$NON-NLS-1$
}
// variables cannot be used among insert elements
@@ -753,7 +753,7 @@
String userQuery = "UPDATE vm1.g3 SET x='x' where e3= 1"; //$NON-NLS-1$
helpFailUpdateProcedure(procedure, userQuery,
- Table.TriggerEvent.UPDATE, "Column variables do not reference columns on group \"pm1.g1\": [Unable to resolve 'INPUTS.x': Symbol INPUTS.x is specified with an unknown group context]"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "Error Code:TEIID30126 Message:TEIID30126 Column variables do not reference columns on group \"pm1.g1\": [Unable to resolve 'INPUTS.x': Symbol INPUTS.x is specified with an unknown group context]"); //$NON-NLS-1$
}
//should resolve first to the table's column
@@ -798,7 +798,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
helpFailUpdateProcedure(proc.toString(), userUpdateStr,
- Table.TriggerEvent.UPDATE, "Nested Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "Error Code:TEIID30124 Message:TEIID30124 Nested Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$
}
@Test public void testTempGroupElementShouldNotBeResolable() {
@@ -855,7 +855,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
- helpFailUpdateProcedure(proc.toString(), userUpdateStr, Table.TriggerEvent.UPDATE, "Cannot create temporary table \"loopCursor\". An object with the same name already exists."); //$NON-NLS-1$
+ helpFailUpdateProcedure(proc.toString(), userUpdateStr, Table.TriggerEvent.UPDATE, "Error Code:TEIID30120 Message:TEIID30120 Cannot create temporary table \"loopCursor\". An object with the same name already exists."); //$NON-NLS-1$
}
@Test public void testProcedureCreateDrop() {
@@ -937,7 +937,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1=1"; //$NON-NLS-1$
helpFailUpdateProcedure(procedure, userUpdateStr,
- Table.TriggerEvent.UPDATE, "Error Code:ERR.015.008.0041 Message:Cannot set symbol 'pm1.g1.e4' with expected type double to expression 'convert(var1, string)'"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "Error Code:TEIID30082 Message:Cannot set symbol 'pm1.g1.e4' with expected type double to expression 'convert(var1, string)'"); //$NON-NLS-1$
}
// special variable INPUT compared against invalid type
@@ -952,7 +952,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'"; //$NON-NLS-1$
helpFailUpdateProcedure(procedure, userUpdateStr,
- Table.TriggerEvent.UPDATE, "Error Code:ERR.015.008.0041 Message:Cannot set symbol 'pm1.g1.e2' with expected type integer to expression '\"new\".e1'"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "Error Code:TEIID30082 Message:Cannot set symbol 'pm1.g1.e2' with expected type integer to expression '\"new\".e1'"); //$NON-NLS-1$
}
@Test public void testVirtualProcedure() throws Exception {
@@ -969,7 +969,7 @@
//cursor starts with "#" Defect14924
@Test public void testVirtualProcedureInvalid1() throws Exception {
- helpResolveException("EXEC pm1.vsp32()",RealMetadataFactory.example1Cached(), "Cursor names cannot begin with \"#\" as that indicates the name of a temporary table: #mycursor."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("EXEC pm1.vsp32()",RealMetadataFactory.example1Cached(), "Error Code:TEIID30125 Message:Cursor names cannot begin with \"#\" as that indicates the name of a temporary table: #mycursor."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testVirtualProcedureWithOrderBy() throws Exception {
@@ -993,7 +993,7 @@
}
@Test public void testLoopRedefinition2() throws Exception {
- helpResolveException("EXEC pm1.vsp11()", RealMetadataFactory.example1Cached(), "Nested Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("EXEC pm1.vsp11()", RealMetadataFactory.example1Cached(), "Error Code:TEIID30124 Message:TEIID30124 Nested Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testVariableResolutionWithIntervening() throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -799,7 +799,7 @@
}
@Test public void testUnknownFunction() {
- helpResolveException("SELECT abc(e1) FROM pm1.g1", "Error Code:ERR.015.008.0039 Message:The function 'abc(e1)' is an unknown form. Check that the function name and number of arguments is correct."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT abc(e1) FROM pm1.g1", "Error Code:TEIID30068 Message:TEIID30068 The function 'abc(e1)' is an unknown form. Check that the function name and number of arguments is correct."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testConversionPossible() {
@@ -1405,7 +1405,7 @@
}
@Test public void testFailedConversion_defect9725() throws Exception{
- helpResolveException("select * from pm3.g1 where pm3.g1.e4 > {b 'true'}", "Error Code:ERR.015.008.0027 Message:The expressions in this criteria are being compared but are of differing types (timestamp and boolean) and no implicit conversion is available: pm3.g1.e4 > TRUE"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select * from pm3.g1 where pm3.g1.e4 > {b 'true'}", "Error Code:TEIID30073 Message:TEIID30073 The expressions in this criteria are being compared but are of differing types (timestamp and boolean) and no implicit conversion is available: pm3.g1.e4 > TRUE"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testLookupFunction() {
@@ -1904,11 +1904,11 @@
* the group g1 is not known to the order by clause of a union
*/
@Test public void testUnionOrderByFail() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY g1.e1", "ORDER BY expression 'g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY g1.e1", "Error Code:TEIID30086 Message:TEIID30086 ORDER BY expression 'g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUnionOrderByFail1() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY pm1.g1.e1", "ORDER BY expression 'pm1.g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY pm1.g1.e1", "Error Code:TEIID30086 Message:TEIID30086 ORDER BY expression 'pm1.g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderByPartiallyQualified() {
@@ -2136,7 +2136,7 @@
}
@Test public void testParameterError() throws Exception {
- helpResolveException("EXEC pm1.sp2(1, 2)", metadata, "Error Code:ERR.015.008.0007 Message:Incorrect number of parameters specified on the stored procedure pm1.sp2 - expected 1 but got 2"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("EXEC pm1.sp2(1, 2)", metadata, "Error Code:TEIID30142 Message:TEIID30142 Incorrect number of parameters specified on the stored procedure pm1.sp2 - expected 1 but got 2"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUnionOfAliasedLiteralsGetsModified() {
@@ -2263,7 +2263,7 @@
procedure = procedure + "DECLARE string VARIABLES.X = 1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
- helpResolveException(procedure, "Error Code:ERR.015.008.0019 Message:Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
+ helpResolveException(procedure, "Error Code:TEIID30136 Message:TEIID30136 Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
}
@Test public void testCreate() {
@@ -2274,7 +2274,7 @@
@Test public void testCreateQualifiedName() {
String sql = "CREATE LOCAL TEMPORARY TABLE pm1.g1 (column1 string)"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot create temporary table \"pm1.g1\". Local temporary tables must be created with unqualified names."); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30117 Message:TEIID30117 Cannot create temporary table \"pm1.g1\". Local temporary tables must be created with unqualified names."); //$NON-NLS-1$
}
@Test public void testProcedureConflict() {
@@ -2294,7 +2294,7 @@
@Test public void testCreateAlreadyExists() {
String sql = "CREATE LOCAL TEMPORARY TABLE g1 (column1 string)"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot create temporary table \"g1\". An object with the same name already exists."); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30118 Message:TEIID30118 Cannot create temporary table \"g1\". An object with the same name already exists."); //$NON-NLS-1$
}
@Test public void testCreateImplicitName() {
@@ -2304,7 +2304,7 @@
}
@Test public void testCreateInProc() throws Exception{
- helpResolveException("CREATE VIRTUAL PROCEDURE BEGIN create local temporary table g1(c1 string); end", "Cannot create temporary table \"g1\". An object with the same name already exists.");//$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("CREATE VIRTUAL PROCEDURE BEGIN create local temporary table g1(c1 string); end", "Error Code:TEIID30118 Message:TEIID30118 Cannot create temporary table \"g1\". An object with the same name already exists.");//$NON-NLS-1$ //$NON-NLS-2$
}
//this was the old virt.agg procedure. It was defined in such a way that relied on the scope leak of #temp
@@ -2399,7 +2399,7 @@
@Test public void testLookupWithoutConstant() throws Exception{
String sql = "SELECT lookup('pm1.g1', convert('e3', float), 'e2', e2) FROM pm1.g1"; //$NON-NLS-1$
- helpResolveException(sql, metadata, "Error Code:ERR.015.008.0063 Message:The first three arguments for the LOOKUP function must be specified as constants."); //$NON-NLS-1$
+ helpResolveException(sql, metadata, "Error Code:TEIID30095 Message:TEIID30095 The first three arguments for the LOOKUP function must be specified as constants."); //$NON-NLS-1$
}
/**
@@ -2420,19 +2420,19 @@
@Test public void testUpdateError() {
String userUpdateStr = "UPDATE vm1.g2 SET e1='x'"; //$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:ERR.015.008.0009 Message:Update is not allowed on the view vm1.g2: a procedure must be defined to handle the Update."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061 Message:TEIID30061 Update is not allowed on the view vm1.g2: a procedure must be defined to handle the Update."); //$NON-NLS-1$
}
@Test public void testInsertError() {
String userUpdateStr = "INSERT into vm1.g2 (e1) values ('x')"; //$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:ERR.015.008.0009 Message:Insert is not allowed on the view vm1.g2: a procedure must be defined to handle the Insert."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061 Message:TEIID30061 Insert is not allowed on the view vm1.g2: a procedure must be defined to handle the Insert."); //$NON-NLS-1$
}
@Test public void testDeleteError() {
String userUpdateStr = "DELETE from vm1.g2 where e1='x'"; //$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:ERR.015.008.0009 Message:Delete is not allowed on the view vm1.g2: a procedure must be defined to handle the Delete."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061 Message:TEIID30061 Delete is not allowed on the view vm1.g2: a procedure must be defined to handle the Delete."); //$NON-NLS-1$
}
@Test public void testResolveXMLSelect() {
@@ -2442,13 +2442,13 @@
procedure = procedure + "select VARIABLES.X from xmltest.doc1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
- helpResolveException(procedure, "Error Code:ERR.015.008.0019 Message:Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
+ helpResolveException(procedure, "Error Code:TEIID30136 Message:TEIID30136 Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
}
@Test public void testXMLJoinFail() {
String query = "select * from xmltest.doc1, xmltest.doc2"; //$NON-NLS-1$
- helpResolveException(query, "Error Code:ERR.015.008.0003 Message:Only one XML document may be specified in the FROM clause of a query."); //$NON-NLS-1$
+ helpResolveException(query, "Error Code:TEIID30112 Message:TEIID30112 Only one XML document may be specified in the FROM clause of a query."); //$NON-NLS-1$
}
@Test public void testExecProjectedSymbols() {
@@ -2478,7 +2478,7 @@
QueryMetadataInterface metadata = RealMetadataFactory.createTransformationMetadata(metadataStore, "example1");
- helpResolveException("select * from pm1.sq2", metadata, "Cannot access procedure pm1.sq2 using table semantics since the parameter and result set column names are not all unique."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select * from pm1.sq2", metadata, "Error Code:TEIID30114 Message:TEIID30114 Cannot access procedure pm1.sq2 using table semantics since the parameter and result set column names are not all unique."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testInlineViewNullLiteralInUnion() {
@@ -2490,21 +2490,21 @@
@Test public void testSelectIntoWithDuplicateNames() {
String sql = "select 1 as x, 2 as x into #temp"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot create group '#temp' with multiple columns named 'x'"); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot create group '#temp' with multiple columns named 'x'"); //$NON-NLS-1$
}
@Test public void testCreateWithDuplicateNames() {
String sql = "CREATE LOCAL TEMPORARY TABLE temp_table (column1 string, column1 string)"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot create group \'temp_table\' with multiple columns named \'column1\'"); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot create group \'temp_table\' with multiple columns named \'column1\'"); //$NON-NLS-1$
}
@Test public void testXMLQuery4() {
- helpResolveException("SELECT * FROM xmltest.doc1 group by a2", "Queries against XML documents can not have a GROUP By clause"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT * FROM xmltest.doc1 group by a2", "Error Code:TEIID30130 Message:TEIID30130 Queries against XML documents can not have a GROUP By clause"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testXMLQuery5() {
- helpResolveException("SELECT * FROM xmltest.doc1 having a2='x'", "Queries against XML documents can not have a HAVING clause"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT * FROM xmltest.doc1 having a2='x'", "Error Code:TEIID30131 Message:TEIID30131 Queries against XML documents can not have a HAVING clause"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testSelectIntoWithOrderBy() {
@@ -2514,8 +2514,8 @@
}
@Test public void testUnionBranchesWithDifferentElementCounts() {
- helpResolveException("SELECT e2, e3 FROM pm1.g1 UNION SELECT e2 FROM pm1.g2","Queries combined with the set operator UNION must have the same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
- helpResolveException("SELECT e2 FROM pm1.g1 UNION SELECT e2, e3 FROM pm1.g2","Queries combined with the set operator UNION must have the same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT e2, e3 FROM pm1.g1 UNION SELECT e2 FROM pm1.g2","Error Code:TEIID30147 Message:TEIID30147 Queries combined with the set operator UNION must have the same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT e2 FROM pm1.g1 UNION SELECT e2, e3 FROM pm1.g2","Error Code:TEIID30147 Message:TEIID30147 Queries combined with the set operator UNION must have the same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testSelectIntoWithNullLiteral() {
@@ -2545,19 +2545,19 @@
@Test public void testInsertWithoutColumnsFails() {
String sql = "Insert into pm1.g1 values (1, 2)"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:ERR.015.008.0010 Message:INSERT statement must have the same number of elements and values specified. This statement has 4 elements and 2 values."); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30127 Message:TEIID30127 INSERT statement must have the same number of elements and values specified. This statement has 4 elements and 2 values."); //$NON-NLS-1$
}
@Test public void testInsertWithoutColumnsFails1() {
String sql = "Insert into pm1.g1 values (1, 2, 3, 4)"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:ERR.015.008.0041 Message:Expected value of type 'boolean' but '3' is of type 'integer' and no implicit conversion is available."); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30082 Message:TEIID30082 Expected value of type 'boolean' but '3' is of type 'integer' and no implicit conversion is available."); //$NON-NLS-1$
}
@Test public void testInsertWithQueryFails() {
String sql = "Insert into pm1.g1 select 1, 2, 3, 4"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot convert insert query expression projected symbol '3' of type java.lang.Integer to insert column 'pm1.g1.e3' of type java.lang.Boolean"); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30128 Message:TEIID30128 Cannot convert insert query expression projected symbol '3' of type java.lang.Integer to insert column 'pm1.g1.e3' of type java.lang.Boolean"); //$NON-NLS-1$
}
@Test public void testInsertWithQueryImplicitWithColumns() {
@@ -2573,7 +2573,7 @@
@Test public void testInsertWithQueryImplicitWithoutColumns1() {
String sql = "Insert into #X select 1 as x, 2 as y, 3 as y"; //$NON-NLS-1$
- helpResolveException(sql, "Cannot create group '#X' with multiple columns named 'y'"); //$NON-NLS-1$
+ helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot create group '#X' with multiple columns named 'y'"); //$NON-NLS-1$
}
@Test public void testInsertWithoutColumnsPasses() {
@@ -2612,7 +2612,7 @@
}
@Test public void testUniqeNamesWithInlineView() {
- helpResolveException("select * from (select count(intNum) a, count(stringKey) b, bqt1.smalla.intkey as b from bqt1.smalla group by bqt1.smalla.intkey) q1 order by q1.a", RealMetadataFactory.exampleBQTCached(), "Cannot create group 'q1' with multiple columns named 'b'"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select * from (select count(intNum) a, count(stringKey) b, bqt1.smalla.intkey as b from bqt1.smalla group by bqt1.smalla.intkey) q1 order by q1.a", RealMetadataFactory.exampleBQTCached(), "Error Code:TEIID30091 Message:TEIID30091 Cannot create group 'q1' with multiple columns named 'b'"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testResolveOldProcRelational() {
@@ -2640,7 +2640,7 @@
@Test public void testCallableStatementTooManyParameters() throws Exception {
String sql = "{call pm4.spTest9(?, ?)}"; //$NON-NLS-1$
- TestResolver.helpResolveException(sql, RealMetadataFactory.exampleBQTCached(), "Error Code:ERR.015.008.0007 Message:Incorrect number of parameters specified on the stored procedure pm4.spTest9 - expected 1 but got 2"); //$NON-NLS-1$
+ TestResolver.helpResolveException(sql, RealMetadataFactory.exampleBQTCached(), "Error Code:TEIID30142 Message:TEIID30142 Incorrect number of parameters specified on the stored procedure pm4.spTest9 - expected 1 but got 2"); //$NON-NLS-1$
}
@Test public void testUpdateSetClauseReferenceType() {
@@ -2656,7 +2656,7 @@
@Test public void testNoTypeCriteria() {
String sql = "select * from pm1.g1 where ? = ?"; //$NON-NLS-1$
- helpResolveException(sql, RealMetadataFactory.example1Cached(), "Error Code:ERR.015.008.0026 Message:Expression '? = ?' has a parameter with non-determinable type information. The use of an explicit convert may be necessary."); //$NON-NLS-1$
+ helpResolveException(sql, RealMetadataFactory.example1Cached(), "Error Code:TEIID30083 Message:TEIID30083 Expression '? = ?' has a parameter with non-determinable type information. The use of an explicit convert may be necessary."); //$NON-NLS-1$
}
@Test public void testReferenceInSelect() {
@@ -2710,7 +2710,7 @@
// ambiguous, should fail
@Test public void testOrderBy_J658d() {
- helpResolveException("SELECT pm1.g1.e1, e2 as x, e3 as x FROM pm1.g1 ORDER BY x, e1 ", "Error Code:ERR.015.008.0042 Message:Element 'x' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1, e2 as x, e3 as x FROM pm1.g1 ORDER BY x, e1 ", "Error Code:TEIID30084 Message:TEIID30084 Element 'x' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderBy_J658e() {
Query resolvedQuery = (Query) helpResolve("SELECT pm1.g1.e1, e2 as x, e3 as e2 FROM pm1.g1 ORDER BY x, e2 "); //$NON-NLS-1$
@@ -2755,7 +2755,7 @@
fail("expected exception");
} catch (RuntimeException e) {
QueryResolverException qre = (QueryResolverException)e.getCause();
- assertEquals("ERR.015.008.0040", qre.getCode());
+ assertEquals("TEIID30070", qre.getCode());
}
}
@@ -2829,7 +2829,7 @@
}
@Test public void testOrderByExpression2() {
- helpResolveException("select pm1.g1.e1 from pm1.g1 union select pm1.g2.e1 from pm1.g2 order by pm1.g1.e1 || 2", "ORDER BY expression '(pm1.g1.e1 || 2)' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select pm1.g1.e1 from pm1.g1 union select pm1.g2.e1 from pm1.g2 order by pm1.g1.e1 || 2", "Error Code:TEIID30086 Message:TEIID30086 ORDER BY expression '(pm1.g1.e1 || 2)' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderByConstantFails() {
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -404,7 +404,7 @@
}
@Test public void testXMLWithSelect1a() {
- helpResolveException("select 'a' from xmltest.doc1 where node1 = 'yyz'", "Expressions cannot be selected by XML Queries"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select 'a' from xmltest.doc1 where node1 = 'yyz'", "Error Code:TEIID30134 Message:TEIID30134 Expressions cannot be selected by XML Queries"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testXMLWithSelect2() {
Modified: trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -883,7 +883,7 @@
fail("Expected QueryValidatorException due to divide by 0"); //$NON-NLS-1$
} catch(TeiidException e) {
// looks like message is being wrapped with another exception with same message
- assertEquals("Error Code:ERR.015.001.0003 Message:Unable to evaluate (5 / 0): Error Code:ERR.015.001.0003 Message:Error while evaluating function /", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to evaluate (5 / 0): Error Code:TEIID30384 Message:TEIID30384 Error while evaluating function /", e.getMessage()); //$NON-NLS-1$
}
}
@@ -896,7 +896,7 @@
QueryRewriter.rewriteCriteria(origCrit, null, metadata);
fail("Expected QueryValidatorException due to invalid string"); //$NON-NLS-1$
} catch(TeiidException e) {
- assertEquals("Error Code:ERR.015.001.0003 Message:Unable to evaluate convert('x', integer): Error Code:ERR.015.001.0003 Message:Error while evaluating function convert", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to evaluate convert('x', integer): Error Code:TEIID30384 Message:TEIID30384 Error while evaluating function convert", e.getMessage()); //$NON-NLS-1$
}
}
@@ -1118,7 +1118,7 @@
getRewritenProcedure(procedure, userQuery, Table.TriggerEvent.INSERT);
fail("exception expected"); //$NON-NLS-1$
} catch (QueryValidatorException e) {
- assertEquals("Infinite loop detected, procedure will not be executed.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30367 Message:TEIID30367 Infinite loop detected, procedure will not be executed.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -29,6 +29,7 @@
import org.teiid.cache.CacheConfiguration;
import org.teiid.cache.CacheFactory;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.jboss.IntegrationPlugin;
public class JBossCacheFactory implements CacheFactory, Serializable{
@@ -53,7 +54,7 @@
if (!destroyed) {
return new JBossCache(this.cacheStore, config.getLocation());
}
- throw new TeiidRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(IntegrationPlugin.Event.TEIID50066, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50066));
}
public void destroy() {
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/Element.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -210,7 +210,7 @@
node.get(type, name, DEFAULT).set(this.defaultValue);
}
else {
- throw new TeiidRuntimeException();
+ throw new TeiidRuntimeException(IntegrationPlugin.Event.TEIID50045);
}
}
}
@@ -234,7 +234,7 @@
model.get(getModelName()).set(operation.get(getModelName()).asBoolean());
}
else {
- throw new TeiidRuntimeException();
+ throw new TeiidRuntimeException(IntegrationPlugin.Event.TEIID50046);
}
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -84,6 +84,28 @@
TEIID50042, // error state
TEIID50043,
TEIID50044, // vdb save failed
-
+ TEIID50045,
+ TEIID50046,
+ TEIID50047,
+ TEIID50048,
+ TEIID50049,
+ TEIID50050,
+ TEIID50051,
+ TEIID50052,
+ TEIID50053,
+ TEIID50054,
+ TEIID50055,
+ TEIID50056,
+ TEIID50057,
+ TEIID50058,
+ TEIID50059,
+ TEIID50060,
+ TEIID50061,
+ TEIID50062,
+ TEIID50063,
+ TEIID50064,
+ TEIID50065,
+ TEIID50066,
+ TEIID50067
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -721,7 +721,7 @@
rm = message.get(timoutInMilli, TimeUnit.MILLISECONDS);
}
if (rm.getException() != null) {
- throw new AdminProcessingException(rm.getException());
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50047, rm.getException());
}
if (rm.isUpdateResult()) {
@@ -985,9 +985,9 @@
try {
VDBMetadataParser.marshell(vdb, this.serializer.getVdbXmlOutputStream(vdb));
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50048, e);
} catch (XMLStreamException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50049, e);
}
}
}
@@ -1015,7 +1015,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50050, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50050, policyName, vdb.getName(), vdb.getVersion()));
}
policy.addMappedRoleName(mappedRole);
@@ -1063,7 +1063,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50051, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50051, policyName, vdb.getName(), vdb.getVersion()));
}
policy.removeMappedRoleName(mappedRole);
@@ -1106,7 +1106,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50052, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50052, policyName, vdb.getName(), vdb.getVersion()));
}
policy.setAnyAuthenticated(true);
@@ -1146,7 +1146,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50053, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50053, policyName, vdb.getName(), vdb.getVersion()));
}
policy.setAnyAuthenticated(false);
@@ -1233,12 +1233,12 @@
ModelMetaData model = vdb.getModel(modelName);
if (model == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("model_not_found", modelName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50054, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50054, modelName, vdb.getName(), vdb.getVersion()));
}
SourceMappingMetadata source = model.getSourceMapping(sourceName);
if(source == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("source_not_found", sourceName, modelName, vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50055, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50055, sourceName, modelName, vdb.getName(), vdb.getVersion()));
}
source.setTranslatorName(translatorName);
source.setConnectionJndiName(dsName);
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportService.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TransportService.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -221,7 +221,7 @@
try {
return this.sessionService.getActiveSessionsCount();
} catch (SessionServiceException e) {
- throw new AdminComponentException(e);
+ throw new AdminComponentException(IntegrationPlugin.Event.TEIID50056, e);
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -312,7 +312,7 @@
final Module module = Module.getCallerModuleLoader().loadModule(moduleId);
classloader = module.getClassLoader();
} catch (ModuleLoadException e) {
- throw new TeiidException(e, RuntimePlugin.Util.getString("failed_load_module", translator.getModuleName(), translator.getName())); //$NON-NLS-1$
+ throw new TeiidException(IntegrationPlugin.Event.TEIID50057, e, RuntimePlugin.Util.gs(IntegrationPlugin.Event.TEIID50057, translator.getModuleName(), translator.getName()));
}
}
@@ -512,7 +512,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50058, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50058, policyName, this.vdb.getName(), this.vdb.getVersion()));
}
policy.addMappedRoleName(mappedRole);
@@ -523,7 +523,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50059, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50059, policyName, this.vdb.getName(), this.vdb.getVersion()));
}
policy.removeMappedRoleName(mappedRole);
@@ -534,7 +534,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50060, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50060, policyName, this.vdb.getName(), this.vdb.getVersion()));
}
policy.setAnyAuthenticated(true);
@@ -545,7 +545,7 @@
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50061, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50061, policyName, this.vdb.getName(), this.vdb.getVersion()));
}
policy.setAnyAuthenticated(false);
@@ -561,12 +561,12 @@
ModelMetaData model = this.vdb.getModel(modelName);
if (model == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("model_not_found", modelName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50062, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50062, modelName, this.vdb.getName(), this.vdb.getVersion()));
}
SourceMappingMetadata source = model.getSourceMapping(sourceName);
if(source == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("source_not_found", sourceName, modelName, this.vdb.getName(), this.vdb.getVersion())); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50063, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50063, sourceName, modelName, this.vdb.getName(), this.vdb.getVersion()));
}
source.setTranslatorName(translatorName);
source.setConnectionJndiName(dsName);
@@ -578,9 +578,9 @@
ObjectSerializer os = getSerializer();
VDBMetadataParser.marshell(this.vdb, os.getVdbXmlOutputStream(this.vdb));
} catch (IOException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50064, e);
} catch (XMLStreamException e) {
- throw new AdminProcessingException(e);
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50065, e);
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/java/org/teiid/replication/jboss/JGroupsObjectReplicator.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -567,7 +567,7 @@
if (e instanceof Exception) {
throw (Exception)e;
}
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(IntegrationPlugin.Event.TEIID50067, e);
} finally {
if (!success) {
channel.close();
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -31,19 +31,24 @@
admin_connection_closed=Teiid admin connection is already closed.
bad_vdb_extension=The extension of the file name must be either ".vdb" for designer vdb or "xxx-vdb.xml" for dynamic VDBs
vdb_not_found=VDB with name "{0}" version "{1}" not found in configuration
-model_not_found=Model name "{0}" not found in the VDB with name "{1}" version "{2}"
-model_not_found=Source name "{0}" not found in model {1} in the VDB with name "{2}" version "{3}"
-policy_not_found=Policy name "{0}" not found in the VDB with name "{1}" version "{2}"
+TEIID50062=Model name "{0}" not found in the VDB with name "{1}" version "{2}"
+TEIID50062=Source name "{0}" not found in model {1} in the VDB with name "{2}" version "{3}"
+TEIID50061=Policy name "{0}" not found in the VDB with name "{1}" version "{2}"
datasource_not_found=Datasource {0} not found in the configuration.
sourcename_not_found=No source name {0} found in the model: {1}.{2}.{3}
vdb_file_not_found = VDB file {0} not found at the location specified.
socket_not_enabled=Socket based remote JDBC protocol is not enabled.
-source_not_found=Source with name {0} not found in the Model {1} in VDB {2}.{3}
-model_not_found=Model with name {0} not found in the VDB {1}.{2}
+TEIID50063=Source with name {0} not found in the Model {1} in VDB {2}.{3}
+TEIID50062=Model with name {0} not found in the VDB {1}.{2}
event_distributor_bound=org.teiid.events.EventDistributorFactory is bound to {0} for manual control of Teiid events.
TEIID50004=Could not replicate object {0}
TEIID50019=Re-deploying VDB {0}
-
+TEIID50066=Cache system has been shutdown
+TEIID50050=Policy {0} not found in VDB {1}.{2}
+TEIID50051=Policy {0} not found in VDB {1}.{2}
+TEIID50054=Model {0} not found in VDB {1}.{2}
+TEIID50055=Source name {0} not found in Model {1} in VDB {1}.{2}
+
no_operation=No operation found with given name = {0}
failed_to_remove=Failed to remove the deployment
deployment_start_failed={0} deployment start failed
@@ -60,7 +65,7 @@
template_not_found=Template not found for {0}
admin_executing=JOPR admin {0} is executing command {1}
error_adding_translator=Error loading the Translator {0}. Execution Factory class is not valid class or not defined.
-failed_load_module={0} Failed to load module "{1}"
+TEIID50057={0} Failed to load module "{1}"
translator.add=Add Translator
translator.remove=Remove Translator
protocol_not_found=protocol is not defined for the transport configuration.
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -196,7 +196,7 @@
IEntryResult[] results = SimpleIndexUtil.queryIndex(new Index[] {index}, new char[0], true, true, false);
recordFactory.getMetadataRecord(results);
} catch (TeiidException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(RuntimeMetadataPlugin.Event.TEIID80000, e);
}
}
//associate the annotation/extension metadata
@@ -435,7 +435,7 @@
private KeyRecord getPrimaryKey(String uuid) {
KeyRecord key = (KeyRecord)this.getByType(MetadataConstants.RECORD_TYPE.PRIMARY_KEY).get(uuid);
if (key == null) {
- throw new TeiidRuntimeException(uuid+" PrimaryKey "+TransformationMetadata.NOT_EXISTS_MESSAGE); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimeMetadataPlugin.Event.TEIID80001, uuid+RuntimeMetadataPlugin.Event.TEIID80001+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
return key;
}
@@ -457,7 +457,7 @@
if(record == null) {
if (mustExist) {
// there should be only one for the UUID
- throw new TeiidRuntimeException(entityName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ throw new TeiidRuntimeException(RuntimeMetadataPlugin.Event.TEIID80002, entityName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
return null;
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -41,4 +41,11 @@
public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static enum Event implements BundleUtil.Event {
+ TEIID80000,
+ TEIID80001,
+ TEIID80002,
+ TEIID80003,
+ }
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -104,7 +104,7 @@
}
}
} catch(IOException e) {
- throw new TeiidException(e);
+ throw new TeiidException(RuntimeMetadataPlugin.Event.TEIID80003, e);
}
return queryResult.toArray(new IEntryResult[queryResult.size()]);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/ExtendedPropertyMetadata.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -24,6 +24,7 @@
import java.util.ArrayList;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.runtime.RuntimePlugin;
/**
@@ -56,7 +57,7 @@
}
if (!encodedData.endsWith("}")) { //$NON-NLS-1$
- throw new TeiidRuntimeException("The description field = "+encodedData+" does not end with \"}\""); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40034, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40034, encodedData));
}
encodedData = encodedData.substring(1, encodedData.length()-1);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -57,7 +57,7 @@
if (!mountPoint.exists()) {
InputStream contents = Thread.currentThread().getContextClassLoader().getResourceAsStream(CoreConstants.SYSTEM_VDB);
if (contents == null) {
- throw new TeiidRuntimeException(RuntimeMetadataPlugin.Util.getString("system_vdb_not_found")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40021, RuntimeMetadataPlugin.Util.gs(RuntimePlugin.Event.TEIID40021));
}
this.file = VFS.mountZip(contents, CoreConstants.SYSTEM_VDB, mountPoint, PROVIDER);
}
@@ -65,9 +65,9 @@
// uri conversion is only to remove the spaces in URL, note this only with above kind situation
this.vdbRepository.setSystemStore(new IndexMetadataFactory(mountPoint).getMetadataStore(null));
} catch (URISyntaxException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40022, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40022));
} catch (IOException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40023, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40023));
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -93,16 +93,16 @@
String executionClass = data.getPropertyValue(VDBTranslatorMetaData.EXECUTION_FACTORY_CLASS);
Object o = ReflectionHelper.create(executionClass, null, classLoader);
if(!(o instanceof ExecutionFactory)) {
- throw new TeiidException(RuntimePlugin.Util.getString("invalid_class", executionClass));//$NON-NLS-1$
+ throw new TeiidException(RuntimePlugin.Event.TEIID40024, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40024, executionClass));
}
executionFactory = (ExecutionFactory)o;
injectProperties(executionFactory, data);
executionFactory.start();
return executionFactory;
} catch (InvocationTargetException e) {
- throw new TeiidException(e);
+ throw new TeiidException(RuntimePlugin.Event.TEIID40025, e);
} catch (IllegalAccessException e) {
- throw new TeiidException(e);
+ throw new TeiidException(RuntimePlugin.Event.TEIID40026, e);
}
}
@@ -120,7 +120,7 @@
Method setterMethod = getSetter(ef.getClass(), method);
setterMethod.invoke(ef, convert(value, method.getReturnType()));
} else if (tp.required()) {
- throw new TeiidException(RuntimePlugin.Util.getString("required_property_not_exists", tp.display())); //$NON-NLS-1$
+ throw new TeiidException(RuntimePlugin.Event.TEIID40027, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40027, tp.display()));
}
}
caseInsensitivProps.remove(Translator.EXECUTION_FACTORY_CLASS);
@@ -157,7 +157,7 @@
try {
return clazz.getMethod(method.getName(), method.getReturnType());
} catch (NoSuchMethodException e1) {
- throw new TeiidException(RuntimePlugin.Util.getString("no_set_method", setter, method.getName())); //$NON-NLS-1$
+ throw new TeiidException(RuntimePlugin.Event.TEIID40028, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40028, setter, method.getName()));
}
}
}
@@ -210,7 +210,7 @@
if (type == Void.TYPE) { //check for setter
Class<?>[] types = method.getParameterTypes();
if (types.length != 1) {
- throw new TeiidRuntimeException("TranslatorProperty annotation should be placed on valid getter or setter method, " + method + " is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40029, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40029, method));
}
type = types[0];
try {
@@ -223,7 +223,7 @@
}
}
} else if (method.getParameterTypes().length != 0) {
- throw new TeiidRuntimeException("TranslatorProperty annotation should be placed on valid getter or setter method, " + method + " is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40030, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40030, method));
} else {
getter = method;
try {
@@ -235,7 +235,7 @@
Object defaultValue = null;
if (prop.required()) {
if (prop.advanced()) {
- throw new TeiidRuntimeException("TranslatorProperty annotation should not both be advanced and required " + method); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40031, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40031,method));
}
} else if (getter != null) {
try {
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -63,12 +63,12 @@
public void addVDB(VDBMetaData vdb, MetadataStoreGroup stores, LinkedHashMap<String, Resource> visibilityMap, UDFMetaData udf, ConnectorManagerRepository cmr) throws VirtualDatabaseException {
if (getVDB(vdb.getName(), vdb.getVersion()) != null) {
- throw new VirtualDatabaseException(RuntimePlugin.Util.getString("duplicate_vdb", vdb.getName(), vdb.getVersion())); //$NON-NLS-1$
+ throw new VirtualDatabaseException(RuntimePlugin.Event.TEIID40035, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40035, vdb.getName(), vdb.getVersion()));
}
// get the system VDB metadata store
if (this.systemStore == null) {
- throw new VirtualDatabaseException(RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
+ throw new VirtualDatabaseException(RuntimePlugin.Event.TEIID40036, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40036));
}
if (this.odbcEnabled && odbcStore == null) {
@@ -281,12 +281,12 @@
public void mergeVDBs(String sourceVDBName, int sourceVDBVersion, String targetVDBName, int targetVDBVersion) throws AdminException{
CompositeVDB source = this.vdbRepo.get(new VDBKey(sourceVDBName, sourceVDBVersion));
if (source == null) {
- throw new AdminProcessingException(RuntimePlugin.Util.getString("vdb_not_found", sourceVDBName, sourceVDBVersion)); //$NON-NLS-1$
+ throw new AdminProcessingException(RuntimePlugin.Event.TEIID40037, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40037, sourceVDBName, sourceVDBVersion));
}
CompositeVDB target = this.vdbRepo.get(new VDBKey(targetVDBName, targetVDBVersion));
if (target == null) {
- throw new AdminProcessingException(RuntimePlugin.Util.getString("vdb_not_found", sourceVDBName, sourceVDBVersion)); //$NON-NLS-1$
+ throw new AdminProcessingException(RuntimePlugin.Event.TEIID40038, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40038, sourceVDBName, sourceVDBVersion));
}
notifyRemove(targetVDBName, targetVDBVersion, target);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -108,12 +108,12 @@
t = this.translatorRepository.getTranslatorMetaData(translatorName);
}
if (t == null) {
- throw new AdminProcessingException(RuntimePlugin.Util.getString("translator_not_found", vdb.getName(), vdb.getVersion(), translatorName)); //$NON-NLS-1$
+ throw new AdminProcessingException(RuntimePlugin.Event.TEIID40032, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40032, vdb.getName(), vdb.getVersion(), translatorName));
}
ef = TranslatorUtil.buildExecutionFactory(t, t.getAttachment(ClassLoader.class));
cm.setExecutionFactory(ef);
} catch (TeiidException e) {
- throw new AdminProcessingException(e.getCause());
+ throw new AdminProcessingException(RuntimePlugin.Event.TEIID40033, e.getCause());
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VirtualDatabaseException.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VirtualDatabaseException.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VirtualDatabaseException.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,13 +22,15 @@
package org.teiid.deployers;
+import org.teiid.core.BundleUtil;
import org.teiid.core.TeiidProcessingException;
/**
* The base exception from which all Runtime Metadata Exceptions extend.
*/
public class VirtualDatabaseException extends TeiidProcessingException {
- public static final String NO_MODELS = "1"; //$NON-NLS-1$
+ private static final long serialVersionUID = -6654557123904497650L;
+ public static final String NO_MODELS = "1"; //$NON-NLS-1$
public static final String MODEL_NON_DEPLOYABLE_STATE = "2"; //$NON-NLS-1$
public static final String VDB_NON_DEPLOYABLE_STATE = "3"; //$NON-NLS-1$
@@ -54,8 +56,8 @@
* @param message A message describing the exception
* @param code The error code
*/
- public VirtualDatabaseException( String code, String message ) {
- super( code, message );
+ public VirtualDatabaseException(BundleUtil.Event code, String message ) {
+ super(code, message );
}
/**
@@ -84,8 +86,8 @@
* @param message A message describing the exception
* @param code A code denoting the exception
*/
- public VirtualDatabaseException( Exception e, String code, String message ) {
- super( e, code, message );
+ public VirtualDatabaseException(BundleUtil.Event event, Exception e, String message ) {
+ super(event, e, message );
}
}
Modified: trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/runtime/RuntimePlugin.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -51,6 +51,57 @@
TEIID40017, // unexpected exp for session
TEIID40018,
TEIID40019,
- TEIID40020
+ TEIID40020,
+ TEIID40021,
+ TEIID40022,
+ TEIID40023,
+ TEIID40024,
+ TEIID40025,
+ TEIID40026,
+ TEIID40027,
+ TEIID40028,
+ TEIID40029,
+ TEIID40030,
+ TEIID40031,
+ TEIID40032,
+ TEIID40033,
+ TEIID40034,
+ TEIID40035,
+ TEIID40036,
+ TEIID40037,
+ TEIID40038,
+ TEIID40039,
+ TEIID40040,
+ TEIID40041,
+ TEIID40042,
+ TEIID40043,
+ TEIID40044,
+ TEIID40045,
+ TEIID40046,
+ TEIID40047,
+ TEIID40048,
+ TEIID40049,
+ TEIID40050,
+ TEIID40051,
+ TEIID40052,
+ TEIID40053,
+ TEIID40054,
+ TEIID40055,
+ TEIID40056,
+ TEIID40057,
+ TEIID40058,
+ TEIID40059,
+ TEIID40060,
+ TEIID40061,
+ TEIID40062,
+ TEIID40063,
+ TEIID40064,
+ TEIID40065,
+ TEIID40066,
+ TEIID40067,
+ TEIID40068,
+ TEIID40069,
+ TEIID40070,
+ TEIID40071,
}
}
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -128,9 +128,9 @@
}
} catch(TeiidComponentException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40039, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40039));
} catch(IOException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("LocalBufferService.Failed_initializing_buffer_manager._8")); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40040, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40040));
}
}
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -120,11 +120,11 @@
public void closeSession(String sessionID) throws InvalidSessionException {
LogManager.logDetail(LogConstants.CTX_SECURITY, new Object[] {"closeSession", sessionID}); //$NON-NLS-1$
if (sessionID == null) {
- throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40041, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40041, sessionID));
}
SessionMetadata info = this.sessionCache.remove(sessionID);
if (info == null) {
- throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40042, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40042, sessionID));
}
if (info.getVDBName() != null) {
try {
@@ -155,7 +155,7 @@
}
if (sessionMaxLimit > 0 && getActiveSessionsCount() >= sessionMaxLimit) {
- throw new SessionServiceException(RuntimePlugin.Util.getString("SessionServiceImpl.reached_max_sessions", new Object[] {new Long(sessionMaxLimit)})); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40043, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40043, new Long(sessionMaxLimit)));
}
if (domains!= null && !domains.isEmpty() && authenticate) {
@@ -210,7 +210,7 @@
int lastIndex = vdbName.lastIndexOf('.');
if (firstIndex != -1) {
if (firstIndex != lastIndex || vdbVersion != null) {
- throw new SessionServiceException(RuntimePlugin.Util.getString("ambigious_name", vdbName, vdbVersion)); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40044, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40044, vdbName, vdbVersion));
}
vdbVersion = vdbName.substring(firstIndex+1);
vdbName = vdbName.substring(0, firstIndex);
@@ -225,18 +225,18 @@
vdb = this.vdbRepository.getVDB(vdbName, Integer.parseInt(vdbVersion));
}
} catch (NumberFormatException e) {
- throw new SessionServiceException(e, RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._3", vdbVersion)); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40045, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40045, vdbVersion));
}
if (vdb == null) {
- throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._1", vdbName, vdbVersion)); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40046, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40046, vdbName, vdbVersion));
}
if (vdb.getStatus() != VDB.Status.ACTIVE) {
- throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, vdbVersion)); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40047, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40047, vdbName, vdbVersion));
}
if (vdb.getConnectionType() == ConnectionType.NONE) {
- throw new SessionServiceException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._4", vdbName, vdbVersion)); //$NON-NLS-1$
+ throw new SessionServiceException(RuntimePlugin.Event.TEIID40048, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40048, vdbName, vdbVersion));
}
return vdb;
}
@@ -326,11 +326,11 @@
private SessionMetadata getSessionInfo(String sessionID)
throws InvalidSessionException {
if (sessionID == null) {
- throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40049, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40049, sessionID));
}
SessionMetadata info = this.sessionCache.get(sessionID);
if (info == null) {
- throw new InvalidSessionException(RuntimePlugin.Util.getString("SessionServiceImpl.invalid_session", sessionID)); //$NON-NLS-1$
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40050, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40050, sessionID));
}
return info;
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/ClientServiceRegistryImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -81,7 +81,7 @@
public ClientService getClientService(String iface) throws ComponentNotFoundException {
ClientService cs = clientServices.get(iface);
if (cs == null) {
- throw new ComponentNotFoundException(RuntimePlugin.Util.getString("ServerWorkItem.Component_Not_Found", type, iface)); //$NON-NLS-1$
+ throw new ComponentNotFoundException(RuntimePlugin.Event.TEIID40070, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40070, type, iface));
}
return cs;
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -72,7 +72,7 @@
InitialContext ic = new InitialContext();
return (ClientServiceRegistry)ic.lookup(TEIID_RUNTIME_CONTEXT);
} catch (NamingException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40067, e);
}
}
@@ -82,12 +82,12 @@
} catch (LogonException e) {
// Propagate the original message as it contains the message we want
// to give to the user
- throw new ConnectionException(e, e.getMessage());
+ throw new ConnectionException(RuntimePlugin.Event.TEIID40068, e, e.getMessage());
} catch (TeiidComponentException e) {
if (e.getCause() instanceof CommunicationException) {
throw (CommunicationException)e.getCause();
}
- throw new CommunicationException(e);
+ throw new CommunicationException(RuntimePlugin.Event.TEIID40069, e);
}
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/LogonImpl.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -69,13 +69,13 @@
if (this.service.getGssSecurityDomain() != null && connProps.get(ILogon.KRB5TOKEN) != null) {
Subject user = this.service.getSubjectInContext(this.service.getGssSecurityDomain());
if (user == null) {
- throw new LogonException(RuntimePlugin.Util.getString("krb5_user_not_found")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40054, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40054));
}
return logon(connProps, (byte[])connProps.get(ILogon.KRB5TOKEN));
}
if (!AuthenticationType.CLEARTEXT.equals(service.getAuthenticationType())) {
- throw new LogonException(RuntimePlugin.Util.getString("wrong_logon_type_jaas")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40055, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40055));
}
return logon(connProps, null);
}
@@ -112,9 +112,9 @@
}
return result;
} catch (LoginException e) {
- throw new LogonException(e.getMessage());
+ throw new LogonException(RuntimePlugin.Event.TEIID40056, e.getMessage());
} catch (SessionServiceException e) {
- throw new LogonException(e, e.getMessage());
+ throw new LogonException(RuntimePlugin.Event.TEIID40057, e, e.getMessage());
}
}
@@ -153,7 +153,7 @@
public LogonResult neogitiateGssLogin(Properties connProps, byte[] serviceTicket, boolean createSession) throws LogonException {
if (!AuthenticationType.GSS.equals(service.getAuthenticationType())) {
- throw new LogonException(RuntimePlugin.Util.getString("wrong_logon_type_krb5")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40058, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40058));
}
String user = connProps.getProperty(TeiidURL.CONNECTION.USER_NAME);
@@ -162,7 +162,7 @@
try {
String securityDomain = service.getGssSecurityDomain();
if (securityDomain == null) {
- throw new LogonException(RuntimePlugin.Util.getString("no_security_domains")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40059, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40059));
}
// If this KRB5 and using keytab, user and password callback handler never gets called
LoginContext ctx = service.createLoginContext(securityDomain, user, password);
@@ -170,7 +170,7 @@
Subject subject = ctx.getSubject();
GSSResult result = Subject.doAs(subject, new GssAction(serviceTicket));
if (result == null) {
- throw new LogonException(RuntimePlugin.Util.getString("krb5_login_failed")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40060, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40060));
}
if (result.context.isEstablished()) {
@@ -188,7 +188,7 @@
//connProps.setProperty(TeiidURL.CONNECTION.PASSTHROUGH_AUTHENTICATION, "true"); //$NON-NLS-1$
return logon(connProps, result.serviceTicket);
} catch (LoginException e) {
- throw new LogonException(e, RuntimePlugin.Util.getString("krb5_login_failed")); //$NON-NLS-1$
+ throw new LogonException(RuntimePlugin.Event.TEIID40061, e, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40061));
}
}
@@ -235,16 +235,16 @@
try {
sessionInfo = this.service.validateSession(checkSession.getSessionID());
} catch (SessionServiceException e) {
- throw new TeiidComponentException(e);
+ throw new TeiidComponentException(RuntimePlugin.Event.TEIID40062, e);
}
if (sessionInfo == null) {
- throw new InvalidSessionException();
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40063);
}
SessionToken st = sessionInfo.getSessionToken();
if (!st.equals(checkSession)) {
- throw new InvalidSessionException();
+ throw new InvalidSessionException(RuntimePlugin.Event.TEIID40064);
}
this.updateDQPContext(sessionInfo);
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/ServerWorkItem.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -130,7 +130,7 @@
try {
result.setContents(socketClientInstance.getCryptor().sealObject(result.getContents()));
} catch (CryptoException e) {
- throw new TeiidRuntimeException(e);
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40071, e);
}
}
socketClientInstance.send(result, messageKey);
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -102,7 +102,7 @@
try {
publicKey = keyGen.createPublicKey();
} catch (CryptoException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(RuntimePlugin.Event.TEIID40051, e);
}
handshake.setPublicKey(publicKey);
}
@@ -133,13 +133,13 @@
//ensure the key information
if (returnedPublicKey == null) {
- throw new CommunicationException(RuntimePlugin.Util.getString("SocketClientInstance.invalid_sessionkey")); //$NON-NLS-1$
+ throw new CommunicationException(RuntimePlugin.Event.TEIID40052, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40052));
}
try {
this.cryptor = keyGen.getSymmetricCryptor(returnedPublicKey);
} catch (CryptoException e) {
- throw new CommunicationException(e);
+ throw new CommunicationException(RuntimePlugin.Event.TEIID40053, e);
}
this.keyGen = null;
} else {
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -25,6 +25,7 @@
import java.net.UnknownHostException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.runtime.RuntimePlugin;
public class SocketConfiguration {
@@ -78,7 +79,7 @@
this.hostName = InetAddress.getLocalHost().getHostName();
}
} catch (UnknownHostException e) {
- throw new TeiidRuntimeException("Failed to resolve the bind address"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40065, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40065));
}
}
@@ -112,7 +113,7 @@
}
return addr;
} catch (UnknownHostException e) {
- throw new TeiidRuntimeException("Failed to resolve the bind address"); //$NON-NLS-1$
+ throw new TeiidRuntimeException(RuntimePlugin.Event.TEIID40066, RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40066));
}
}
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2012-02-01 16:55:53 UTC (rev 3838)
@@ -22,16 +22,17 @@
-LocalBufferService.Failed_initializing_buffer_manager._8=Failed initializing buffer manager.
+TEIID40040=Failed initializing buffer manager.
+TEIID40039=Failed initializing buffer manager.
-VDBService.VDB_does_not_exist._1=VDB \"{0}\" version \"{1}\" does not exist.
-VDBService.VDB_does_not_exist._2=VDB \"{0}\" version \"{1}\" is not in the "active" status.
-VDBService.VDB_does_not_exist._4=VDB \"{0}\" version \"{1}\" is not accepting connections.
-VDBService.VDB_does_not_exist._3=Invalid VDB version \"{0}\" - must be a positive integer.
+TEIID40046=VDB \"{0}\" version \"{1}\" does not exist.
+TEIID40047=VDB \"{0}\" version \"{1}\" is not in the "active" status.
+TEIID40048=VDB \"{0}\" version \"{1}\" is not accepting connections.
+TEIID40045=Invalid VDB version \"{0}\" - must be a positive integer.
# session service
TEIID40019=The specified session ID "{0}" is invalid. It cannot be found in the userbase.
-SessionServiceImpl.reached_max_sessions = The server has reached the maximum number of sessions of {0} as defined by the property "session-max-limit". If more sessions are required, modify this property value in the "standalone-teiid.xml" file.
+TEIID40043=The server has reached the maximum number of sessions of {0} as defined by the property "session-max-limit". If more sessions are required, modify this property value in the "standalone-teiid.xml" file.
TEIID40008 = Expiring session {0}
TEIID40007 = Keepalive failed for session {0}
SessionServiceImpl.The_username_0_and/or_password_are_incorrect=The username "{0}" and/or password and/or payload token could not be authenticated by any membership domain.
@@ -42,14 +43,15 @@
TEIID40017=Unexpected exception for session {0}
TEIID40011=Processing exception ''{0}'' for session {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
-ServerWorkItem.Component_Not_Found=Only {0} connections are allowed on this port. Component not found: {1}
+TEIID40070=Only {0} connections are allowed on this port. Component not found: {1}
SocketTransport.1=Bound to address {0} listening on port {1}
LocalTransportHandler.Transport_shutdown=Transport has been shutdown.
-SocketClientInstance.invalid_sessionkey=Invalid session key used during handshake
+TEIID40052=Invalid session key used during handshake
SSLAwareChannelHandler.channel_closed=Channel closed
+TEIID40065=Failed to resolve the bind address
+TEIID40066=Failed to resolve the bind address
-
TEIID40003=VDB {0}.{1} is set to "active"
TEIID40006=VDB {0}.{1} is set to "inactive"
validity_errors_in_vdb={0} VDB has validity errors; failed to deploy - {1}
@@ -57,28 +59,29 @@
vdb_delete_failed=Failed to delete the cached metadata files due to:
-system_vdb_load_error=System.vdb needs to be loaded before any other VDBs.
+TEIID40036=System.vdb needs to be loaded before any other VDBs.
fail_to_deploy="{0}" Can not be active because model "{1}" is not fully configured.
udf_model_not_found=User Defined Function (UDF) model "{0}" not found in the VDB
-duplicate_vdb=VDB with given name and version already exists! {0}.{1}
-system_vdb_not_found=System.vdb not found in classpath
+TEIID40035=VDB with given name and version already exists! {0}.{1}
+TEIID40021=System.vdb not found in classpath
invalid_udf_file=No "path" information found to load the FUNCTION model {0}; FUNCTION model must have path information.
-vdb_not_found=VDB {0}.{1} not found deployed.
+TEIID40037=VDB {0}.{1} not found deployed.
+TEIID40038=VDB {0}.{1} not found deployed.
TEIID40005=For {0}.{1} VDB, Translator "{2}" not found.
recursive_delegation=For {0}.{1} VDB, recursive delegation {2} found.
TEIID40012=For {0}.{1} VDB, Data Source "{2}" not found.
datasource_replaced=For {0}.{1} VDB, Data Source "{2}" replaced with "{3}"
vdb_inactivated={0}.{1} status has been changed to inactive. Check the required translators and data sources!
translator_added=Teiid translator "{0}" has been added.
-invalid_class={0} invalid type of class specified. Must be of type org.teiid.connector.api.Connector
+TEIID40024={0} invalid type of class specified. Must be of type org.teiid.connector.api.Connector
class_not_found=Class {0} not found.
translator_removed=Teiid translator "{0}" removed.
-no_set_method=No {0} method found for translator property {1}
-required_property_not_exists=Required property "{0}" has no value. Deployment is incomplete.
+TEIID40028=No {0} method found for translator property {1}
+TEIID40027=Required property "{0}" has no value. Deployment is incomplete.
TEIID40001=The provided translator property values {0} were not used. Please check the properties that are expected by translator {1}.
name_not_found=Translator property "name" not defined for the deployment "{0}"
translator_type_not_found=The parent translator defined not found in configuration "{0}"
@@ -89,21 +92,32 @@
error_closing_stmt=Error closing portal statement {0}
model_metadata_loading=VDB {0}.{1} model {2} metadata is currently being loaded. Start Time: {3}
-ambigious_name=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
+TEIID40044=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
lo_not_supported=LO functions are not supported
SSLConfiguration.no_anonymous=The anonymous cipher suite TLS_DH_anon_WITH_AES_128_CBC_SHA is not available. Please change the transport to be non-SSL or use non-anonymous SSL.
TEIID40016=Could not initialize ODBC SSL. non-SSL connections will still be allowed.
TEIID40015=Unexpected error occurred
-wrong_logon_type_jaas = Wrong logon method is being used. Server is not set up for JAAS based authentication. Correct your client's 'AuthenticationType' property.
-wrong_logon_type_krb5 = Wrong logon method is being used. Server is not set up for Kerberos based authentication. Correct your client's 'AuthenticationType' property.
-krb5_login_failed=Kerberos context login failed
-no_security_domains=No security domain configured for Kerberos authentication. Can not authenticate.
-krb5_user_not_found=GSS authentication is in use, however authenticated user not found in the context to proceed.
+TEIID40055=Wrong logon method is being used. Server is not set up for JAAS based authentication. Correct your client's 'AuthenticationType' property.
+TEIID40058=Wrong logon method is being used. Server is not set up for Kerberos based authentication. Correct your client's 'AuthenticationType' property.
+TEIID40060=Kerberos context login failed
+TEIID40061=Kerberos context login failed
+TEIID40059=No security domain configured for Kerberos authentication. Can not authenticate.
+TEIID40054=GSS authentication is in use, however authenticated user not found in the context to proceed.
auth_type=Authentication Type set to {0} for security-domains {1}
replication_failed=replication failed to {0}
TEIID40014=Kerberos context login failed
TEIID40018=Exception terminitating session
TEIID40020=Error occurred
-SessionServiceImpl.invalid_session=Invalid Session. Session may have been terminated. Re-connect and try again.
\ No newline at end of file
+TEIID40049=Invalid Session. Session may have been terminated. Re-connect and try again.
+TEIID40050=Invalid Session. Session may have been terminated. Re-connect and try again.
+TEIID40034=The description field = {0} does not end with \"}\""
+TEIID40023=System.vdb needs to be loaded before any other VDBs.
+TEIID40022=System.vdb needs to be loaded before any other VDBs.
+TEIID40029=TranslatorProperty annotation should be placed on valid getter or setter method, {0} is not valid.
+TEIID40030=TranslatorProperty annotation should be placed on valid getter or setter method, {0} is not valid.
+TEIID40031=TranslatorProperty annotation should not both be advanced and required
+TEIID40032=Translator {2} not found in repository for VDB {0}.{1}
+TEIID40041=Invalid Session. Session may have been terminated. Re-connect and try again.
+TEIID40042=Invalid Session. Session may have been terminated. Re-connect and try again.
\ No newline at end of file
Modified: trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java 2012-02-01 16:13:49 UTC (rev 3837)
+++ trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java 2012-02-01 16:55:53 UTC (rev 3838)
@@ -154,7 +154,7 @@
createFakeConnection(serverInstance);
fail("expected exception"); //$NON-NLS-1$
} catch (CommunicationException e) {
- assertEquals("Unable to find a component used authenticate on to Teiid", e.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID20018 Message:TEIID20018 Unable to find a component used authenticate on to Teiid", e.getMessage()); //$NON-NLS-1$
}
}
12 years, 11 months
teiid SVN: r3837 - branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-02-01 11:13:49 -0500 (Wed, 01 Feb 2012)
New Revision: 3837
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
Log:
TEIID-1921 fix for suspend/resume when using the local connection
Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-01-31 18:11:54 UTC (rev 3836)
+++ branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2012-02-01 16:13:49 UTC (rev 3837)
@@ -348,13 +348,17 @@
}
private void resume() throws XATransactionException {
- if (this.transactionState == TransactionState.ACTIVE && this.transactionContext.getTransaction() != null) {
+ if (this.transactionState == TransactionState.ACTIVE && isSuspendable()) {
this.transactionService.resume(this.transactionContext);
}
}
+ private boolean isSuspendable() {
+ return !this.useCallingThread && this.transactionContext.getTransaction() != null;
+ }
+
private void suspend() {
- if ((this.transactionState != TransactionState.NONE) && this.transactionContext.getTransaction() != null) {
+ if (this.transactionState != TransactionState.NONE && isSuspendable()) {
try {
this.transactionService.suspend(this.transactionContext);
} catch (XATransactionException e) {
12 years, 11 months