cancel
Showing results for 
Search instead for 
Did you mean: 

Impossible de récupérer le serviceRegistry

nathservice
Champ in-the-making
Champ in-the-making
Bonjour à tous,

Je viens vers vous, après plusieurs jours de recherches peu fructueux…

Mon problème : récupérer le serviceRegistry (ou n'importe quelles autres services) via Spring. Je l'ai déjà effectuer plusieurs fois, et sans soucis, mais cette fois… Ca ne veut pas…

Il s'agit d'un module qui va instancier une classe (qui permettra d'écouter sur un port et +++), lors du lancement d'Alfresco (3.4.e) .
voici déjà le -context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="${groupId}.${artifactId}.exampleBean" class="org.alfresco.demoamp.Demo" init-method="init">
<bean id="${groupId}.${artifactId}.JMXcloudHandlerBean" class="com.titaniumtrack.exchangeengine.client.handler.JMXCloudHandler">         
          <property name="serviceRegistry">
             <ref bean="ServiceRegistry"/>
          </property>
       </bean>
</beans>

la classe Demo (celle du sdk si je ne m'abuse)

public class Demo
{
   public void init()
   {
      System.out.println("DEMO TEST  Demo AMP class has been loaded "+"lancement du handler ");

      try {
         JMXCloudHandler handler = new JMXCloudHandler();      
         
      } catch (Exception e) {
         //e.printStackTrace();
         System.err.println("RECEIVE: "+e.getMessage());
      }
   }
}

Une partie de la classe JMXCloudHandler

….

   /** serviceRegistry bean reference */
   private ServiceRegistry serviceRegistry;   
   public void setServiceRegistry(ServiceRegistry serviceRegistry)
   {
      this.serviceRegistry = serviceRegistry;
   }
   /**
    * @return serviceRegistry
    */
   private ServiceRegistry getServiceRegistry()
   {
      return this.serviceRegistry;
   }


   @Override
   public void handle(NewClientMessage message) {
      String errMsg = null;
      System.out.println("Received:"+message);
      ClientSenderMBean sender = getClientSender();
      try {
         this.getServiceRegistry().getSearchService();
      }
      catch(Exception e){
         e.printStackTrace();
      }
      TitaniumResponseMessage response = new NewClientResponse(message, errMsg);
      sender.send(response);
   }


Le fichier de logs :


25 avr. 2012 15:59:41 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/alfresco-3.4.e/java/jre/lib/amd64/server:/opt/alfresco-3.4.e/java/jre/lib/amd64:/opt/alfresco-3.4.e/java/jre/../lib/amd64:/opt/alfresco-3.4.e/postgresql/lib:/opt/alfresco-3.4.e/common/lib::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
25 avr. 2012 15:59:42 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
25 avr. 2012 15:59:42 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 371 ms
25 avr. 2012 15:59:42 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
25 avr. 2012 15:59:42 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
25 avr. 2012 15:59:42 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration alfresco.xml
25 avr. 2012 15:59:46 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
15:59:52,843  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
15:59:52,845  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
15:59:52,845  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [/opt/alfresco-3.4.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/test/alfresco-global.properties]
15:59:52,845  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [/opt/alfresco-3.4.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org_alfresco_module_wcmquickstart/alfresco-global.properties]
15:59:52,845  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco-global.properties]
15:59:52,893  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
15:59:53,074  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
15:59:53,136  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
15:59:53,157  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
15:59:53,158  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
25 avr. 2012 16:00:01 org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
25 avr. 2012 16:00:01 org.activiti.engine.impl.jobexecutor.JobAcquisitionThread run
INFO: JobAcquisitionThread starting to acquire jobs
DEMO TEST  Demo AMP class has been loaded lancement de l'ecoute
0
RMI registry ready.
16:00:04,088  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor Repository Template Processor for extension ftl
16:00:04,090  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor Repository Script Processor for extension js
16:00:08,996  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.PostgreSQLDialect.
16:00:11,670  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
16:00:11,766  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
16:00:12,488  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:12,489  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:12,489  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:12,489  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:12,489  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:12,498  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
16:00:13,442  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
16:00:13,453  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:13,454  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:13,454  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:13,455  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:13,455  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:13,766  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
16:00:13,767  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
16:00:13,778  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:13,778  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:13,778  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:13,778  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:13,779  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:14,221  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
16:00:17,041  INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /nfs/alfresco-3.4.e/alf_data
16:00:17,120  INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
16:00:17,619  INFO  [admin.patch.PatchExecuter] No patches were required.
16:00:17,631 User:System INFO  [repo.module.ModuleServiceImpl] Found 9 module(s).
16:00:17,704 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'modelededonnee' version 1.0.
16:00:17,750 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'org_alfresco_module_wcmquickstart' version 1.0.
16:00:17,788 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'artifact.amp-to-maven' version 1.0.1.
16:00:17,825 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'syncDevice' version 2.0.
16:00:17,862 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.2.
16:00:17,897 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'importCSV' version 1.0.
16:00:17,931 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'creerCompteCSV' version 1.0.
16:00:17,964 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'syncDeviceModule' version 2.0.
16:00:17,995 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'creerClientCSV' version 1.0.
16:00:18,010  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
16:00:18,026  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:18,027  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:18,028  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:18,028  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:18,028  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:18,271  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
16:00:18,283  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:18,283  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:18,283  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:18,284  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:18,284  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:18,357  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
16:00:23,371  ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
16:00:23,372  ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect <broadcast> setting)
16:00:23,438  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
16:00:23,438  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
16:00:23,449  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,449  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,449  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,449  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,449  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,490  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
16:00:23,490  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, outbound]
16:00:23,498  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,499  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,499  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,500  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,500  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,527  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, outbound] complete
16:00:23,527  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'email' subsystem, ID: [email, inbound]
16:00:23,536  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,536  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,537  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,537  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,537  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,567  WARN  [springframework.beans.GenericTypeAwarePropertyDescriptor] Invalid JavaBean property 'blockedSenders' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.email.server.EmailServer.setBlockedSenders(java.util.List)]: [public void org.alfresco.email.server.EmailServer.setBlockedSenders(java.lang.String)]
16:00:23,567  WARN  [springframework.beans.GenericTypeAwarePropertyDescriptor] Invalid JavaBean property 'allowedSenders' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.email.server.EmailServer.setAllowedSenders(java.util.List)]: [public void org.alfresco.email.server.EmailServer.setAllowedSenders(java.lang.String)]
16:00:23,591  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, inbound] complete
16:00:23,591  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, default]
16:00:23,610  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,611  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,611  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,611  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,611  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,809  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, default] complete
16:00:23,810  INFO  [repo.usage.UserUsageTrackingComponent] Enabled - calculate missing user usages …
16:00:23,839  INFO  [repo.usage.UserUsageTrackingComponent] Found 0 users to recalculate
16:00:23,839  INFO  [repo.usage.UserUsageTrackingComponent] … calculated missing usages for 0 users
16:00:23,839  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
16:00:23,864  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,865  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,865  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,865  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,865  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,909  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
16:00:23,984  INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_22-b04; maximum heap size 682.688MB
16:00:23,985  INFO  [service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.4.0 (e 3419) schema 4113 - Originally installed version 3.4.0 (e 3419) schema 4113
16:00:23,985  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'Replication' subsystem, ID: [Replication, default]
16:00:23,994  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/version.properties]
16:00:23,994  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:00:23,994  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
16:00:23,994  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/module/org.alfresco.module.vti/context/vti.properties]
16:00:23,994  INFO  [alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from URL [file:/opt/alfresco-3.4.e/tomcat/shared/classes/alfresco/extension/custom-vti.properties]
16:00:23,999  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'Replication' subsystem, ID: [Replication, default] complete
16:00:24,595  INFO  [module.vti.VtiServer] Vti server started successfully on port: 7070
16:00:35,364 User:System INFO  [extensions.webscripts.DeclarativeRegistry] Registered 390 Web Scripts (+0 failed), 631 URLs
16:00:35,371 User:System INFO  [extensions.webscripts.DeclarativeRegistry] Registered 2 Package Description Documents (+0 failed)
16:00:35,371 User:System INFO  [extensions.webscripts.DeclarativeRegistry] Registered 1 Schema Description Documents (+0 failed)
16:00:35,373 User:System INFO  [extensions.webscripts.AbstractRuntimeContainer] Initialised Repository Web Script Container (in 7853.927ms)
16:00:35,381  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
16:00:35,382  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
25 avr. 2012 16:00:36 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration host-manager.xml
25 avr. 2012 16:00:36 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration manager.xml
25 avr. 2012 16:00:36 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive wcmqs.war de l'application web
WARN : org.apache.myfaces.shared_impl.util.LocaleUtils - Locale name in faces-config.xml null or empty, setting locale to default locale : fr_CH
WARN : org.springframework.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'baseUrl' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.wcm.client.impl.WebScriptCallerImpl.setBaseUrl(java.lang.String) throws java.net.URISyntaxException]: [public void org.alfresco.wcm.client.impl.WebScriptCallerImpl.setBaseUrl(java.net.URI)]
25 avr. 2012 16:00:38 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive awe.war de l'application web
25 avr. 2012 16:00:41 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive share.war de l'application web
16:00:44,391  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 268 Web Scripts (+0 failed), 278 URLs
16:00:44,392  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
16:00:44,392  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
16:00:44,561  INFO  [extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 1095.7936ms)
16:00:44,588  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
16:00:44,649  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
16:00:44,762  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
16:00:44,766  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
16:00:44,882  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
16:00:44,886  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
25 avr. 2012 16:00:45 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire ROOT de l'application web
25 avr. 2012 16:00:45 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
25 avr. 2012 16:00:45 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
25 avr. 2012 16:00:45 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/18  config=null
25 avr. 2012 16:00:45 org.apache.catalina.startup.Catalina start
INFO: Server startup in 63137 ms
Received:NewClientMessage: [clientId: 1, destination: EUROPE, email:email]
java.lang.NullPointerException
   at com.titaniumtrack.exchangeengine.client.handler.JMXCloudHandler.handle(JMXCloudHandler.java:150)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
   at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
   at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
   at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
   at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
   at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
   at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
   at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
   at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
   at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
   at sun.rmi.transport.Transport$1.run(Transport.java:159)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)


Bien entendu la ligne (JMXCloudHandler.java:150) Correspond à –>     this.getServiceRegistry().getSearchService();

J'ai vérifier en créant des erreurs dans le -context pour être sur qu'il est bien pris en compte, ainsi que ne pas mettre le setter-getter pour le serviceRegistry. Donc je suis sur et certain que les beans sont bien lus.

Donc voili voiloi, si je m'y prend mal (ce que je suppose), merci de bien vouloir m'indiquer à quel(s) niveau(x)…

Merci d'avance!!
4 REPLIES 4

cleseach
Star Contributor
Star Contributor
Bonjour,

1/ Quand vous faites ça (cf. classe Demo) :
JMXCloudHandler handler = new JMXCloudHandler()
Vous êtes en dehors de votre contexte Spring, donc serviceRegistry n'est pas défini.

2/ Je ne suis pas sûr de la validité de votre fichier -context.xml : l'élément XML définissant le bean exempleBean n'est pas fermé

3/ Pourquoi ne pas injecter directement SearchService ?

Cordialement,
Charles Le Seac'h

nathservice
Champ in-the-making
Champ in-the-making
Bonjour merci pour la réponse
,
1/ Quand vous faites ça (cf. classe Demo) :

JMXCloudHandler handler = new JMXCloudHandler()

