Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Setting the display name for a class (BrowserSlotPattern) - Does it work on a remote project?

Tania Tudorache tudorache at stanford.edu
Thu Mar 19 12:17:07 PDT 2009


Hi Ron,

There are two solutions to the problem:

1. You add the jar with the protege job to the classpath of the server 
and client. That would work.

or

2. You create an empty project plugin (or some other plugin type) and 
add the jar to the same folder as the empty plugin. (This is because the 
way class loaders work for the plugins in protege. Yes, it's a bug, that 
we will probably not fix. Protege 4 does not have this problem).

The entry in the manifest of the protege-job jar is not necessary and it 
is better to remove it.

Hope this helps,

Tania

Ron Schultz wrote:
> Thanks Tania,
>
> I am still confused a bit. I built a plug-in only containing the
> ChangeBrowserSlotJob class and loaded it into my Protege server. Not
> sure what I should put into the MANIFEST, but used:
>
> Manifest-Version: 1.0
>
> Name: com/aboutMyThings/client/ChangeBrowserSlotJob.class
> Project-Plugin: False
>
>
> I am unsure what to use for the Plugin value, since this is not a tab,
> or slot widget, or backend. But the Protege server seems to load
> without errors. But I still get the same null class error which I
> suspect means my class is not loading into the Protege server from my
> plugin. I also noticed that in non-server protege all the plugins
> report that they loaded. See below:
>
> cwd: C:\Protege533\
> cmd: "C:\Program Files\Java\jdk1.6.0_11\bin\java.exe" -Xms262144000 -Xmx52428800
> 0 -classpath "C:\Protege533\protege.jar;C:\Protege533\looks-2.1.3.jar;C:\Protege533\unicode_panel.jar;C:\Protege533\driver.jar;C:\Protege533\driver0.jar;C:\Prot
> ege533\driver1.jar;C:\Protege533\driver2.jar$;C:\Protege533\lax.jar;"
> com.zerog.lax.LAX "C:/Protege533/Protege.lax" "C:/Documents and
> Settings/Jewel/Local Settings/Temp/lax5EF.tmp"
> Protege 3.4 Build 533, JVM 1.6.0_11-b03, memory=520M, Windows XP,
> encoding=UTF-8, language=en, country=US
> Loaded plugin edu.stanford.smi.protegex.owl - OWL Plugin
> Loaded plugin ca.uvic.cs.chisel.jambalaya - Jambalaya
> Loaded plugin com.aboutMyThings.client - AboutMyThings_Client
> Loaded plugin dfki.protege.ontoviz
> Loaded plugin edu.stanford.smi.protegex.rdf_backend - RDF Backend
> Loaded plugin edu.stanford.smi.protegex.changes - Changes tab
> Loaded plugin edu.stanford.smi.protegex.standard_extensions - Graph
> Widget, Table Widget
> Loaded plugin edu.stanford.smi.protegex.chatPlugin - Chat
>
> The AboutMyThings plugin contains the ChangeBrowserSlotJob class. The
> same reporting does not occur in Protege Server so I am not absolutley
> sure my plugin is loading, or loading properly. Is there some way I
> can detect or report that the plugin loaded properly on the Protege
> Server so that I know where to debug this issue?
>
>
> On Wed, Mar 18, 2009 at 1:43 PM, Tania Tudorache <tudorache at stanford.edu> wrote:
>   
>> 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
>>>
>>>
>>>       
>> _______________________________________________
>> 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