[JBoss Seam] - javassist.CannotCompileException: duplicate method: createIn
by mgrouch
I get this exception with seam app running on weblogic 9.1
when I click on some links. the app works fine under JBoss.
Any ideas?
Thanks a lot
anonymous wrote :
| javax.el.ELException: /Status.xhtml: Could not instantiate Seam component: statusHome
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
| at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:171)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.ui.UIDecorate.encodeChildren(UIDecorate.java:234)
| at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
| at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
| at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
| at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
| at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
| at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
| at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
| at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
| at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
| at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3151)
| at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
| at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
| at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
| at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
| at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
| at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
| at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
| Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: pmdbFailStatusHome
| at org.jboss.seam.Component.newInstance(Component.java:1740)
| at org.jboss.seam.Component.getInstance(Component.java:1643)
| at org.jboss.seam.Component.getInstance(Component.java:1610)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:114)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
| at com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
| at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
| ... 44 more
| Caused by: java.lang.RuntimeException: duplicate method: createInstance
| at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:173)
| at org.jboss.seam.Component.createProxyFactory(Component.java:1979)
| at org.jboss.seam.Component.getProxyFactory(Component.java:1154)
| at org.jboss.seam.Component.wrap(Component.java:1145)
| at org.jboss.seam.Component.instantiateJavaBean(Component.java:1134)
| at org.jboss.seam.Component.instantiate(Component.java:1088)
| at org.jboss.seam.Component.newInstance(Component.java:1736)
| ... 55 more
| Caused by: javassist.CannotCompileException: duplicate method: createInstance
| at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:544)
| at javassist.bytecode.ClassFile.addMethod(ClassFile.java:528)
| at javassist.util.proxy.ProxyFactory.override(ProxyFactory.java:373)
| at javassist.util.proxy.ProxyFactory.overrideMethods(ProxyFactory.java:349)
| at javassist.util.proxy.ProxyFactory.make(ProxyFactory.java:277)
| at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:164)
| ... 61 more
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033501#4033501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033501
17 years
[JBoss Seam] - Can't find bundle for base name org.hibernate.validator.reso
by mgrouch
How to fix this error at seam app startup?
Thanks
anonymous wrote :
| java.util.MissingResourceException: Can't find bundle for base name org.hibernate.validator.resources.DefaultValidatorMessages, locale en_US
| at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
| at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:726)
| at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
| at org.hibernate.validator.ClassValidator.(ClassValidator.java:129)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:318)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1112)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
| at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:869)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
| at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
| at org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:70)
| 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:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1842)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
| at org.jboss.seam.Component.newInstance(Component.java:1746)
| at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
| at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
| at org.jboss.seam.init.Initialization.init(Initialization.java:504)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:374)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033500#4033500
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033500
17 years
[JCA/JBoss] - Re: Bug/Missing feature in XA-DS.xml
by vickyk
I have gone with the different approach , here it goes .
I have modified the ConnectionFactoryTemplate.xsl. I have made the following changes
Changed <xsl:choose>
| <xsl:when test="max-pool-size">
| <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
| </xsl:when>
| <xsl:otherwise>
| <attribute name="MaxSize">20</attribute>
| </xsl:otherwise>
| </xsl:choose>
to
<xsl:variable name="maxPoolCount"><xsl:value-of select="max-pool-size"/></xsl:variable>
| <xsl:variable name="minPoolCount"><xsl:value-of select="min-pool-size"/></xsl:variable>
| <xsl:choose>
| <!-- max-pool-size entry is there in the -ds.xml file -->
| <xsl:when test="max-pool-size">
| <xsl:choose>
| <!-- min pool size is present -->
| <xsl:when test="min-pool-size">
| <xsl:choose>
| <xsl:when test="$maxPoolCount>$minPoolCount">
| <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
| </xsl:when>
| <xsl:otherwise>
| <attribute name="MaxSize"><xsl:value-of select="min-pool-size"/></attribute>
| </xsl:otherwise>
| </xsl:choose>
| </xsl:when>
| <!-- min pool size is absent -->
| <xsl:otherwise>
| <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
| </xsl:otherwise>
| </xsl:choose>
| </xsl:when>
|
| <!-- max-pool-size entry is not there in the -ds.xml file -->
| <xsl:otherwise>
| <xsl:choose>
| <!-- min-pool-size is present -->
| <xsl:when test="min-pool-size">
| <xsl:choose>
| <xsl:when test="20 >= $minPoolCount">
| <attribute name="MaxSize">20</attribute>
| </xsl:when>
| <xsl:otherwise>
| <attribute name="MaxSize"><xsl:value-of select="min-pool-size"/></attribute>
| </xsl:otherwise>
| </xsl:choose>
| </xsl:when>
| <!-- min-pool-size is absent -->
| <xsl:otherwise>
| <attribute name="MaxSize">20</attribute>
| </xsl:otherwise>
| </xsl:choose>
| </xsl:otherwise>
| </xsl:choose>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033499#4033499
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033499
17 years
[EJB 3.0] - RollbackException and PersistentContext
by vedgunjan
Hi Experts,
Im using injected persistent context in my session bean.
@PersistentContext(unit="AppConext")
private EntityManeger entityManager;
In this session bean i've a method in which,i iterate over the list.
Lets say this method as method1();
The scenario is somthing like this..
@TransactionAttribute(REQUIRES_NEW)
public voic method1()
{
......some code.....
for(SomeObject obj : someObjectList)
{
..............some code....
//call method2
method2(obj);
.........some code......
}
}
@TransactionAttribute(REQUIRES_NEW)
public void method2()
{
}
What is happening here is when i call mehod2 and pass value to it from list,
the method throws NoEntityFound excexption and ejb transaction rolls back.
In the catch block of method2 , i'm catching NoEntityFoundException and getting the programm flow to normal flow.
Throwing of NoEntiyFound exception is an expected behaviour.
But my requirement is that i need to continue the iteration over the other values in the list.
But when the programm comes back to method1 and the moment it does some
procesing i get exception like:
javax.transaction.RollbackException: Already marked for rollback, tx=TransactionImpl:XidImpl[FormatId=257,
GenericJDBCException..cannot open connection..session close....
1)What is the technical reson behind exception in method1?
2)What should i do to solve it so that my code processes the rest of the elements in the list?
Thanking in advance for any help.
Thanks
Vedgunjan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033496#4033496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033496
17 years
[JBoss Seam] - Re: EntityConverter - when and how?
by irVega
OK, so the catbean.categories in
| <h:selectOneMenu value="#{search.category}"
| converter="#{catbean.converter}">
| <f:selectItem itemLabel="Any" itemValue="#{catbean.nullCategory}" />
| <f:selectItems value="#{catbean.categories}" />
| </h:selectOneMenu>
|
returns the map populated in the CategotyBean at instantiation.
When the converter is called into action, it takes the key (the selected Category's name), now in the appropriate context, and looks up the actual Category object (in the same map) to get that Category's id for use in the query.
Is that a better way to achieve this effect than the use of something like an entityQuery for retrieving the Categorys (categoriesQuery) with the following in the components.xml ?
| <h:selectOneListbox <h:selectOneMenu value="#{search.category}"
| <s:selectItems value="#{categoriesQuery.resultList}" var="category" label="#{category.name}" />
| </h:selectOneMenu>
|
Would a converter be needed in this case? What are the pros and cons of each approach (assuming my suggestion would even work - haven't tried it yet)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033493#4033493
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033493
17 years