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

Error when retrieve : RPC Fault faultString="Channel disconnected" #3

Closed
jforatier opened this issue Mar 8, 2011 · 7 comments
Closed

Comments

@jforatier
Copy link

Hi,
I Follow the "Getting Started" Section, and all work perfectly except one thing.
I can't retrieve item collection from my Database.

I've created items from Flex with :
private function creationComplete():void {
em = EntityManager.getInstance();

                            var configuration:Configuration = new Configuration();
                            configuration.gateway = "http://localhost/myflextrineproject/gateway.php";
                            em.setConfiguration(configuration);

                            // Create some doctors
                            var doctorRobert:Doctor = new Doctor();
                            doctorRobert.name = "Doctor Robert";
                            em.persist(doctorRobert);

                            var doctorBorquin:Doctor = new Doctor();
                            doctorBorquin.name = "Doctor Borquin";
                            em.persist(doctorBorquin);

                            em.flush();
                    }

but when i tried to use the Load Function :
private function creationComplete():void {
// Get the EntityManager and configure it to point at our server-side
em = EntityManager.getInstance();

                            var configuration:Configuration = new Configuration();
                            configuration.gateway = "http://localhost/myflextrineproject/gateway.php";
                            configuration.entityTimeToLive = -1;
                            em.setConfiguration(configuration);

                            dataGrid.dataProvider = em.getRepository(Doctor).entities;
                            em.getRepository(Doctor).loadAll();
                    }

I get this error : RemoteDelegate:[RPC Fault faultString="Channel disconnected" faultCode="Client.Error.DeliveryInDoubt" faultDetail="Channel disconnected before an acknowledgement was received"]

I don't think the problem is in my entities because the create function work ! What do you think about it ?

Thanks

@ccapndave
Copy link
Owner

The code looks fine - could you possible download a debugging proxy (e.g. http://www.charlesproxy.com/) and see exactly what is going on here, then paste more details about the error message into this issue.

@jforatier
Copy link
Author

Thanks, i'll try it !

@jforatier
Copy link
Author

This is my Apache Error Log, i try the sample in my Project LB_MyMoney.swf
i use a MVC framework (Mate) to structure my code. So i put vos in com.squd.lifeboard.money.model.vos and i want to put flextrine generated entities in com.squd.lifeboard.money.model.vos.orm

How do i structure php side [php/app/lb_money/...] and sould i edit [RemoteClass(alias="...")] properties in generated Flex files ?

Thanks for your help

[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP Warning: require(C:\ORM\flextrine-0.9\php\app\lb_money\entities\com\squd\lifeboard\money\model\vos\persist\vo\lb_bank.php) [function.require]: failed to open stream: No such file or directory in C:\ORM\flextrine-0.9\php\lib\Doctrine\Common\ClassLoader.php on line 148, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 1. {main}() C:\ORM\flextrine-0.9\php\web\gateway.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 2. Zend_Amf_Server->handle() C:\ORM\flextrine-0.9\php\web\gateway.php:27, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 3. Zend_Amf_Server->_handle() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:629, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 4. Zend_Amf_Server->_dispatch() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:553, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 5. Zend_Server_Reflection_Method->invokeArgs() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:359, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 6. Zend_Server_Reflection_Function_Abstract->__call() C:\ORM\flextrine-0.9\php\lib\Zend\Server\Reflection\Function\Abstract.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 7. call_user_func_array() C:\ORM\flextrine-0.9\php\lib\Zend\Server\Reflection\Function\Abstract.php:380, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 8. Flextrine\AbstractFlextrineService->loadAll() C:\ORM\flextrine-0.9\php\lib\Flextrine\AbstractFlextrineService.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 9. Doctrine\ORM\EntityManager->getRepository() C:\ORM\flextrine-0.9\php\lib\Flextrine\AbstractFlextrineService.php:105, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 10. Doctrine\ORM\EntityManager->getClassMetadata() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\EntityManager.php:563, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 11. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\EntityManager.php:247, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 12. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:169, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 13. Doctrine\ORM\Mapping\ClassMetadataFactory->getParentClasses() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:245, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 14. class_parents() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:222, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 15. Doctrine\Common\ClassLoader->loadClass() C:\ORM\flextrine-0.9\php\lib\Doctrine\Common\ClassLoader.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP Fatal error: require() [function.require]: Failed opening required 'C:\ORM\flextrine-0.9\php\app\lb_money\entities\com\squd\lifeboard\money\model\vos\persist\vo\lb_bank.php' (include_path='.;C:\php\pear;C:\ORM\flextrine-0.9\php/lib') in C:\ORM\flextrine-0.9\php\lib\Doctrine\Common\ClassLoader.php on line 148, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 1. {main}() C:\ORM\flextrine-0.9\php\web\gateway.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 2. Zend_Amf_Server->handle() C:\ORM\flextrine-0.9\php\web\gateway.php:27, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 3. Zend_Amf_Server->_handle() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:629, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 4. Zend_Amf_Server->_dispatch() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:553, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 5. Zend_Server_Reflection_Method->invokeArgs() C:\ORM\flextrine-0.9\php\lib\Zend\Amf\Server.php:359, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 6. Zend_Server_Reflection_Function_Abstract->__call() C:\ORM\flextrine-0.9\php\lib\Zend\Server\Reflection\Function\Abstract.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 7. call_user_func_array() C:\ORM\flextrine-0.9\php\lib\Zend\Server\Reflection\Function\Abstract.php:380, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 8. Flextrine\AbstractFlextrineService->loadAll() C:\ORM\flextrine-0.9\php\lib\Flextrine\AbstractFlextrineService.php:0, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 9. Doctrine\ORM\EntityManager->getRepository() C:\ORM\flextrine-0.9\php\lib\Flextrine\AbstractFlextrineService.php:105, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 10. Doctrine\ORM\EntityManager->getClassMetadata() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\EntityManager.php:563, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 11. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\EntityManager.php:247, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 12. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:169, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 13. Doctrine\ORM\Mapping\ClassMetadataFactory->getParentClasses() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:245, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 14. class_parents() C:\ORM\flextrine-0.9\php\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php:222, referer: app:/LB_MyMoney.swf
[Thu Mar 10 10:44:03 2011] [error] [client 127.0.0.1] PHP 15. Doctrine\Common\ClassLoader->loadClass() C:\ORM\flextrine-0.9\php\lib\Doctrine\Common\ClassLoader.php:0, referer: app:/LB_MyMoney.swf

@ccapndave
Copy link
Owner

As long as you have set your paths and namespaces correctly in PHP, the generated AS3 files should automatically be in the right packages and the PHP autoloader should work out where to load things. You should never have to touch the [RemoteClass] metadata.

Could you paste in your PHP entity (and its path) so I can have a quick look?

Dave

@jforatier
Copy link
Author

Path To Entity : C:\ORM\flextrine-0.9\php\app\lb_money\entities\com\squd\lifeboard\money\model\vos\persist

Entity PHP :

Entity 'lb_bank.as' Flex (Generated):
package vo {

[RemoteClass(alias="vo.lb_bank")]
[Entity]
public class lb_bank extends lb_bankEntityBase {

}

}

@ccapndave
Copy link
Owner

Ah - the problem is with your namespace in the PHP entity. You have:

namespace vo;

But you need to have:

namespace com\squd\lifeboard\money\model\vos\persist;

@jforatier
Copy link
Author

Aaaah !!! Shame on me ^^
I just correct that and ... It's Work !

Thanks a lot !

This issue was closed.
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