[Building Sakai] why i can't use sakai service in my app :( ?
Steve Swinsburg
steve.swinsburg at gmail.com
Thu Oct 15 23:16:22 PDT 2009
Ok that looks all fine, it's connecting from your JSP to the API
because it makes the call. You'd get a NPE if it wasn't injected
correctly anyway.
So the NoSuchMethodError usually means one of two things:
1. You haven't restarted Tomcat since you made the change and deployed
your jars.
2. You've got multiple copies of your API in shared. Check
$CATALINA_HOME/shared/lib for multiples of your jar that is being
deployed.
cheers,
Steve
On 16/10/2009, at 4:58 PM, Small Cat wrote:
> Ok,
> In ExternalLogic class, I add a function
> public String getOneSite(String locationId);
>
> In ExternalLogicImpl class ( I copy from function getLocationTittle )
> public String getOneSite(String locationId) {
> String title = null;
> try {
> Site site = siteService.getSite(locationId);
> title = site.getTitle();
> } catch (IdUnusedException e) {
> log.warn("Cannot get the info about locationId: " +
> locationId);
> title = "----------";
> }
> return title;
> }
> In main class, I call it
> public String getOneSiteTitle(){
>
> return
> externalLogic.getOneSite(externalLogic.getCurrentALocationId());
> //return
> externalLogic.getLocationTitle(externalLogic.getCurrentALocationId());
> }
> In .jsp file ( I use JSF to presentation )
> <sakai:instruction_message value="Hello,
> #{MyportfoliosBean.oneSiteTitle}"/>
>
> Thank you very much ,
>
> 2009/10/16 Steve Swinsburg <steve.swinsburg at gmail.com>
> Hi Tran,
>
> Can you post your API and Impl classes, and your Spring config
> (components.xml) and we'll take a look. I assume from the error log
> that it is the getOneSite method that you are trying to call?
>
> cheers,
> Steve
>
>
>
> On 16/10/2009, at 3:56 PM, Small Cat wrote:
>
> Dear all,
> I used sakai app builder to generate a full CRUD application for
> sakai 2.5.4 . It can run in sakai with no error.
> In ExternalLogic class and ExternalLogicImpl class , i add a
> function. In this function, I used some APIs of SiteService, but it
> has some error when run in Sakai :(.
> Now, I test again, by copy a function ,change it's name ( and change
> it's name in ExternalLogic ) and use it, but it has error when I
> run it in Sakai portal>"<.
> I don't understand, with same function, original function can run,
> but copy function can't run :(.
> I feel it's very hard to use sakai service for my application :(.
> Please help me !!!!
>
>
>
> --
> Regards,
> Tran Trung Kien
> <error.txt>_______________________________________________
> 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"
>
>
>
>
> --
> Regards,
> Tran Trung Kien
> <ExternalLogic.java><ExternalLogicImpl.java><components.xml>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091016/80b76632/attachment.html
More information about the sakai-dev
mailing list