Cant get to work

Splash Forums Rewrite Users Cant get to work

This topic contains 21 replies, has 3 voices, and was last updated by  Christian Kaltepoth 9 years, 5 months ago.

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
  • #18479

    Vivek Katta

    Hi, just started using rewrite. Its a great framework! but am not able to set the URL segments into a bean using EL.

    The rule I am using:

    addRule(Join.path("/{betaName}/{profileURI}").where("betaName").bindsTo("#{navigationBean.betaName}")).constrainedBy(betaNameConstraint) .to("/faces/view/commons/protected-profile-access.xhtml").when(notLoggedInCondition))

    The rule is working the way I want but navigationBean.betaName remains null. Am I missing something? Is the rule usage correct?

    Any help appreciated.


    PS. All necessary dependencies have been included



    could you tell us more about the navigationBean? Is it a CDI managed bean? Which scope does it have?




    Vivek Katta

    Hi Christian, it is a CDI bean and I tried both conversation scope (not long running) and session scoped.

    My Environment:

    I have included the rewrite-integration-cdi jar as well. Its a JSF2, RF 4 application running on jboss as 7.1. I have seam solder configured as well which caused a problem with ExpressionFactoryProducer class complaining of ambiguity. I then deleted this class from the seam solder jar(temp fix) and the application started up correctly.

    Let me know if you need more information.




    Ok, it sounds like we need to add some qualifiers to the Rewrite EL integration module.


    Which version of Rewrite are you using? If I remember correctly, the issue regarding ExpressionFactoryProducer was fixed some time ago.


    Vivek Katta

    I am using 1.0.5.Final which I thought was the latest version


    Vivek Katta

    Also, I wasn’t very clear about the difference between addRule and defineRule…is one better than the other?




    addRule() adds a rule object, whereas defineRule() lets you build one using conditions and operations. They should probbly both be addRule


    Vivek Katta

    Hi, need some advise on ExpressionFactoryProducer. How do I solve that problem? I am using seam solder 3.0.Final.




    Hmmm… in order to fix this properly, I need some more info.

    What is the exact error you get?

    Could you upload a simple maven war project that reproduces this?



    Vivek Katta

    Sure..I’ll upload one soon.


    Awesome! Thanks :)


    Vivek Katta

    Hi Lincoln, can’t seem to find a way to upload files (or have I missed something trivial here?)

    Anyway I am pasting the stacktrace here. The project was an empty web app with seam solder and rewrite included. Also I had a @Startup class configured where I had one log statement (logger implemented using Jboss message logger and hence seam solder)

    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [ExpressionFactory] with qualifiers [@Default] at injection point
    [[parameter 2] of [constructor] @Inject public org.jboss.seam.solder.el.Expressions(ELContext, ExpressionFactory)]. Possible dependencies [[Producer Method [ExpressionFactory] with qualifiers [@Any @Default]
    declared as [[method] @Produces @ApplicationScoped org.ocpsoft.rewrite.cdi.expressions.ExpressionFactoryProducer.createExpressionFactory(BeanManager)], Producer Method [ExpressionFactory] with qualifiers [@Any @Default]
    declared as method] @Produces @ApplicationScoped org.jboss.seam.solder.el.ExpressionFactoryProducer.createExpressionFactory(BeanManager)]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(
    at org.jboss.weld.bootstrap.Validator.validateBean(
    at org.jboss.weld.bootstrap.Validator.validateRIBean(
    at org.jboss.weld.bootstrap.Validator.validateBeans(

    Hope this helps..




    Ok, as I suspected, this looks like a bug in Solder, but we can work around it by renaming some classes and removing some extensability (we really don’t need to be extensible in the same way Solder does.)


    Also, you’re right. It seems that our file-upload plugin has stopped working. I’ll take a look into that… that’s bad :)

Viewing 15 posts - 1 through 15 (of 22 total)

The forum ‘Rewrite Users’ is closed to new topics and replies.

Comments are closed.