Wednesday, April 26, 2017

Create a createLuceneIndex.sh file that works: [pt2}:

Deleting service_properties.xml and index_properties.xml gives:


Imposible to read the configuration file /var/lib/tomcat7/webapps/poweraqua/service_properties.xml (No such file or directory)
java.io.FileNotFoundException: /var/lib/tomcat7/webapps/poweraqua/service_properties.xml (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:73)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:52)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:56)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)
Exception in thread "main" java.lang.NullPointerException
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:82)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:52)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:56)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)

Creating service_properties.xml as an empty file gives:

Creating standard index for entities (Classes, properties, instances, literals): type-URI-labe
Number of indexes is 1
creating new Conexion for the database index ontology jdbc:mysql://localhost:3306/ontologyindexrelation ************
[Fatal Error] :-1:-1: Premature end of file.
Imposible to read the configuration file Premature end of file.
org.xml.sax.SAXParseException; Premature end of file.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:73)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:52)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:56)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)
Exception in thread "main" java.lang.NullPointerException
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:82)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:52)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:56)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)


Copying service_properties.xml to the global file gives:

<?xml version="1.0" encoding="UTF-8"?>
<CONFIGURATION>
<PLUGIN_MANAGER>/var/lib/tomcat7/webapps/poweraqua/WEB-INF/aquaplugins</PLUGIN_MANAGER>
<REPOSITORY>
    <SERVER>localhost: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>

Creating standard index for entities (Classes, properties, instances, literals): type-URI-label
Number of indexes is 1
creating new Conexion for the database index ontology jdbc:mysql://localhost:3306/ontologyindexrelation ************
Number of repositories in xml file is 1
java.io.FileNotFoundException: /var/lib/tomcat7/webapps/poweraqua/index_properties.xml (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfiguration(IndexServiceConfiguration.java:66)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfigurationFile(IndexServiceConfiguration.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:57)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)
Exception in thread "main" java.lang.NullPointerException
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfiguration(IndexServiceConfiguration.java:74)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfigurationFile(IndexServiceConfiguration.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:57)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)

Creating an empty index_properties.xml file:

Creating standard index for entities (Classes, properties, instances, literals): type-URI-label
Number of indexes is 1
creating new Conexion for the database index ontology jdbc:mysql://localhost:3306/ontologyindexrelation ************
Number of repositories in xml file is 1
[Fatal Error] :-1:-1: Premature end of file.
org.xml.sax.SAXParseException; Premature end of file.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfiguration(IndexServiceConfiguration.java:66)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfigurationFile(IndexServiceConfiguration.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:57)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)
Exception in thread "main" java.lang.NullPointerException
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfiguration(IndexServiceConfiguration.java:74)
    at poweraqua.indexingService.manager.IndexServiceConfiguration.readConfigurationFile(IndexServiceConfiguration.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.<init>(IndexingCreator.java:57)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:650)

Copying the index_properties.xml file from ./indexListInformation/indexbrentweb/

<?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://localhost:3306/metadataindex</METADATA_INDEX_DB><METADATA_INDEX_DB_LOGIN>root</METADATA_INDEX_DB_LOGIN><METADATA_INDEX_DB_PASSWORD>password</METADATA_INDEX_DB_PASSWORD><METADATA_INDEX_TABLE>indexbrentweb</METADATA_INDEX_TABLE></INDEX></CONFIGURATION>

Creating standard index for entities (Classes, properties, instances, literals): type-URI-label
Number of indexes is 1
creating new Conexion for the database index ontology jdbc:mysql://localhost:3306/ontologyindexrelation ************
Number of repositories in xml file is 1
Number of indexes is 1
Imposible to read the configuration file /var/lib/tomcat7/webapps/poweraqua/indexListInformation/indexbrentwebservice_properties.xml (No such file or directory)
java.io.FileNotFoundException: /var/lib/tomcat7/webapps/poweraqua/indexListInformation/indexbrentwebservice_properties.xml (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:73)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:56)
    at poweraqua.serviceConfig.MultiOntologyManager.<init>(MultiOntologyManager.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:73)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:549)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:556)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:652)
java.lang.NullPointerException
    at poweraqua.serviceConfig.ServiceConfiguration.readConfiguration(ServiceConfiguration.java:82)
    at poweraqua.serviceConfig.ServiceConfiguration.readConfigurationFile(ServiceConfiguration.java:56)
    at poweraqua.serviceConfig.MultiOntologyManager.<init>(MultiOntologyManager.java:51)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:73)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:549)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:556)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:652)

Modify multi_index_properties.xml:

Go from:
<INDEX_INFO_FOLDER>./indexListInformation/indexbrentweb</INDEX_INFO_FOLDER>

to:
<INDEX_INFO_FOLDER>./indexListInformation/indexbrentweb/</INDEX_INFO_FOLDER>

gives:

