Search Mailing List Archives
[protege-discussion] Setting the display name for a class (BrowserSlotPattern) - Does it work on a remote project?
Tania Tudorache
tudorache at stanford.edu
Wed Mar 18 11:43:17 PDT 2009
Hi Ron,
The class has to be both on the server and client. Make sure that the
jar containing this class is also on the server.
Tania
Ron Schultz wrote:
> Tania,
>
> I tried the previously presented code, and then executed on a remote
> client as follows:
>
> ChangeBrowserSlotJob job = new ChangeBrowserSlotJob(kb,
> kb.getCls("PortletDisplayControl"),
> kb.getSlot("name"));
> job.execute();
>
> I get a Class Not Found Exception : null class
>
> Any idea why I am getting a null class?
>
> EVERE: Exception
> edu.stanford.smi.protege.exception.ProtegeIOException:
> java.rmi.ServerException: RemoteException occurred in server thread;
> nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments; nested
> exception is:
> java.lang.ClassNotFoundException: null class
> at edu.stanford.smi.protege.server.framestore.RemoteClientFrameStore.executeProtegeJob(Unknown
> Source)
> at edu.stanford.smi.protege.util.ProtegeJob.execute(Unknown Source)
> at com.aboutMyThings.client.PortletDisplaySlotAssigner.main(PortletDisplaySlotAssigner.java:83)
> Caused by: java.rmi.ServerException: RemoteException occurred in
> server thread; nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments; nested
> exception is:
> java.lang.ClassNotFoundException: null class
> at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
> at sun.rmi.transport.Transport$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Unknown Source)
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
> at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
> at edu.stanford.smi.protege.server.framestore.ServerFrameStore_Stub.executeProtegeJob(Unknown
> Source)
> 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)
> at edu.stanford.smi.protege.server.framestore.RemoteClientFrameStore$2.invoke(Unknown
> Source)
> at $Proxy1.executeProtegeJob(Unknown Source)
> at edu.stanford.smi.protege.server.framestore.RemoteClientFrameStore.executeProtegeJob(Unknown
> Source)
>
>
> On Thu, Mar 12, 2009 at 4:58 PM, Tania Tudorache <tudorache at stanford.edu> wrote:
>
>> Hi Ron,
>>
>> A ProtegeJob to change the browser slot could look like below. If you
>> still have problems, please send me your implementation of the protege
>> job and what is not working.
>>
>> Tania
>>
>> ------------------
>>
>> class ChangeBrowserText extends ProtegeJob {
>> private Cls cls;
>> private Slot browserSlot;
>>
>> public ChangeBrowserText(KnowledgeBase kb, Cls cls, Slot
>> newBrowserSlot) {
>> super(kb);
>> this.cls = cls;
>> this.browserSlot = newBrowserSlot;
>> }
>>
>> @Override
>> public Object run() throws ProtegeException {
>> cls.setDirectBrowserSlot(browserSlot);
>> return null;
>> }
>>
>> @Override
>> public void localize(KnowledgeBase kb) {
>> super.localize(kb);
>> LocalizeUtils.localize(cls, kb);
>> LocalizeUtils.localize(browserSlot, kb);
>> }
>>
>> }
>>
>>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>
>
More information about the protege-discussion
mailing list