Kurt,

Well I just simply tried to download a fresh
'juddi-portal-bundle-3.0.4.zip', unzip it, setup authentication in
propeties, create users.xml, startup it and try to save publisher. Same
exception. In my project I use only "juddi-client-3.0.4.jar" and
"uddi-ws-.3.0.4.jar" which are related to juddi. No idea.

--Martin

2011/3/30 Kurt T Stam <[email protected]>

>  Martin,
>
> The code is fine. Can it be you deployed the juddi-core.jar more then once?
> It looks to me like that classcast might be caused by
> classloading issues, or version mismatch.
>
> --Kurt
>
>
> On 3/30/11 9:08 AM, Kurt T Stam wrote:
>
> Hi Martin
>
> This is good info! It looks like a bug in our core code and I opened a jira
> for it:
> http://issues.apache.org/jira/browse/JUDDI-466
>
> It should be fixed soon.
>
> Thanks for finding it :)
>
> --Kurt
>
> On 3/30/11 4:16 AM, Martynas A. (chainer) wrote:
>
> Hey Kurt,
>
> Here is the log from Catalina: http://codepaste.net/abrvqa
>
> 2011/3/29 Kurt T Stam <[email protected]>
>
>> Hi Martin,
>>
>> Can you check the juddi.log on the server side for stacktraces?
>> You are doing something very similar to what we do in the unittests (and
>> it works fine there), so I'm not sure what's going on.
>>
>> It should never deal with anything org.apache.juddi.model.* on the client
>> side. And I can't tell where it is trying a cast either..
>>
>> Thx,
>>
>> --Kurt
>>
>>
>> On 3/29/11 9:17 AM, chainerlt wrote:
>>
>>>
>>> Kurt wrote:
>>>
>>>> Hi Martin,
>>>>
>>>> Your code fragments don't really tell the whole story, can you attach
>>>> all code and the
>>>> full stack trace?
>>>>
>>>> --Kurt
>>>>
>>>>  Hi again,
>>>
>>> well I'm not gonna post whole project, since it is just too big, but I'm
>>> gonna show the classes which gets involved in this problem.
>>>
>>> so Here are 2 important classes which does work around with juddiv3.
>>> Tools class which operates with juddiv3 directly:
>>> Tools - http://codepaste.net/dijvwq
>>> and QueryBuilder which builds queries in a static way:
>>> QueryBuilder - http://codepaste.net/radvpa
>>> Some classes you might be interested in:
>>> FindQualifiersAbbreviations - http://codepaste.net/bw4oye
>>> SwingWorkerCompletionWaiter - http://codepaste.net/wwygis
>>>
>>> Let me remind I already set up XMLDocAuthenticator in
>>> ~\webapps\juddiv3\WEB-INF\classes\juddiv3.properties :
>>>
>>>
>>>  juddi.authenticator = org.apache.juddi.v3.auth.XMLDocAuthenticator
>>>> juddi.usersfile = juddi-users.xml
>>>>
>>>>  Have ~\webapps\juddiv3\WEB-INF\classes\juddi-users.xml which is:
>>>
>>>
>>>  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>>>> <juddi-users>
>>>>     <user userid="anou_mana" password="password" />
>>>>     <user userid="bozo" password="clown" />
>>>>     <user userid="sviens" password="password" />
>>>>     <user userid="admin" password="secret" />
>>>> </juddi-users>
>>>>
>>>>  So everything seems to be working: I can get AuthToken using
>>> credentials.
>>> Also authorized users can save/delete business/services and etc. But
>>> problems appears in working with Publishers. I can view them, but cannot
>>> save/delete (throws exception).
>>> The main idea of the architecture: You build queries with QueryBuilder
>>> and
>>> pass them to Tools so it will return feedback depending on what query you
>>> gave to it.
>>> For instance let me show simplified code example of how I view all
>>> publishers:
>>>
>>>
>>>         //Let's imagine we have a valid auth token with admin rights.
>>>> AuthToken authToken = ?;
>>>>        //Build query (GetAllPublisherDetail)
>>>> Object query = QueryBuilder.GetAllPublisherDetail(authToken);
>>>>        //Pass to the tools object so it can manage it and give me the
>>>> feedback
>>>> Object feedback = tools.submitQuery(null, query);
>>>>        //the feedback should be PublisherDetail object or null.
>>>>        //(I'm not adding exception handling here, so code could be more
>>>> easy to
>>>> read)
>>>>        //Lets say it gives me PublisherDetail which I know contains all
>>>> publishers,
>>>>        //and .getPublisher() will give me non-empty List<Publisher>.
>>>>        //Lets take first Publisher from here:
>>>> Publisher p = ((PublisherDetail)feedback).getPublisher().get(0);
>>>>        //Okay, lets imagine we edited this publisher a bit and now we
>>>> wanna save
>>>> it:
>>>>        //Build query (SavePublisher)
>>>> query = QueryBuilder.GetSavePublisher(p ,authToken);
>>>>        //Pass it to the tools, and expect PublisherDetail object as a
>>>> feedback
>>>> feedback = tools.submitQuery(null, query); //but here I get the
>>>> exception
>>>>
>>>>  The exception:
>>>
>>>
>>>  javax.xml.ws.soap.SOAPFaultException:
>>>> org.apache.juddi.model.UddiEntityPublisher cannot be cast to
>>>> org.apache.juddi.model.Publisher
>>>>         at
>>>>
>>>> com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
>>>>         at
>>>>
>>>> com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
>>>>         at
>>>>
>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
>>>>         at
>>>>
>>>> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
>>>>         at
>>>> com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
>>>>         at $Proxy40.savePublisher(Unknown Source)
>>>>         at
>>>> juddiv3admin.juddiv3.Tools$PublisherWorker.savePublisher(Tools.java:200)
>>>>         at juddiv3admin.juddiv3.Tools$1.doInBackground(Tools.java:170)
>>>>         at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
>>>>         at
>>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>>>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>>>         at javax.swing.SwingWorker.run(SwingWorker.java:316)
>>>>         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)
>>>>
>>>>  Appears in this Tools class here:
>>>
>>>
>>>  public PublisherDetail savePublisher(SavePublisher savePublisher) throws
>>>> Exception
>>>> {
>>>>      return juddiApi.savePublisher(savePublisher);
>>>> }
>>>>
>>>>  Looking for answer, thank you.
>>> --Martin
>>>
>>
>>
>
>
>

Reply via email to