Hi, my problem is resolved. What I did were:
1, remove "samples" out of the webapps, no sure whether this is a big deal. 2, wait until "RTMP server listening on port xxxx". this is probably the main reason, sometimes it seems to take a long time before this line appear, if you try to connect to the mxml file before this line appear, surely the "url undefined". some times it never appear, I need to kill it and restart. 3, avoid names conflict. I have named query "all" in Event/Employee/Contact.hbm.xml, it seems to have conflicting. So I changed to "event.all", "employee.all", etc. York --- In [email protected], "ggyao2005" <[EMAIL PROTECTED]> wrote: > > > > Hello, > > have anyone found the solution? I encountered the same problem right > now. > > Here is what I did: > > {tomcat}/flex/WEB-INF/flex/data-management-config.xml > > <?xml version="1.0" encoding="UTF-8"?> > <service id="data-service" > class="flex.data.DataService"> > > <adapters> > <adapter-definition id="actionscript" > class="flex.data.adapters.ASObjectAdapter" default="true"/> > <adapter-definition id="java-dao" > class="flex.data.adapters.JavaAdapter"/> > </adapters> > > <default-channels> > <channel ref="my-rtmp"/> > </default-channels> > > <destination id="hibernate-contact"> > <adapter ref="java-dao" /> > <properties> > <use-transactions>true</use-transactions> > <source>flex.data.assemblers.HibernateAssembler</source> > <scope>application</scope> > <metadata> > <identity property="contactId"/> > </metadata> > <network> > <session-timeout>20</session-timeout> > <paging enabled="false" pageSize="10" /> > <throttle-inbound policy="ERROR" max- frequency="500"/> > <throttle-outbound policy="REPLACE" > max-frequency="500"/> > </network> > <server> > <hibernate-entity>crm.Contact</hibernate-entity> > <fill-method> > <name>fill</name> > <params>java.util.List</params> > </fill-method> > <fill-configuration> > <use-query-cache>false</use-query-cache> > <allow-hql-queries>true</allow-hql-queries> > </fill-configuration> > </server> > </properties> > </destination> > > <!-- --> > <destination id="crm.employee.hibernate" channels="my-rtmp"> > <adapter ref="java-dao" /> > <properties> > <use-transactions>true</use-transactions> > <source>flex.data.assemblers.HibernateAssembler</source> > <scope>application</scope> > <metadata> > <identity property="employeeId" /> > <many-to-many property="events" > destination="crm.event.hibernate" lazy="false" /> > </metadata> > <network> > <session-timeout>20</session-timeout> > <paging enabled="false" pageSize="10" /> > <throttle-inbound policy="ERROR" max-frequency="500" /> > <throttle-outbound policy="REPLACE" max-frequency="500" /> > </network> > <server> > <hibernate-entity> > crm.Employee > </hibernate-entity> > <fill-configuration> > <use-query-cache>false</use-query-cache> > <allow-hql-queries>true</allow-hql-queries> > </fill-configuration> > </server> > </properties> > </destination> > <destination id="crm.event.hibernate" channels="my-rtmp"> > <adapter ref="java-dao" /> > <properties> > <use-transactions>true</use-transactions> > <source>flex.data.assemblers.HibernateAssembler</source> > <scope>application</scope> > <metadata> > <identity property="eventId" /> > <many-to-many property="employees" > destination="crm.employee.hibernate" lazy="false" /> > </metadata> > <network> > <session-timeout>20</session-timeout> > <paging enabled="false" pageSize="10" /> > <throttle-inbound policy="ERROR" max-frequency="500" /> > <throttle-outbound policy="REPLACE" max-frequency="500" /> > </network> > <server> > <hibernate-entity>crm.Event</hibernate-entity> > <fill-configuration> > <use-query-cache>false</use-query-cache> > <allow-hql-queries>true</allow-hql-queries> > </fill-configuration> > </server> > </properties> > </destination> > > </service> > > > > {tomcat}/flex/WEB-INF/classes/hibernate.cfg.xml > > <?xml version="1.0" encoding="utf-8"?> > <!DOCTYPE hibernate-configuration PUBLIC > "-//Hibernate/Hibernate Configuration DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd > <http://hibernate.sourceforge.net/hibernate-configuration- 3.0.dtd> "> > <hibernate-configuration> > <session-factory> > <property > name="hibernate.bytecode.use_reflection_optimizer">false</property> > <property > name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</proper ty\ > > > <property name="hibernate.connection.password">flex</property> > <property > name="hibernate.connection.url">jdbc:mysql://127.0.0.1/flex</property> > <property name="hibernate.connection.username">flex</property> > <property > name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> > <mapping resource="crm/Contact.hbm.xml" /> > <!-- --> > <mapping resource="crm/Employee.hbm.xml" /> > <mapping resource="crm/Event.hbm.xml" /> > > </session-factory> > </hibernate-configuration> > > > {tomcat}/flex/WEB-INF/classes/crm/*.java > {tomcat}/flex/WEB-INF/classes/crm/*.hbm.xml > > > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping > DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd > <http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd> "> > <!-- Generated 2007-10-3 10:27:56 by Hibernate Tools 3.2.0.b9 --> > <hibernate-mapping> > <class name="crm.Contact" table="contact" catalog="flex"> > <comment></comment> > <id name="contactId" type="int"> > <column name="contact_id" /> > <generator class="assigned" /> > </id> > <property name="firstName" type="string"> > <column name="first_name" length="20"> > <comment></comment> > </column> > </property> > <property name="lastName" type="string"> > <column name="last_name" length="20"> > <comment></comment> > </column> > </property> > <property name="address" type="string"> > <column name="address" length="256"> > <comment></comment> > </column> > </property> > <property name="city" type="string"> > <column name="city" length="50"> > <comment></comment> > </column> > </property> > <property name="state" type="string"> > <column name="state" length="2"> > <comment></comment> > </column> > </property> > <property name="zip" type="string"> > <column name="zip" length="10"> > <comment></comment> > </column> > </property> > <property name="country" type="string"> > <column name="country" length="256"> > <comment></comment> > </column> > </property> > <property name="phone" type="string"> > <column name="phone" length="12"> > <comment></comment> > </column> > </property> > <property name="email" type="string"> > <column name="email" length="128"> > <comment></comment> > </column> > </property> > <property name="notes" type="string"> > <column name="notes" length="512"> > <comment></comment> > </column> > </property> > </class> > > </hibernate-mapping> > > > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping > DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd > <http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd> "> > <!-- Generated 2007-10-3 10:27:56 by Hibernate Tools 3.2.0.b9 --> > <hibernate-mapping> > <class name="crm.Employee" table="employee" catalog="flex"> > <comment></comment> > <id name="employeeId" type="int"> > <column name="employee_id" /> > <generator class="assigned" /> > </id> > <property name="firstName" type="string"> > <column name="first_name" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <property name="lastName" type="string"> > <column name="last_name" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <property name="email" type="string"> > <column name="email" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <property name="phone" type="string"> > <column name="phone" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <property name="title" type="string"> > <column name="title" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <set name="events" inverse="true" table="eventemployee"> > <key> > <column name="employee_id" not-null="true"> > <comment></comment> > </column> > </key> > <many-to-many entity-name="crm.Event"> > <column name="event_id" not-null="true"> > <comment></comment> > </column> > </many-to-many> > </set> > </class> > </hibernate-mapping> > > > <?xml version="1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping > DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd > <http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd> "> > <!-- Generated 2007-10-3 10:27:56 by Hibernate Tools 3.2.0.b9 --> > <hibernate-mapping> > <class name="crm.Event" table="event" catalog="flex"> > <comment></comment> > <id name="eventId" type="int"> > <column name="event_id" /> > <generator class="assigned" /> > </id> > <property name="name" type="string"> > <column name="name" length="200" not-null="true"> > <comment></comment> > </column> > </property> > <property name="eventDate" type="date"> > <column name="eventDate" length="10" not-null="true"> > <comment></comment> > </column> > </property> > <property name="eventTime" type="string"> > <column name="eventTime" length="45" not-null="true"> > <comment></comment> > </column> > </property> > <set name="employees" inverse="true" table="eventemployee"> > <key> > <column name="event_id" not-null="true"> > <comment></comment> > </column> > </key> > <many-to-many entity-name="crm.Employee"> > <column name="employee_id" not-null="true"> > <comment></comment> > </column> > </many-to-many> > </set> > </hibernate-mapping> > > > > If I comment out Event and Employee mapping files in > hibernate.cfg.xml, the rtmp channel is listening on localhost:2038 > (netstat -a). This is to model the "contact" sample in LCDS samples. > But if I uncomment the Event and Employee mapping files (many-to- > many) relationship, then the localhost:2038 won't show up when > running "netstat -a". If I tried to run my client mxml file, I got > error: undefined url:'rtmp://localhost:2038' <'rtmp://localhost:2038'> . > > I got the many-to-many example from > http://viconflex.blogspot.com/2006/12/many-to-many-using-fds- hibernate.h\ > tml > <http://viconflex.blogspot.com/2006/12/many-to-many-using-fds- hibernate.\ > html> > > Can anyone give me some help? > > York > > --- In [email protected] <mailto:[email protected]> , > "chrisnoeflex" <chrisnoeflex@> > wrote: > > > > Jeff, > > > > telnet does not work when container is running. > > So does this mean that the endpoint for the rtmp connection is not > > set up correctly ? It does say in the log that > > > > "07/02/19 13:19:42 [Flex] [INFO] [Configuration] Endpoint my-rtmp > > created with security: None > > at URI: rtmp://10.10.0.119:2038" > > > > So the endpoint is created, but does not work ? > > > > C:\>ipconfig > > > > Windows IP Configuration > > > > > > Ethernet adapter Local Area Connection: > > > > Connection-specific DNS Suffix . : vlaamsparlement.be > > IP Address. . . . . . . . . . . . : 10.10.0.119 > > Subnet Mask . . . . . . . . . . . : 255.255.0.0 > > Default Gateway . . . . . . . . . : 10.10.0.1 > > > > C:\>telnet 10.10.0.119 2038 > > Connecting To 10.10.0.119...Could not open connection to the host, > on > > port 2038: Connect failed > > > > C:\> > > >

