Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not setup RDF store ARC2 RDF in RDFIOAdmin #56

Open
irtos opened this issue Sep 8, 2018 · 4 comments
Open

Can not setup RDF store ARC2 RDF in RDFIOAdmin #56

irtos opened this issue Sep 8, 2018 · 4 comments

Comments

@irtos
Copy link

irtos commented Sep 8, 2018

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

@samuell
Copy link
Member

samuell commented Sep 8, 2018

Hi @irtos ,

Does the RDF import and/or SPARQL endpoint work?

@irtos
Copy link
Author

irtos commented Sep 9, 2018

yes import and export is seems to work. Can not test SPARQL functionality because It is a new theme to me.

@irtos
Copy link
Author

irtos commented Sep 9, 2018

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();

@irtos
Copy link
Author

irtos commented Sep 9, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants