12 Replies Latest reply on Oct 12, 2009 10:18 AM by jasenm

    Data service samples and tomcat5.5

    the-story
      hi,
      i 'd tried the samples coming with flex Data services 2 on a tomcat 5.5 server under jre 1.4.2_10.
      Messaging sample dashboard is performing well with both browsers open and the chat is ok.
      RPC services database Manager works fine and sql interogation return correct value from the database in the datagrid.
      But ... I get a "channel disconnected" error message window when i run data services samples CRM and FlexCab.
      i don't know why because it seems that my_rtmp is working fine with the dashboard...???
      Could you give me an explanation on what's doing wrong?
        • 1. Re: Data service samples and tomcat5.5
          CathyM Level 1
          Sorry, there is not enough information to tell you what the issue is without additional information.

          To obtain additional infomration, try enabling logging at the debug level in /WEB-INF/flex/services-config.xml

          After that restart your server and check the server logs and our server console for any errors.

          Also, please be sure that you've installed FDS on Tomcat as documented -
          http://www.adobe.com/support/documentation/en/flex/2/install.html#tomcat

          And, you may also check out this tech note which includes an issue commonly encountered by users of FDS and Tomcat - http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6b82874f
          • 2. Re: Data service samples and tomcat5.5
            jrunrandy Adobe Employee
            Did you install JOTM. This is described in the install instructions. That's the only thing I can think of.
            • 3. Re: Data service samples and tomcat5.5
              the-story Level 1
              First of all thanks to both.
              I though JOTM was installed on my tomcat but no
              so thanks giving me the idea to verify and of course
              installing JOTM.
              Things goes better now and i could launch the crm and flexcab samples
              without the message "channel disconnected":
              But ... now i get the following message "Unable to access UserTransaction in DataService"
              following your links cathyM i applied all the recommendation given in these topics but it's steel not working
              even this one
              http://static.raibledesigns.com/downloads/howto-tomcat-jotm.htmlt

              searching more deaper i discovered this one
              http://www.nabble.com/UserTransaction%2C-JOTM-and-Tomcat-5.5.x-tf1073172r5.html

              It seems that there is some problems with tomcat 5.5 and JOTM
              I discovered another message with the crm and flexcab samples telling me "attempt to begin a dataService Transaction when an existing transaction was already in place".
              As indicated in the last reply of the post, HSQLDB doesn't seem to support nested transactions.

              So thanks again for your help but it seems very hard to run flex 2 data services on tomcat 5.5 (may be it's better with another DB) and if you know someone who know the answers to all these misfunctionalities i'm all ears.
              thanks
              • 4. Re: Data service samples and tomcat5.5
                CathyM Level 1
                > now i get the following message "Unable to access UserTransaction in DataService"

                Did you successfully run the test jsp page indicated in the tech note?

                The samples installed on Tomcat, based on the instructions, have been tested to run successfully on Tomcat 5.5. You should be able to successfully run the samples.

                > I discovered another message with the crm and flexcab samples telling me "attempt to begin a dataService Transaction when an existing transaction was already in place".

                Does this mean that you resolve the UserTransaction issue? If you resolve the user transaction issue and still see the error, please let us know the step you performed when using the samples to reproduce this issue.

                Thanks.
                • 5. Re: Data service samples and tomcat5.5
                  the-story Level 1
                  hi,
                  no i didn't perform with success the jsp page of the dbtest with hsqldb.
                  as they explain on starting page of the jsp.
                  This page contains scriplets to create an HSQL Database. It was initially just used for testing JOTM on HSQLDB. HSQLDB doesn't support nested transactions so this particular sample doesn't work.
                  As explain in the second post i send u it seems tomcat5.5.x as problem with User transaction.
                  "Could u give me the versions use for tomcat and JOTM you used to test the samples?

                  these are the following manipulations i try to do:
                  i used META-INF/context.xml simplified to:
                  > <Context>
                  >
                  > <Resource name="jdbc/CRM" auth="Container" type="javax.sql.DataSource"
                  > factory="org.objectweb.jndi.DataSourceFactory"
                  > driverClassName="org.hsqldb.jdbcDriver"
                  > username="sa" password=""
                  > url="jdbc:hsqldb:."/>
                  >
                  > <Transaction factory="org.objectweb.jotm.UserTransactionFactory"
                  > jotm.timeout="60"/>
                  >
                  > </Context>
                  just changing the myDB with CRM
                  All the JOTM's jars file are in samples WEB_INF/lib directory as well as the hsqldb.jar JDBC driver
                  i put the context.xml file in the samples META-INF directory
                  and the carol.properties in the samples WEB_INF/classes
                  all done as explain in the dbtest installation.
                  but this never resolves the UserTransaction problem.

                  Seems all these version doesn't perform very well together if u don't have the chance to find the good kit LOLLL

                  "attempt to begin a dataService Transaction when an existing transaction was already in place" arrive when i get the UserTransaction failure message and click OK and when i retry to add a company or an employee again.

                  thanks for u'r help
                  • 6. Re: Data service samples and tomcat5.5
                    CathyM Level 1
                    > no i didn't perform with success the jsp page of the dbtest with hsqldb.

                    I'm sorry I wasn't explicit. Please use the following test jsp included in the Tech Note.
                    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6b82874f

                    <%@ page import="javax.naming.*,javax.transaction.*" %>
                    <%
                    Context ctx = new InitialContext();
                    UserTransaction tx = (UserTransaction)ctx.lookup("java:comp/UserTransaction");
                    tx.begin();
                    tx.commit();
                    %>
                    success!

                    > "Could u give me the versions use for tomcat and JOTM you used to test the samples?
                    These steps are based on the latest version of Tomcat (5.5.17) and JOTM (2.0.10).

                    It is not necessary to setup any datasources nor is it necessary to run the dbtest.jsp.
                    • 7. Re: Data service samples and tomcat5.5
                      the-story Level 1
                      OKKK cathyM all is working now
                      what i done? just changing my old jre 1.4.2_10 with the new one coming with J2EE sdk5.
                      After all reinstalled tomcat 5.5_20 and flex2 dataservices and following the ADOBE installation notes + JOTM installation guide in http://static.raibledesigns.com/downloads/howto-tomcat-jotm.htmlt and that's all folk.
                      I think may be u need to add in your installation note the carol.properties files how to.
                      thanks, this was only a bad version of jre: i had not the good kit LOL
                      • 8. Re: Data service samples and tomcat5.5
                        CathyM Level 1
                        I'm glad that this is finally working for you.

                        I've just verified again that the instructions for FDS 2 are valid and complete.
                        > http://www.adobe.com/support/documentation/en/flex/2/install.html#tomcat

                        > I think may be u need to add in your installation note the carol.properties files how to.
                        I did not find this necessary to run the samples.
                        • 9. Re: Data service samples and tomcat5.5
                          the-story Level 1
                          Ok thanks for all
                          • 10. Re: Data service samples and tomcat5.5
                            greg h_ Level 1
                            Hi All,

                            I would like to learn more about the FlexCab sample.

                            I am not familiar with it, can find no references for "FlexCab" in the docs and googling FlexCab turns up only this forum thread.

                            Perhaps FlexCab is short for ____ ? Or perhaps you can provide a link in the docs or Devnet?

                            Thanks,

                            g
                            • 11. Re: Data service samples and tomcat5.5
                              jrunrandy Adobe Employee
                              Flexcab is a sample application in the samples.war. Look in \samples\dataservice\flexcab

                              HTH
                              • 12. Re: Data service samples and tomcat5.5
                                jasenm

                                I had the oringinal error message ( "Unable to access UserTransaction in DataService" ) with flex.samples.crm and JOTM, but using tomcat 6.0.16 with a virtual directory.

                                 

                                ...And reading this post gave me the idea of a JOTM was not installed...but I was using LiveCycle 3 ES 3 Beta 3 with integrated server (where JOTM is already installed)...

                                 

                                My issue was obviously different becuase I was using docBase in my conf/localhost/<SITE_CONTEXT>.xml

                                 

                                ....But tomcat still did not 'see' JOTM installed even though the jotm files are already installed (as part of the installation in ..tomcat/libs) - but if using docBase you need to copy the jotm file into the <SITE_CONTEXT>/WEB-INF/libs/ directory.

                                 

                                I mention it here now, after all this time because someone might find it usefull...and save some hair pulling.

                                 

                                Hindsight in a fabulous thing