Skip to content

Commit

Permalink
TEIIDDES-3051 - added check for error message
Browse files Browse the repository at this point in the history
  • Loading branch information
blafond committed May 23, 2017
1 parent d4aac4d commit eea4bb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -42,6 +42,8 @@ public class TeiidParentServerListener implements IServerLifecycleListener, ISer
* Could not execute "read-children-names" for undefined. Failure was "JBAS013493: System boot is in process; execution of remote management operations is not currently available".
*/
public static String JBAS013493_CODE = "JBAS013493"; //$NON-NLS-1$

public static String MISSING_NLS_MESSAGE = "NLS missing message: OperationOnAddressFailed in"; //$NON-NLS-1$

/**
* Get the singleton instance of of this class
Expand Down
Expand Up @@ -52,7 +52,8 @@ public Object getAdapter(Object adaptableObject, Class adapterType) {
return adaptServer((IServer) adaptableObject, ServerOptions.ADD_TO_REGISTRY, ServerOptions.CONNECT);
}
} catch (Exception ex) {
if(! ex.getMessage().contains(TeiidParentServerListener.JBAS013493_CODE)) {
if(! ex.getMessage().contains(TeiidParentServerListener.JBAS013493_CODE) &&
! ex.getMessage().contains(TeiidParentServerListener.MISSING_NLS_MESSAGE)) {
// Teiid really isn't installed and this is called as part of this factory's extension point.
// So look for the
DqpPlugin.Util.log(IStatus.ERROR, ex, "Failed to determine if server supports teiid"); //$NON-NLS-1$
Expand Down

0 comments on commit eea4bb9

Please sign in to comment.