Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine

Subject: perfsonar development work

List archive

Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine


Chronological Thread 
  • From: Roman Lapacz <>
  • To: Michael Bischoff <>
  • Cc: "" <>
  • Subject: Re: [pS-dev] perfsonar: r2738 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine
  • Date: Tue, 28 Aug 2007 15:57:10 +0200


Michael,

I wanted to test you recent changes in the base to be sure they can work with current service implementations so I created new jar and run my RRD MA. I sent one of my test requests and got error message in the response:

<?xml version="1.0" encoding="UTF-8"?>
<nmwg:message id="resultCodeMessage" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
<nmwg:metadata id="resultCodeMetadata">
<nmwg:eventType>error.common.parse_error</nmwg:eventType>
</nmwg:metadata>
<nmwg:data id="resultDescriptionData_for_resultCodeMetadata" metadataIdRef="resultCodeMetadata">
<nmwgr:datum xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/";>Parse/validation error, Cannot convert request to Message.</nmwgr:datum>
</nmwg:data>
</nmwg:message>

I asked Maciej to test LS with that base and his LS also failed. Could you check that? I even think it would be good to go back to the state of the base before your changes until you fix the problem. Currently our services does not work correctly.


Roman



Roman Lapacz wrote:

Hi Michael,

I see that you have done some updates in the base. I've skimmed them quickly and they seems to improve some things. Could you send some information about them and the intention behind? The base is a core piece of all our java services and its changes are crucial. We have to be sure that they are tested and known by other developers before committing to the final svn location.


Roman



wrote:
Author: michael.bischoff
Date: 2007-08-27 19:27:19 -0400 (Mon, 27 Aug 2007)
New Revision: 2738

Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
Log:
improved logging

Modified: branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
===================================================================
--- branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java 2007-08-27 23:05:59 UTC (rev 2737)
+++ branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java 2007-08-27 23:27:19 UTC (rev 2738)
@@ -36,66 +36,47 @@
throws PerfSONARException {
// get a logger
- LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
- getInstance().getComponent(ComponentNames.LOGGER);
+ LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
Class engineClass = null;
// try to get the class for the given className
try {
-
engineClass = Class.forName(engineClassName);
-
} catch (ClassNotFoundException e) {
-
// class not found
- logger.fatal("ServiceEngineFactory: class not found for name: "
- + engineClassName);
- throw new PerfSONARException("ServiceEngineFactory: ClassNotFound: "
- + engineClassName);
-
+ logger.fatal("ServiceEngineFactory: class not found for name: "+engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: ClassNotFound: "+ engineClassName
+ );
}
ServiceEngine engine = null;
// get an instance of it
try {
-
engine = (ServiceEngine) engineClass.newInstance();
-
} catch (ClassCastException e1) {
-
- logger.fatal(
- "ServiceEngineFactory: class cast exception while "
- + "trying to instantiate: " + engineClassName);
-
- throw new PerfSONARException("ServiceEngineFactory: class cast exception while "
- + "trying to instantiate: " + engineClassName);
-
-
+ logger.fatal("ServiceEngineFactory: specified class doesn't implement ServiceEngine: " + engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: specified class("+engineClassName+") doesn't implement ServiceEngine"
+ );
} catch (InstantiationException e1) {
-
- logger.fatal(
- "ServiceEngineFactory: class instantiaiton exception while "
- + "trying to instantiate: " + engineClassName);
-
- throw new PerfSONARException("ServiceEngineFactory: class instantiation "
- + "exception for " + engineClassName);
-
+ logger.fatal("ServiceEngineFactory: Couldn't instanciate class ("+engineClassName+") Perhaps there isn't a no arg constructor?");
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: Couldn't instanciate class ("+engineClassName+") Perhaps there isn't a no arg constructor?"
+ );
} catch (IllegalAccessException e1) {
-
- logger.fatal("ServiceEngineFactory: class instantiation is illegal "
- + "for: " + engineClassName);
- throw new PerfSONARException("ServiceEngineFactory: IllegalAccessException "
- + "while instantiating "+engineClassName);
-
+ logger.fatal("ServiceEngineFactory: IllegalAccessException couldn't instanciate: " + engineClassName);
+ throw new PerfSONARException(
+ "error.common.service_engine.creation_failure",
+ "ServiceEngineFactory: IllegalAccessException couldn't instanciate: "+engineClassName
+ );
}
-
return engine;
-
}
-
-
-
}




Archive powered by MHonArc 2.6.16.

Top of Page