[JBoss Seam] - Re: Entity EJB3.0 Unit Testing - How to setup JNDI datasourc
by sushmu
Running Embedded JBoss from Maven is tricky partly because of the classpath issues and partly because of the surefire test plugin and the jdk 1.6 incompatabilities.
I did the following:
1. Download Embedded JBoss Beta 2 version.
2. Copy all folders under 'bootstrap' that comes with EJ into src/test/resources folder.
3. Configure the surefire test plugin with the necessary hacks.
Now I'm able to run EJ and deploy the EJB's. I've successfully unit tested an Entity EJB with the built in HSQL datasource. Next step.. Test the Session Beans (this has seam functionality).. Seam has to be configured next with Embedded JBoss and maven.
This entire exercise of making Maven2 + Seam2 + EJB3 + Embedded JBoss Beta2 + Unit/Integration Testing is making me go insane.
MORAL: Unless you have unlimited time to waste, dont try this. Use seam-gen instead.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115368#4115368
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115368
18 years, 3 months
[JBoss Seam] - argument type mismatch exception after Seam 2 upgrade - help
by terryb
Having upgraded seam 1.2.1GA project to Seam 2 and JBoss EAP 4.2; my project is now unusable. I can't seen to find out why I get the following error and where it comes from. On some pages it occurs when html form is submitted, and on some just when page is being displayed?
Seam 2.0GA + Facelets + Sun RI. I followed Seam2Migration instructions.
| 0:28:58,516 ERROR [SeamPhaseListener] uncaught exception
| javax.el.ELException: java.lang.IllegalArgumentException: argument type mismatch
| at javax.el.BeanELResolver.setValue(BeanELResolver.java:116)
| at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
| at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:93)
| at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
| at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
| at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
| at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
| at org.jboss.seam.navigation.Pages.applyConvertedValidatedValuesToModel(Pages.java:779)
| at org.jboss.seam.navigation.Pages.postRestore(Pages.java:402)
| at org.jboss.seam.jsf.SeamPhaseListener.postRestorePage(SeamPhaseListener.java:528)
| at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:374)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:211)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.IllegalArgumentException: argument type mismatch
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
| ... 53 more
| 00:28:58,532 ERROR [CachedConnectionValve] Application error: Faces Servlet did not complete its transaction
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115367#4115367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115367
18 years, 3 months
[JCA/JBoss] - WorkManager thread pooling
by avzak
Hi,
We are developing a resource adapter which uses threads in order to process incoming network data. These threads are obtained from the WorkManager instance which uses a BasicThreadPool instance as its thread pooling mechanism.
When we tried to configure the thread pool we noticed that its minimum pool size is always the same as its maximum size. As a result, if the maximum size is configured to, say 500, then its minimum size is also set to 500, so 500 threads will be created even if there are idle threads in the pool (because the pool prefers to first fill the pool up to its min size).
After threads were allocated and their keep alive time has expired, they are all removed from the pool, although you would expect a minimum size will be kept.
All of this results in a very inefficient idle threads management.
Is this issue a known bug? if so, when it is expected to be fixed? is it possible to configure the WorkManager to use other implementation of thread pool?
Regards,
Eli Avzak
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115361#4115361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115361
18 years, 3 months