ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Waldemar Kłaczyński (JIRA) <scout-...@ws.apache.org>
Subject [jira] Commented: (SCOUT-67) ClassCastException in BusinessQueryManager.getRegistryObject(...,LifeCycleManager.SERVICE)
Date Fri, 06 Feb 2009 00:27:59 GMT

    [ https://issues.apache.org/jira/browse/SCOUT-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670961#action_12670961
] 

Waldemar Kłaczyński commented on SCOUT-67:
------------------------------------------

Java version "1.6.0_0"
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Server VM (build 10.0-b19, mixed mode)


I checked in the code, it seems to me that there is some irregularity in the files ScoutUddiJaxrHelper
and ScoutJaxrUddiHelper.

in function: ScoutUddiJaxrHelper.getServiceBinding(...)

         TModelInstanceInfo info = (TModelInstanceInfo)tmodelInstanceInfoArray[i];
         InstanceDetails idetails = info.getInstanceDetails(); 
         Collection<ExternalLink> elinks = getExternalLinks(idetails.getOverviewDoc(),lcm);
         SpecificationLinkImpl slink = new SpecificationLinkImpl(lcm);

It seems to me that this line should be changed or deleted:
from:   slink.addExternalIdentifiers(elinks) change to: slink.addExternalLinks(elinks);

         serviceBinding.addSpecificationLink(slink); 

         ConceptImpl c = new ConceptImpl(lcm);
         c.setExternalLinks(elinks);
         c.setKey(lcm.createKey(info.getTModelKey())); 
         c.setName(lcm.createInternationalString(idetails.getInstanceParms()));
         c.setValue(idetails.getInstanceParms());

In contrast, the next solution to the problem is the opposite.
in function: ScoutJaxrUddiHelper.getBindingTemplateFromJAXRSB(...)

	
Maybe should be?: Collection<ExternalLink> externalLinks = slink.getExternalLinks();
=> collection<ExternalLink> externalLinks = specificationObject.getExternalLinks();


                        if (externalLinks!=null && externalLinks.size()>0) {
                            for (ExternalLink link : externalLinks) {
                                InstanceDetails ids = emptyTInfo.addNewInstanceDetails();
                                if (link.getDescription()!=null) {
                                    Description description = ids.addNewDescription();
                                    description.setStringValue(link.getDescription().getValue());
                                }
                                if (link.getExternalURI()!=null) {
                                    OverviewDoc overviewDoc = ids.addNewOverviewDoc();
                                    overviewDoc.setOverviewURL(link.getExternalURI());
                                }
                            } 
                        }

	
I've made the fix in my version of the code and it works well

> ClassCastException in BusinessQueryManager.getRegistryObject(...,LifeCycleManager.SERVICE)
> ------------------------------------------------------------------------------------------
>
>                 Key: SCOUT-67
>                 URL: https://issues.apache.org/jira/browse/SCOUT-67
>             Project: Scout
>          Issue Type: Bug
>          Components: Scout Implementation
>    Affects Versions: 1.0rc2
>            Reporter: Waldemar Kłaczyński
>            Assignee: Kurt T Stam
>            Priority: Critical
>
> java.lang.ClassCastException: org.apache.ws.scout.registry.infomodel.ExternalLinkImpl
cannot be cast to javax.xml.registry.infomodel.ExternalIdentifier
>         at org.apache.ws.scout.registry.infomodel.RegistryObjectImpl.addExternalIdentifiers(RegistryObjectImpl.java:211)
>         at org.apache.ws.scout.util.ScoutUddiJaxrHelper.getServiceBinding(ScoutUddiJaxrHelper.java:439)
>         at org.apache.ws.scout.util.ScoutUddiJaxrHelper.getService(ScoutUddiJaxrHelper.java:372)
>         at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getServiceFromBusinessService(BusinessQueryManagerImpl.java:783)
>         at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:756)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org


Mime
View raw message