You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Trevor Donaldson <tm...@gmail.com> on 2015/01/16 02:21:01 UTC

Third Party Libraries in Fuseki 2

Where should I place third party libraries in Fuseki2? I am using
fuseki.war. I would like to use a custom shiro realm. I am not sure where
to place the custom.jar.

Thanks

Re: Third Party Libraries in Fuseki 2

Posted by Andy Seaborne <an...@apache.org>.
On 17/01/15 00:55, Stian Soiland-Reyes wrote:
> Just relax - custom property functions work well in Fuseki 2. (which
> is presumably something along the lines of what Trevor wants to add).
>
> I tested a custom function with Fuseki 2 WAR deployed in Tomcat 7:
>
>      PREFIX arq: <java:arq.examples.propertyfunction.>
>      SELECT ?s ?name WHERE { ?s arq:localname ?name }
>
> works perfectly.
>
> I added localname.jar to WEB-INF/lib/ as Trevor suggests:
>
>      sudo jar -uf /var/lib/tomcat7/webapps/fuseki.war WEB-INF/lib/localname.jar
>
> (You have to place the JAR in an empty subfolder WEB-INF/lib/first)
>
>
> Tomcat should restart the application automatically when the .war is updated.
>
> (I made localname.jar from the jena-arq/src-examples. I had to do the
> last bit old-skool with javac and jar as there was no pom.xml for the
> examples  :( )
>
>
> # fuseki dist
>
> Installing custom JARs to fuseki 1 or in the Fuseki 2
> jena-fuseki2/jena-fuseki-dist distribution seems to be a bit trickier,
> as you have to edit the launcher scripts fuseki-server or
> fuseki-server.bat to modify the java -classpath.
>
> (Even then I could not get this to work, but I didn't try very hard).


You can modify the fuseki-server.jar -- it's a shared jar executable jar 
(another way that code likes to get sealed) so add in .class files with 
the additional code, not adding a file to an archive,

Another way, which avoids hacking the server jar, is to use the 
fuseki-server jar as a normal component of the classpath:

java ... -cp "fuseki-server.jar:MoreStuff.jar" \
     org.apache.jena.fuseki.cmd.FusekiCmd  "$@"


That also works as a self contained jar to run command line stuff:

java -cp fuseki-server.jar arq.sparql --version

	Andy

(notes now in the scripts)

>
> On 16 January 2015 at 16:14, Stian Soiland-Reyes <st...@apache.org> wrote:
>> Presumably one would always have to do the WEB-INF/lib trick to add
>> custom ARQ Filter functions?
>>
>> https://jena.apache.org/documentation/query/extension.html#value-functions
>>
>>
>> (.. as the functions would need access to the interface
>> com.hp.hpl.jena.sparql.pfunction.PFuncAssignToObject from the webapp
>> classloader that holds jena-arq.jar and friends)
>>
>>
>>
>> Does https://jena.apache.org/documentation/query/java-uri.html even
>> work within Fuseki 2 as a WAR?
>>
>> com.hp.hpl.jena.sparql.util.Loader uses Class.forName() ...
>>
>> On 16 January 2015 at 15:10, John A. Fereira <ja...@cornell.edu> wrote:
>>>
>>> Sounds good.  So, did it work?
>>>
>>> Documenting this somewhere would probably be useful.
>>>
>>> -----Original Message-----
>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>> Sent: Friday, January 16, 2015 10:02 AM
>>> To: users@jena.apache.org
>>> Subject: Re: Third Party Libraries in Fuseki 2
>>>
>>> Thanks Stian, John, and Andy. I actually went with jar -uf <war> WEB-INF/lib/<custom.jar>
>>>
>>> On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>>> If you want additional jars/classes AND in war file form, I think it
>>>> needs some small amount of self-assembly.
>>>>
>>>> You may be able to take the war file distributed and add your extra
>>>> jars (it is a zip file; or "jar -u") I've not tried - just read some
>>>> page like
>>>> http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
>>>> :-)
>>>>
>>>> With maven, you can probably do that, or have your own war builder
>>>> with the same dependency of jena-fuseki-core as the delivery module.
>>>>
>>>>          Andy
>>>>
>>>>
>>>> On 16/01/15 13:59, Stian Soiland-Reyes wrote:
>>>>
>>>>> It should be safest to do the second option of WEB-INF/lib -
>>>>> otherwise you might have to ensure that everything your JAR in
>>>>> tomcat/lib requires is also in tomcat/lib (even if it is in
>>>>> WEB-INF/lib) - which could cause conflicts.
>>>>>
>>>>>
>>>>>
>>>>> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Ok thanks.
>>>>>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>>>>>
>>>>>>   That depends on what you're using for your servlet container.  When
>>>>>> I
>>>>>>> use
>>>>>>> jetty I just create a lib directory in the directory where I've
>>>>>>> downloaded fuseki, and  drop any jar files there (for example, if/**
  * Framework for implementaing a Transactional which is compromised of 
a number
  * of TransactionalComponents
  * */

>>>>>>> you want to connect to an sdb that's where the sdb jar file would
>>>>>>> go.  Then the start up script just needs to include those jar files
>>>>>>> in the classpath.  If you're deploying to Tomcat the easiest way is
>>>>>>> to use jar to expand the fuseki.war
>>>>>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>>>>>> then the re-create the war file with the jar command.
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>>>>>> Sent: Thursday, January 15, 2015 8:21 PM
>>>>>>> To: users@jena.apache.org
>>>>>>> Subject: Third Party Libraries in Fuseki 2
>>>>>>>
>>>>>>> Where should I place third party libraries in Fuseki2? I am using
>>>>>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
>>>>>>> where to place the custom.jar.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>
>>
>>
>> --
>> Stian Soiland-Reyes
>> Apache Taverna (incubating)
>> http://orcid.org/0000-0001-9842-9718
>
>
>


Re: Third Party Libraries in Fuseki 2

Posted by Stian Soiland-Reyes <so...@cs.manchester.ac.uk>.
Just relax - custom property functions work well in Fuseki 2. (which
is presumably something along the lines of what Trevor wants to add).

I tested a custom function with Fuseki 2 WAR deployed in Tomcat 7:

    PREFIX arq: <java:arq.examples.propertyfunction.>
    SELECT ?s ?name WHERE { ?s arq:localname ?name }

works perfectly.

I added localname.jar to WEB-INF/lib/ as Trevor suggests:

    sudo jar -uf /var/lib/tomcat7/webapps/fuseki.war WEB-INF/lib/localname.jar

(You have to place the JAR in an empty subfolder WEB-INF/lib/first)


Tomcat should restart the application automatically when the .war is updated.

(I made localname.jar from the jena-arq/src-examples. I had to do the
last bit old-skool with javac and jar as there was no pom.xml for the
examples  :( )


# fuseki dist

Installing custom JARs to fuseki 1 or in the Fuseki 2
jena-fuseki2/jena-fuseki-dist distribution seems to be a bit trickier,
as you have to edit the launcher scripts fuseki-server or
fuseki-server.bat to modify the java -classpath.

(Even then I could not get this to work, but I didn't try very hard).

On 16 January 2015 at 16:14, Stian Soiland-Reyes <st...@apache.org> wrote:
> Presumably one would always have to do the WEB-INF/lib trick to add
> custom ARQ Filter functions?
>
> https://jena.apache.org/documentation/query/extension.html#value-functions
>
>
> (.. as the functions would need access to the interface
> com.hp.hpl.jena.sparql.pfunction.PFuncAssignToObject from the webapp
> classloader that holds jena-arq.jar and friends)
>
>
>
> Does https://jena.apache.org/documentation/query/java-uri.html even
> work within Fuseki 2 as a WAR?
>
> com.hp.hpl.jena.sparql.util.Loader uses Class.forName() ...
>
> On 16 January 2015 at 15:10, John A. Fereira <ja...@cornell.edu> wrote:
>>
>> Sounds good.  So, did it work?
>>
>> Documenting this somewhere would probably be useful.
>>
>> -----Original Message-----
>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>> Sent: Friday, January 16, 2015 10:02 AM
>> To: users@jena.apache.org
>> Subject: Re: Third Party Libraries in Fuseki 2
>>
>> Thanks Stian, John, and Andy. I actually went with jar -uf <war> WEB-INF/lib/<custom.jar>
>>
>> On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>>> If you want additional jars/classes AND in war file form, I think it
>>> needs some small amount of self-assembly.
>>>
>>> You may be able to take the war file distributed and add your extra
>>> jars (it is a zip file; or "jar -u") I've not tried - just read some
>>> page like
>>> http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
>>> :-)
>>>
>>> With maven, you can probably do that, or have your own war builder
>>> with the same dependency of jena-fuseki-core as the delivery module.
>>>
>>>         Andy
>>>
>>>
>>> On 16/01/15 13:59, Stian Soiland-Reyes wrote:
>>>
>>>> It should be safest to do the second option of WEB-INF/lib -
>>>> otherwise you might have to ensure that everything your JAR in
>>>> tomcat/lib requires is also in tomcat/lib (even if it is in
>>>> WEB-INF/lib) - which could cause conflicts.
>>>>
>>>>
>>>>
>>>> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
>>>> wrote:
>>>>
>>>>> Ok thanks.
>>>>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>>>>
>>>>>  That depends on what you're using for your servlet container.  When
>>>>> I
>>>>>> use
>>>>>> jetty I just create a lib directory in the directory where I've
>>>>>> downloaded fuseki, and  drop any jar files there (for example, if
>>>>>> you want to connect to an sdb that's where the sdb jar file would
>>>>>> go.  Then the start up script just needs to include those jar files
>>>>>> in the classpath.  If you're deploying to Tomcat the easiest way is
>>>>>> to use jar to expand the fuseki.war
>>>>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>>>>> then the re-create the war file with the jar command.
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>>>>> Sent: Thursday, January 15, 2015 8:21 PM
>>>>>> To: users@jena.apache.org
>>>>>> Subject: Third Party Libraries in Fuseki 2
>>>>>>
>>>>>> Where should I place third party libraries in Fuseki2? I am using
>>>>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
>>>>>> where to place the custom.jar.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>
>
>
>
> --
> Stian Soiland-Reyes
> Apache Taverna (incubating)
> http://orcid.org/0000-0001-9842-9718



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

Re: Third Party Libraries in Fuseki 2

Posted by Stian Soiland-Reyes <st...@apache.org>.
Presumably one would always have to do the WEB-INF/lib trick to add
custom ARQ Filter functions?

https://jena.apache.org/documentation/query/extension.html#value-functions


(.. as the functions would need access to the interface
com.hp.hpl.jena.sparql.pfunction.PFuncAssignToObject from the webapp
classloader that holds jena-arq.jar and friends)



Does https://jena.apache.org/documentation/query/java-uri.html even
work within Fuseki 2 as a WAR?

com.hp.hpl.jena.sparql.util.Loader uses Class.forName() ...

On 16 January 2015 at 15:10, John A. Fereira <ja...@cornell.edu> wrote:
>
> Sounds good.  So, did it work?
>
> Documenting this somewhere would probably be useful.
>
> -----Original Message-----
> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> Sent: Friday, January 16, 2015 10:02 AM
> To: users@jena.apache.org
> Subject: Re: Third Party Libraries in Fuseki 2
>
> Thanks Stian, John, and Andy. I actually went with jar -uf <war> WEB-INF/lib/<custom.jar>
>
> On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:
>
>> If you want additional jars/classes AND in war file form, I think it
>> needs some small amount of self-assembly.
>>
>> You may be able to take the war file distributed and add your extra
>> jars (it is a zip file; or "jar -u") I've not tried - just read some
>> page like
>> http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
>> :-)
>>
>> With maven, you can probably do that, or have your own war builder
>> with the same dependency of jena-fuseki-core as the delivery module.
>>
>>         Andy
>>
>>
>> On 16/01/15 13:59, Stian Soiland-Reyes wrote:
>>
>>> It should be safest to do the second option of WEB-INF/lib -
>>> otherwise you might have to ensure that everything your JAR in
>>> tomcat/lib requires is also in tomcat/lib (even if it is in
>>> WEB-INF/lib) - which could cause conflicts.
>>>
>>>
>>>
>>> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
>>> wrote:
>>>
>>>> Ok thanks.
>>>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>>>
>>>>  That depends on what you're using for your servlet container.  When
>>>> I
>>>>> use
>>>>> jetty I just create a lib directory in the directory where I've
>>>>> downloaded fuseki, and  drop any jar files there (for example, if
>>>>> you want to connect to an sdb that's where the sdb jar file would
>>>>> go.  Then the start up script just needs to include those jar files
>>>>> in the classpath.  If you're deploying to Tomcat the easiest way is
>>>>> to use jar to expand the fuseki.war
>>>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>>>> then the re-create the war file with the jar command.
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>>>> Sent: Thursday, January 15, 2015 8:21 PM
>>>>> To: users@jena.apache.org
>>>>> Subject: Third Party Libraries in Fuseki 2
>>>>>
>>>>> Where should I place third party libraries in Fuseki2? I am using
>>>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
>>>>> where to place the custom.jar.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>
>>>
>>>
>>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating)
http://orcid.org/0000-0001-9842-9718

Re: Third Party Libraries in Fuseki 2

Posted by Trevor Donaldson <tm...@gmail.com>.
agreed.

On Fri, Jan 16, 2015 at 10:20 AM, Claude Warren <cl...@xenei.com> wrote:

> I am anticipating working with Trevor to get a cookbook for how to apply
> Jena-Security in the Fuseki environment.  So we should have a document that
> covers 3rd party jars then.
>
> On Fri, Jan 16, 2015 at 3:16 PM, Trevor Donaldson <tm...@gmail.com>
> wrote:
>
> > well, it is in the war. :-)  I haven't actually tested my code yet. I am
> > trying to learn Shiro, Fuseki2 and Jena Security all at the same time. I
> am
> > at the point of testing my custom realms. i will let you know how it
> goes.
> >
> > On Fri, Jan 16, 2015 at 10:10 AM, John A. Fereira <ja...@cornell.edu>
> > wrote:
> >
> > >
> > > Sounds good.  So, did it work?
> > >
> > > Documenting this somewhere would probably be useful.
> > >
> > > -----Original Message-----
> > > From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> > > Sent: Friday, January 16, 2015 10:02 AM
> > > To: users@jena.apache.org
> > > Subject: Re: Third Party Libraries in Fuseki 2
> > >
> > > Thanks Stian, John, and Andy. I actually went with jar -uf <war>
> > > WEB-INF/lib/<custom.jar>
> > >
> > > On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org>
> wrote:
> > >
> > > > If you want additional jars/classes AND in war file form, I think it
> > > > needs some small amount of self-assembly.
> > > >
> > > > You may be able to take the war file distributed and add your extra
> > > > jars (it is a zip file; or "jar -u") I've not tried - just read some
> > > > page like
> > > > http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
> > > > :-)
> > > >
> > > > With maven, you can probably do that, or have your own war builder
> > > > with the same dependency of jena-fuseki-core as the delivery module.
> > > >
> > > >         Andy
> > > >
> > > >
> > > > On 16/01/15 13:59, Stian Soiland-Reyes wrote:
> > > >
> > > >> It should be safest to do the second option of WEB-INF/lib -
> > > >> otherwise you might have to ensure that everything your JAR in
> > > >> tomcat/lib requires is also in tomcat/lib (even if it is in
> > > >> WEB-INF/lib) - which could cause conflicts.
> > > >>
> > > >>
> > > >>
> > > >> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> Ok thanks.
> > > >>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu>
> > wrote:
> > > >>>
> > > >>>  That depends on what you're using for your servlet container.
> When
> > > >>> I
> > > >>>> use
> > > >>>> jetty I just create a lib directory in the directory where I've
> > > >>>> downloaded fuseki, and  drop any jar files there (for example, if
> > > >>>> you want to connect to an sdb that's where the sdb jar file would
> > > >>>> go.  Then the start up script just needs to include those jar
> files
> > > >>>> in the classpath.  If you're deploying to Tomcat the easiest way
> is
> > > >>>> to use jar to expand the fuseki.war
> > > >>>> file.  Then you should see a WEB-INF/lib directory.   Drop your
> jar
> > > file
> > > >>>> then the re-create the war file with the jar command.
> > > >>>>
> > > >>>>
> > > >>>> -----Original Message-----
> > > >>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> > > >>>> Sent: Thursday, January 15, 2015 8:21 PM
> > > >>>> To: users@jena.apache.org
> > > >>>> Subject: Third Party Libraries in Fuseki 2
> > > >>>>
> > > >>>> Where should I place third party libraries in Fuseki2? I am using
> > > >>>> fuseki.war. I would like to use a custom shiro realm. I am not
> sure
> > > >>>> where to place the custom.jar.
> > > >>>>
> > > >>>> Thanks
> > > >>>>
> > > >>>>
> > > >>
> > > >>
> > > >>
> > > >
> > >
> >
>
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>

Re: Third Party Libraries in Fuseki 2

Posted by Claude Warren <cl...@xenei.com>.
I am anticipating working with Trevor to get a cookbook for how to apply
Jena-Security in the Fuseki environment.  So we should have a document that
covers 3rd party jars then.

On Fri, Jan 16, 2015 at 3:16 PM, Trevor Donaldson <tm...@gmail.com>
wrote:

> well, it is in the war. :-)  I haven't actually tested my code yet. I am
> trying to learn Shiro, Fuseki2 and Jena Security all at the same time. I am
> at the point of testing my custom realms. i will let you know how it goes.
>
> On Fri, Jan 16, 2015 at 10:10 AM, John A. Fereira <ja...@cornell.edu>
> wrote:
>
> >
> > Sounds good.  So, did it work?
> >
> > Documenting this somewhere would probably be useful.
> >
> > -----Original Message-----
> > From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> > Sent: Friday, January 16, 2015 10:02 AM
> > To: users@jena.apache.org
> > Subject: Re: Third Party Libraries in Fuseki 2
> >
> > Thanks Stian, John, and Andy. I actually went with jar -uf <war>
> > WEB-INF/lib/<custom.jar>
> >
> > On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:
> >
> > > If you want additional jars/classes AND in war file form, I think it
> > > needs some small amount of self-assembly.
> > >
> > > You may be able to take the war file distributed and add your extra
> > > jars (it is a zip file; or "jar -u") I've not tried - just read some
> > > page like
> > > http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
> > > :-)
> > >
> > > With maven, you can probably do that, or have your own war builder
> > > with the same dependency of jena-fuseki-core as the delivery module.
> > >
> > >         Andy
> > >
> > >
> > > On 16/01/15 13:59, Stian Soiland-Reyes wrote:
> > >
> > >> It should be safest to do the second option of WEB-INF/lib -
> > >> otherwise you might have to ensure that everything your JAR in
> > >> tomcat/lib requires is also in tomcat/lib (even if it is in
> > >> WEB-INF/lib) - which could cause conflicts.
> > >>
> > >>
> > >>
> > >> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
> > >> wrote:
> > >>
> > >>> Ok thanks.
> > >>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu>
> wrote:
> > >>>
> > >>>  That depends on what you're using for your servlet container.  When
> > >>> I
> > >>>> use
> > >>>> jetty I just create a lib directory in the directory where I've
> > >>>> downloaded fuseki, and  drop any jar files there (for example, if
> > >>>> you want to connect to an sdb that's where the sdb jar file would
> > >>>> go.  Then the start up script just needs to include those jar files
> > >>>> in the classpath.  If you're deploying to Tomcat the easiest way is
> > >>>> to use jar to expand the fuseki.war
> > >>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar
> > file
> > >>>> then the re-create the war file with the jar command.
> > >>>>
> > >>>>
> > >>>> -----Original Message-----
> > >>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> > >>>> Sent: Thursday, January 15, 2015 8:21 PM
> > >>>> To: users@jena.apache.org
> > >>>> Subject: Third Party Libraries in Fuseki 2
> > >>>>
> > >>>> Where should I place third party libraries in Fuseki2? I am using
> > >>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
> > >>>> where to place the custom.jar.
> > >>>>
> > >>>> Thanks
> > >>>>
> > >>>>
> > >>
> > >>
> > >>
> > >
> >
>



-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: Third Party Libraries in Fuseki 2

Posted by Trevor Donaldson <tm...@gmail.com>.
well, it is in the war. :-)  I haven't actually tested my code yet. I am
trying to learn Shiro, Fuseki2 and Jena Security all at the same time. I am
at the point of testing my custom realms. i will let you know how it goes.

On Fri, Jan 16, 2015 at 10:10 AM, John A. Fereira <ja...@cornell.edu> wrote:

>
> Sounds good.  So, did it work?
>
> Documenting this somewhere would probably be useful.
>
> -----Original Message-----
> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> Sent: Friday, January 16, 2015 10:02 AM
> To: users@jena.apache.org
> Subject: Re: Third Party Libraries in Fuseki 2
>
> Thanks Stian, John, and Andy. I actually went with jar -uf <war>
> WEB-INF/lib/<custom.jar>
>
> On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:
>
> > If you want additional jars/classes AND in war file form, I think it
> > needs some small amount of self-assembly.
> >
> > You may be able to take the war file distributed and add your extra
> > jars (it is a zip file; or "jar -u") I've not tried - just read some
> > page like
> > http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
> > :-)
> >
> > With maven, you can probably do that, or have your own war builder
> > with the same dependency of jena-fuseki-core as the delivery module.
> >
> >         Andy
> >
> >
> > On 16/01/15 13:59, Stian Soiland-Reyes wrote:
> >
> >> It should be safest to do the second option of WEB-INF/lib -
> >> otherwise you might have to ensure that everything your JAR in
> >> tomcat/lib requires is also in tomcat/lib (even if it is in
> >> WEB-INF/lib) - which could cause conflicts.
> >>
> >>
> >>
> >> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
> >> wrote:
> >>
> >>> Ok thanks.
> >>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
> >>>
> >>>  That depends on what you're using for your servlet container.  When
> >>> I
> >>>> use
> >>>> jetty I just create a lib directory in the directory where I've
> >>>> downloaded fuseki, and  drop any jar files there (for example, if
> >>>> you want to connect to an sdb that's where the sdb jar file would
> >>>> go.  Then the start up script just needs to include those jar files
> >>>> in the classpath.  If you're deploying to Tomcat the easiest way is
> >>>> to use jar to expand the fuseki.war
> >>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar
> file
> >>>> then the re-create the war file with the jar command.
> >>>>
> >>>>
> >>>> -----Original Message-----
> >>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> >>>> Sent: Thursday, January 15, 2015 8:21 PM
> >>>> To: users@jena.apache.org
> >>>> Subject: Third Party Libraries in Fuseki 2
> >>>>
> >>>> Where should I place third party libraries in Fuseki2? I am using
> >>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
> >>>> where to place the custom.jar.
> >>>>
> >>>> Thanks
> >>>>
> >>>>
> >>
> >>
> >>
> >
>

RE: Third Party Libraries in Fuseki 2

Posted by "John A. Fereira" <ja...@cornell.edu>.
Sounds good.  So, did it work?  

Documenting this somewhere would probably be useful.  

-----Original Message-----
From: Trevor Donaldson [mailto:tmdonalds@gmail.com] 
Sent: Friday, January 16, 2015 10:02 AM
To: users@jena.apache.org
Subject: Re: Third Party Libraries in Fuseki 2

Thanks Stian, John, and Andy. I actually went with jar -uf <war> WEB-INF/lib/<custom.jar>

On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:

> If you want additional jars/classes AND in war file form, I think it 
> needs some small amount of self-assembly.
>
> You may be able to take the war file distributed and add your extra 
> jars (it is a zip file; or "jar -u") I've not tried - just read some 
> page like 
> http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
> :-)
>
> With maven, you can probably do that, or have your own war builder 
> with the same dependency of jena-fuseki-core as the delivery module.
>
>         Andy
>
>
> On 16/01/15 13:59, Stian Soiland-Reyes wrote:
>
>> It should be safest to do the second option of WEB-INF/lib - 
>> otherwise you might have to ensure that everything your JAR in 
>> tomcat/lib requires is also in tomcat/lib (even if it is in 
>> WEB-INF/lib) - which could cause conflicts.
>>
>>
>>
>> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
>> wrote:
>>
>>> Ok thanks.
>>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>>
>>>  That depends on what you're using for your servlet container.  When 
>>> I
>>>> use
>>>> jetty I just create a lib directory in the directory where I've 
>>>> downloaded fuseki, and  drop any jar files there (for example, if 
>>>> you want to connect to an sdb that's where the sdb jar file would 
>>>> go.  Then the start up script just needs to include those jar files 
>>>> in the classpath.  If you're deploying to Tomcat the easiest way is 
>>>> to use jar to expand the fuseki.war
>>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>>> then the re-create the war file with the jar command.
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>>> Sent: Thursday, January 15, 2015 8:21 PM
>>>> To: users@jena.apache.org
>>>> Subject: Third Party Libraries in Fuseki 2
>>>>
>>>> Where should I place third party libraries in Fuseki2? I am using 
>>>> fuseki.war. I would like to use a custom shiro realm. I am not sure 
>>>> where to place the custom.jar.
>>>>
>>>> Thanks
>>>>
>>>>
>>
>>
>>
>

Re: Third Party Libraries in Fuseki 2

Posted by Trevor Donaldson <tm...@gmail.com>.
Thanks Stian, John, and Andy. I actually went with jar -uf <war>
WEB-INF/lib/<custom.jar>

On Fri, Jan 16, 2015 at 9:48 AM, Andy Seaborne <an...@apache.org> wrote:

> If you want additional jars/classes AND in war file form, I think it needs
> some small amount of self-assembly.
>
> You may be able to take the war file distributed and add your extra jars
> (it is a zip file; or "jar -u") I've not tried - just read some page like
> http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
> :-)
>
> With maven, you can probably do that, or have your own war builder with
> the same dependency of jena-fuseki-core as the delivery module.
>
>         Andy
>
>
> On 16/01/15 13:59, Stian Soiland-Reyes wrote:
>
>> It should be safest to do the second option of WEB-INF/lib - otherwise
>> you might have to ensure that everything your JAR in tomcat/lib
>> requires is also in tomcat/lib (even if it is in WEB-INF/lib) - which
>> could cause conflicts.
>>
>>
>>
>> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com>
>> wrote:
>>
>>> Ok thanks.
>>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>>
>>>  That depends on what you're using for your servlet container.  When I
>>>> use
>>>> jetty I just create a lib directory in the directory where I've
>>>> downloaded
>>>> fuseki, and  drop any jar files there (for example, if you want to
>>>> connect
>>>> to an sdb that's where the sdb jar file would go.  Then the start up
>>>> script
>>>> just needs to include those jar files in the classpath.  If you're
>>>> deploying to Tomcat the easiest way is to use jar to expand the
>>>> fuseki.war
>>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>>> then the re-create the war file with the jar command.
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>>> Sent: Thursday, January 15, 2015 8:21 PM
>>>> To: users@jena.apache.org
>>>> Subject: Third Party Libraries in Fuseki 2
>>>>
>>>> Where should I place third party libraries in Fuseki2? I am using
>>>> fuseki.war. I would like to use a custom shiro realm. I am not sure
>>>> where
>>>> to place the custom.jar.
>>>>
>>>> Thanks
>>>>
>>>>
>>
>>
>>
>

Re: Third Party Libraries in Fuseki 2

Posted by Andy Seaborne <an...@apache.org>.
If you want additional jars/classes AND in war file form, I think it 
needs some small amount of self-assembly.

You may be able to take the war file distributed and add your extra jars 
(it is a zip file; or "jar -u") I've not tried - just read some page like
http://linuxproblems.org/wiki/Add_or_update_files_in_a_war_file
:-)