22:23:29.823 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating system name: Linux
22:23:29.824 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating system architecture: amd64
22:23:29.824 [main] DEBUG o.a.commons.httpclient.HttpClient - Operating system version: 3.13.0-44-generic
22:23:30.191 [main] DEBUG o.a.commons.httpclient.HttpClient - SUN 1.8: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS & DKS keystores; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
22:23:30.192 [main] DEBUG o.a.commons.httpclient.HttpClient - SunRsaSign 1.8: Sun RSA signature provider
22:23:30.192 [main] DEBUG o.a.commons.httpclient.HttpClient - SunEC 1.8: Sun Elliptic Curve provider (EC, ECDSA, ECDH)
22:23:30.192 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJSSE 1.8: Sun JSSE provider(PKCS12, SunX509/PKIX key/trust factories, SSLv3/TLSv1/TLSv1.1/TLSv1.2)
22:23:30.192 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJCE 1.8: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
22:23:30.192 [main] DEBUG o.a.commons.httpclient.HttpClient - SunJGSS 1.8: Sun (Kerberos v5, SPNEGO)
22:23:30.193 [main] DEBUG o.a.commons.httpclient.HttpClient - SunSASL 1.8: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5, NTLM; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5, NTLM)
22:23:30.193 [main] DEBUG o.a.commons.httpclient.HttpClient - XMLDSig 1.8: XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory; C14N 1.0, C14N 1.1, Exclusive C14N, Base64, Enveloped, XPath, XPath2, XSLT TransformServices)
22:23:30.193 [main] DEBUG o.a.commons.httpclient.HttpClient - SunPCSC 1.8: Sun PC/SC provider
Number of indexes is 1
********Indexing Semantic Entities in indexbrentweb/index_dir/
Opening Index : indexbrentweb/index_dir/
This shoul dnot be here, it is affecting the creation of indexes. And it is not Watson compatible
java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/var/lib/tomcat7/webapps/poweraqua/LuceneIndexes/indexbrentweb/index_dir/_instances: files:
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:604)
    at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:115)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:206)
    at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:47)
    at poweraqua.indexingService.manager.IndexManagerLucene.<init>(IndexManagerLucene.java:104)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:99)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:81)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:549)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:556)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:652)
creating new Conexion for the metadata jdbc:mysql://localhost:3306/metadataindex ************
Imposible to drop table
metadata tables created ..
Imposible to drop table
metadata tables created ..
Imposible to drop table
metadata tables created ..
Imposible to drop table
metadata tables created ..
Imposible to drop table
metadata tables created ..
Imposible to drop table
metadata tables created ..
Indexing osPlugin number 1 isp : !!!!!!!!!!!!!!!!
Reading all properties
Fail to execute:  select p,o,r,l,ol,rl from {p} rdf:type {X}, [{p} rdfs:domain {o}, [{o} rdfs:label {ol}]], [{p} rdfs:range {r}, [{r} rdfs:label {rl}]], [{p} rdfs:label {l}] where  X = <http://www.w3.org/2002/07/owl#ObjectProperty> or X = <http://www.w3.org/2002/07/owl#DataProperty> or X = <http://www.w3.org/2002/07/owl#DatatypeProperty> or X = <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> limit 10000 offset 0
java.lang.IllegalStateException: unsupported protocol: 'localhost'
    at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149)
    at org.apache.commons.httpclient.protocol.Protocol.getProtocol(Protocol.java:117)
    at org.apache.commons.httpclient.HttpHost.<init>(HttpHost.java:107)
    at org.apache.commons.httpclient.HttpMethodBase.setURI(HttpMethodBase.java:280)
    at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
    at org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(ExpectContinueMethod.java:93)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(EntityEnclosingMethod.java:119)
    at org.apache.commons.httpclient.methods.PostMethod.<init>(PostMethod.java:106)
    at org.openrdf.http.client.HTTPClient.getQueryMethod(HTTPClient.java:464)
    at org.openrdf.http.client.HTTPClient.sendTupleQuery(HTTPClient.java:407)
    at org.openrdf.http.client.HTTPClient.sendTupleQuery(HTTPClient.java:393)
    at org.openrdf.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:41)
    at Sesame2Plugin.Sesame2Plugin.execute(Sesame2Plugin.java:2597)
    at Sesame2Plugin.Sesame2Plugin.getAllPropertiesPeriodically(Sesame2Plugin.java:350)
    at poweraqua.indexingService.creator.IndexingCreator.addInformationToIndexPeriodically(IndexingCreator.java:336)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:104)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:81)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:549)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:556)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:652)
Imposible to add the information to the index *********************************
java.lang.NullPointerException
    at Sesame2Plugin.Sesame2Plugin.getAllPropertiesPeriodically(Sesame2Plugin.java:367)
    at poweraqua.indexingService.creator.IndexingCreator.addInformationToIndexPeriodically(IndexingCreator.java:336)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:104)
    at poweraqua.indexingService.creator.IndexingCreator.createIndex(IndexingCreator.java:81)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:549)
    at poweraqua.indexingService.creator.IndexingCreator.createMultipleIndexes(IndexingCreator.java:556)
    at poweraqua.indexingService.creator.IndexingCreator.main(IndexingCreator.java:652)

No comments:

Post a Comment