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] NullPointerException when logging

Timothy Redmond tredmond at stanford.edu
Fri Feb 10 10:02:13 PST 2012


It looks like you have provided a very nice bug report and it should be 
very easy to fix.  For now I have added a GForge tracker for this [1].

-Timothy

[1] https://bmir-gforge.stanford.edu/gf/project/protege3owl/tracker/?action=TrackerItemEdit&tracker_item_id=3864&start=0


On 2/10/12 7:57 AM, Mansour, Michel wrote:
> Hello,
>
> Protege 3.4.8 is throwing a NullPointerException when the logging 
> level is set to FINE or lower (i.e., FINER, FINEST, ALL). This only 
> seems to happen when opening a project using the Java API by 
> specifying a .pprj file, which contains the database connection 
> information. The relevant portion of the stack trace is:
>
> java.lang.NullPointerException
>     at 
> edu.stanford.smi.protege.storage.database.pool.DatabaseParam.hashCode(Unknown 
> Source)
>     at java.util.HashMap.get(HashMap.java:300)
>     at 
> edu.stanford.smi.protege.storage.database.pool.ConnectionPool.getConnectionPool(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.storage.database.RobustConnection.<init>(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.storage.database.AbstractDatabaseFrameDb.createConnection(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.storage.database.AbstractDatabaseFrameDb.getCurrentConnection(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.storage.database.IdleConnectionNarrowFrameStore.setIdle(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.storage.database.IdleConnectionNarrowFrameStore.getName(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.dumpFrameStores(Unknown 
> Source)
>     at 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.addActiveFrameStore(Unknown 
> Source)
>     at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
>     at 
> edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown 
> Source)
>     at edu.stanford.smi.protege.model.Project.<init>(Unknown Source)
>     at edu.stanford.smi.protege.model.Project.<init>(Unknown Source)
>     at edu.stanford.smi.protege.model.Project.<init>(Unknown Source)
>     at edu.stanford.smi.protege.model.Project.<init>(Unknown Source)
>
> (The initial Project constructor being called is Project(String, 
> Collection).)
>
> And it seems to come down to this block of code in 
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore#addActiveFrameStore(NarrowFrameStore, 
> Collection) (lines 262-265):
>
>         if (log.isLoggable(Level.FINE)) {
>             log.fine("Added new active frame store");
>             dumpFrameStores(Level.FINE);
>         }
>
> By the time it tries to create the connection in 
> AbstractDatabaseFrameDb, all of the connection parameters are null, 
> resulting in the NPE in DatabaseParam's hashCode() method. If logging 
> is turned off (or set to a level higher than FINE), this error doesn't 
> occur.
>
> Please let me know if you need any more information.
>
> Thank you,
> Michel
>
> ------------------------------------------------------------------------
>
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20120210/fbc1e376/attachment.html>


More information about the protege-discussion mailing list