With maven, you can probably do that, or have your own war builder with 
the same dependency of jena-fuseki-core as the delivery module.

	Andy

On 16/01/15 13:59, Stian Soiland-Reyes wrote:
> It should be safest to do the second option of WEB-INF/lib - otherwise
> you might have to ensure that everything your JAR in tomcat/lib
> requires is also in tomcat/lib (even if it is in WEB-INF/lib) - which
> could cause conflicts.
>
>
>
> On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com> wrote:
>> Ok thanks.
>> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>>
>>> That depends on what you're using for your servlet container.  When I use
>>> jetty I just create a lib directory in the directory where I've downloaded
>>> fuseki, and  drop any jar files there (for example, if you want to connect
>>> to an sdb that's where the sdb jar file would go.  Then the start up script
>>> just needs to include those jar files in the classpath.  If you're
>>> deploying to Tomcat the easiest way is to use jar to expand the fuseki.war
>>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>>> then the re-create the war file with the jar command.
>>>
>>>
>>> -----Original Message-----
>>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>>> Sent: Thursday, January 15, 2015 8:21 PM
>>> To: users@jena.apache.org
>>> Subject: Third Party Libraries in Fuseki 2
>>>
>>> Where should I place third party libraries in Fuseki2? I am using
>>> fuseki.war. I would like to use a custom shiro realm. I am not sure where
>>> to place the custom.jar.
>>>
>>> Thanks
>>>
>
>
>


Re: Third Party Libraries in Fuseki 2

Posted by Stian Soiland-Reyes <so...@cs.manchester.ac.uk>.
It should be safest to do the second option of WEB-INF/lib - otherwise
you might have to ensure that everything your JAR in tomcat/lib
requires is also in tomcat/lib (even if it is in WEB-INF/lib) - which
could cause conflicts.



On 16 January 2015 at 02:46, Trevor Donaldson <tm...@gmail.com> wrote:
> Ok thanks.
> On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:
>
>> That depends on what you're using for your servlet container.  When I use
>> jetty I just create a lib directory in the directory where I've downloaded
>> fuseki, and  drop any jar files there (for example, if you want to connect
>> to an sdb that's where the sdb jar file would go.  Then the start up script
>> just needs to include those jar files in the classpath.  If you're
>> deploying to Tomcat the easiest way is to use jar to expand the fuseki.war
>> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
>> then the re-create the war file with the jar command.
>>
>>
>> -----Original Message-----
>> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
>> Sent: Thursday, January 15, 2015 8:21 PM
>> To: users@jena.apache.org
>> Subject: Third Party Libraries in Fuseki 2
>>
>> Where should I place third party libraries in Fuseki2? I am using
>> fuseki.war. I would like to use a custom shiro realm. I am not sure where
>> to place the custom.jar.
>>
>> Thanks
>>



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

RE: Third Party Libraries in Fuseki 2

Posted by Trevor Donaldson <tm...@gmail.com>.
Ok thanks.
On Jan 15, 2015 9:05 PM, "John A. Fereira" <ja...@cornell.edu> wrote:

> That depends on what you're using for your servlet container.  When I use
> jetty I just create a lib directory in the directory where I've downloaded
> fuseki, and  drop any jar files there (for example, if you want to connect
> to an sdb that's where the sdb jar file would go.  Then the start up script
> just needs to include those jar files in the classpath.  If you're
> deploying to Tomcat the easiest way is to use jar to expand the fuseki.war
> file.  Then you should see a WEB-INF/lib directory.   Drop your jar file
> then the re-create the war file with the jar command.
>
>
> -----Original Message-----
> From: Trevor Donaldson [mailto:tmdonalds@gmail.com]
> Sent: Thursday, January 15, 2015 8:21 PM
> To: users@jena.apache.org
> Subject: Third Party Libraries in Fuseki 2
>
> Where should I place third party libraries in Fuseki2? I am using
> fuseki.war. I would like to use a custom shiro realm. I am not sure where
> to place the custom.jar.
>
> Thanks
>

RE: Third Party Libraries in Fuseki 2

Posted by "John A. Fereira" <ja...@cornell.edu>.
That depends on what you're using for your servlet container.  When I use jetty I just create a lib directory in the directory where I've downloaded fuseki, and  drop any jar files there (for example, if you want to connect to an sdb that's where the sdb jar file would go.  Then the start up script just needs to include those jar files in the classpath.  If you're deploying to Tomcat the easiest way is to use jar to expand the fuseki.war file.  Then you should see a WEB-INF/lib directory.   Drop your jar file then the re-create the war file with the jar command.


-----Original Message-----
From: Trevor Donaldson [mailto:tmdonalds@gmail.com] 
Sent: Thursday, January 15, 2015 8:21 PM
To: users@jena.apache.org
Subject: Third Party Libraries in Fuseki 2

Where should I place third party libraries in Fuseki2? I am using fuseki.war. I would like to use a custom shiro realm. I am not sure where to place the custom.jar.

Thanks