Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

Abdullah Battal
Hello;
I'm new to protege. I've recently downloaded protege 4 to my pc on which I run Pardus Linux 2008.2.
Everything was going well until I changed the look'n feel of protege to Nimbus (I still don't know why I needed to do that?!). Actually nothing happened right away when I selected Nimbus, but then I closed Protege and, after a while, I tried to re-open it and it didn't work, prompting me a large error message. I tried to uninstall protege using the uninstaller and then reinstall, but that didn't spare me the error message too.

Here is what I do:
I follow the path to where Protege 4 is installed, and type "./Protege"
"Welcome to protege" screen appears. Then I want to open an ontology (a new one, an existing one, from the Tones repository... it doesn't matter) and the error message something like below appears:

ERROR:
Error 1 Logged at Sat Apr 18 23:10:19 EEST 2009
NullPointerException: null
    java.util.Hashtable.put(Hashtable.java:394)
    javax.swing.text.SimpleAttributeSet.addAttribute(SimpleAttributeSet.java:176)
    javax.swing.text.StyleContext.addAttribute(StyleContext.java:293)
    javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1488)
    javax.swing.text.StyleConstants.setForeground(StyleConstants.java:544)
    org.protege.editor.owl.ui.renderer.OWLCellRenderer.prepareStyles(OWLCellRenderer.java:624)
    org.protege.editor.owl.ui.renderer.OWLCellRenderer.<init>(OWLCellRenderer.java:148)
    org.protege.editor.owl.model.OWLWorkspace.createOWLCellRenderer(OWLWorkspace.java:639)
    org.protege.editor.owl.model.OWLWorkspace.createOWLCellRenderer(OWLWorkspace.java:634)
    org.protege.editor.owl.ui.find.EntityFinderField.<init>(EntityFinderField.java:77)
    org.protege.editor.owl.model.OWLWorkspace.createActiveOntologyPanel(OWLWorkspace.java:475)
    org.protege.editor.owl.model.OWLWorkspace.initialise(OWLWorkspace.java:129)
    org.protege.editor.owl.OWLEditorKit.getWorkspace(OWLEditorKit.java:103)
    org.protege.editor.owl.OWLEditorKit.getWorkspace(OWLEditorKit.java:43)
    org.protege.editor.core.editorkit.EditorKitManager.addEditorKit(EditorKitManager.java:47)
    org.protege.editor.core.ProtegeManager.openAndSetupRecentEditorKit(ProtegeManager.java:174)
    org.protege.editor.core.ProtegeWelcomeFrame$ProtegeWelcomePanel$5.actionPerformed(ProtegeWelcomeFrame.java:233)
    org.protege.editor.core.ui.util.LinkLabel.activateLink(LinkLabel.java:97)
    org.protege.editor.core.ui.util.LinkLabel.access$100(LinkLabel.java:30)
    org.protege.editor.core.ui.util.LinkLabel$1.mouseReleased(LinkLabel.java:63)
    java.awt.Component.processMouseEvent(Component.java:6216)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
........GOES ON...

Now, I would like to know if anybody else had seen this problem and if there is any solution. Any help is appreciated.

Regards.
--
Abdullah Battal.



Yahoo! Türkiye açıldı!
Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
www.yahoo.com.tr

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

Nick Drummond
Hi Abdullah,

You can set the look and feel in the command line (edit the script you use to start p4).
add the following:
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
Once you've successfully started p4, change the default L&F in the Window menu to something that works and close protege.
You can get rid of the command line addition now.

Nick

2009/4/18 Abdullah Battal <[hidden email]>
Hello;
I'm new to protege. I've recently downloaded protege 4 to my pc on which I run Pardus Linux 2008.2.
Everything was going well until I changed the look'n feel of protege to Nimbus (I still don't know why I needed to do that?!). Actually nothing happened right away when I selected Nimbus, but then I closed Protege and, after a while, I tried to re-open it and it didn't work, prompting me a large error message. I tried to uninstall protege using the uninstaller and then reinstall, but that didn't spare me the error message too.

