Author: shawkins
Date: 2012-05-02 13:00:12 -0400 (Wed, 02 May 2012)
New Revision: 4049
Modified:
branches/8.0.x/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
branches/8.0.x/client/src/main/java/org/teiid/gss/MakeGSS.java
branches/8.0.x/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
branches/8.0.x/client/src/main/resources/org/teiid/jdbc/i18n.properties
branches/8.0.x/common-core/src/main/java/org/teiid/core/CorePlugin.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/ClobType.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/FileUtils.java
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java
branches/8.0.x/common-core/src/main/resources/org/teiid/core/i18n.properties
branches/8.0.x/common-core/src/test/java/org/teiid/core/util/TestFileUtils.java
branches/8.0.x/engine/src/main/java/org/teiid/query/QueryPlugin.java
branches/8.0.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
branches/8.0.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java
branches/8.0.x/engine/src/main/java/org/teiid/query/parser/QueryParser.java
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
branches/8.0.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
branches/8.0.x/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java
branches/8.0.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
branches/8.0.x/engine/src/main/resources/org/teiid/query/i18n.properties
branches/8.0.x/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
branches/8.0.x/engine/src/test/java/org/teiid/query/function/TestFunction.java
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
branches/8.0.x/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
branches/8.0.x/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
Log:
TEIID-1889 TEIID-2022 refining exception codes
Modified: branches/8.0.x/admin/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- branches/8.0.x/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/admin/src/main/java/org/teiid/adminapi/AdminFactory.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -22,25 +22,15 @@
package org.teiid.adminapi;
-import static
org.jboss.as.controller.client.helpers.ClientConstants.DEPLOYMENT_REMOVE_OPERATION;
-import static
org.jboss.as.controller.client.helpers.ClientConstants.DEPLOYMENT_UNDEPLOY_OPERATION;
+import static org.jboss.as.controller.client.helpers.ClientConstants.*;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
+import java.util.logging.Logger;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
@@ -64,10 +54,10 @@
import org.teiid.adminapi.impl.PropertyDefinitionMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBMetadataMapper;
+import org.teiid.adminapi.impl.VDBTranslatorMetaData;
import org.teiid.adminapi.impl.VDBMetadataMapper.RequestMetadataMapper;
import org.teiid.adminapi.impl.VDBMetadataMapper.SessionMetadataMapper;
import org.teiid.adminapi.impl.VDBMetadataMapper.TransactionMetadataMapper;
-import org.teiid.adminapi.impl.VDBTranslatorMetaData;
import org.teiid.core.util.ObjectConverterUtil;
@@ -76,6 +66,7 @@
*/
@SuppressWarnings("nls")
public class AdminFactory {
+ private static final Logger LOGGER = Logger.getLogger(AdminFactory.class.getName());
private static AdminFactory INSTANCE = new AdminFactory();
public static AdminFactory getInstance() {
@@ -106,12 +97,12 @@
List<String> nodeTypes = Util.getNodeTypes(newClient, new
DefaultOperationRequestAddress());
if (!nodeTypes.isEmpty()) {
boolean domainMode = nodeTypes.contains("server-group");
//$NON-NLS-1$
- System.out.println("Connected to " //$NON-NLS-1$
+ LOGGER.info("Connected to " //$NON-NLS-1$
+ (domainMode ? "domain controller at " :
"standalone controller at ") //$NON-NLS-1$ //$NON-NLS-2$
+ host + ":" + port); //$NON-NLS-1$
return new AdminImpl(newClient);
}
- System.out.println(AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70051, host,
port)); //$NON-NLS-1$ //$NON-NLS-2$
+ LOGGER.info(AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70051, host, port));
//$NON-NLS-1$ //$NON-NLS-2$
} catch (UnknownHostException e) {
throw new AdminProcessingException(AdminPlugin.Event.TEIID70000,
AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70000, host, e.getLocalizedMessage()));
}
Modified: branches/8.0.x/client/src/main/java/org/teiid/gss/MakeGSS.java
===================================================================
--- branches/8.0.x/client/src/main/java/org/teiid/gss/MakeGSS.java 2012-05-02 15:00:34 UTC
(rev 4048)
+++ branches/8.0.x/client/src/main/java/org/teiid/gss/MakeGSS.java 2012-05-02 17:00:12 UTC
(rev 4049)
@@ -124,7 +124,7 @@
else if (result instanceof CommunicationException)
throw (CommunicationException)result;
else if (result instanceof Exception)
- throw new LogonException(JDBCPlugin.Event.TEIID20006, (Exception)result,
JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20006));
+ throw new LogonException(JDBCPlugin.Event.TEIID20005, (Exception)result,
JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20005));
return (LogonResult)result;
}
Modified: branches/8.0.x/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java
===================================================================
--- branches/8.0.x/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java 2012-05-02 15:00:34
UTC (rev 4048)
+++ branches/8.0.x/client/src/main/java/org/teiid/jdbc/JDBCPlugin.java 2012-05-02 17:00:12
UTC (rev 4049)
@@ -43,7 +43,6 @@
TEIID20002,
TEIID20003,
TEIID20005,
- TEIID20006,
TEIID20007,
TEIID20008,
TEIID20009,
Modified: branches/8.0.x/client/src/main/resources/org/teiid/jdbc/i18n.properties
===================================================================
--- branches/8.0.x/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-05-02
17:00:12 UTC (rev 4049)
@@ -152,7 +152,6 @@
no_krb_ticket=No cached kerberos ticket found and/or no password supplied
-TEIID20006=GSS Authentication failed
TEIID20005=GSS Authentication failed
TEIID20007=Duplicate class
setup_failed=Protocol error. Session setup failed.
Modified: branches/8.0.x/common-core/src/main/java/org/teiid/core/CorePlugin.java
===================================================================
--- branches/8.0.x/common-core/src/main/java/org/teiid/core/CorePlugin.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/common-core/src/main/java/org/teiid/core/CorePlugin.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -66,11 +66,6 @@
TEIID10022,
TEIID10023,
TEIID10024,
- TEIID10025,
- TEIID10026,
- TEIID10027,
- TEIID10028,
- TEIID10029,
TEIID10030,
TEIID10031,
TEIID10032,
@@ -91,7 +86,6 @@
TEIID10047,
TEIID10048,
TEIID10049,
- TEIID10050,
TEIID10051,
TEIID10052,
TEIID10053,
@@ -102,10 +96,7 @@
TEIID10059,
TEIID10060,
TEIID10061,
- TEIID10062,
TEIID10063,
- TEIID10064,
- TEIID10066,
TEIID10068,
TEIID10069,
TEIID10070,
Modified: branches/8.0.x/common-core/src/main/java/org/teiid/core/types/ClobType.java
===================================================================
--- branches/8.0.x/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/common-core/src/main/java/org/teiid/core/types/ClobType.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -33,8 +33,6 @@
import java.sql.Clob;
import java.sql.SQLException;
-import javax.sql.rowset.serial.SerialClob;
-
import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ObjectConverterUtil;
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -847,7 +847,7 @@
targetClass);
if (transform == null) {
Object[] params = new Object[] { sourceType, targetClass, value};
- throw new TransformationException(CorePlugin.Event.TEIID10050,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10050, params));
+ throw new TransformationException(CorePlugin.Event.TEIID10076,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10076, params));
}
T result = (T) transform.transform(value);
return getCanonicalValue(result);
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/ClobToStringTransform.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -61,9 +61,9 @@
}
return contents.toString();
} catch (SQLException e) {
- throw new TransformationException(CorePlugin.Event.TEIID10064, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10064, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
+ throw new TransformationException(CorePlugin.Event.TEIID10080, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10080, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
} catch(IOException e) {
- throw new TransformationException(CorePlugin.Event.TEIID10064, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10064, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
+ throw new TransformationException(CorePlugin.Event.TEIID10080, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10080, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
} finally {
if (reader != null) {
try {
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/SQLXMLToStringTransform.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -56,9 +56,9 @@
int read = reader.read(result);
return new String(result, 0, read);
} catch (SQLException e) {
- throw new TransformationException(CorePlugin.Event.TEIID10066, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10066, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
+ throw new TransformationException(CorePlugin.Event.TEIID10080, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10080, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
} catch (IOException e) {
- throw new TransformationException(CorePlugin.Event.TEIID10066, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10066, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
+ throw new TransformationException(CorePlugin.Event.TEIID10080, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10080, new Object[] {getSourceType().getName(),
getTargetType().getName()}));
} finally {
try {
if (reader != null) {
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -58,12 +58,12 @@
result = Date.valueOf( (String) value );
} catch(Exception e) {
if (!validate && pattern.matcher((String)value).matches()) {
- throw new TransformationException(CorePlugin.Event.TEIID10062,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10062, value, getTargetType().getSimpleName()));
+ throw new TransformationException(CorePlugin.Event.TEIID10060,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10060, value, getTargetType().getSimpleName()));
}
throw new TransformationException(CorePlugin.Event.TEIID10061, e,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10061, value));
}
if (validate && !result.toString().equals(value)) {
- throw new TransformationException(CorePlugin.Event.TEIID10062,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10062, value, getTargetType().getSimpleName()));
+ throw new TransformationException(CorePlugin.Event.TEIID10060,
CorePlugin.Util.gs(CorePlugin.Event.TEIID10060, value, getTargetType().getSimpleName()));
}
return result;
}
Modified: branches/8.0.x/common-core/src/main/java/org/teiid/core/util/FileUtils.java
===================================================================
--- branches/8.0.x/common-core/src/main/java/org/teiid/core/util/FileUtils.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/common-core/src/main/java/org/teiid/core/util/FileUtils.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -22,17 +22,7 @@
package org.teiid.core.util;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.io.*;
import java.util.ArrayList;
import java.util.List;
@@ -74,12 +64,6 @@
public final static char[] SUFFIX_zip = ".zip".toCharArray();
//$NON-NLS-1$
public final static char[] SUFFIX_ZIP = ".ZIP".toCharArray();
//$NON-NLS-1$
-
- private static final String TEMP_FILE = "delete.me"; //$NON-NLS-1$
- private static final String TEMP_FILE_RENAMED = "delete.me.old";
//$NON-NLS-1$
-
-
-
static {
String tempDirPath = System.getProperty(JAVA_IO_TEMP_DIR);
TEMP_DIRECTORY = (tempDirPath.endsWith(File.separator) ? tempDirPath :
tempDirPath + File.separator);
@@ -751,63 +735,6 @@
}
/**
- * Test whether it's possible to read and write files in the specified directory.
- * @param dirPath Name of the directory to test
- * @throws TeiidException
- * @since 4.3
- */
- public static void testDirectoryPermissions(String dirPath) throws TeiidException {
-
- //try to create a file
- File tmpFile = new File(dirPath + File.separatorChar + TEMP_FILE);
- boolean success = false;
- try {
- success = tmpFile.createNewFile();
- } catch (IOException e) {
- }
- if (!success) {
- final String msg =
CorePlugin.Util.getString("FileUtils.Unable_to_create_file_in", dirPath);
//$NON-NLS-1$
- 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(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(CorePlugin.Event.TEIID10027, msg);
- }
-
- //test if file can be renamed
- File newFile = new File(dirPath + File.separatorChar + TEMP_FILE_RENAMED);
- success = false;
- try {
- success = tmpFile.renameTo(newFile);
- } catch (Exception e) {
- }
- if (!success) {
- final String msg =
CorePlugin.Util.getString("FileUtils.Unable_to_rename_file_in", dirPath);
//$NON-NLS-1$
- throw new TeiidException(CorePlugin.Event.TEIID10028, msg);
- }
-
- //test if file can be deleted
- success = false;
- try {
- success = newFile.delete();
- } catch (Exception e) {
- }
- if (!success) {
- final String msg =
CorePlugin.Util.getString("FileUtils.Unable_to_delete_file_in", dirPath);
//$NON-NLS-1$
- throw new TeiidException(CorePlugin.Event.TEIID10029, msg);
- }
- }
-
- /**
* Rename a file.
* @param oldFilePath
* @param newFilePath
Modified:
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java
===================================================================
---
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/java/org/teiid/core/util/ReflectionHelper.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -23,7 +23,6 @@
package org.teiid.core.util;
import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
Modified: branches/8.0.x/common-core/src/main/resources/org/teiid/core/i18n.properties
===================================================================
---
branches/8.0.x/common-core/src/main/resources/org/teiid/core/i18n.properties 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/main/resources/org/teiid/core/i18n.properties 2012-05-02
17:00:12 UTC (rev 4049)
@@ -70,11 +70,6 @@
IDGenerator.The_stringified_ID_may_not_be_null=The stringified ID may not be null
FileUtils.The_name_of_the_file_may_not_be_null=The name of the file may not be null
FileUtils.The_file_extension_may_not_be_null=The file extension may not be null
-FileUtils.Unable_to_create_file_in=Unable to create file in \"{0}\"
-FileUtils.Unable_to_write_file_in=Unable to create file in \"{0}\"
-FileUtils.Unable_to_read_file_in=Unable to create file in \"{0}\"
-FileUtils.Unable_to_rename_file_in=Unable to create file in \"{0}\"
-FileUtils.Unable_to_delete_file_in=Unable to create file in \"{0}\"
FileUtils.File_already_exists=File "\{0}\" already exists
@@ -109,8 +104,6 @@
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}
-TEIID10064=Failed to transform Clob to String. source={0}, target={1}
-TEIID10066=Failed to transform XML to String. source={0}, target={1}
#CM_UTIL_ERR
TEIID10006=Decryption failed: {0} {1}
Modified: branches/8.0.x/common-core/src/test/java/org/teiid/core/util/TestFileUtils.java
===================================================================
---
branches/8.0.x/common-core/src/test/java/org/teiid/core/util/TestFileUtils.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/common-core/src/test/java/org/teiid/core/util/TestFileUtils.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -28,6 +28,7 @@
import junit.framework.TestCase;
+import org.teiid.core.CorePlugin;
import org.teiid.core.TeiidException;
@@ -42,6 +43,8 @@
private final static String TEMP_DIR_NAME = "tempdir"; //$NON-NLS-1$
File tempDir;
+ public static final String TEMP_FILE = "delete.me"; //$NON-NLS-1$
+ public static final String TEMP_FILE_RENAMED = "delete.me.old"; //$NON-NLS-1$
private final static String TEMP_FILE_NAME = "tempfile.txt"; //$NON-NLS-1$
private final static String TEMP_FILE_NAME2 = "tempfile2.txt";
//$NON-NLS-1$
@@ -135,11 +138,11 @@
//positive case
- FileUtils.testDirectoryPermissions(TEMP_DIR_NAME);
+ TestFileUtils.testDirectoryPermissions(TEMP_DIR_NAME);
//negative case: dir doesn't exist
try {
- FileUtils.testDirectoryPermissions("fakeDir"); //$NON-NLS-1$
+ TestFileUtils.testDirectoryPermissions("fakeDir"); //$NON-NLS-1$
fail("Expected a MetaMatrixCoreException"); //$NON-NLS-1$
} catch (TeiidException e) {
}
@@ -250,5 +253,57 @@
fileSource.delete();
}
}
+
+ /**
+ * Test whether it's possible to read and write files in the specified directory.
+ * @param dirPath Name of the directory to test
+ * @throws TeiidException
+ * @since 4.3
+ */
+ public static void testDirectoryPermissions(String dirPath) throws TeiidException {
+
+ //try to create a file
+ File tmpFile = new File(dirPath + File.separatorChar + TestFileUtils.TEMP_FILE);
+ boolean success = false;
+ try {
+ success = tmpFile.createNewFile();
+ } catch (IOException e) {
+ }
+ if (!success) {
+ throw new TeiidException("cannot create file in " + dirPath);
//$NON-NLS-1$
+ }
+
+ //test if file can be written to
+ if (!tmpFile.canWrite()) {
+ throw new TeiidException("cannot write " +dirPath); //$NON-NLS-1$
+ }
+
+ //test if file can be read
+ if (!tmpFile.canRead()) {
+ throw new TeiidException("cannot read " + dirPath); //$NON-NLS-1$
+ }
+
+ //test if file can be renamed
+ File newFile = new File(dirPath + File.separatorChar +
TestFileUtils.TEMP_FILE_RENAMED);
+ success = false;
+ try {
+ success = tmpFile.renameTo(newFile);
+ } catch (Exception e) {
+ }
+ if (!success) {
+ throw new TeiidException("failed to rename " + dirPath);
//$NON-NLS-1$
+ }
+
+ //test if file can be deleted
+ success = false;
+ try {
+ success = newFile.delete();
+ } catch (Exception e) {
+ }
+ if (!success) {
+ final String msg =
CorePlugin.Util.getString("FileUtils.Unable_to_delete_file_in", dirPath);
//$NON-NLS-1$
+ throw new TeiidException(msg);
+ }
+ }
}
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/QueryPlugin.java
===================================================================
--- branches/8.0.x/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -113,15 +113,12 @@
TEIID30070,
TEIID30071,
TEIID30072,
- TEIID30073,
TEIID30074,
TEIID30075,
TEIID30076,
TEIID30077,
TEIID30078,
TEIID30079,
- TEIID30080,
- TEIID30081,
TEIID30082,
TEIID30083,
TEIID30084,
@@ -144,25 +141,13 @@
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,
@@ -172,7 +157,6 @@
TEIID30129,
TEIID30130,
TEIID30131,
- TEIID30132,
TEIID30133,
TEIID30134,
TEIID30135,
@@ -210,7 +194,6 @@
TEIID30170,
TEIID30171,
TEIID30172,
- TEIID30173,
TEIID30174,
TEIID30175,
TEIID30176,
@@ -251,8 +234,6 @@
TEIID30211,
TEIID30212,
TEIID30213,
- TEIID30214,
- TEIID30215,
TEIID30216,
TEIID30217,
TEIID30218,
@@ -265,7 +246,6 @@
TEIID30225,
TEIID30226,
TEIID30227,
- TEIID30228,
TEIID30229,
TEIID30230,
TEIID30231,
@@ -292,8 +272,6 @@
TEIID30252,
TEIID30253,
TEIID30254,
- TEIID30255,
- TEIID30256,
TEIID30257,
TEIID30258,
TEIID30259,
@@ -310,11 +288,7 @@
TEIID30273,
TEIID30274,
TEIID30275,
- TEIID30276,
- TEIID30277,
TEIID30278,
- TEIID30279,
- TEIID30280,
TEIID30281,
TEIID30282,
TEIID30283,
@@ -323,17 +297,10 @@
TEIID30286,
TEIID30287,
TEIID30288,
- TEIID30289,
- TEIID30290,
- TEIID30291,
- TEIID30292,
- TEIID30293,
TEIID30294,
TEIID30295,
TEIID30296,
TEIID30297,
- TEIID30298,
- TEIID30299,
TEIID30300,
TEIID30301,
TEIID30302,
@@ -344,10 +311,9 @@
TEIID30307,
TEIID30308,
TEIID30309,
- TEIID30310,
TEIID30311,
+ TEIID30312,
TEIID30314,
- TEIID30315,
TEIID30316,
TEIID30319,
TEIID30320,
@@ -367,7 +333,6 @@
TEIID30337,
TEIID30338,
TEIID30339,
- TEIID30340,
TEIID30341,
TEIID30342,
TEIID30343,
@@ -395,7 +360,6 @@
TEIID30365,
TEIID30366,
TEIID30367,
- TEIID30368,
TEIID30369,
TEIID30370,
TEIID30371,
@@ -406,7 +370,6 @@
TEIID30376,
TEIID30377,
TEIID30378,
- TEIID30379,
TEIID30380,
TEIID30381,
TEIID30382,
@@ -419,11 +382,7 @@
TEIID30390,
TEIID30391,
TEIID30392,
- TEIID30393,
- TEIID30394,
- TEIID30395,
TEIID30396,
- TEIID30397,
TEIID30398,
TEIID30399,
TEIID30400,
@@ -434,7 +393,6 @@
TEIID30405,
TEIID30406,
TEIID30407,
- TEIID30408,
TEIID30409,
TEIID30410,
TEIID30411,
@@ -442,7 +400,6 @@
TEIID30413,
TEIID30415,
TEIID30416,
- TEIID30417,
TEIID30418,
TEIID30419,
TEIID30420,
@@ -473,19 +430,9 @@
TEIID30447,
TEIID30448,
TEIID30449,
- TEIID30450,
TEIID30451,
TEIID30452,
- TEIID30453,
- TEIID30454,
- TEIID30455,
- TEIID30456,
TEIID30457,
- TEIID30458,
- TEIID30459,
- TEIID30460,
- TEIID30461,
- TEIID30462,
TEIID30463,
TEIID30464,
TEIID30465,
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- branches/8.0.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -101,7 +101,7 @@
try {
QueryResult.serialize(row, result, SaxonXQueryExpression.DEFAULT_OUTPUT_PROPERTIES);
} catch (XPathException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30310, e);
+ throw new TeiidRuntimeException(e);
}
}
}
@@ -271,7 +271,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30314, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30314, "left", criteria));
//$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30312, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30312, "left", criteria));
//$NON-NLS-1$
}
// Shortcut if null
@@ -284,7 +284,7 @@
try {
rightValue = evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30314, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30314, "right", criteria));
//$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30312, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30312, "right", criteria));
//$NON-NLS-1$
}
// Shortcut if null
@@ -305,7 +305,7 @@
try {
value = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30315, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30315, "left", criteria));
//$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30312, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30312, "left", criteria));
//$NON-NLS-1$
}
// Shortcut if null
@@ -330,7 +330,7 @@
try {
rightValue = (String) evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30315, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30315, "right", criteria));
//$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30312, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30312, "right", criteria));
//$NON-NLS-1$
}
// Shortcut if null
@@ -935,7 +935,7 @@
return internalEvaluate(expr.getThenExpression(i), tuple);
}
} catch (ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30340, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30340, "CASE",
expr.getWhenCriteria(i))); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30346, e,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30346, "CASE",
expr.getWhenCriteria(i))); //$NON-NLS-1$
}
}
if (expr.getElseExpression() != null) {
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -237,22 +237,15 @@
// ================== Function = rand=====================
- public static Object rand(CommandContext context, Object seed) throws
FunctionExecutionException {
- if(context != null) {
- if(seed == null) {
- return new Double(context.getNextRand());
- } else if(seed instanceof Integer) {
- return new Double(context.getNextRand(((Integer)seed).longValue()));
- }
- }
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30393,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30393, "rand", seed)); //$NON-NLS-1$
+ public static Object rand(CommandContext context, Integer seed) {
+ if(seed == null) {
+ return new Double(context.getNextRand());
+ }
+ return new Double(context.getNextRand(seed.longValue()));
}
- public static Object rand(CommandContext context) throws FunctionExecutionException
{
- if(context != null) {
- return new Double(context.getNextRand());
- }
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30394,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30394, "rand"));//$NON-NLS-1$
+ public static Object rand(CommandContext context) {
+ return new Double(context.getNextRand());
}
// ================== Function = mod =====================
@@ -462,12 +455,11 @@
// ================== Function = quarter =====================
- public static Object quarter(Date date)
- throws FunctionExecutionException {
+ public static Object quarter(Date date) {
int month = getField(date, Calendar.MONTH);
if (month > 11) {
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30395,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30395, "quarter",
date.getClass().getName())); //$NON-NLS-1$
+ throw new AssertionError("Invalid month for " + date); //$NON-NLS-1$
}
return Integer.valueOf(month/3 + 1);
}
@@ -667,7 +659,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30397,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30397, countValue));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30396,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30396, countValue));
} else if(string.length() < countValue) {
return string;
} else {
@@ -1032,7 +1024,7 @@
public static Object rowlimitexception(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30408,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30408));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30407,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30407));
}
// ================== Function = lookup =====================
@@ -1432,7 +1424,7 @@
if (array instanceof java.sql.Array) {
return Array.getLength(((java.sql.Array)array).getArray());
}
- throw new FunctionExecutionException(QueryPlugin.Event.TEIID30417,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30417, array.getClass()));
+ throw new FunctionExecutionException(QueryPlugin.Event.TEIID30416,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30416, array.getClass()));
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingChoiceNode.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -90,18 +90,18 @@
}
public MappingChoiceNode addChoiceNode(MappingChoiceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30453,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30453));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingSequenceNode addSequenceNode(MappingSequenceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30454,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30454));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingElement addChildElement(MappingElement elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30455,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30455));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingSourceNode addSourceNode(MappingSourceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30456,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30456));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/mapping/xml/MappingDocument.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -23,6 +23,7 @@
package org.teiid.query.mapping.xml;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.core.util.Assertion;
import org.teiid.query.QueryPlugin;
@@ -120,30 +121,26 @@
}
public MappingAllNode addAllNode(MappingAllNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30458,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30458));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingChoiceNode addChoiceNode(MappingChoiceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30459,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30459));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingSequenceNode addSequenceNode(MappingSequenceNode elem) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30460,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30460));
+ throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30452,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30452));
}
public MappingElement addChildElement(MappingElement elem) {
- if (elem == null) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30461,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30461));
- }
+ Assertion.isNotNull(elem);
fixCardinality(elem);
setRoot(elem);
return elem;
}
public MappingSourceNode addSourceNode(MappingSourceNode elem) {
- if (elem == null) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30462,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30462));
- }
+ Assertion.isNotNull(elem);
setRoot(elem);
return elem;
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -649,10 +649,10 @@
} else if (subqueryContainer instanceof ExistsCriteria) {
((ExistsCriteria) subqueryContainer).setShouldEvaluate(true);
} else {
- throw new QueryPlannerException(QueryPlugin.Event.TEIID30255,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30255, container));
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30253,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30253, container));
}
} else {
- throw new QueryPlannerException(QueryPlugin.Event.TEIID30256,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30256, container));
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30253,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30253, container));
}
}
ProcessorPlan plan = QueryOptimizer.optimizePlan(subqueryContainer.getCommand(),
metadata, null, capFinder, analysisRecord, context);
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -22,16 +22,7 @@
package org.teiid.query.optimizer.relational.rules;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
@@ -376,7 +367,7 @@
private void planForDependencies(JoinRegion joinRegion) throws QueryPlannerException
{
if (joinRegion.getJoinSourceNodes().isEmpty()) {
- throw new QueryPlannerException(QueryPlugin.Event.TEIID30276,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30276,
joinRegion.getUnsatisfiedAccessPatterns()));
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30275,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30275,
joinRegion.getUnsatisfiedAccessPatterns()));
}
HashSet<GroupSymbol> currentGroups = new HashSet<GroupSymbol>();
@@ -435,7 +426,7 @@
}
if (!dependentNodes.isEmpty()) {
- throw new QueryPlannerException(QueryPlugin.Event.TEIID30277,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30277,
joinRegion.getUnsatisfiedAccessPatterns()));
+ throw new QueryPlannerException(QueryPlugin.Event.TEIID30275,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30275,
joinRegion.getUnsatisfiedAccessPatterns()));
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/NameInSourceResolverVisitor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -31,7 +31,6 @@
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;
@@ -118,9 +117,9 @@
symbol.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(symbol.getMetadataID())));
return symbol;
} catch (QueryMetadataException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30279, e);
+ throw new TeiidRuntimeException(e);
} catch (TeiidComponentException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30280, e);
+ throw new TeiidRuntimeException(e);
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/SourceNodePlannerVisitor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -33,7 +33,6 @@
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;
@@ -184,7 +183,7 @@
baseQuery.setCriteria(inputSetCriteria);
rsInfo.setCriteriaRaised(true);
} catch (Exception e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30289, e);
+ throw new TeiidRuntimeException(e);
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/ValidateMappedCriteriaVisitor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -28,7 +28,6 @@
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;
@@ -76,7 +75,7 @@
ResolverVisitor.resolveLanguageObject(crit, null,
planEnv.getGlobalMetadata());
return crit;
} catch (Exception e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30290, e);
+ throw new TeiidRuntimeException(e);
}
}
return null;
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -293,7 +293,7 @@
// in the orderby. static nodes do not qualify for ordering.
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$
+ String msg = QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30288, params);
throw new QueryPlannerException(QueryPlugin.Event.TEIID30288, msg);
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLProjectionMinimizer.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -31,7 +31,6 @@
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;
@@ -104,7 +103,7 @@
MappingSourceNode parent = element.getParentSourceNode();
collectElementSymbols(element, bindings, parent);
} catch (TeiidException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30298, e);
+ throw new TeiidRuntimeException(e);
}
}
@@ -176,7 +175,7 @@
}
}
} catch (TeiidException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30299, e);
+ throw new TeiidRuntimeException(e);
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -106,7 +106,7 @@
}
} catch (Exception e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30292, e);
+ throw new TeiidRuntimeException(e);
}
}
@@ -132,7 +132,7 @@
ProcessorPlan queryPlan = optimizePlan(cmd, planEnv);
rsInfo.setPlan(queryPlan);
} catch (Exception e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30293, e);
+ throw new TeiidRuntimeException(e);
}
}
};
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/optimizer/xml/XMLStagaingQueryPlanner.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -38,7 +38,6 @@
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;
@@ -53,17 +52,7 @@
import org.teiid.query.resolver.QueryResolver;
import org.teiid.query.resolver.util.ResolverUtil;
import org.teiid.query.resolver.util.ResolverVisitor;
-import org.teiid.query.sql.lang.Command;
-import org.teiid.query.sql.lang.CompareCriteria;
-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.GroupBy;
-import org.teiid.query.sql.lang.Insert;
-import org.teiid.query.sql.lang.Option;
-import org.teiid.query.sql.lang.Query;
-import org.teiid.query.sql.lang.Select;
-import org.teiid.query.sql.lang.UnaryFromClause;
+import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
@@ -87,7 +76,7 @@
try {
stagePlannedQuery(sourceNode, planEnv);
} catch (Exception e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30291, e);
+ throw new TeiidRuntimeException(e);
}
}
};
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/parser/QueryParser.java
===================================================================
--- branches/8.0.x/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/engine/src/main/java/org/teiid/query/parser/QueryParser.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -148,7 +148,7 @@
throw convertParserException(pe);
} catch(TokenMgrError tme) {
if(sql.startsWith(XML_OPEN_BRACKET) || sql.startsWith(XQUERY_DECLARE)) {
- throw new QueryParserException(QueryPlugin.Event.TEIID30379, tme,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30379, sql));
+ throw new QueryParserException(QueryPlugin.Event.TEIID30378, tme,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30378, sql));
}
throw handleTokenMgrError(tme);
}
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/processor/DdlPlan.java
===================================================================
--- branches/8.0.x/engine/src/main/java/org/teiid/query/processor/DdlPlan.java 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/engine/src/main/java/org/teiid/query/processor/DdlPlan.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -99,14 +99,14 @@
if (obj.getEnabled() == null) {
if (obj.isCreate()) {
if (getPlanForEvent(t, event) != null) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30156, new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30156, t.getName(),
obj.getEvent())));
+ throw new TeiidRuntimeException(new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30156, t.getName(),
obj.getEvent())));
}
} else if (getPlanForEvent(t, event) == null) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30158, new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30158, t.getName(),
obj.getEvent())));
+ throw new TeiidRuntimeException(new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30158, t.getName(),
obj.getEvent())));
}
sql = obj.getDefinition().toString();
} else if (getPlanForEvent(t, event) == null) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30158, new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30158, t.getName(),
obj.getEvent())));
+ throw new TeiidRuntimeException(new
TeiidProcessingException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30158, t.getName(),
obj.getEvent())));
}
if (getMetadataRepository(vdb, t.getParent().getName()) != null) {
if (sql != null) {
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/proc/ErrorInstruction.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -22,7 +22,7 @@
package org.teiid.query.processor.proc;
-import static org.teiid.query.analysis.AnalysisRecord.PROP_EXPRESSION;
+import static org.teiid.query.analysis.AnalysisRecord.*;
import org.teiid.client.ProcedureErrorInstructionException;
import org.teiid.client.plan.PlanNode;
@@ -77,7 +77,7 @@
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(QueryPlugin.Event.TEIID30167,
ERROR_PREFIX + (value != null ? value.toString() : ""));
+ throw new ProcedureErrorInstructionException(QueryPlugin.Event.TEIID30167,
ERROR_PREFIX + (value != null ? value.toString() : "")); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -332,7 +332,7 @@
this.notifyAll();
}
} catch (TeiidException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30173, e);
+ throw new TeiidRuntimeException(e);
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -287,7 +287,7 @@
} else
if(namespacePrefix.equals(MappingNodeConstants.INSTANCES_NAMESPACE_PREFIX)) {
uri = MappingNodeConstants.INSTANCES_NAMESPACE;
}else {
- String msg = QueryPlugin.Util.getString("XMLPlanner.no_uri",
new Object[] {namespacePrefix, name}); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30213, new
Object[] {namespacePrefix, name}); //$NON-NLS-1$
throw new TeiidComponentException(QueryPlugin.Event.TEIID30213, msg);
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -77,13 +77,7 @@
* @return
*/
public List<?> getCurrentRow(String aliasResultName) throws
TeiidComponentException, TeiidProcessingException {
- PlanExecutor executor = this.resultsMap.get(aliasResultName);
- if (executor == null) {
- if (this.parentContext != null) {
- return this.parentContext.getCurrentRow(aliasResultName);
- }
- throw new TeiidComponentException(QueryPlugin.Event.TEIID30214,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30214, aliasResultName));
- }
+ PlanExecutor executor = getExecutor(aliasResultName);
return executor.currentRow();
}
@@ -94,13 +88,7 @@
* @throws TeiidComponentException
*/
public List<?> getNextRow(String aliasResultName) throws
TeiidComponentException, TeiidProcessingException {
- PlanExecutor executor = this.resultsMap.get(aliasResultName);
- if (executor == null) {
- if (this.parentContext != null) {
- return this.parentContext.getNextRow(aliasResultName);
- }
- throw new TeiidComponentException(QueryPlugin.Event.TEIID30215,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30215, aliasResultName));
- }
+ PlanExecutor executor = getExecutor(aliasResultName);
return executor.nextRow();
}
@@ -132,15 +120,21 @@
* @throws TeiidComponentException
*/
public List<?> getOutputElements(String resultName) throws
TeiidComponentException {
- PlanExecutor executor = this.resultsMap.get(resultName);
+ PlanExecutor executor = getExecutor(resultName);
+ return executor.getOutputElements();
+ }
+
+ private PlanExecutor getExecutor(String resultName)
+ throws TeiidComponentException {
+ PlanExecutor executor = this.resultsMap.get(resultName);
if (executor == null) {
if (this.parentContext != null) {
- return this.parentContext.getOutputElements(resultName);
+ return this.parentContext.getExecutor(resultName);
}
throw new TeiidComponentException(QueryPlugin.Event.TEIID30216,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30216, resultName));
}
- return executor.getOutputElements();
- }
+ return executor;
+ }
/**
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -210,7 +210,7 @@
try {
ResolverUtil.resolveGroup(obj, metadata);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30104, err);
+ throw new TeiidRuntimeException(err);
}
}
@@ -223,7 +223,7 @@
try {
QueryResolver.resolveCommand(command, metadata.getMetadata(), false);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30105, err);
+ throw new TeiidRuntimeException(err);
}
}
@@ -240,7 +240,7 @@
}
obj.setElementSymbols(elementSymbols);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30106, err);
+ throw new TeiidRuntimeException(err);
}
}
@@ -288,7 +288,7 @@
try {
obj.setFile(ResolverUtil.convertExpression(obj.getFile(),
DataTypeManager.DefaultDataTypes.CLOB, metadata));
} catch (QueryResolverException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30107, e);
+ throw new TeiidRuntimeException(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(QueryPlugin.Event.TEIID30108, e);
+ throw new TeiidRuntimeException(e);
}
}
@@ -357,7 +357,7 @@
try {
ResolverUtil.addTempGroup(metadata, obj.getGroupSymbol(),
obj.getProjectedSymbols(), false);
} catch (QueryResolverException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30109, err);
+ throw new TeiidRuntimeException(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(QueryPlugin.Event.TEIID30110, e);
+ throw new TeiidRuntimeException(e);
}
}
}
@@ -383,7 +383,7 @@
try {
ResolverUtil.addTempGroup(metadata, obj.getGroupSymbol(),
obj.getCommand().getProjectedSymbols(), false);
} catch (QueryResolverException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30111, err);
+ throw new TeiidRuntimeException(err);
}
obj.getGroupSymbol().setMetadataID(metadata.getMetadataStore().getTempGroupID(obj.getGroupSymbol().getName()));
}
@@ -400,7 +400,7 @@
createProcRelational(obj);
}
} catch(TeiidException e) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30113, e);
+ throw new TeiidRuntimeException(e);
}
}
@@ -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(msg);
+ QueryResolverException qre = new
QueryResolverException(QueryPlugin.Event.TEIID30115, msg);
qre.addUnresolvedSymbol(new
UnresolvedSymbolDescription(group.toString(), msg));
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30115, qre);
+ throw new TeiidRuntimeException(qre);
}
}
discoveredGroups.clear();
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/TempTableResolver.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -73,13 +73,13 @@
throw new QueryResolverException(QueryPlugin.Event.TEIID30118,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30118, group.getName()));
}
if (metadata.getMetadata().hasProcedure(group.getName())) {
- throw new QueryResolverException(QueryPlugin.Event.TEIID30119,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30119, group.getName()));
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30118,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30118, 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.Event.TEIID30120,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30120, group.getName()));
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30118,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30118, 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:
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -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.Event.TEIID30122,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30122, assStmt.getVariable()));
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30121,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30121, assStmt.getVariable()));
}
//don't allow variable assignments to be external
assStmt.getVariable().setIsExternalReference(false);
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -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(QueryPlugin.Event.TEIID30132, e);
+ throw new TeiidRuntimeException(e);
}
}
}
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -672,7 +672,7 @@
if (commonType == null) {
// Neither are aggs, but types can't be reconciled
- throw new QueryResolverException(QueryPlugin.Event.TEIID30073,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30073, new Object[] { leftTypeName,
rightTypeName, ccrit }));
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30072,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30072, new Object[] { leftTypeName,
rightTypeName, ccrit }));
}
ccrit.setLeftExpression(ResolverUtil.convertExpression(leftExpression, leftTypeName,
commonType, metadata) );
ccrit.setRightExpression(ResolverUtil.convertExpression(rightExpression, rightTypeName,
commonType, metadata) );
@@ -855,7 +855,7 @@
}
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new
String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(QueryPlugin.Event.TEIID30080,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30080, "THEN/ELSE",
obj));//$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30079,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30079, "THEN/ELSE",
obj));//$NON-NLS-1$
}
obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), whenTypeName,
metadata));
ArrayList whens = new ArrayList(whenCount);
@@ -941,7 +941,7 @@
// 3. Perform implicit type conversions
String thenTypeName = ResolverUtil.getCommonType(thenTypeNames.toArray(new
String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(QueryPlugin.Event.TEIID30081,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30081, "THEN/ELSE", obj));
//$NON-NLS-1$
+ throw new QueryResolverException(QueryPlugin.Event.TEIID30079,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30079, "THEN/ELSE", obj));
//$NON-NLS-1$
}
ArrayList thens = new ArrayList(whenCount);
for (int i = 0; i < whenCount; i++) {
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -541,7 +541,7 @@
try {
return rewriteExpressionDirect(element);
} catch (TeiidException err) {
- throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30368, err);
+ throw new TeiidRuntimeException(err);
}
}
};
Modified: branches/8.0.x/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/sql/lang/MatchCriteria.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -340,7 +340,7 @@
}
if (escaped) {
- throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30450,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30450, new Object[] {pattern, new
Character(escape)}));
+ throw new ExpressionEvaluationException(QueryPlugin.Event.TEIID30449,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30449, new Object[] {pattern, new
Character(escape)}));
}
if (!endsWithMatchAny) {
Modified:
branches/8.0.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
---
branches/8.0.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -336,7 +336,7 @@
return tempTable;
}
} else if (tempTable.getActive().get() != 0) {
- throw new TeiidProcessingException(QueryPlugin.Event.TEIID30228,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30228, tempTableID));
+ throw new TeiidProcessingException(QueryPlugin.Event.TEIID30227,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30227, tempTableID));
}
}
} else if (transactionMode == TransactionMode.ISOLATE_READS) {
Modified: branches/8.0.x/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- branches/8.0.x/engine/src/main/resources/org/teiid/query/i18n.properties 2012-05-02
15:00:34 UTC (rev 4048)
+++ branches/8.0.x/engine/src/main/resources/org/teiid/query/i18n.properties 2012-05-02
17:00:12 UTC (rev 4049)
@@ -29,15 +29,13 @@
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}
+TEIID30412=Could not parse number using format: {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}"
@@ -74,16 +72,14 @@
QueryParser.lexicalError=Lexical error: {0}
QueryParser.nullSqlExpr=Parser cannot parse a null sql expression.
TEIID30378=Direct usage of XQuery is no longer supported, use XMLQUERY instead.
-TEIID30379=Direct usage of XQuery is no longer supported, use XMLQUERY instead.
# processor (006)
TEIID30311=Unknown criteria type: {0}
-TEIID30315=Unable to evaluate {0} expression of {1}
+TEIID30312=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}
-TEIID30340=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}
@@ -101,7 +97,6 @@
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}
@@ -111,7 +106,6 @@
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.
@@ -127,12 +121,10 @@
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}
+TEIID30099=Unable to resolve key 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}
@@ -241,7 +233,7 @@
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''
+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}
@@ -276,7 +268,7 @@
SQLParser.Invalid_char={0} value must be a single character: [{1}].
SQLParser.expected_non_reserved=Expected non-reserved word {0}, but was {1}.
SQLParser.invalid_window=Cannot window a non-aggregate expression {0}.
-SQLParser.virtual_proc_def=Virtual procedure {0} must define the procedure block after
'AS' keyword
+SQLParser.virtual_proc_def=Virtual procedure {0} must define the procedure block after
''AS'' keyword
SQLParser.view_def=Virtual view {0} must be defined with a query expression.
SQLParser.pk_exists=Primary Key is already defined on {0}
SQLParser.no_column=Column name {0} not found on table {1}
@@ -720,7 +712,6 @@
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.
@@ -745,10 +736,8 @@
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.
-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.
-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.
TEIID30462=Root node assigned to a document can be null.
TEIID30457=Found recursive node {0} without recursive root node.
@@ -757,7 +746,6 @@
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
-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}.
TEIID30128=Cannot convert insert query expression projected symbol
''{0}'' of type {1} to insert column ''{2}'' of type {3}
@@ -769,8 +757,8 @@
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}'
+ValidationVisitor.group_in_both_dep=Table specified in both dependent and independent
queries ''{0}''
+XMLQuery.resolvingError=Failed to resolve the query ''{0}''
TEIID30085=Invalid order by at {0}
TEIID30367=Infinite loop detected, procedure will not be executed.
@@ -778,9 +766,9 @@
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}
+TEIID30213=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}
+TEIID30288=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.
TEIID30174=Failed to rewrite the command: {0}
@@ -797,10 +785,8 @@
ExecDynamicSqlInstruction.6=The datatype ''{0}'' for element
''{1}'' in the dynamic SQL cannot be implicitly converted to
''{2}''.
TEIID30168=Couldn''t execute the dynamic SQL command "{0}" with the SQL
statement "{1}" due to: {2}
-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.
TEIID30295=Cannot create a query for MappingClass with user criteria {0}
TEIID30296=Conjunct "{0}" has no relationship with target context {1}.
@@ -841,7 +827,7 @@
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\".
+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}.
TEIID30303=No root node found.
@@ -856,7 +842,7 @@
TEIID30005=rollback failed for requestID={0}
ConnectorWorker.process_failed=Connector worker process failed for atomic-request={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
+TEIID30554=A single source is not assigned to model {0} in VDB name {1}.{2}
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
@@ -876,9 +862,9 @@
ERR.018.005.0095 = User <{0}> is not entitled to action <{1}> for 1 or more
of the groups/elements/procedures.
# services (003)
-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.
+TEIID30032=No lob manager found.
+TEIID30033=No existing lob reference found.
+TEIID30034=Expected lob to have a reference value.
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.
@@ -890,7 +876,7 @@
TransactionServer.no_transaction=No transaction found for client {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
+TEIID30520=Unknown END 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}.
@@ -927,14 +913,12 @@
TEIID30481=Failed to find the Connection Factory with JNDI name {0}. Please check the
name or deploy the Connection Factory with specified name.
TEIID31097=Connection Factory (no data source found) provided is null; Can not proceed
with metadata load.
-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}"
TEIID30561=The multisource plan must execute a procedure returning parameter values
exactly 1: {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}
@@ -972,54 +956,40 @@
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}
+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 LOOKUP function group: {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.
+TEIID30375=The specified insert variables {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}
+TEIID30396=Left/Right count {0} is invalid. It must be >= 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}
+TEIID30409=Illegal date format: {0}
+TEIID30410=Could not parse date using format: {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}
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.=======
@@ -1027,7 +997,7 @@
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
+TEIID30519=Unknown START 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:
branches/8.0.x/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -35,7 +35,6 @@
import org.teiid.client.xa.XATransactionException;
import org.teiid.client.xa.XidImpl;
import org.teiid.common.queue.FakeWorkManager;
-import org.teiid.dqp.internal.process.TransactionServerImpl;
import org.teiid.dqp.service.TransactionContext;
public class TestTransactionServer {
@@ -234,7 +233,7 @@
server.start(THREAD1, XID1, Integer.MAX_VALUE, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30519 Message:TEIID30519 Unknown
flags", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("Error Code:TEIID30519 Message:TEIID30519 Unknown START
flags", ex.getMessage()); //$NON-NLS-1$
}
}
Modified: branches/8.0.x/engine/src/test/java/org/teiid/query/function/TestFunction.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/query/function/TestFunction.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/query/function/TestFunction.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -1108,12 +1108,6 @@
Double d = (Double)FunctionMethods.rand(new CommandContext(), new Integer(100));
assertEquals(new Double(0.7220096548596434), d);
- try {
- FunctionMethods.rand(new CommandContext(), new Double(34.5));
- fail("should have failed to take a double"); //$NON-NLS-1$
- } catch (FunctionExecutionException e) {
- }
-
FunctionMethods.rand(new CommandContext());
}
Modified:
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -39,16 +39,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.sql.lang.CollectionValueIterator;
-import org.teiid.query.sql.lang.CompareCriteria;
-import org.teiid.query.sql.lang.Criteria;
-import org.teiid.query.sql.lang.ExistsCriteria;
-import org.teiid.query.sql.lang.IsNullCriteria;
-import org.teiid.query.sql.lang.MatchCriteria;
-import org.teiid.query.sql.lang.Query;
-import org.teiid.query.sql.lang.SetCriteria;
-import org.teiid.query.sql.lang.SubqueryCompareCriteria;
-import org.teiid.query.sql.lang.SubqueryContainer;
+import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.util.ValueIterator;
@@ -327,7 +318,7 @@
try {
helpTestMatch("abc", "a", 'a', true);
//$NON-NLS-1$ //$NON-NLS-2$
} catch (ExpressionEvaluationException cee) {
- assertEquals("Error Code:TEIID30450 Message:TEIID30450 Invalid escape
sequence \"a\" with escape character \"a\"", cee.getMessage());
//$NON-NLS-1$
+ assertEquals("Error Code:TEIID30449 Message:TEIID30449 Invalid escape
sequence \"a\" with escape character \"a\"", cee.getMessage());
//$NON-NLS-1$
}
}
Modified:
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -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 = "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$
+ String expectedMsg = "Error Code:TEIID30288 Message:TEIID30288 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:
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -855,7 +855,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'";
//$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$
+ helpFailUpdateProcedure(proc.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE, "Error Code:TEIID30118 Message:TEIID30118 Cannot create
temporary table \"loopCursor\". An object with the same name already
exists."); //$NON-NLS-1$
}
@Test public void testProcedureCreateDrop() {
Modified: branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
---
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -1405,7 +1405,7 @@
}
@Test public void testFailedConversion_defect9725() throws Exception{
- 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$
+ helpResolveException("select * from pm3.g1 where pm3.g1.e4 > {b
'true'}", "Error Code:TEIID30072 Message:TEIID30072 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() {
Modified:
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java
===================================================================
---
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/IntegrationPlugin.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -84,13 +84,11 @@
TEIID50047,
TEIID50048,
TEIID50049,
- TEIID50050,
TEIID50051,
TEIID50054,
TEIID50055,
TEIID50056,
TEIID50057,
- TEIID50061,
TEIID50062,
TEIID50063,
TEIID50064,
Modified:
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
---
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -1039,12 +1039,8 @@
String mappedRole = operation.get(OperationsConstants.MAPPED_ROLE).asString();
try {
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = VDBService.getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50050,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50050, policyName, vdb.getName(),
vdb.getVersion()));
- }
-
policy.addMappedRoleName(mappedRole);
save(vdb);
} catch (AdminProcessingException e) {
@@ -1087,12 +1083,8 @@
String mappedRole = operation.get(OperationsConstants.MAPPED_ROLE).asString();
try {
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = VDBService.getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50051,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50051, policyName, vdb.getName(),
vdb.getVersion()));
- }
-
policy.removeMappedRoleName(mappedRole);
save(vdb);
} catch (AdminProcessingException e) {
@@ -1130,12 +1122,8 @@
String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
try {
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = VDBService.getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50051,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50051, policyName, vdb.getName(),
vdb.getVersion()));
- }
-
policy.setAnyAuthenticated(true);
save(vdb);
} catch (AdminProcessingException e) {
@@ -1170,12 +1158,8 @@
String policyName = operation.get(OperationsConstants.DATA_ROLE).asString();
try {
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = VDBService.getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50051,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50051, policyName, vdb.getName(),
vdb.getVersion()));
- }
-
policy.setAnyAuthenticated(false);
save(vdb);
} catch (AdminProcessingException e) {
Modified: branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
---
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -429,45 +429,29 @@
}
public void addDataRole(String policyName, String mappedRole) throws
AdminProcessingException{
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50061,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50061, policyName,
this.vdb.getName(), this.vdb.getVersion()));
- }
-
policy.addMappedRoleName(mappedRole);
save();
}
public void remoteDataRole(String policyName, String mappedRole) throws
AdminProcessingException{
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50061,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50061, policyName,
this.vdb.getName(), this.vdb.getVersion()));
- }
-
policy.removeMappedRoleName(mappedRole);
save();
}
public void addAnyAuthenticated(String policyName) throws AdminProcessingException{
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50061,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50061, policyName,
this.vdb.getName(), this.vdb.getVersion()));
- }
-
policy.setAnyAuthenticated(true);
save();
}
public void removeAnyAuthenticated(String policyName) throws AdminProcessingException{
- DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+ DataPolicyMetadata policy = getPolicy(vdb, policyName);
- if (policy == null) {
- throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50061,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50061, policyName,
this.vdb.getName(), this.vdb.getVersion()));
- }
-
policy.setAnyAuthenticated(false);
save();
}
@@ -504,6 +488,16 @@
}
}
+ static DataPolicyMetadata getPolicy(VDBMetaData vdb, String policyName)
+ throws AdminProcessingException {
+ DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
+
+ if (policy == null) {
+ throw new AdminProcessingException(IntegrationPlugin.Event.TEIID50051,
IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50051, policyName, vdb.getName(),
vdb.getVersion()));
+ }
+ return policy;
+ }
+
@SuppressWarnings("serial")
static class TranslatorNotFoundException extends TeiidException {
public TranslatorNotFoundException(String msg) {
Modified:
branches/8.0.x/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
---
branches/8.0.x/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-05-02
17:00:12 UTC (rev 4049)
@@ -30,14 +30,12 @@
TEIID50002=Teiid Engine stopped {0}
TEIID50062=Model name "{0}" not found in the VDB with name "{1}"
version "{2}"
TEIID50062=Source name "{0}" not found for model {1} in the VDB with name
"{2}" version "{3}"
-TEIID50061=Policy name "{0}" not found in the VDB with name "{1}"
version "{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}
Modified:
branches/8.0.x/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
===================================================================
---
branches/8.0.x/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java 2012-05-02
15:00:34 UTC (rev 4048)
+++
branches/8.0.x/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java 2012-05-02
17:00:12 UTC (rev 4049)
@@ -44,7 +44,6 @@
public static enum Event implements BundleUtil.Event {
TEIID80000,
- TEIID80001,
TEIID80002,
TEIID80003,
TEIID80004