[JBoss Seam] - Parameter in EL in a POJO env
by esoares
I have faced a problem when passing parameters to a method using EL in a POJO environment (non-EJB and non-hibernate). I have setup the SeamFaceletViewHandler in faces-config.xml, as well.
Here is the xhtml sample :
<h:dataTable value="#{fruitList}" var="fr">
<h:column>
<f:facet name="header">
<f:verbatim>Description</f:verbatim>
</f:facet>
(1) <s:link value="#{fr.name}" action="#{fruitBasket.select(fr.id)}"/>
(2) <s:link value="#{fr.name}" action="#{fruitBasket.select(fr)}"/>
</h:column>
</h:dataTable>
In case (1) the fr.id is not interpreted by EL and stays as "fr.is" in the rendered HTML!
In case (2) I do not receive any error, but the object Fruit related to variable fr, is not passed.
Looking at Hibernate sample I got the alternative using @DataModelSelectionIndex, but I would like to understand why the code above does not work since this simple approach may not be suitable in complex interations when I need to pass more than the "index".
I am evaluating Seam to be used in a project.
Eddy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992506#3992506
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992506
19 years, 4 months
[JBoss Seam] - Re: How many EntityManagers and SFSBs in a web app?
by SmokingAPipe
"petemuir" wrote : So, Tomahawk works with Seam conversations (try using an up-to-date version i.e. 1.1.3, also n.b. Tomahawk 1.1.0 would have to have been Myfaces 1.1.0 as old versions had to have exactly the same version no, perhaps thats where you were going wrong?). It's just that Tomahawk is written in a strange way in places which means that some of the components don't work. You would be far better off using a Gavin-recommended component set (e.g. Trinidad or Icefaces), not least because you'll get more help here.
I'm tripping out all the Tomahawk; there are only a dozen pages so far so that's not a big deal. Gavin has made it pretty clear, Tomahawk and Seam are like oil and water. I'm not going to try to fight that. Icefaces looks so cool I would rather use that. But I'm going to be sane and just get my plain old application working correctly first, and THEN I will try adding some Icefaces stuff.
"petemuir" wrote : @Stateful Seam components are SESSION scoped by default. You shouldn't just remove the EXTENDED parameter, you should use an SMPC - http://docs.jboss.com/seam/1.1CR2/reference/en/html/configuration.html#d0...
Ok, now THAT was the other thing I was missing. I didn't know about configuring the SMPC and that resulted in everything else going to hell. I'm configuring that now. I notice in that doc that it clearly explains why SMPC should make LIEs be a thing of the past, which is why I started with Seam from the beginning.
anonymous wrote : You would definitely be better off changing your component set to work with Seam, not the other way around.
Yes, definitely, especially because at this stage it's not much trouble for me to do that.
anonymous wrote : I think it is worth pointing out that you could of course do PHP style DB access in Java using plain JDBC - but that would obviously mean no ORM etc.
Oh certainly, there are plenty of web apps out there that use JSP pages with code and direct JDBC calls all throughout the page, just like with PHP, and it's equally as horrible as PHP. My goal is to get to a real object-oriented application approach. That could mean several different things, including ugly anti-patterns like using DTOs. What I really want is to bind my object all the way through to web forms using minimal glue and DTO-type code. It looks like Seam is supposed to do that if I can figure it out... SMPC and getting rid of Tomahawk and using conversations are the first steps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992505#3992505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992505
19 years, 4 months
[Installation, Configuration & Deployment] - Re: How to specify Application specific XML Parser factories
by amit_sri
Hi All,
I tried changing the default XML factories settings to use Oracle specific parsers for application in JBoss server but I am getting issues while server startup stating-
12:50:20,842 WARN [XMLLoginConfigImpl] End loadConfig, failed to load config: f
ile:/E:/jboss-4.0.2/server/default/conf/login-config.xml
org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, col
umn 1.
Was expecting one of:
...
at org.jboss.security.auth.login.SunConfigParser.generateParseException(
SunConfigParser.java:389)
at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunCon
figParser.java:327)
at org.jboss.security.auth.login.SunConfigParser.config(SunConfigParser.
java:98)
at org.jboss.security.auth.login.SunConfigParser.parse(SunConfigParser.j
ava:57)
at org.jboss.security.auth.login.SunConfigParser.doParse(SunConfigParser
.java:79)
at org.jboss.security.auth.login.XMLLoginConfigImpl.loadSunConfig(XMLLog
inConfigImpl.java:295)
at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginC
onfigImpl.java:279)
at org.jboss.security.auth.login.XMLLoginConfigImpl.loadConfig(XMLLoginC
onfigImpl.java:253)
at org.jboss.security.auth.login.XMLLoginConfig.startService(XMLLoginCon
fig.java:162)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
I have referred to the following link to change facory settings- http://www.huihoo.com/jboss/online_manual/3.0/ch13s135.html
Please, help me in getting this issue resolved.,
Thanks,
Amit Srivastava..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992503#3992503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992503
19 years, 4 months
[JBoss Seam] - Re: Why do none of the samples work in Tomcat?
by krica
Well, I fail to see why I would need to clean from a fresh Seam distribution, but maybe it is so. In any case, I always do run clean before a new compilation (when things are not working anyway), but I do not do so on the same command (i.e. "ant clean deploy.tomcat"). If this is so important, it should be mentioned in the readme no? I followed the instructions in the readme. I understand that the problem is the default "deploy" target, but this issue should be mentioned in the readme, IMO.
After upgrading my JDK to the latest release and running "ant clean deploy.tomcat", I do get past this issue except for the "issues" project, which gives me.
ERROR 10-12 10:52:49,171 (Log4JLogger.java:error:119) -Servlet.service() for servlet jsp threw exception
| java.lang.NoClassDefFoundError: org/apache/myfaces/config/MyfacesConfig
| ...
(I'm not going to copy the whole stack trace cause this thread is not about this, which I believe is a separate issue. Yes, MyFacesConfig is in WEB-INF/lib/myfaces-impl-1.1.3.jar)
Anyway, it would seem you are right Richard. I needed to run "ant clean deploy.tomcat" specifically (or the JDK was bad, which I do not believe was the case). However, I asked two of my colleagues to deploy to Tomcat as I originally did (as described in the readme, i.e. first "ant", then "ant deploy.tomcat") and it worked perfectly well for both of them. Must be something with me :)
Still will not work in JBoss AS, but again, a different issue and I really do not need it solved right now.
Thanks for you assistance Richard!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992500#3992500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992500
19 years, 4 months
[Beginners Corner] - Exception in thread "main" javax.ejb.EJBException: javax.per
by sjsustudent
log4j:WARN No appenders could be found for logger (org.jboss.remoting.Client).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 7
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:319)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992499#3992499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992499
19 years, 4 months