[armedbear-devel] integrating abcl into Protege

Mark Evenson evenson at panix.com
Thu Mar 11 00:20:54 UTC 2010


Actually, Pathnames of the form "jar:URL!/ENTRY" can now use an  
arbitrary URL as long as the java.net.URL constructor returns an  
instance we can use to get a URLConnection. There is a rather  
elaborate plugin mechanism to register additional protocols, which I'm  
guessing OSGi implements for bundle: but somehow returns something  
which behaves slightly different from the built-in file: and http:  
protocols that I tested with.

Tersely written from my iPod


On Mar 10, 2010, at 11:29 PM, Alessio Stalla <alessiostalla at gmail.com>  
wrote:

> On Wed, Mar 10, 2010 at 11:06 PM, Timothy Redmond <tredmond at stanford.edu 
> > wrote:
>> On Wed, 2010-03-10 at 22:19 +0100, Alessio Stalla wrote:
>>> On Wed, Mar 10, 2010 at 9:14 PM, Alan Ruttenberg
>>> <alanruttenberg at gmail.com> wrote:
>>>> Protege is an ontology development tool. I'm interested in using  
>>>> abcl
>>>> to develop plugins and TIm Redmond was kind enough to have a stab  
>>>> at
>>>> doing a first pass integration, but ran into trouble. I wonder if  
>>>> his
>>>> report makes rings a bell?
>>>
>>> Surely the function/class loading code has changed quite a lot since
>>> 0.18.1, so I'd advise you to try with abcl from trunk (or wait till
>>> 0.19 is released). Maybe the problem won't go away, but it's worth
>>> trying - at least we'll get a stack trace that's more meaningful  
>>> wrt.
>>> the current state of affairs.
>>
>> I included the error on trunk below.  The url returned by the class
>> loader has the wrong format.  For some reason this url is being  
>> parsed
>> in the Pathname class and it gets into trouble.  I was thinking  
>> that it
>> might be possible for me to make a minimal change to the code  
>> somehow to
>> fix this but I have not yet figured out exactly how to make this  
>> change.
>
> Pathname represents a path to a file or, since recently, an entry in a
> Jar file, but it's not able to represent an arbitrary URL.
>
> I know little about OSGi, but probably it requires some special
> handling if one wants to explicitly load resources like ABCL does.
>
> As an attempt which I really doubt will work, you can try this:
> since what is failing is getLispHome() in class Site, and that can
> also use the "abcl.home" system property, you could try to set that
> property to "jar:file:/whatever/abcl.jar!/org/armedbear/lisp/" before
> loading ABCL and cross your fingers. You'll probably get past the
> current failing point but some other things will probably fail. Even
> if it works, it's not a good solution at all; still, it might serve as
> a temporary hack until we figure out how to behave in a OSGi context.
>
> Alessio
>
>> -Timothy
>>
>> java.lang.Error
>>        at org.armedbear.lisp.Primitives$pf_error.execute 
>> (Primitives.java:1561)
>>        at org.armedbear.lisp.Primitive.execute(Primitive.java:108)
>>        at org.armedbear.lisp.Symbol.execute(Symbol.java:775)
>>        at org.armedbear.lisp.Lisp.error(Lisp.java:357)
>>        at org.armedbear.lisp.Pathname.<init>(Pathname.java:184)
>>        at org.armedbear.lisp.Site.init(Site.java:59)
>>        at org.armedbear.lisp.Site.getLispHome(Site.java:72)
>>        at org.armedbear.lisp.Site.<clinit>(Site.java:82)
>>        at org.armedbear.lisp.Load.loadSystemFile(Load.java:255)
>>        at org.armedbear.lisp.Interpreter.initializeLisp 
>> (Interpreter.java:158)
>>        at org.armedbear.lisp.Interpreter.createInstance 
>> (Interpreter.java:69)
>>        at org.sciencecommons.protege.lisp.LispContext.<init> 
>> (LispContext.java:14)
>>        at org.sciencecommons.protege.lisp.LispContext.getInstance 
>> (LispContext.java:20)
>>        at org.sciencecommons.protege.lisp.Activator.start 
>> (Activator.java:13)
>>        at  
>> org.apache.felix.framework.util.SecureAction.startActivator 
>> (SecureAction.java:639)
>>        at org.apache.felix.framework.Felix.activateBundle 
>> (Felix.java:1700)
>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>> 1622)
>>        at org.apache.felix.framework.BundleImpl.start 
>> (BundleImpl.java:915)
>>        at org.apache.felix.framework.BundleImpl.start 
>> (BundleImpl.java:902)
>>        at org.protege.editor.core.BundleManager.startPlugins 
>> (BundleManager.java:110)
>>        at org.protege.editor.core.BundleManager.loadPlugins 
>> (BundleManager.java:41)
>>        at org.protege.editor.core.ProtegeApplication.loadPlugins 
>> (ProtegeApplication.java:277)
>>        at org.protege.editor.core.ProtegeApplication.initApplication 
>> (ProtegeApplication.java:171)
>>        at org.protege.editor.core.ProtegeApplication.start 
>> (ProtegeApplication.java:113)
>>        at  
>> org.apache.felix.framework.util.SecureAction.startActivator 
>> (SecureAction.java:639)
>>        at org.apache.felix.framework.Felix.activateBundle 
>> (Felix.java:1700)
>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>> 1622)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel 
>> (Felix.java:1077)
>>        at org.apache.felix.framework.StartLevelImpl.run 
>> (StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:619)
>> ERROR placeholder called with arguments:
>> #<ERROR {1876E5D}>
>> Unsupported URL: 'bundle://10.0:2/org/armedbear/lisp/boot.lisp'
>>
>>
>>>
>>> Alessio
>>>
>>>> -Alan
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Timothy Redmond <tredmond at stanford.edu>
>>>> Date: Wed, Mar 10, 2010 at 2:12 PM
>>>> Subject: [POSSIBLE VIRUS:###] Re: further on common lisp  
>>>> integration
>>>> To: Alan Ruttenberg <alanruttenberg at gmail.com>
>>>>
>>>>
>>>>
>>>> There is something of a difficulty in using this library.  It is  
>>>> doing
>>>> some funky stuff with urls and class loaders and this doesn't  
>>>> work with
>>>> Protege.  Probably could be made to work by making some changes  
>>>> to the
>>>> abcl sources.  In particular it seems to detect that it is loading
>>>> through the class loader if the prefix begins with jar which is  
>>>> not a
>>>> correct assumption in general.
>>>>
>>>> But here is a start if you want to debug a bit more.
>>>>
>>>> -Timothy
>>>>
>>>>
>>>>
>>>>
>>>> java.util.zip.ZipException: error in opening zip file
>>>>        at java.util.zip.ZipFile.open(Native Method)
>>>>        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
>>>>        at java.util.zip.ZipFile.<init>(ZipFile.java:75)
>>>>        at org.armedbear.lisp.ZipCache.getZip(ZipCache.java:54)
>>>>        at org.armedbear.lisp.Lisp.readFunctionBytes(Lisp.java:1305)
>>>>        at org.armedbear.lisp.AutoloadedFunctionProxy$2.execute 
>>>> (AutoloadedFunctionProxy.java:307)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 562)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:494)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Lisp.processTagBody(Lisp.java:767)
>>>>        at org.armedbear.lisp.dotimes.execute(dotimes.java:105)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:449)
>>>>        at org.armedbear.lisp.Load.faslLoadStream(Load.java:628)
>>>>        at org.armedbear.lisp.Load.access$100(Load.java:70)
>>>>        at org.armedbear.lisp.Load$1.execute(Load.java:485)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 579)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:501)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Load.loadStream(Load.java:593)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:556)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:499)
>>>>        at org.armedbear.lisp.Load.loadSystemFile(Load.java:415)
>>>>        at org.armedbear.lisp.Load$4.execute(Load.java:774)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 562)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:494)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Load.loadStream(Load.java:593)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:556)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:499)
>>>>        at org.armedbear.lisp.Load.loadSystemFile(Load.java:415)
>>>>        at org.armedbear.lisp.Interpreter.initializeLisp 
>>>> (Interpreter.java:158)
>>>>        at org.armedbear.lisp.Interpreter.createInstance 
>>>> (Interpreter.java:69)
>>>>        at org.sciencecommons.protege.lisp.LispContext.<init> 
>>>> (LispContext.java:14)
>>>>        at org.sciencecommons.protege.lisp.LispContext.getInstance 
>>>> (LispContext.java:20)
>>>>        at org.sciencecommons.protege.lisp.Activator.start 
>>>> (Activator.java:13)
>>>>        at  
>>>> org.apache.felix.framework.util.SecureAction.startActivator 
>>>> (SecureAction.java:639)
>>>>        at org.apache.felix.framework.Felix.activateBundle 
>>>> (Felix.java:1700)
>>>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>>>> 1622)
>>>>        at org.apache.felix.framework.BundleImpl.start 
>>>> (BundleImpl.java:915)
>>>>        at org.apache.felix.framework.BundleImpl.start 
>>>> (BundleImpl.java:902)
>>>>        at org.protege.editor.core.BundleManager.startPlugins 
>>>> (BundleManager.java:110)
>>>>        at org.protege.editor.core.BundleManager.loadPlugins 
>>>> (BundleManager.java:41)
>>>>        at org.protege.editor.core.ProtegeApplication.loadPlugins 
>>>> (ProtegeApplication.java:277)
>>>>        at  
>>>> org.protege.editor.core.ProtegeApplication.initApplication 
>>>> (ProtegeApplication.java:171)
>>>>        at org.protege.editor.core.ProtegeApplication.start 
>>>> (ProtegeApplication.java:113)
>>>>        at  
>>>> org.apache.felix.framework.util.SecureAction.startActivator 
>>>> (SecureAction.java:639)
>>>>        at org.apache.felix.framework.Felix.activateBundle 
>>>> (Felix.java:1700)
>>>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>>>> 1622)
>>>>        at org.apache.felix.framework.Felix.setActiveStartLevel 
>>>> (Felix.java:1077)
>>>>        at org.apache.felix.framework.StartLevelImpl.run 
>>>> (StartLevelImpl.java:264)
>>>>        at java.lang.Thread.run(Thread.java:619)
>>>> java.lang.Error
>>>>        at org.armedbear.lisp.Primitives$70.execute 
>>>> (Primitives.java:1462)
>>>>        at org.armedbear.lisp.Primitive.execute(Primitive.java:108)
>>>>        at org.armedbear.lisp.Symbol.execute(Symbol.java:770)
>>>>        at org.armedbear.lisp.Lisp.error(Lisp.java:354)
>>>>        at org.armedbear.lisp.Lisp.readFunctionBytes(Lisp.java:1329)
>>>>        at org.armedbear.lisp.AutoloadedFunctionProxy$2.execute 
>>>> (AutoloadedFunctionProxy.java:307)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 562)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:494)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Lisp.processTagBody(Lisp.java:767)
>>>>        at org.armedbear.lisp.dotimes.execute(dotimes.java:105)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:449)
>>>>        at org.armedbear.lisp.Load.faslLoadStream(Load.java:628)
>>>>        at org.armedbear.lisp.Load.access$100(Load.java:70)
>>>>        at org.armedbear.lisp.Load$1.execute(Load.java:485)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 579)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:501)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Load.loadStream(Load.java:593)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:556)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:499)
>>>>        at org.armedbear.lisp.Load.loadSystemFile(Load.java:415)
>>>>        at org.armedbear.lisp.Load$4.execute(Load.java:774)
>>>>        at org.armedbear.lisp.LispThread.execute(LispThread.java: 
>>>> 562)
>>>>        at org.armedbear.lisp.Lisp.evalCall(Lisp.java:494)
>>>>        at org.armedbear.lisp.Lisp.eval(Lisp.java:459)
>>>>        at org.armedbear.lisp.Load.loadStream(Load.java:593)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:556)
>>>>        at org.armedbear.lisp.Load.loadFileFromStream(Load.java:499)
>>>>        at org.armedbear.lisp.Load.loadSystemFile(Load.java:415)
>>>>        at org.armedbear.lisp.Interpreter.initializeLisp 
>>>> (Interpreter.java:158)
>>>>        at org.armedbear.lisp.Interpreter.createInstance 
>>>> (Interpreter.java:69)
>>>>        at org.sciencecommons.protege.lisp.LispContext.<init> 
>>>> (LispContext.java:14)
>>>>        at org.sciencecommons.protege.lisp.LispContext.getInstance 
>>>> (LispContext.java:20)
>>>>        at org.sciencecommons.protege.lisp.Activator.start 
>>>> (Activator.java:13)
>>>>        at  
>>>> org.apache.felix.framework.util.SecureAction.startActivator 
>>>> (SecureAction.java:639)
>>>>        at org.apache.felix.framework.Felix.activateBundle 
>>>> (Felix.java:1700)
>>>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>>>> 1622)
>>>>        at org.apache.felix.framework.BundleImpl.start 
>>>> (BundleImpl.java:915)
>>>>        at org.apache.felix.framework.BundleImpl.start 
>>>> (BundleImpl.java:902)
>>>>        at org.protege.editor.core.BundleManager.startPlugins 
>>>> (BundleManager.java:110)
>>>>        at org.protege.editor.core.BundleManager.loadPlugins 
>>>> (BundleManager.java:41)
>>>>        at org.protege.editor.core.ProtegeApplication.loadPlugins 
>>>> (ProtegeApplication.java:277)
>>>>        at  
>>>> org.protege.editor.core.ProtegeApplication.initApplication 
>>>> (ProtegeApplication.java:171)
>>>>        at org.protege.editor.core.ProtegeApplication.start 
>>>> (ProtegeApplication.java:113)
>>>>        at  
>>>> org.apache.felix.framework.util.SecureAction.startActivator 
>>>> (SecureAction.java:639)
>>>>        at org.apache.felix.framework.Felix.activateBundle 
>>>> (Felix.java:1700)
>>>>        at org.apache.felix.framework.Felix.startBundle(Felix.java: 
>>>> 1622)
>>>>        at org.apache.felix.framework.Felix.setActiveStartLevel 
>>>> (Felix.java:1077)
>>>>        at org.apache.felix.framework.StartLevelImpl.run 
>>>> (StartLevelImpl.java:264)
>>>>        at java.lang.Thread.run(Thread.java:619)
>>>>
>>>> _______________________________________________
>>>> armedbear-devel mailing list
>>>> armedbear-devel at common-lisp.net
>>>> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>>>>
>>>>
>>
>>
>>
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>




More information about the armedbear-devel mailing list