You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Kurt T Stam (JIRA)" <ju...@ws.apache.org> on 2013/04/04 16:11:16 UTC

[jira] [Commented] (JUDDI-572) Sending a business key for getServiceDetail causing a class cast exception

    [ https://issues.apache.org/jira/browse/JUDDI-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622357#comment-13622357 ] 

Kurt T Stam commented on JUDDI-572:
-----------------------------------

Hi Alex,

I don't know how to reproduce the issue - line 472 says:

org.apache.juddi.model.BusinessService modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);

and if I pass in a businessKey, it simply does not find the BusinessService, and returns null. Also WE are not doing any casting in this line; this is straight JPA and the first argument we pass in is the class we are looking for.

Can it be you used the same key for both service and business?, or something like it... I mean you copied in the stack trace - so the error surely happened. I'm just trying to see how we can reproduce it - and how to fix it. 

--Kurt
                
> Sending a business key for getServiceDetail causing a class cast exception
> --------------------------------------------------------------------------
>
>                 Key: JUDDI-572
>                 URL: https://issues.apache.org/jira/browse/JUDDI-572
>             Project: jUDDI
>          Issue Type: Bug
>            Reporter: Alex O'Ree
>            Assignee: Kurt T Stam
>             Fix For: 3.1.5
>
>
> probably should trap this and handle it correctly...
>  Caused by: java.lang.ClassCastException: org.apache.juddi.model.BusinessEntity cannot be cast to org.apache.juddi.model.BusinessService
>  	at org.apache.juddi.api.impl.UDDIInquiryImpl.getServiceDetail(UDDIInquiryImpl.java:472)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira