EPrints Technical Mailing List Archive
Message: #00918
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Configuration may be wrong
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Configuration may be wrong
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- Date: Mon, 30 Jul 2012 11:41:29 +0100
On 30/07/12 11:35, Robert Berry wrote:
Great! Yes it'd be nice if you could tell us if you spot any errors related to this.Hi Seb, Thanks, that has fixed it! I will keep an eye on this and report back any errors that occur given the change.
This modification could possibly break repositories using MySQL, however, which does treat '' and NULL as different.
You're right - we will probably fix this in the core as:push @sql_and, $db->quote_identifier( $table, $col_name ).$db->sql_NotNull();
Then in Database.pm: sub sql_NotNull { return " != '' " } And in Database/Oracle.pm: sub sql_NotNull { return " IS NOT NULL " } Feel free to test the above patch. Seb.
Best wishes, Rob Sebastien Francois<sf2@ecs.soton.ac.uk> writes:Hi Rob, Have a look into : perl_lib/EPrints/Search/Condition/IsNotNull.pm, and search for: push @sql_and, $db->quote_identifier( $table, $col_name )." != ''"; Perhaps you can try to replace " != ''" with " IS NOT NULL " there (then restart Apache& test again)? I don't know if this could break other things in the system though. Seb. On 30/07/12 10:48, Robert Berry wrote:Hi Seb, The problem is with the Oracle layer. Immediately preceding the error message is the following SQL: Database execute debug: SELECT DISTINCT D0,D1 FROM (SELECT "DISTINCTBY_188303376"."DIVISIONS" D0,"DISTINCTBY_188303376"."EPRINTID" D1 FROM "EPRINT", "EPRINT_DIVISIONS" "DISTINCTBY_188303376", "EPRINT_DIVISIONS" "EPRINT_DIVISIONS" WHERE "EPRINT"."EPRINTID"="DISTINCTBY_188303376"."EPRINTID" AND "EPRINT"."EPRINTID"="EPRINT_DIVISIONS"."EPRINTID" AND "EPRINT"."METADATA_VISIBILITY" = 'show' AND "EPRINT"."EPRINT_STATUS" = 'archive' AND ( "EPRINT_DIVISIONS"."DIVISIONS" != '')) D Warning! No values were found for eprint.view.divisions [divisions] - configuration may be wrong This SQL will *never* return results. This is because Oracle treats the empty string '' as equivalent to NULL, so the statement "EPRINT_DIVISIONS.DIVISIONS != ''" breaks it. If you try running either of the following statements against the database, SELECT * FROM EPRINT_DIVISIONS WHERE divisions = NULL; SELECT * FROM EPRINT_DIVISIONS WHERE divisions = ''; or SELECT * FROM EPRINT_DIVISIONS WHERE divisions != NULL; SELECT * FROM EPRINT_DIVISIONS WHERE divisions != ''; An empty result set will be returned. This is very bizarre, I know, but the layer needs to use 'IS NULL' or 'IS NOT NULL' in those scenarios. To whom do I need to speak about fixing this? Best wishes, Rob Robert Berry<robert.berry@liverpool.ac.uk> writes:Hi Seb, Sorry, never mind that last e-mail. The data isn't wrong - everything looks right. Still unsure why the script won't generate the divisions view, however, as I definitely have prints with those divisions set. I will do some more digging - thanks for your advice. Best wishes, Rob Robert Berry<robert.berry@liverpool.ac.uk> writes:Hi Seb, I tried reindexing and it gave no errors. It's still not working, though. I looked at the SQL that was being used in the generate_views script, and it is using SUBJECT__ORDER_VALUES_EN as part of its look up for the subjects / divisions. The data in here is wrong though - it relates to the old set of subjects. Is there a way to repopulate this table? Do you know why it might not have been populated? Best wishes, Rob Sebastien Francois<sf2@ecs.soton.ac.uk> writes:Hi Rob, I think this means you've asked EPrints to generate a 'view' on 'subjects', however no EPrint objects / publications have got a subject set. In other words, your 'view' will be empty. I can't comment much about the Oracle error except that when you imported your subjects file, EPrints must have requested to re-index the "subjects" dataset and this is probably what this error relates to (but I cannot tell you any implications this will have...). You may try to: /opt/eprints3/bin/epadmin reindex<archive_id> subject and see what happens. Seb. On 27/07/12 16:57, Robert Berry wrote:Hello, What does it mean when I run the bin/generate_views script, and it gives an error like -- Wrote: /eprints/eprints3/archives/liverpool/html/en/view/year Warning! No values were found for eprint.view.subjects [subjects] - configuration may be wrong What configuration? Where? I've imported a new subjects file. It gave a bunch of Oracle errors- ORA-01722: invalid number (DBD ERROR: error possibly near<*> indicator at char 52 in 'INSERT INTO "EVENT_QUEUE" ("EVENTQUEUEID") VALUES (:<*>p1)') at /eprints/eprints3/bin/../perl_lib/EPrints/DataObj.pm line 294 -so I guess it could be related to that. The subjects are in the database, table, however, and look correct. Best wishes, Rob *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/
- References:
- [EP-tech] Configuration may be wrong
- From: Robert Berry <robert.berry@liverpool.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Robert Berry <robert.berry@liverpool.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Robert Berry <robert.berry@liverpool.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Robert Berry <robert.berry@liverpool.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Configuration may be wrong
- From: Robert Berry <robert.berry@liverpool.ac.uk>
- [EP-tech] Configuration may be wrong
- Prev by Date: [EP-tech] Re: Configuration may be wrong
- Next by Date: [EP-tech] Browser view for multilang fields
- Previous by thread: [EP-tech] Re: Configuration may be wrong
- Next by thread: [EP-tech] EPrints Indexer Service error
- Index(es):