3 Replies Latest reply on May 12, 2010 12:43 PM by Steve Pruitt

    Class not found - was channel definition question

    Steve Pruitt Level 1

      I am much closer.  Tomcat is putting some key messages in the console and I overlooked them.  It looks like I am closer than I thought.  The request looks like its getting received, but my service blows up on response due to I think two class not found issues.  But, I can't tell what classes are missing.

       

      [Flex]Deserializing AMF/RTMP request
      Version: 3  null
        2.0

        (Command method=null (0) trxId=2.0)
          null
          (Externalizable Object #0 'flex.data.messages.DataMessageExt')
            (Array #1)
              [0] = (Typed Object #2 'flex.data.messages.DataMessage')
                identity = (Object #3)
                  partId = 81959
                operation = 11
                correlationId = "419F99AA-B649-9490-650D-88F3CAADBCB7"
                headers = (Object #4)
                messageId = "8AF6C660-9DE3-F155-6A91-88F3CAC5A4F0"
                timestamp = 0
                destination = "DocumentPart"
                timeToLive = 0
                body = (Typed Object #5 'com.hpdocs.ds.document.DocumentPart')
                  documentId = 81960
                  partId = 81959
                  content = "Hello World"
                clientId = "05E549ED-455F-A9AF-EEDE-88F3CA7E4BF9"
      "DocumentPart"
      (Object #6)
              DSEndpoint = "hp_rtmp"
              DSId = "F65B351A-A60C-6F91-2932-44630DAED2B9"
      (Byte Array #7, Length 16) ""
      7
      [Flex]Received command: TCCommand [ Cmd: 0, MethodName: null, TrxID: 2.0]
      [Flex]Serializing AMF/RTMP response
      Version: 3
        (Command method=_error (0) trxId=2.0)
          (Typed Object #0 'flex.messaging.messages.ErrorMessage')
            headers = (Object #1)
            rootCause = (Typed Object #2 'java.lang.NoClassDefFoundError')
              message = "javax/transaction/SystemException"
              localizedMessage = "javax/transaction/SystemException"
              cause = (Typed Object #3 'java.lang.ClassNotFoundException')
                message = "javax.transaction.SystemException"
                localizedMessage = "javax.transaction.SystemException"
                cause = null
                exception = null
            body = null
            correlationId = "419F99AA-B649-9490-650D-88F3CAADBCB7"
            faultDetail = null
            faultString = "There was an unhandled failure on the server. javax/transaction/SystemException"
            clientId = "F65B3649-620E-C827-50C4-6A1C78BC3712"
            timeToLive = 0.0
            destination = "DocumentPart"
            timestamp = 1.273607998612E12
            extendedData = null
            faultCode = "Server.Processing"
            messageId = "F65B3675-5409-795E-747F-B2F459749415"

        • 1. Re: Class not found - was channel definition question
          Steve Pruitt Level 1

          Looks like the missing class was the java transaction class, I thought it was part of the error message.  As soon as I solved that issue, I might be down to my real problem.  I can hope.

           

          [Flex]Received command: TCCommand [ Cmd: 0, MethodName: null, TrxID: 2.0]
          [Flex]Serializing AMF/RTMP response
          Version: 3
            (Command method=_error (0) trxId=2.0)
              (Typed Object #0 'flex.messaging.messages.ErrorMessage')
                headers = (Object #1)
                rootCause = (Typed Object #2 'javax.naming.NamingException')
                  rootCause = null
                  message = "Cannot create resource instance"
                  resolvedObj = null
                  localizedMessage = "Cannot create resource instance"
                  cause = null
                  explanation = "Cannot create resource instance"
                  remainingName = null
                  resolvedName = null
                body = null
                correlationId = "45956F25-1939-F669-9D35-890EE1F7B2DF"
                faultDetail = null
                faultString = "Unable to access UserTransaction in DataService."
                clientId = "F69D5A07-C00E-0898-6998-EC24BD5DA1A1"
                timeToLive = 0.0
                destination = "DocumentPart"
                timestamp = 1.273609774041E12
                extendedData = null
                faultCode = "Server.Processing"
                messageId = "F69D5A44-C90B-AB9E-B7CC-C15A86A027E1"

          • 2. Re: Class not found - was channel definition question
            mayaning

            it looks like your Tomcat is missing the JTA setting.

             

            Tomcat

            To use LiveCycle Data Services with Tomcat when not using the integrated Tomcat configuration, install support for the Java Transaction API (JTA). You might also have to install several other libraries depending on the features that you plan to use. Follow these steps after deploying the LiveCycle Data Services WAR files. These steps are not necessary for the integrated Tomcat installation.

            1. Stop Tomcat.
            2. To install support for JTA, a recommended implementation is the Java Open Transaction Manager (JOTM), which is a fully functional open source stand-alone transaction manager.
              1. Download JOTM from http://jotm.objectweb.org.
              2. Copy the JAR files from jotm-root/lib to [tomcat-root]/common/lib.
              3. Create a context file for your web application and register JOTM using the Transaction element. For example, for the samples WAR create a tomcat-root/conf/Catalina/localhost/lcds-samples.xml file and add the following lines:
                CONTEXT antijarlocking="false" antiresourcelocking="false"   docbase="${catalina.home}/webapps/lcds-samples" path="/lcds-samples"   privileged="true">  <TRANSACTION factory="org.objectweb.jotm.UserTransactionFactory"   jotm.timeout="60"></TRANSACTION></CONTEXT>  
                Note: If a context file exists for your web application, add the <TRANSACTION> element under the <CONTEXT> element.
            3. Increase the maximum memory to at least 512 MB by specifying the maximum heap size for the JVM in the JAVA_OPTS variable: -Xmx512m
            4. (Optional) To enable custom authentication, locate the Tomcat security resource libraries under install_root/resources/security/tomcat.
              1. Place the flex-tomcat-common.jar and flex-tomcat-server.jar files in the tomcat/lib folder.
              2. Add the following line to the context descriptor file for your web application:

                <VALVE classname="flex.messaging.security.TomcatValve"></VALVE>

                You can now perform authentication against the current Tomcat realm. Usually, the default configuration for authentication stores user information in conf/tomcat-users.xml. See the Tomcat documentation for more information on realms. See the LiveCycle Data Services documentation for more information on custom authentication.

              3. You might also have to update the active <LOGIN-COMMAND> in /WEB-INF/flex/services-config.xml in each deployment of a LiveCycle Data Services WAR file. For Tomcat, ensure that the TomcatLoginCommand is active in the <SECURITY>section:
                <SECURITY><LOGIN-COMMAND server="Tomcat"></LOGIN-COMMAND>...</SECURITY>
            5. (Optional) To use the JMSAdapter with the Message Service, install and configure a JMS provider (such as ActiveMQ or openJMS) for use with Tomcat.
            6. Restart Tomcat.

             

            original doc is located here

            Hopefully this will help.

            • 3. Re: Class not found - was channel definition question
              Steve Pruitt Level 1

              No luck, the same problem.  The console message looks exactly the same.

               

              I followed all of the above instructions except for the two optional steps.  I currently have no security considerations and I am not yet using the JMSAdaptor.

               

              I am majorly stuck.  I guess I can either switch to the integrated Tomcat.  Or, I can try my luck with JBoss.  Any opinion on which version of JBoss?