You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Neda Alipanah <ne...@gmail.com> on 2017/11/23 01:25:47 UTC

Jena Initializer Error

Hello there,
I have a quick question. I am loading a 25 Meg Owl file to the memory using
the following commands. My code is working fine through the IDE(IntelliJ),
but when I create a runnable Jar, it does not find the file. I already put
the owl file directory in the class path but I get Exception In Initializer
error.

// Create an empty model
model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);

// Use the FileManager to find the input file
InputStream in = FileManager.get().open(inPath);

[image: Inline image 1]

Really appreciate if you can provide a solution for the problem.


Best Regards,

Neda

Re: Jena Initializer Error

Posted by Andy Seaborne <an...@apache.org>.
Neda - I can't see the image in the email.  The list restricts 
attachments.  Please include the stacktrace as text.

As Claude says, the runtime jar is probably missing some jars.  If it is 
a combined runtime jar, also see

https://jena.apache.org/documentation/notes/jena-repack.html

     Andy

On 23/11/17 07:47, Claude Warren wrote:
> Neda,
> 
> What is the call stack from the exception?  it would be nice to know what
> it says as that would point to the location of the error.
> 
> I suspect that you are not including all the necessary Jena libraries, but
> can not be certain.
> 
> Claude
> 
> On Thu, Nov 23, 2017 at 1:25 AM, Neda Alipanah <ne...@gmail.com>
> wrote:
> 
>> Hello there,
>> I have a quick question. I am loading a 25 Meg Owl file to the memory
>> using the following commands. My code is working fine through the
>> IDE(IntelliJ), but when I create a runnable Jar, it does not find the file.
>> I already put the owl file directory in the class path but I get Exception
>> In Initializer error.
>>
>> // Create an empty model
>> model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
>>
>> // Use the FileManager to find the input file
>> InputStream in = FileManager.get().open(inPath);
>>
>> [image: Inline image 1]
>>
>> Really appreciate if you can provide a solution for the problem.
>>
>>
>> Best Regards,
>>
>> Neda
>>
>>
> 
> 

Re: Jena Initializer Error

Posted by Claude Warren <cl...@xenei.com>.
Neda,

What is the call stack from the exception?  it would be nice to know what
it says as that would point to the location of the error.

I suspect that you are not including all the necessary Jena libraries, but
can not be certain.

Claude

On Thu, Nov 23, 2017 at 1:25 AM, Neda Alipanah <ne...@gmail.com>
wrote:

> Hello there,
> I have a quick question. I am loading a 25 Meg Owl file to the memory
> using the following commands. My code is working fine through the
> IDE(IntelliJ), but when I create a runnable Jar, it does not find the file.
> I already put the owl file directory in the class path but I get Exception
> In Initializer error.
>
> // Create an empty model
> model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
>
> // Use the FileManager to find the input file
> InputStream in = FileManager.get().open(inPath);
>
> [image: Inline image 1]
>
> Really appreciate if you can provide a solution for the problem.
>
>
> Best Regards,
>
> Neda
>
>


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