3 Replies Latest reply on Aug 30, 2012 8:17 AM by Eric Wittmann

    Need help - modeshape sequencing problem

    Eric Wittmann Apprentice

      Hey guys.  Let me preface this by saying I'm probably doing something dumb.    However, I just tried upgrading s-ramp to the latest modeshape Beta release, and sequencing appears to no longer work.  The breakage seems to have happened between Alpha6 and Beta1.  If I make no other changes to s-ramp except to change the modeshape version, our unit tests begin to fail.


      I think I've ruled out a problem with the eventing mechanism.  I believe the sequencers themselves are not kicking in when content is added.  Did anything obvious change between those two releases?


      I have skinnied down s-ramp into a reasonably simple test project, which you can find attached to a JIRA ticket here:




      If you download the attached project you can run the class SimpleModeshapeSrampSequencerTest (it's not a junit but instead has a main()).  If you run that with Alpha6 it will work...anything later will fail.


      Any help would be greatly appreciated!

        • 1. Re: Need help - modeshape sequencing problem
          Eric Wittmann Apprentice

          Ok so I've been debugging through the ModeShape code a bit today and discovered the problem.  The Sequencer is failing to run because the original content being added is missing a mime type.  I'll tackle that tomorrow and report back my success or failure.


          UPDATE:  that was it - solution was simply to add the right jcr:mimeType property to the jcr:content node

          • 2. Re: Need help - modeshape sequencing problem
            Randall Hauch Master



            As you may know, the code that calls the sequencer is in the SequencingRunner.run() method. If the sequencer has accepted MIME types (which the XSD sequencer does), then this code looks for the "jcr:mimeType" property and, if not there, tries to get the MIME type from the Binary value (which will use a MIME type detector to determine it from the name and/or content) on line 133. Perhaps you could debug this part of the code to see why that's not returning an acceptable MIME type.


            Best regards,




            P.S. Sorry for the delay. Several of us are currently on vacation, but I'll be back at work on Friday.

            • 3. Re: Need help - modeshape sequencing problem
              Eric Wittmann Apprentice

              Hey no problem (re: the delay).  I figured it out eventually. 


              As for why it's not returning an acceptable mime type.  The problem is that we weren't setting it explicitely *and* our node name doesn't have an extension.  So the mime type detecting didn't really have much to work with.  Ultimately it gets into detectFallbackMimeType and returns "text/plain" as the content type (which is not unreasonable).  The solution is obviously to set the jcr:mimeType explicitely, which is what I'm doing now.





              1 of 1 people found this helpful