Forums / Extensions / eZ Find / eZ Publish 4 alpha2: classes are not available

eZ Publish 4 alpha2: classes are not available

Author Message

Piotrek Karaś

Wednesday 31 October 2007 2:04:46 am

The installation went smooth and I'm pretty sure that Solr is wokring fine (I can access the server console on port :8983). The extension is declared, the java process has the ability to write log files, etc..

However, the extension fails whenever I call it, both by eZ Publish in order to search the content or via CLI interface to reindex it.

For example:
<i>/ez4ezfind/index.php/pol/content/search?SearchText=ship</i>

Fatal error: Class 'eZSolrBase' not found in /var/www/ez4ezfind/extension/ezfind/search/plugins/ezsolr/ezsolr.php on line 43
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.

Similar thing happens with CLI, but different class is missing, I guess it is eZSolr.

Seems to me like an autoload problem and not real eZFind issue. Any suggestions? Thanks.

My installation details:
- Apache/2.2.3 (Ubuntu) PHP/5.2.1
- eZ Publish 4 alpha2
- eZ Find 1.0.0beta1

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kåre Køhler Høvik

Wednesday 31 October 2007 2:14:04 am

Hi

Have you run the script <i>bin/php/ezpgenerateautoloads.php</i> after you installed the extension ?

This might be missing from the eZ Find for eZP4 installation instructions. I'll check and update the installation doc soon.

Kåre Høvik

Piotrek Karaś

Wednesday 31 October 2007 2:20:46 am

<i>I'm afraid I'm missing that file in that location...</i>
Sorry, I misunderstood you, the file's there ;) Trying further
(...)

Unfortunately, got lost again:
<i>CLI: php bin/php/ezpgenerateautoloads.php</i>

Warning: require(Base/src/base.php): failed to open stream: No such file or directory in /var/www/ez4ezfind/bin/php/ezpgenerateautoloads.php on line 17

Fatal error: require(): Failed opening required 'Base/src/base.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/ez4ezfind/bin/php/ezpgenerateautoloads.php on line 17

The missing <b>base</b> reminded me of eZ Components base, so I tried to follow that path by manually installing EZC and setting additional include path in the ezpgen... file:

$myEZCPath = '/var/www/ezc';
set_include_path(get_include_path() . PATH_SEPARATOR . $myEZCPath);

But that's probably not it...:

Warning: require_once(Structures/Graph.php): failed to open stream: No such file or directory in /var/www/ez4ezfind/bin/php/ezpgenerateautoloads.php on line 24

Fatal error: require_once(): Failed opening required 'Structures/Graph.php' (include_path='.:/usr/share/php:/usr/share/pear:/var/www/ezc') in /var/www/ez4ezfind/bin/php/ezpgenerateautoloads.php on line 24

I must be missing something important here ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kåre Køhler Høvik

Wednesday 31 October 2007 3:08:37 am

bin/php/ezpgenerateautoloads.php requires PHP-pear to be installed. We're wroking on removing this dependency for future eZP4 releases.

Kåre Høvik

Piotrek Karaś

Wednesday 31 October 2007 3:52:43 am

That would be great. Meanwhile, I got something running, but not all the way ;(
<i>sudo php extension/ezfind/bin/php/updatesearchindexsolr.php</i>

Starting object re-indexing
Number of objects to index: 57 
............
Fatal error: Call to a member function pathWithNames() on a non-object in /var/www/ez4ezfind/kernel/classes/ezcontentobjecttreenode.php on line 3761

Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.

(...)
DEBUG:
Error: ()
eZContentObjectTreeNode::pathWithNames() failed to fetch path of node 145, falling back to generated url entries. Run updateniceurls.php to fix the problem.

I did successfully run the updateniceurls.php script, but nothing changed after that.
Any ideas? Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kåre Køhler Høvik

Wednesday 31 October 2007 5:14:20 am

I've reported the issue, and hopefully it'll be resolved soon. http://issues.ez.no/11793

Kåre Høvik

Piotrek Karaś

Wednesday 31 October 2007 5:20:53 am

Too bad ;(
Time to switch to 3.10.x testing ;)

(...)
I still decided to experiment a bit. The comment under the problematic code seemed like a hint:

// $paren = $this->fetchParent();
// $path = $paren->pathWithNames();
// Return a perma-link when the path lookup failed, this link will always work

If the system path should do, as suggested, I decided to comment two other codelines. The result is that it works, or at least goes through reindexing process without any notices or errors. Can't be sure of the results at this point, because the search returns nothing ;)
(...)

Thanks and greetings,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kåre Køhler Høvik

Wednesday 31 October 2007 8:24:21 am

No result is no good ...

What's the output from the java application when you perform a search ?

Kåre Høvik

Piotrek Karaś

Wednesday 31 October 2007 6:11:53 pm

I got it running all right. The key turned out to be an installation of eZComponents via Pear installer. When this was done, autoload generation script went smooth and so did the scripts for Solr. If I encounter any further problems, I'll let you know.

For the time being, both eZ Publish and Solr console do return search results. I'm completely new to Lucene syntax, so have to read and try a bit. Should I expect the possibility of using the complete syntax (http://lucene.apache.org/java/docs/queryparsersyntax.html) with eZ? Especially the wildcards, fuzzy searches, etc.?

Thanks for your help,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kåre Køhler Høvik

Thursday 01 November 2007 1:11:43 am

Hi

We're using Solr and the DisMax request handler in eZ Find. This currently limits some of the functionality available, but you can find more information about the DisMax handler here : http://wiki.apache.org/solr/DisMaxRequestHandler?highlight=%28CategorySolrRequestHandler%29%7C%28%28CategorySolrRequestHandler%29%29

Kåre Høvik