Cant get EL.property to work
July 3, 2012 at 1:20 pm #18479
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:
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 includedJuly 3, 2012 at 1:44 pm #22740
could you tell us more about the
navigationBean? Is it a CDI managed bean? Which scope does it have?
ChristianJuly 3, 2012 at 6:22 pm #22741
Hi Christian, it is a CDI bean and I tried both conversation scope (not long running) and session scoped.
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.
VivekJuly 4, 2012 at 1:28 am #22742
Ok, it sounds like we need to add some qualifiers to the Rewrite EL integration module.July 4, 2012 at 4:53 am #22743
Which version of Rewrite are you using? If I remember correctly, the issue regarding ExpressionFactoryProducer was fixed some time ago.July 4, 2012 at 9:47 am #22744
I am using 1.0.5.Final which I thought was the latest versionJuly 4, 2012 at 9:50 am #22745
Also, I wasn’t very clear about the difference between addRule and defineRule…is one better than the other?
VivekJuly 4, 2012 at 12:49 pm #22746
addRule() adds a rule object, whereas defineRule() lets you build one using conditions and operations. They should probbly both be addRuleJuly 4, 2012 at 2:25 pm #22747
Hi, need some advise on ExpressionFactoryProducer. How do I solve that problem? I am using seam solder 3.0.Final.
VivekJuly 4, 2012 at 2:35 pm #22748
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?
Thanks!July 4, 2012 at 2:43 pm #22749
Sure..I’ll upload one soon.July 4, 2012 at 3:03 pm #22750
Awesome! ThanksJuly 5, 2012 at 9:10 am #22751
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)]
Hope this helps..
VivekJuly 5, 2012 at 4:28 pm #22752
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.)July 5, 2012 at 4:29 pm #22753
Also, you’re right. It seems that our file-upload plugin has stopped working. I’ll take a look into that… that’s bad
The forum ‘Rewrite Users’ is closed to new topics and replies.