Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003384 [Quercus] major always 03-10-09 22:03 03-22-12 13:43
Reporter al View Status public  
Assigned To
Priority normal Resolution open  
Status assigned   Product Version 4.0.11
Summary 0003384: Quercus + Zend Framework => controller resolution broken
Description The simple Zend controller tutorial (ZF 1.7) does not work with Quercus. The controller does not get called and a blank page is being rendered (no error message). Sounds like a reflection issue.

http://framework.zend.com/manual/en/zend.controller.html#zend.controller.quickstart.go [^]

I believe this is related to this issue (although claimed to be fixed in 4.0)
http://bugs.caucho.com/view.php?id=3038 [^]
Additional Information
Attached Files  quercus.zip [^] (23,153 bytes) 09-29-10 01:33

- Relationships

- Notes
(0004029)
tjdett
05-20-09 15:11

I have the same problem with the Zend Framework 1.8.1 using Resin 4.0.0. The page is blank, but the dispatch() does finish (without calling a controller or action). The returned Zend_Controller_Response_Http shows two exceptions:

Zend_Controller_Response_Http Object
(
    [_body:protected] => Array
                (
                )

    [_exceptions:protected] => Array
                (
                    [0] => Exception Object
            (
                [_quercusException] => resource(com.caucho.quercus.QuercusException)
                [code] => 0
                [file] => IteratorDelegate.java
                [line] => 92
                [message] => 'com.caucho.quercus.lib.spl.ArrayObject@fa3703' is an invalid iterator
                [trace] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [file] => C:\Users\Tim\Documents\NetBeansProjects\quercus-zf-test\build\web\public\index.php
                                                    [line] => 28
                                                    [function] => dispatch
                                                    [class] => Zend_Controller_Front
                                                    [type] => ->
                                                    [args] => Array
                                                        (
                                                        )

                                                )

                                        )

            )

                    [1] => Exception Object
            (
                [_quercusException] => resource(com.caucho.quercus.QuercusException)
                [code] => 0
                [file] => AbstractFunction.java
                [line] => 345
                [message] =>
                [trace] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [file] => C:\Users\Tim\Documents\NetBeansProjects\quercus-zf-test\build\web\library\Zend\Controller\Front.php
                                                    [line] => 947
                                                    [function] => postDispatch
                                                    [class] => Zend_Controller_Plugin_Broker
                                                    [type] => ->
                                                    [args] => Array
                                                        (
                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [file] => C:\Users\Tim\Documents\NetBeansProjects\quercus-zf-test\build\web\public\index.php
                                                    [line] => 28
                                                    [function] => dispatch
                                                    [class] => Zend_Controller_Front
                                                    [type] => ->
                                                    [args] => Array
                                                        (
                                                        )

                                                )

                                        )

            )

                )

    [_headers:protected] => Array
                (
                )

    [_headersRaw:protected] => Array
                (
                )

    [_httpResponseCode:protected] => 200
    [_isRedirect:protected] =>
    [_renderExceptions:protected] =>
    [headersSentThrowsException] => 1
)
 
(0004034)
al
05-26-09 23:14

This issue was reported more than 2 months ago and still not assigned to anyone. Zend is a major framework you can't ignore if you want to get traction from the php community...
 
(0004093)
iwiznia
07-08-09 09:02

I agree with tjdett. This is a very important framework, I'm using version 3.2 and was hoping that version 4 supported the Zend Framework.
I would give this a high priority.
 
(0004125)
kward
08-17-09 15:27

I was looking for resolution as well. Having this fixed could be HUGE for Quercus.
 
(0004249)
jbelich
09-19-09 11:24
edited on: 09-19-09 12:25

I'd like to bump this as well... ArrayObject is a very useful spl class, It gets used alot as an iterator for classes that use the IteratorAggregate interface.

I'm not nearly as familiar with java as I am with php internals, and it's probably not much worse than trivial to implement, but IteratorDelegate.java needs to account for the possibility it's passed an instance of IteratorAggregate as well. This is core php behavior.

For the rest of the interested, to solve the immediate issue just change (or overload) Zend_Controller_Action_HelperBroker_PriorityStack::getIterator() to return an ArrayIterator instead of ArrayObject

 
(0004250)
jbelich
09-19-09 11:58

Code to reproduce:

class Test implements IteratorAggregate
{

    public function getIterator()
    {
        return new ArrayObject(array('a'));
    }

}

$a = new Test;

foreach ($a as $b) {
    print_r($b);
}

Expected Result:
a

Actual result:
java.lang.IllegalStateException: 'com.caucho.quercus.lib.spl.ArrayObject@40e7e8eb' is an invalid iterator
 
(0004251)
mzach
09-23-09 07:31

Just had a quick look at the source, but I believe the error is to be found on line 91 in spl/IteratorDelegate.java:

if(! obj.isA("iterator"))

should imo be:

if(! obj.isA("Iterator"))

Maybe someone can test it?
Regards
 