Here is what I do:
I follow the path to where Protege 4 is installed, and type "./Protege"
"Welcome to protege" screen appears. Then I want to open an ontology (a new one, an existing one, from the Tones repository... it doesn't matter) and the error message something like below appears:

ERROR:
Error 1 Logged at Sat Apr 18 23:10:19 EEST 2009
NullPointerException: null
    java.util.Hashtable.put(Hashtable.java:394)
    javax.swing.text.SimpleAttributeSet.addAttribute(SimpleAttributeSet.java:176)
    javax.swing.text.StyleContext.addAttribute(StyleContext.java:293)
    javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1488)
    javax.swing.text.StyleConstants.setForeground(StyleConstants.java:544)
    org.protege.editor.owl.ui.renderer.OWLCellRenderer.prepareStyles(OWLCellRenderer.java:624)
    org.protege.editor.owl.ui.renderer.OWLCellRenderer.<init>(OWLCellRenderer.java:148)
    org.protege.editor.owl.model.OWLWorkspace.createOWLCellRenderer(OWLWorkspace.java:639)
    org.protege.editor.owl.model.OWLWorkspace.createOWLCellRenderer(OWLWorkspace.java:634)
    org.protege.editor.owl.ui.find.EntityFinderField.<init>(EntityFinderField.java:77)
    org.protege.editor.owl.model.OWLWorkspace.createActiveOntologyPanel(OWLWorkspace.java:475)
    org.protege.editor.owl.model.OWLWorkspace.initialise(OWLWorkspace.java:129)
    org.protege.editor.owl.OWLEditorKit.getWorkspace(OWLEditorKit.java:103)
    org.protege.editor.owl.OWLEditorKit.getWorkspace(OWLEditorKit.java:43)
    org.protege.editor.core.editorkit.EditorKitManager.addEditorKit(EditorKitManager.java:47)
    org.protege.editor.core.ProtegeManager.openAndSetupRecentEditorKit(ProtegeManager.java:174)
    org.protege.editor.core.ProtegeWelcomeFrame$ProtegeWelcomePanel$5.actionPerformed(ProtegeWelcomeFrame.java:233)
    org.protege.editor.core.ui.util.LinkLabel.activateLink(LinkLabel.java:97)
    org.protege.editor.core.ui.util.LinkLabel.access$100(LinkLabel.java:30)
    org.protege.editor.core.ui.util.LinkLabel$1.mouseReleased(LinkLabel.java:63)
    java.awt.Component.processMouseEvent(Component.java:6216)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
........GOES ON...

Now, I would like to know if anybody else had seen this problem and if there is any solution. Any help is appreciated.

Regards.
--
Abdullah Battal.



Yahoo! Türkiye açıldı!
Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
www.yahoo.com.tr

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

donwalter
In reply to this post by Abdullah Battal
I'm trying to run P4  (build-113) on Linux Ubuntu9.04 -- using
sun-java-6 resulted in a slew of NPE errors when loading any ontology
(owl) They start with a hashtable error (394).. ...so I swithed to
sun-java-5 -- now I can load ontologies, but my screen is blank, and the
only error I get is --java.lang.ClassNotFoundException:
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel - I understand that
this is class is only included with java6 -- am I standing between a
rock (J6) and a hard place (J5) -- o should I just curl up ---help!!

P4 worked for a while -- I must have enables numbus LAF  -- but then
---- does P4 default to the nimbus LAF? - is there a secret config file????

Please help -- I can't sleep -Thanks

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

Nick Drummond
Hi,

Yes, P4 is only tested in java5.


You can either find the preference
(protege_preferences.application_preferences.look_and_feel_key) under
ubuntu's standard java prefs location (I don't know where this is) and
delete it.

Or you can choose what L&F you want using the standard java opt on the
command line [1] (add it to the startup script you use).
Set it to something you would expect your system to support - eg
javax.swing.plaf.metal.MetalLookAndFeel
You can then change the one selected in Protege (under the Window
menu) and revert your startup script.


Nick

[1] http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html#commandLine



2009/7/24 walter <[hidden email]>:

> I'm trying to run P4  (build-113) on Linux Ubuntu9.04 -- using sun-java-6
> resulted in a slew of NPE errors when loading any ontology (owl) They start
> with a hashtable error (394).. ...so I swithed to sun-java-5 -- now I can
> load ontologies, but my screen is blank, and the only error I get is
> --java.lang.ClassNotFoundException:
> com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel - I understand that this is
> class is only included with java6 -- am I standing between a rock (J6) and a
> hard place (J5) -- o should I just curl up ---help!!
>
> P4 worked for a while -- I must have enables numbus LAF  -- but then ----
> does P4 default to the nimbus LAF? - is there a secret config file????
>
> Please help -- I can't sleep -Thanks
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Nimbus Look'n Feel Makes Protege 4 Beta crash on Linux

Timothy Redmond
In reply to this post by donwalter

You need to explicitly tell Protege what look and feel to use (to  
reset it).  See [1].  I was just checking the jars on a linux machine  
and it looks like the metal look and feel can be found here:

             javax/swing/plaf/metal/MetalLookAndFeel.class

>  is there a secret config file????

Yes there is...  It is the file containing the user preferences and it  
can be found here:

        ~/.java/.userPrefs

Deleting (or moving) this will probably also work.

-Timothy


[1] https://mailman.stanford.edu/pipermail/p4-feedback/2009-April/001991.html


On Jul 24, 2009, at 7:51 AM, walter wrote:

> I'm trying to run P4  (build-113) on Linux Ubuntu9.04 -- using sun-
> java-6 resulted in a slew of NPE errors when loading any ontology  
> (owl) They start with a hashtable error (394).. ...so I swithed to  
> sun-java-5 -- now I can load ontologies, but my screen is blank, and  
> the only error I get is --java.lang.ClassNotFoundException:  
> com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel - I understand that  
> this is class is only included with java6 -- am I standing between a  
> rock (J6) and a hard place (J5) -- o should I just curl up ---help!!
>
> P4 worked for a while -- I must have enables numbus LAF  -- but then  
> ---- does P4 default to the nimbus LAF? - is there a secret config  
> file????
>
> Please help -- I can't sleep -Thanks
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback