RDFIO
RDFIO copied to clipboard
Can not setup RDF store ARC2 RDF in RDFIOAdmin
Then pushing button "setup triple store" on page RDFIOAdmin the field above became green but then reload page the field also stayed "Store is not set up" state.
Then trying to find some other method to setup triplestore. I have found extensions/Rdfio/maintenance/setupStore.php script
but here is the same bad behaviour ((
513ns /var/www/513ns/htdocs/mediawiki # php extensions/Rdfio/maintenance/setupStore.php ARC2 Store is NOT setup, so setting up now ... Store successfully set up! 513ns /var/www/513ns/htdocs/mediawiki # php extensions/Rdfio/maintenance/setupStore.php ARC2 Store is NOT setup, so setting up now ... Store successfully set up! 513ns /var/www/513ns/htdocs/mediawiki # php extensions/Rdfio/maintenance/setupStore.php ARC2 Store is NOT setup, so setting up now ... Store successfully set up! 513ns /var/www/513ns/htdocs/mediawiki # php extensions/Rdfio/maintenance/setupStore.php ARC2 Store is NOT setup, so setting up now ... Store successfully set up! 513ns /var/www/513ns/htdocs/mediawiki #
Also I changed mariadb-10.1.34 to mysql-5.6.40 but nothing changed Also some version info :
- MediaWiki | 1.30.0
- PHP | 7.1.18 (cgi-fcgi)
- MySQL | 5.6.40-log
- ICU | 60.2
- Semantic MediaWiki | 2.5.7
- RDFIO | v3.0.2 | GPL-2.0
- semsol/arc2 | 2.4.0
Do not know is it ARC2 bug or RDFIO bug mysql> show tables; +-----------------------------+ | Tables_in_wikdb | +-----------------------------+ | xxxxarc2store_g2t | | xxxxarc2store_id2val | | xxxxarc2store_o2val | | xxxxarc2store_s2val | | xxxxarc2store_setting | | xxxxarc2store_triple
Hi @irtos ,
Does the RDF import and/or SPARQL endpoint work?
yes import and export is seems to work. Can not test SPARQL functionality because It is a new theme to me.
The code looks very robust.
`` global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBprefix; $arc2StoreConfig = array( 'db_host' => $wgDBserver, 'db_name' => $wgDBname, 'db_user' => $wgDBuser, 'db_pwd' => $wgDBpassword, 'store_name' => $wgDBprefix . 'arc2store', // Determines table prefix ); $store = ARC2::getStore( $arc2StoreConfig );
if ( $store->isSetUp() ) {
$this->output( "Store is already set up, so not doing anything.\n" );
return;
}
$this->output( 'ARC2 Store is NOT setup, so setting up now ... ' );
$store->setUp();
if ( $store->getErrors() ) {
$this->error( "Setup failed with the following errors reported by the ARC2 library:\n" . implode( "\n", $store->getErrors() ) . "\n" );
return;
}
if ( $store->isSetUp() ) {
$this->output( "Store successfully set up!\n" );
}
try to experiment ---> doubling the code gives right result to the second part of code
ARC2 Store is NOT setup, so setting up now ... Store successfully set up! Store is already set up, so not doing anything.
` $store = ARC2::getStore( $arc2StoreConfig ); $this->output( "$wgDBserver $wgDBname $wgDBuser $wgDBpassword $wgDBprefix . 'arc2store'\n" );
if ( $store->isSetUp() ) {
$this->output( "Store is already set up, so not doing anything.\n" );
return;
}
$this->output( 'ARC2 Store is NOT setup, so setting up now ... ' );
$store->setUp();
if ( $store->getErrors() ) {
$this->error( "Setup failed with the following errors reported by the ARC2 library:\n" . implode( "\n", $store->getErrors() ) . "\n" );
return;
}
if ( $store->isSetUp() ) {
$this->output( "Store successfully set up!\n" );
}
$this->output( "$wgDBserver $wgDBname $wgDBuser $wgDBpassword $wgDBprefix . 'arc2store'\n" );
if ( $store->isSetUp() ) {
$this->output( "Store is already set up, so not doing anything.\n" );
return;
}
$this->output( 'ARC2 Store is NOT setup, so setting up now ... ' );
$store->setUp();
if ( $store->getErrors() ) {
$this->error( "Setup failed with the following errors reported by the ARC2 library:\n" . implode( "\n", $store->getErrors() ) . "\n" );
return;
}
if ( $store->isSetUp() ) {
$this->output( "Store successfully set up!\n" );
}
`
May be there is some more init code to find out that the $store->setUp();
I add
$store->createDBCon(); after
$store = ARC2::getStore( $arc2StoreConfig );
then iternal ARC@:: isSetup() returns true
So I added $store->createDBCon(); after every line of ARC2::getStore( $arc2StoreConfig ); in project