(0004253)
nam
09-23-09 16:34

Thanks for the feedback. I'll personally take a look at the ArrayObject/Iterator issue.
 
(0004261)
everflux
10-12-09 08:40

Looks like this really fixes the issue, works for me. (compiled from svn trunk)
 
(0004321)
nam
12-01-09 18:18

We fixed several issues with ArrayObject and Iterator for 4.0.2, but there appears are still issues (jbelich's test case is still failing).
 
(0004322)
iwiznia
12-02-09 03:04

So, when is it going to be fixed?? It's been 9 months since this bug has been submitted...
 
(0004363)
tszming
12-21-09 22:34

Have tested resin-4.0.2, still the same problem.
 
(0004416)
ice-breaker
02-05-10 05:02

I have got the same problem, Zend Framework can not run due to this bug :(
 
(0004652)
thmarx
07-02-10 01:16

I also need to run the Zend-Framework on Quercus. Please fix this bug so we can use Quercus.
 
(0004763)
domdorn
09-28-10 10:20

Taking this over as former assignee isn't an employee anymore.

Anyone of you got new insights and/or testcases on this?
changing iterator -> Iterator didn't changed a thing (as stated before).
 
(0004765)
thmarx
09-29-10 01:34

I have upload a simple example. it isn't a testcase.
you have to put jars rom quercus into the WEB-INF/lib folder and the ZendFramework into the WEB-INF/backend/library folder.

hope this helps you.
 
(0004766)
domdorn
09-29-10 05:19

thmarx, could you please check the file and send it to dorn at caucho.com ?
When trying to extract the files in the zip, I get error messages.

I've got a fix for the testcase given by jbelich, but have to check with the framework itself if it is enough to get it running.
 
(0004780)
domdorn
10-06-10 14:15

new related issue 0004243 http://bugs.caucho.com/view.php?id=4243 [^]
 
(0004846)
timboco
11-16-10 08:59

I tried the latest Zend Framework v1.11.0 with quercus 4.0.13 in glassfish v3.0.1, and still no luck: see related bug http://bugs.caucho.com/view.php?id=4295. [^]
 

- Issue History
Date Modified Username Field Change
03-10-09 22:03 al New Issue
05-20-09 15:11 tjdett Note Added: 0004029
05-20-09 15:32 tjdett Issue Monitored: tjdett
05-26-09 23:14 al Note Added: 0004034
07-08-09 09:00 iwiznia Issue Monitored: iwiznia
07-08-09 09:02 iwiznia Note Added: 0004093
08-17-09 15:27 kward Note Added: 0004125
09-19-09 11:24 jbelich Note Added: 0004249
09-19-09 11:58 jbelich Note Added: 0004250
09-19-09 12:13 jbelich Note Edited: 0004249
09-19-09 12:15 jbelich Issue Monitored: jbelich
09-19-09 12:21 jbelich Note Edited: 0004249
09-19-09 12:25 jbelich Note Edited: 0004249
09-23-09 07:31 mzach Note Added: 0004251
09-23-09 16:34 nam Note Added: 0004253
09-24-09 10:29 mzach Issue Monitored: mzach
10-12-09 08:40 everflux Note Added: 0004261
11-27-09 08:59 mdzigurski Issue Monitored: mdzigurski
12-01-09 17:50 nam Status new => assigned
12-01-09 17:50 nam Assigned To  => nam
12-01-09 18:18 nam Note Added: 0004321
12-02-09 03:04 iwiznia Note Added: 0004322
12-21-09 22:33 tszming Issue Monitored: tszming
12-21-09 22:34 tszming Note Added: 0004363
02-05-10 05:01 ice-breaker Issue Monitored: ice-breaker
02-05-10 05:02 ice-breaker Note Added: 0004416
02-08-10 10:22 fvlankvelt Issue Monitored: fvlankvelt
02-17-10 06:38 ulseth Issue Monitored: ulseth
07-02-10 01:16 thmarx Note Added: 0004652
07-02-10 01:16 thmarx Issue Monitored: thmarx
09-28-10 10:20 domdorn Note Added: 0004763
09-28-10 10:20 domdorn version 4.0.0 => 4.0.10
09-28-10 10:20 domdorn Description Updated
09-28-10 10:21 domdorn Assigned To nam => domdorn
09-29-10 01:33 thmarx File Added: quercus.zip
09-29-10 01:34 thmarx Note Added: 0004765
09-29-10 05:19 domdorn Note Added: 0004766
10-06-10 14:15 domdorn Note Added: 0004780
10-06-10 14:15 domdorn version 4.0.10 => 4.0.11
11-16-10 08:59 timboco Note Added: 0004846
11-16-10 09:00 timboco Issue Monitored: timboco
03-22-12 13:43 domdorn Assigned To domdorn =>
03-22-12 15:22 tjdett Issue End Monitor: tjdett


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
99 total queries executed.
60 unique queries executed.
Powered by Mantis Bugtracker