Friday, April 28, 2017

Status Log: Still Unable Populate MySQL tables with Lucene Index Script

I'm sharing what I have so far for the createLuceneIndex.sh file. Maybe I'll figure it out eventually.  The error log is linked to at the end.

I created a shell script to create the LuceneIndex at
https://gist.github.com/bshambaugh/42c1accf6d2e5dc607a8d46047cc98be .

I manually created databases ontologyindexrelation and metadataindex.

The script created the following tables in the database metadataindex:

indexbrentwebdirectclasses
indexbrentwebdirectsubclasses
indexbrentwebdirectsuperclasses
indexbrentwebequivalent
indexbrentwebsubclasses
indexbrentwebsuperclasses

The database tables remain empty.
Expect the database tables to contain the columns: id, ontologyId, entityURI, classURI, and classLabel

The database ontologyindexrelation contains no tables.
Expect the table ontologyindextable with the columns: id, ontologyId, and indexManagerId

I manually created ./poweraqua/indexListInformation/indexbrentweb:

with service_properties.xml

<?xml version="1.0" encoding="UTF-8"?>
<CONFIGURATION>
<PLUGIN_MANAGER>/var/lib/tomcat7/webapps/poweraqua/WEB-INF/aquaplugins</PLUGIN_MANAGER>
<REPOSITORY>
    <SERVER>127.0.0.1:8080/openrdf-sesame</SERVER>
    <PROXY></PROXY>
    <PORT></PORT>
    <LOGIN></LOGIN>
    <PASSWORD></PASSWORD>
    <PLUGIN_TYPE>sesame2</PLUGIN_TYPE>
    <REPOSITORY_NAME>isp</REPOSITORY_NAME>
    <TYPE>OWL</TYPE>
</REPOSITORY>
</CONFIGURATION>

and index_properties.xml

<?xml version="1.0" encoding="UTF-8"?>
<CONFIGURATION>
<INDEX>
<INDEX_DIRECTORY>indexbrentweb/index_dir/</INDEX_DIRECTORY>
<SPELL_INDEX_DIRECTORY>indexbrentweb/spell_index_dir/</SPELL_INDEX_DIRECTORY>
<METADATA_INDEX_DB>jdbc:mysql://127.0.0.1:3306/metadataindex</METADATA_INDEX_DB>
<METADATA_INDEX_DB_LOGIN>root</METADATA_INDEX_DB_LOGIN>
<METADATA_INDEX_DB_PASSWORD>your_password</METADATA_INDEX_DB_PASSWORD>
<METADATA_INDEX_TABLE>indexbrentweb</METADATA_INDEX_TABLE>
</INDEX>
</CONFIGURATION>

I copied the index_properties.xml and service_properties.xml to the global files in

./poweraqua/

My multi_index_properties.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<CONFIGURATION>
        <WATSON>false</WATSON>
        <POWERMAP>true</POWERMAP>
        <VIRTUOSO>false</VIRTUOSO>
        <REMOTESPARQLVIRTUOSO>false</REMOTESPARQLVIRTUOSO>
<ONTOLOGY_INDEX_DB>jdbc:mysql://127.0.0.1:3306/ontologyindexrelation</ONTOLOGY_INDEX_DB>
<ONTOLOGY_INDEX_DB_LOGIN>root</ONTOLOGY_INDEX_DB_LOGIN>
<ONTOLOGY_INDEX_DB_PASSWORD>your_password</ONTOLOGY_INDEX_DB_PASSWORD>
<INDEX_GLOBAL_PATH>./LuceneIndexes/</INDEX_GLOBAL_PATH>
<INDEX_INFO_FOLDER>./indexListInformation/indexbrentweb/</INDEX_INFO_FOLDER>
</CONFIGURATION>

./LuceneIndexes now contains:

.
└── indexbrentweb
    ├── index_dir
    │   ├── _instances
    │   │   ├── segments_c
    │   │   └── segments.gen
    │   ├── segments_c
    │   └── segments.gen
    └── spell_index_dir
        ├── _instances
        │   ├── segments_1
        │   └── segments.gen
        ├── segments_1
        └── segments.gen

My error log looks like:

https://gist.github.com/bshambaugh/c06f3b2b784f47e5a6e123df2ab42fed
Conclusions:

At this point, I think that commons-http-client-3.1 might be out of date.

I'm ignoring SLF4J errors for now. I ran createSesame2Repository.sh and it successfully created a full repository in sesame (I had to create the repository isp though and change the below part of Sesame2URLDatabaseTransformer.java and recompile to Sesame2URLDatabaseTransformer.class via Netbeans

 public static void main(String[] args)
  {
    String sesameServerPath = "http://kmi-web03:8080/openrdf-sesame/";
    String repositoryName = "evoont-seals_10000K_final";

    String path = "http://kmi.open.ac.uk/technologies/poweraqua/evoont-seals_10000K_final.owl";
    String baseURI = "";
    createDBFromURI(sesameServerPath, repositoryName, path, "RDF", baseURI);
  }

)
This looks weird: Getting Services from 127.0.0.1:8080/openrdf-sesame isp
I changed all localhost instances in the config files to 127.0.0.1 .

Sidenote: I have no idea why this is hardcoded:
"
public static void main(String[] args)
{
RepositoryVirtuoso repository = new RepositoryVirtuoso();
repository.setRepositoryName("jdbc:virtuoso://kmi-dev02.open.ac.uk:8890#http://geography.org");
System.out.print(repository.getGraphIRI());
}"

https://github.com/bshambaugh/PowerAqua-decompiled/blob/master/lib/poweraqua/serviceConfig/RepositoryVirtuoso.java
I did include the downloaded class file in a jar file in the CLASSPATH of createLuceneIndex.sh

/var/lib/tomcat7/webapps/poweraqua/WEB-INF/lib/serviceConfig.jar

No comments:

Post a Comment