mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[367264] [dstore] Trace should be written when load miner is failed.
This commit is contained in:
parent
a090799028
commit
015fe4c937
2 changed files with 22 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -14,6 +14,7 @@
|
|||
* Contributors:
|
||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||
* David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
|
||||
* David McKnight (IBM) - [367264] [dstore] Trace should be written when load miner is failed.
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.java;
|
||||
|
@ -131,7 +132,11 @@ public class RemoteClassLoader extends ClassLoader
|
|||
public boolean useCaching()
|
||||
{
|
||||
boolean useCaching = false;
|
||||
String pref = _dataStore.getPreference(CACHING_PREFERENCE);
|
||||
|
||||
// hard coding this to false for now since remote loading can cause problems
|
||||
// and isn't intentionally used by anyone
|
||||
String pref = "false"; //$NON-NLS-1$
|
||||
//String pref = _dataStore.getPreference(CACHING_PREFERENCE);
|
||||
if (pref != null && pref.equals("true")) //$NON-NLS-1$
|
||||
{
|
||||
useCaching = true;
|
||||
|
@ -185,9 +190,8 @@ public class RemoteClassLoader extends ClassLoader
|
|||
theClass = ((ClassLoader)localLoaders.get(i)).loadClass(className);
|
||||
if (theClass != null) return theClass;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//e.printStackTrace();
|
||||
catch (Exception e){
|
||||
_dataStore.trace(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,9 +207,14 @@ public class RemoteClassLoader extends ClassLoader
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
if (!_useCaching){
|
||||
// no remote loading in this case
|
||||
throw new ClassNotFoundException(className);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// DKM
|
||||
// only do lookup if the classname looks valid
|
||||
// don't want to be requesting rsecomm from client
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -13,6 +13,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
|
||||
* David McKnight (IBM) - [367264] [dstore] Trace should be written when load miner is failed.
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.internal.core.server;
|
||||
|
@ -213,25 +214,25 @@ public class MinerLoader implements ISchemaRegistry
|
|||
}
|
||||
catch (NoClassDefFoundError e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
_dataStore.trace(e);
|
||||
handleNoClassFound(e.getMessage().replace('/','.'));
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
_dataStore.trace(e);
|
||||
handleNoClassFound(name);
|
||||
}
|
||||
catch (InstantiationException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
_dataStore.trace(e);
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
_dataStore.trace(e);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
_dataStore.trace(e);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -350,7 +351,6 @@ public class MinerLoader implements ISchemaRegistry
|
|||
//if (remoteLoader.canLoad(source))
|
||||
if(true)
|
||||
{
|
||||
//System.out.println("using RemoteClassLoader");
|
||||
return remoteLoader;
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,6 @@ public class MinerLoader implements ISchemaRegistry
|
|||
ExternalLoader loader = (ExternalLoader) _loaders.get(i);
|
||||
if (loader.canLoad(source))
|
||||
{
|
||||
// System.out.println("using local loader");
|
||||
return loader;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue