[Building Sakai] FW: Send Private Message ERROR

Antonio muñoz alonso antoniovalenciaspain at hotmail.com
Thu Dec 13 02:15:23 PST 2012


HIthe function is able to create a message and save,but if you send fails, anyone have any examples?.
the problem is the command sendPrivateMessage


TOOL/POM:<dependencies>		<!-- project dependencies -->		<dependency>      		<groupId>org.sakaiproject</groupId>      		<artifactId>app-api</artifactId>    	</dependency>    	    	<!-- third party dependencies -->		<dependency>			<groupId>org.apache.wicket</groupId>			<artifactId>wicket</artifactId>		</dependency>		<dependency>			<groupId>org.apache.wicket</groupId>			<artifactId>wicket-spring</artifactId>    	</dependency>		<dependency>			<groupId>org.slf4j</groupId>			<artifactId>slf4j-log4j12</artifactId>		</dependency>		<dependency>			<groupId>org.slf4j</groupId>			<artifactId>slf4j-api</artifactId>		</dependency>		<dependency>			<groupId>log4j</groupId>			<artifactId>log4j</artifactId>		</dependency>		<dependency>			<groupId>org.projectlombok</groupId>			<artifactId>lombok</artifactId>		</dependency>				<!-- Sakai dependencies -->       	<dependency>           	<groupId>org.sakaiproject.kernel</groupId>			<artifactId>sakai-kernel-api</artifactId>		</dependency>		<dependency>			<groupId>org.sakaiproject.kernel</groupId>			<artifactId>sakai-component-manager</artifactId>		</dependency>		<dependency>			<groupId>org.sakaiproject.kernel</groupId>			<artifactId>sakai-kernel-util</artifactId>		</dependency>		<dependency>			<groupId>org.apache.wicket</groupId>			<artifactId>wicket-extensions</artifactId>			<version>1.4.17</version>				</dependency>				<dependency>	<groupId>org.openengsb.forks</groupId>	<artifactId>org.odlabs.wiquery</artifactId>	<version>1.2.4.w1</version></dependency>		<dependency>	<groupId>org.sakaiproject.msgcntr</groupId>	<artifactId>messageforums-api</artifactId>	<version>3.0.0-b07</version></dependency>
<dependency>	<groupId>commons-configuration</groupId>	<artifactId>commons-configuration</artifactId>	<version>1.9</version></dependency>	
	</dependencies>	

Date: Thu, 13 Dec 2012 10:23:09 +1100
Subject: Re: [Building Sakai] FW: Send Private Message ERROR
From: steve.swinsburg at gmail.com
To: antoniovalenciaspain at hotmail.com
CC: farreri.sakai at gmail.com

Ok that looks fine. What about your pom?

On Thu, Dec 13, 2012 at 8:01 AM, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:




Sorry.
This is the list complete
accountvalidator-api-2.8.3.jaractivation-1.1.1.jarantlr-2.7.6.jarapp-api-1.0-SNAPSHOT.jar
archive-api-1.1.4.jarasm-1.5.3.jarasm-attrs-1.5.3.jarbasiclti-help-1.3.4.jarcastor-1.0.jarcglib-2.1_3.jarcglib-nodep-2.2.jarcommons-collections-3.2.1.jar
commons-dbcp-1.2.2.jarcommons-fileupload-1.2.2.jarcommons-io-1.4.jarcommons-lang-2.5.jarcommons-pool-1.5.6.jarconfiguration-bundles-2.8.1.jarcontent-copyright-api-2.8.1.jar
content-help-2.8.1.jarcontentreview-model-api-2.8.6.jarcontentreview-service-api-2.8.6.jarcoursemanagement-api-1.1.3.jarcoursemanagement-hibernate-model-1.1.3.jar
dom4j-1.6.1.jarehcache-1.6.1.jaremailtemplateservice-api-0.5.4.jarentitybroker-api-1.4.3.jargeronimo-spec-jms-1.1-rc4.jargradebook-service-api-1.1.3.jargradebook-service-hibernate-1.1.3.jar
hibernate-3.2.7.ga.jarhsqldb-1.8.0.10.jarjaxen-1.1-beta-10.jarjcr-1.0.jarjdbc2_0-stdext-h2.1.8.jarjdom-1.0.jarjstl-1.1.2.jarjta-1.0.1B.jar
jta-h2.1.8.jarlogin-api-2.8.1.jarmail-1.4.3.jarmessageforums-api-2.8.2.jarmessageforums-hbm-2.8.2.jarmessageforums-help-2.8.2.jarOkiOSID-2.0.jar
osp-common-api-2.8.1.jarosp-glossary-api-2.8.1.jarosp-glossary-help-2.8.1.jarosp-integration-api-2.8.1.jarosp-matrix-api-2.8.1.jarosp-matrix-help-2.8.1.jar
osp-portal-api-2.8.1.jarosp-presentation-api-2.8.1.jarosp-presentation-help-2.8.1.jarosp-styles-help-2.8.1.jarosp-wizard-api-2.8.1.jarosp-wizard-help-2.8.1.jar
pluto-container-1.1.7.jarpluto-descriptor-api-1.1.7.jarpluto-descriptor-impl-1.1.7.jarpluto-taglib-1.1.7.jarpolls-api-1.4.3.jarpolls-help-1.4.3.jarportlet-api-1.0.jar
profile2-api-1.4.4.jarprofile2-help-1.4.4.jarprofile-api-2.8.3.jarprofile-component-shared-2.8.3.jarquartz-1.6.6.jarsakai-announcement-api-2.8.1.jarsakai-announcement-help-2.8.1.jar
sakai-assignment-api-2.8.1.jarsakai-assignment-help-2.8.1.jarsakai-calendar-api-2.8.1.jarsakai-calendar-help-2.8.1.jarsakai-chat-api-2.8.1.jarsakai-chat-help-2.8.1.jar
sakai-citations-api-2.8.1.jarsakai-common-composite-component-data-1.1.4.jarsakai-common-edu-person-api-1.1.4.jarsakai-common-manager-api-1.1.4.jarsakai-common-type-api-1.1.4.jar
sakai-component-manager-1.2.6.jarsakai-comp-shared-help-2.8.1.jarsakai-courier-api-2.8.1.jarsakai-gradebook-help-2.8.1.jarsakai-help-api-2.8.1.jarsakai-help-content-2.8.1.jar
sakai-kernel-api-1.2.6.jarsakai-kernel-private-1.2.6.jarsakai-mailarchive-api-2.8.1.jarsakai-mailarchive-help-2.8.1.jarsakai-message-api-2.8.1.jarsakai-metaobj-api-2.8.1.jar
sakai-metaobj-help-2.8.1.jarsakai-news-api-2.8.1.jarsakai-podcasts-api-2.8.1.jarsakai-podcasts-help-2.8.1.jarsakai-portal-api-2.8.1.jarsakai-portal-render-api-2.8.1.jar
sakai-postem-api-2.8.1.jarsakai-postem-hbm-2.8.1.jarsakai-postem-help-2.8.1.jarsakai-presence-api-2.8.1.jarsakai-privacy-api-1.1.4.jarsakai-privacy-hbm-1.1.4.jar
sakai-reset-pass-help-2.8.3.jarsakai-rights-api-2.8.1.jarsakai-roster-api-2.8.1.jarsakai-roster-help-2.8.1.jarsakai-rwiki-api-2.8.1.jarsakai-rwiki-help-2.8.1.jar
sakai-rwiki-model-2.8.1.jarsakai-sections-help-2.8.1.jarsakai-siteassociation-api-2.8.1.jarsakai-siteassociation-hbm-2.8.1.jarsakai-site-help-2.8.1.jarsakai-site-manage-api-2.8.1.jar
sakai-site-manage-hbm-2.8.1.jarsakai-site-manage-help-2.8.1.jarsakai-syllabus-api-2.8.1.jarsakai-syllabus-hbm-2.8.1.jarsakai-syllabus-help-2.8.1.jarsakai-taggable-api-2.8.1.jar
sakai-taggable-hbm-2.8.1.jarsakai-usermembership-api-2.8.1.jarsakai-usermembership-help-2.8.1.jarsakai-velocity-tool-api-2.8.1.jarsakai-warehouse-api-2.8.1.jarsakai-web-api-2.8.1.jar
sakai-web-help-2.8.1.jarsamigo-api-2.8.3.jarsamigo-help-2.8.3.jarsamigo-hibernate-2.8.3.jarsamigo-services-2.8.3.jarscheduler-api-2.8.2.jarscheduler-component-shared-2.8.2.jar
scheduler-events-model-2.8.2.jarsearch-api-1.3.5.jarsearch-help-1.3.5.jarsearch-model-1.3.5.jarsections-api-1.1.3.jarsections-model-1.1.3.jarshortenedurl-api-1.0.3.jar
simple-xml-2.3.6.jarsitestats-api-2.2.2.jarsitestats-help-2.2.2.jarsitestats-impl-hib-2.2.2.jarspring-2.5.6.SEC02.jarspring-webmvc-2.5.6.SEC02.jarsu-help-2.8.1.jar




From: antoniovalenciaspain at hotmail.com

To: steve.swinsburg at gmail.com
CC: farreri.sakai at gmail.com
Subject: RE: [Building Sakai] FW: Send Private Message ERROR

Date: Wed, 12 Dec 2012 21:58:26 +0100




tomcat/shared/lib 
sakai-common-edu-person-api-1.1.4.jarsakai-common-manager-api-1.1.4.jarsakai-common-type-api-1.1.4.jarsakai-component-manager-1.2.6.jar
sakai-comp-shared-help-2.8.1.jarsakai-courier-api-2.8.1.jarsakai-gradebook-help-2.8.1.jarsakai-help-api-2.8.1.jarsakai-help-content-2.8.1.jarsakai-kernel-api-1.2.6.jar
sakai-kernel-private-1.2.6.jarsakai-mailarchive-api-2.8.1.jarsakai-mailarchive-help-2.8.1.jarsakai-message-api-2.8.1.jarsakai-metaobj-api-2.8.1.jarsakai-metaobj-help-2.8.1.jar
sakai-news-api-2.8.1.jarsakai-podcasts-api-2.8.1.jarsakai-podcasts-help-2.8.1.jarsakai-portal-api-2.8.1.jarsakai-portal-render-api-2.8.1.jarsakai-postem-api-2.8.1.jar
sakai-postem-hbm-2.8.1.jarsakai-postem-help-2.8.1.jarsakai-presence-api-2.8.1.jarsakai-privacy-api-1.1.4.jarsakai-privacy-hbm-1.1.4.jarsakai-reset-pass-help-2.8.3.jar
sakai-rights-api-2.8.1.jarsakai-roster-api-2.8.1.jarsakai-roster-help-2.8.1.jarsakai-rwiki-api-2.8.1.jarsakai-rwiki-help-2.8.1.jarsakai-rwiki-model-2.8.1.jar
sakai-sections-help-2.8.1.jarsakai-siteassociation-api-2.8.1.jarsakai-siteassociation-hbm-2.8.1.jarsakai-site-help-2.8.1.jarsakai-site-manage-api-2.8.1.jarsakai-site-manage-hbm-2.8.1.jar
sakai-site-manage-help-2.8.1.jarsakai-syllabus-api-2.8.1.jarsakai-syllabus-hbm-2.8.1.jarsakai-syllabus-help-2.8.1.jarsakai-taggable-api-2.8.1.jarsakai-taggable-hbm-2.8.1.jar
sakai-usermembership-api-2.8.1.jarsakai-usermembership-help-2.8.1.jarsakai-velocity-tool-api-2.8.1.jarsakai-warehouse-api-2.8.1.jarsakai-web-api-2.8.1.jarsakai-web-help-2.8.1.jar
samigo-api-2.8.3.jarsamigo-help-2.8.3.jarsamigo-hibernate-2.8.3.jarsamigo-services-2.8.3.jarscheduler-api-2.8.2.jarscheduler-component-shared-2.8.2.jar
scheduler-events-model-2.8.2.jarsearch-api-1.3.5.jarsearch-help-1.3.5.jarsearch-model-1.3.5.jarsections-api-1.1.3.jarsections-model-1.1.3.jarshortenedurl-api-1.0.3.jar
simple-xml-2.3.6.jarsitestats-api-2.2.2.jarsitestats-help-2.2.2.jarsitestats-impl-hib-2.2.2.jarspring-2.5.6.SEC02.jarspring-webmvc-2.5.6.SEC02.jarsu-help-2.8.1.jar


CC: farreri.sakai at gmail.com
From: steve.swinsburg at gmail.com

Subject: Re: [Building Sakai] FW: Send Private Message ERROR
Date: Thu, 13 Dec 2012 07:23:54 +1100
To: antoniovalenciaspain at hotmail.com


I mean in your pom. Please also send directory listing of the tomcat shared lib directory. 

Sent from my iPhone
On 12/12/2012, at 22:00, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:





Code:

	public void message(){		System.out.println("a");
		MessageForumsMessageManager forumMessageManager = (MessageForumsMessageManager) ComponentManager.get(MessageForumsMessageManager.class); 		PrivateMessageManager pmm =  (PrivateMessageManager) ComponentManager.get(PrivateMessageManager.class);
	    System.out.println("b");			    //PrivateMessage privateMessage = forumMessageManager.createPrivateMessage();
	    PrivateMessage privateMessage = pmm.createPrivateMessage("fsjdhjsh");
	    	    System.out.println("id: "+privateMessage.getId());
	    System.out.println("id: " + privateMessage.getUuid());	            privateMessage.setAuthor(getCurrentUserId());
        privateMessage.setBody("hola esto es una prueba");	    privateMessage.setTitle("Prueba");	    privateMessage.setInReplyTo(null);
	    privateMessage.setDeleted(Boolean.FALSE);	   // privateMessage.setId((long)17867);	    privateMessage.setRecipientsAsText(getCurrentUserId());

	    	    Map<User,Boolean> map = new HashMap<User,Boolean>();		User user = userDirectoryService.getCurrentUser();
				
	    map.put(user, Boolean.FALSE);          pmm.sendPrivateMessage(privateMessage, map,false);
        	    //forumMessageManager.saveMessage(privateMessage,Boolean.FALSE);	  		
	}
CC: farreri.sakai at gmail.com; sakai-msgcntr-team at collab.sakaiproject.org; sakai-dev at collab.sakaiproject.org

From: steve.swinsburg at gmail.com
Subject: Re: [Building Sakai] FW: Send Private Message ERROR
Date: Wed, 12 Dec 2012 08:01:12 +1100
To: antoniovalenciaspain at hotmail.com


A directory listing of tomcat/shared/lib would be useful. Also how have you declared the dependency on the messageforums API?

Sent from my iPhone
On 12/12/2012, at 4:33, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com> wrote:





Yes, I use Sakai Maven Archetype.I have only created a project, all I have in sakaiProxy functions work correctly unless this.
Thanks


Date: Tue, 11 Dec 2012 18:07:08 +0100
From: farreri.sakai at gmail.com
To: antoniovalenciaspain at hotmail.com

CC: steve.swinsburg at gmail.com; sakai-msgcntr-team at collab.sakaiproject.org; sakai-dev at collab.sakaiproject.org

Subject: Re: [Building Sakai] FW: Send Private Message ERROR


  
    
  
  
    Hehehe, i assume that you are using the Sakai
      Maven Archetype, right?Do you have another tool in the APP server
      that uses org.sakaiproject.logic.SakaiProxy?

      

      In this case, just rename the classes because the "SakaiProxy"
      class you're invoking is from other tool ;)

      

      Miguel

      

      

    
    El 11/12/2012 17:56, Antonio muñoz
      alonso escribió:

    
    
      
      
        Hi.
        

        
        everything is correct on packages.
        I think it has to be the code.
        

        
        Any more ideas?
        

        
        

        
        Thanks

        

        
          Date: Tue, 11 Dec 2012 16:24:42 +0100

          From: farreri.sakai at gmail.com

          To: antoniovalenciaspain at hotmail.com

          CC: steve.swinsburg at gmail.com;
          sakai-msgcntr-team at collab.sakaiproject.org;
          sakai-dev at collab.sakaiproject.org

          Subject: Re: [Building Sakai] FW: Send Private Message ERROR

          

          Check this files in your tomcat
            installation, and pay special attention to the libraries
            located in shared\lib (check if you have duplicated jars)

            

            components\messageforums-components

            shared\lib\messageforums-api-2.8.2.jar

            shared\lib\messageforums-hbm-2.8.2.jar

            shared\lib\messageforums-help-2.8.2.jar

            webapps\messageforums-tool.war

            

            Regards, Miguel.

            

          
          El 11/12/2012 16:15, Antonio
            muñoz alonso escribió:

          
          
            
            Versión-->2.8.1
              

              
              

                

                
                  Date: Fri, 7 Dec 2012
                  07:16:53 +1100

                  Subject: Re: [Building Sakai] FW: Send Private Message
                  ERROR

                  From: steve.swinsburg at gmail.com

                  To: antoniovalenciaspain at hotmail.com

                  CC: sakai-msgcntr-team at collab.sakaiproject.org;
                  sakai-dev at collab.sakaiproject.org

                  

                  2.8.0, 2.8.1, 2.8.2 or 2.8-SNAPSHOT? Whatever version
                  you have, make sure theres no older jars in
                  shared/lib. Alternatively, send a directory listing of
                  shared/lib.
                  

                  
                  cheers,
                  Steve
                   

                    

                    On Thu, Dec 6, 2012 at
                      11:22 PM, Antonio muñoz alonso <antoniovalenciaspain at hotmail.com>
                      wrote:

                      
                        
                          
                            Sakai 2.8
                            

                            
                            

                              

                            
                            
                              
                                CC: sakai-msgcntr-team at collab.sakaiproject.org;
                                sakai-dev at collab.sakaiproject.org

                                From: steve.swinsburg at gmail.com

                                Subject: Re: [Building Sakai] FW: Send
                                Private Message ERROR

                                Date: Thu, 6 Dec 2012 09:29:48 +1100

                                To: antoniovalenciaspain at hotmail.com
                              
                                

                                  

                                  Hi,
                                  

                                  
                                  Check shared/lib for old jars
                                    related to this app. What version
                                    Sakai are you using?
                                  

                                  
                                  Cheers,
                                  Steve

                                    

                                    Sent from my iPad
                                  

                                    On 05/12/2012, at 22:52, Antonio
                                    muñoz alonso <antoniovalenciaspain at hotmail.com>

                                    wrote:

                                    

                                  
                                  
                                    
                                      
                                        

                                          

                                          
                                            

                                              Hi
                                                

                                                
                                                I get an
                                                    error when sending a
                                                    private message
                                                
                                                  Map<User,Boolean>

                                                      mp = new
                                                      HashMap<User,Boolean>();
                                                   User user =
                                                      userDirectoryService.getCurrentUser();
                                                  

                                                    
                                                   mp.put(user, Boolean.FALSE);
                                                       
                                                       
                                                      pmm.sendPrivateMessage(privateMessage,
                                                      mp,false);
                                                
                                                

                                                
                                                

                                                
                                                TRACE:
                                                
                                                  caused by: java.lang.NoSuchMethodError: org.sakaiproject.api.app.messageforums.ui.PrivateMessageManager.sendPrivateMessage(Lorg/sakaiproject/api/app/messageforums/PrivateMessage;Ljava/util/Map;Z)V
    at org.sakaiproject.logic.SakaiProxyImpl.message(SakaiProxyImpl.java:625)
    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)
                                                
                                                

                                                
                                                

                                                
                                                
                                                  any ideas?
                                                

                                                
                                                Thanks.
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                  
                                    _______________________________________________

                                      sakai-dev mailing list

                                      sakai-dev at collab.sakaiproject.org

                                      http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

                                      

                                      TO UNSUBSCRIBE: send email
                                        to sakai-dev-unsubscribe at collab.sakaiproject.org
                                        with a subject of "unsubscribe"
                                  
                                
                              
                            
                          
                        
                      
                    
                    

                  
                
              
            
            

            
            

            _______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
          
          

          -- 

            
            
            
              <ATT00001>

               
              Miguel
                      Carro Pellicer
              Technical
                      Manager - Director técnico
              miguel.carro at samoo.es
              +34 - 673 80 32
                  69
              Skype:
                  mcpellicer
              www.samoo.es
               
              Este 
                  correo  y  sus archivos asociados son privados y
                  confidenciales y va dirigido  exclusivamente  a su
                  destinatario. Si recibe este correo sin ser el 
                  destinatario del mismo, le rogamos proceda a su
                  eliminación y lo ponga en  conocimiento del emisor. La
                  difusión por cualquier medio del contenido de  este 
                  correo podría ser sancionada conforme a lo previsto en
                  las leyes españolas, Ley Orgánica 15/1999 de
                  Protección de Datos de Carácter Personal.  No  se
                  autoriza la utilización con fines comerciales o para
                  su incorporación a ficheros automatizados de las
                  direcciones del emisor o del destinatario.”
               
              This mail and its attached files are
                  confidential and are only and exclusively intended to
                  their addressee. In case you may receive this mail not
                  being its addressee, we beg you to let us know the
                  error by reply and to proceed to destroy it. The
                  circulation by any mean of this mail could be
                  penalised in accordance with the Spanish legislation.
                  Is not allowed the use of both, the transmitter and
                  the addressee’s, address with a commercial aim, or in
                  order to be incorporated to automated data process or
                  to any kind of files. 
               
              P
                Antes
                  de imprimir este correo electrónico piense bien si es
                  necesario hacerlo. El medioambiente es cosa de todos.
               
               
            
          
        
      
    
    

    -- 

      
      
      
      
      
      
      


      
      
      
      
      
        <image002.jpg>

         
        Miguel Carro Pellicer
        Technical Manager - Director
                técnico
        miguel.carro at samoo.es
        +34 - 673 80 32 69
        Skype: mcpellicer
        www.samoo.es
         
        Este  correo  y  sus
            archivos
            asociados son privados y confidenciales y va dirigido 
            exclusivamente  a su destinatario. Si recibe este correo sin
            ser el 
            destinatario del mismo, le rogamos proceda a su eliminación
            y lo ponga en 
            conocimiento del emisor. La difusión por cualquier medio del
            contenido de 
            este  correo podría ser sancionada conforme a lo previsto en
            las leyes
            españolas, Ley Orgánica 15/1999 de Protección de Datos de
            Carácter
            Personal.  No  se autoriza la utilización con fines
            comerciales o
            para su incorporación a ficheros automatizados de las
            direcciones del emisor o
            del destinatario.”
         
        This mail and its
            attached files are confidential and are only and exclusively
            intended to their
            addressee. In case you may receive this mail not being its
            addressee, we beg
            you to let us know the error by reply and to proceed to
            destroy it. The
            circulation by any mean of this mail could be penalised in
            accordance with the
            Spanish legislation. Is not allowed the use of both, the
            transmitter and the
            addressee’s, address with a commercial aim, or in order to
            be incorporated to
            automated data process or to any kind of files. 
         
        P Antes
            de imprimir este
            correo electrónico piense bien si es necesario hacerlo. El
            medioambiente es
            cosa de todos.
         
         
      
     		 	   		  
 		 	   		  
<1.png><2.png><3.png> 		 	   		  
 		 	   		  

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121213/62f44a99/attachment.html 


More information about the sakai-dev mailing list