Vous êtes en dehors de votre contexte Spring, donc serviceRegistry n'est pas défini.
Voilà, c'est bien se qu'il me semblait… Existe -t-il une solution "simple" pour recharger le "bon" contexte?

2/ Je ne suis pas sûr de la validité de votre fichier -context.xml : l'élément XML définissant le bean exempleBean n'est pas fermé

Copier-Coller raté tout les éléments sont bien fermés  Smiley Frustrated

3/ Pourquoi ne pas injecter directement SearchService ?

Il se passe la même chose, je suis toujours en dehors de mon contexte… (j'aurai besoin de pas mal des services (node, fileFolder, …. ) le serviceRegistry était là l'exemple Smiley Wink  )


Sinon je passerai par un autre moyen pour arriver à mes fins Smiley Wink

cleseach
Star Contributor
Star Contributor
Bonjour,

Existe -t-il une solution "simple" pour recharger le "bon" contexte?

Oui, très certainement, mais il va falloir nous en dire un peu plus sur comment est utilisée la classe Demo.

Cordialement,
Charles Le Seac'h

rguinot
Confirmed Champ
Confirmed Champ
En effet comme le fait remarquer charles,  du fait de votre "new" , votre bean n'est pas instancié par spring, et donc les propriétés ne sont pas injectées.
Peut être faudrait il que le JMX bean soit injecté en dépendance de la classe Demo…

Cependant votre exemple m'a l'air un peu farfelu.
Notez qu'Alfresco expose également un certain nombre de métriques via JMX. Vous pourriez peut être vous inspirer du code et des mécanimses sous jacents.
Faites comme les vieux éléphants, ils savent tjs où trouver de l'eau.