[Persistence, JBoss/CMP, Hibernate, Database] - DataSource inside ear file
by darretta
Since migrating to JBoss 4.0.3 and EJB 3.0, I've had a huge struggle with JNDI binding. My latest issue is regarding my datasource, named nicweb-jboss-ds.xml. Prior to JBoss 4.0.3 (or, maybe it's J2EE 1.5), I was able to deploy this file from the top level of my ear. Now, unless I explicitly place this file in the JBoss deploy directory (outside my ear), it will not bind to JNDI.
I have a similar issue where my 2.1 beans no longer bind to JNDI.
Has there been a change in the spec for Java 1.5, or does JBoss 4.0.3SP1 handle ears differently. I cannot seem to resolve this via my own limited knowledge and web searches.
Any suggestions are appreciated.
Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104364#4104364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104364
18 years, 8 months
[JBoss Seam] - a4j:support to reRender dataTable and Factory question
by asookazian
so I'm using the Factory component pattern on a conversation scoped SFSB. I added a a4j:support tag to a h:selectOneRadio tag and the h:form is reRendered when user clicks 'no' on one of the radioButtons.
So my question is: does the Factory method execute again when the dataTable is reRendered? It seems it's not refiring based on log output in the server.log. I don't actually want it to, but just curious...
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:c="http://java.sun.com/jstl/core"
| template="layout/template.xhtml">
|
|
|
| <ui:define name="body">
|
| <script type="text/javascript"
| src="seam/resource/remoting/resource/remote.js">
| </script>
|
| <script type="text/javascript"
| src="seam/resource/remoting/interface.js?noteAction">
| </script>
|
| <script type="text/javascript"
| src="seam/resource/remoting/interface.js?securityAuditAction">
| </script>
|
| <script type="text/javascript"
| src="js/securityAudit.js">
| </script>
|
| <h:messages globalOnly="true" styleClass="message"/>
|
| <rich:modalPanel id="mp" minHeight="200" minWidth="450"
| height="500" width="500" zindex="2000">
|
| <f:facet name="header">
| <a4j:form id="a4jHeaderForm">
| <h:outputText id="headerText" value=""/>
| </a4j:form>
| </f:facet>
|
| <a4j:form id="a4jMainForm">
| <h:panelGrid columns="2" style="vertical-align:middle">
| <h:outputText id="description" value=""/>
| <BR/>
| <h:inputTextarea id="noteText" value="#{noteAction.noteText}" rows="6" cols="50"/>
| <!-- hidden variables are null/empty in NoteAction submit method, using Seam remoting -->
|
| <h:inputHidden id="rowIndex" value="noteAction.rowIndex"/>
| <h:inputHidden id="colName" value="noteAction.colName"/>
| <!--
| <h:inputHidden id="siteId" value="noteAction.siteId"/>
| <h:inputHidden id="employeeNumber" value="noteAction.employeeNumber"/>
| -->
| <a4j:commandButton value="submit" action="#{noteAction.submit}" onclick="showNoteGraphic();Richfaces.hideModalPanel('mp')"/>
| <BR/>
| <a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mp');unselectCurrentRadioButton();checkForSubmitFromModalPanel()"/>
| </h:panelGrid>
| </a4j:form>
| </rich:modalPanel>
| <!--
| <rich:panel>
| <a4j:form>
| <h:panelGrid columns="2">
| <h:inputText value="#{noteAction.networkId}"/>
| <a4j:commandButton value="Submit" align="top"/>
| <a4j:status>
| <f:facet name="start">
| <h:graphicImage value="/img/spinner.gif"/>
| </f:facet>
| </a4j:status>
| </h:panelGrid>
| </a4j:form>
| </rich:panel>
| -->
| <rich:panel>
| <h:form id="mainForm">
| <h:outputText value="No Direct Reports" rendered="#{myAuditList != null and myAuditList.rowCount==0}"/>
| <h:dataTable id="dataTable1" value="#{myAuditList}" var="myRow" rendered="#{myAuditList != null and myAuditList.rowCount > 0}"
| styleClass="dataTable" rowClasses="oddRow, evenRow" frame="hsides">
| <h:column>
| <f:facet name="header">Status</f:facet>
|
| <h:graphicImage id="statusImage" value="/img/red.gif"/>
| </h:column>
| <h:column>
| <f:facet name="header">Employee Name</f:facet>
|
| <!-- siteId and employeeNumber hidden fields are used for all radio buttons -->
| <h:outputText id="employeeName" value="#{myRow[0].id.employeeName}"/>
| <h:inputHidden id="employeeNameHidden" value="#{myRow[0].id.employeeName}"/>
| <h:inputHidden id="siteId" value="#{myRow[0].id.siteId}"/>
| <h:inputHidden id="employeeNumber" value="#{myRow[0].id.employeeNumber}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">SiteId</f:facet>
|
| <h:outputText value="#{myRow[0].id.siteId}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">EmployeeNumber</f:facet>
|
| <h:outputText value="#{myRow[0].id.employeeNumber}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">Account Approved?</f:facet>
|
| <h:selectOneRadio id="accountApprovedRB" value="#{myRow[1].icomsAccountApproved}">
| <a4j:support event="onclick"
| oncomplete="showHideRadioButtons(#{myAuditList.getRowIndex()}); processNote(#{myAuditList.getRowIndex()}, 'accountApproved'); checkForSubmit(#{myAuditList.getRowIndex()})"
| action="#{noteAction.setRenderRadioButtons(myAuditList.getRowIndex(), myRow[1].icomsAccountApproved)}"
| reRender="mainForm"
| ajaxSingle="true"/>
|
| <f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
| </h:selectOneRadio>
| <h:graphicImage id="acctGraphic" value="/img/icon_edit.gif"
| onclick="editNote(this, #{myAuditList.getRowIndex()}, 'accountApproved');" style="visibility:hidden"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">Security Level Approved?</f:facet>
| <h:selectOneRadio id="securityLevelApprovedRB" value="#{myRow[1].securityLevelApproved}"
| onclick="processNote(#{myAuditList.getRowIndex()}, 'secLevelApproved');checkForSubmit(#{myAuditList.getRowIndex()})"
| rendered="#{noteAction.getRenderRadioButtons(myAuditList.getRowIndex())}">
| <f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
| </h:selectOneRadio>
| <h:graphicImage id="securityLevelGraphic" value="/img/icon_edit.gif"
| onclick="editNote(this, #{myAuditList.getRowIndex()}, 'secLevelApproved');" style="visibility:hidden"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">Adjustment Limit Approved?</f:facet>
| <h:selectOneRadio id="adjustmentLimitApprovedRB" value="#{myRow[1].adjustmentLimitApproved}"
| onclick="processNote(#{myAuditList.getRowIndex()}, 'adjLimitApproved');checkForSubmit(#{myAuditList.getRowIndex()})"
| rendered="#{noteAction.getRenderRadioButtons(myAuditList.getRowIndex())}">
| <f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
| </h:selectOneRadio>
| <h:graphicImage id="adjLimitGraphic" value="/img/icon_edit.gif"
| onclick="editNote(this, #{myAuditList.getRowIndex()}, 'adjLimitApproved');" style="visibility:hidden"/>
| </h:column>
|
|
| <h:column>
| <h:commandButton id="submitEmployee" value="Submit" action="#{securityAuditAction.submit}" style="visibility:hidden"/>
| <!-- <f:param name="securityAuditRowNum" value="#{myAuditList.getRowIndex()}"/> -->
| <h:inputHidden id="securityAuditRowNum" value="#{myAuditList.getRowIndex()}"/>
| </h:column>
| </h:dataTable>
|
| </h:form>
| </rich:panel>
|
| </ui:define>
| </ui:composition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104363#4104363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104363
18 years, 8 months
[JBoss OSGi] - Re: OSGi features
by alesj
"trouby" wrote :
| Nuxeo(OSS ECM) took this step forward, they had to deploy their application on Eclipse server and Jboss as well, so they have their own OSGI implementation with Jboss adpater which hook Jboss j2ee/javaee behaviors with the OSGI model
|
| You guys better take a look, they also have component extensibility where each component can declare extension-points and can contribute to other components (but yet again, I'm really not sure this is a part of the OSGI spec),
|
Yeah, I wanted to get in touch with Nuxeo, about the OSGI support they have already done on top of JBoss, but there was no response.
So we took our own approach. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104351#4104351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104351
18 years, 8 months
[JBoss Seam] - NPE Problem with <s:convertEntity />, seems Entity manager i
by gnevarez
I have an error with a dropdown, it seems something is not correct about the entity manager or the Seam Managed Persistence Context (SMPC) , although I can get a log entry saying entities were retrieved from the database.
It's the booking example modified, some of the labels might be familiar.
I'm using Seam 2.0.0 and AS 4.2.2
Except from the view (registrounidad.xhtml)
| <h:selectOneMenu id="idgrupo" value="#{unidad.idgrupo}" required="true">
|
| <s:selectItems value="#{gruposDisponibles}" var="grupo" label="#{grupo.nombre}" noSelectionLabel="Please select..." />
| <s:convertEntity />
| </h:selectOneMenu>
|
persistance.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
| version="1.0">
|
| <persistence-unit name="bookingDatabase">
|
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
| <jta-data-source>java:/bookingDatasource</jta-data-source>
|
| <properties>
|
| <property name="hibernate.hbm2ddl.auto" value="update"/>
|
| <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
|
| <property name="hibernate.show_sql" value="true"/>
|
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
|
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/unitsEntityManagerFactory"/>
| </properties>
|
| </persistence-unit>
|
| </persistence>
|
components.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <components xmlns="http://jboss.com/products/seam/components"
|
| xmlns:core="http://jboss.com/products/seam/core"
|
| xmlns:security="http://jboss.com/products/seam/security"
|
| xmlns:transaction="http://jboss.com/products/seam/transaction"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| xsi:schemaLocation=
|
| "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
|
| http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
|
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd ">
|
|
|
| <core:init jndi-pattern="@jndiPattern@" debug="true"/>
|
|
|
| <core:manager conversation-timeout="120000"
|
| concurrent-request-timeout="500"
|
| conversation-id-parameter="cid"/>
|
| <core:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/unitsEntityManagerFactory"/>.
|
| <transaction:ejb-transaction/>
|
|
|
| <security:identity authenticate-method="#{authenticator.authenticate}"/>
|
|
| </components>
|
The Search Bean (UnidadSearchingAction.java)
| package org.jboss.seam.example.booking;
|
| import java.util.List;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.jboss.seam.log.Log;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.annotations.security.Restrict;
|
| @Stateful
| @Name("unidadSearch")
| @Scope(ScopeType.SESSION)
| @Restrict("#{identity.loggedIn}")
| public class UnidadSearchingAction implements UnidadSearching
| {
|
| @Logger
| Log log;
|
| @PersistenceContext
| private EntityManager entityManager;
| //private EntityManager em;
|
| private String searchString;
| private int pageSize = 10;
| private int page;
|
| @Out(required = false)
| public List<Grupo> gruposDisponibles;
|
| @DataModel
| private List<Unidad> unidades;
|
| public void find()
| {
| page = 0;
| queryUnidades();
| }
| public void nextPage()
| {
| page++;
| queryUnidades();
| }
|
|
| public List<Grupo> getGruposDisponibles() {
| return gruposDisponibles;
| }
| public void setGruposDisponibles(List<Grupo> gruposDisponibles) {
| this.gruposDisponibles = gruposDisponibles;
| }
|
| @Factory("gruposDisponibles")
| public void comboGrupos()
| {
| log.info("Loading gruposDisponibles...");
| gruposDisponibles = entityManager.createQuery("select g from Grupo g order by g.nombre")
| .getResultList();
| log.info("Size: " + gruposDisponibles.size());
| }
|
| private void queryUnidades()
| {
| unidades = entityManager.createQuery("select u from Unidad u where lower(u.etiqueta) like #{unidPattern} or lower(u.device) like #{unidPattern} or lower(u.placa) like #{unidPattern} order by u.etiqueta")
| .setMaxResults(pageSize)
| .setFirstResult( page * pageSize )
| .getResultList();
| }
|
| public boolean isNextPageAvailable()
| {
| return unidades!=null && unidades.size()==pageSize;
| }
|
| public int getPageSize() {
| return pageSize;
| }
|
| public void setPageSize(int pageSize) {
| this.pageSize = pageSize;
| }
|
| @Factory(value="unidPattern", scope=ScopeType.EVENT)
| public String getSearchPattern()
| {
| return searchString==null ?
| "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
| }
|
| public String getSearchString()
| {
| return searchString;
| }
|
| public void setSearchString(String searchString)
| {
| this.searchString = searchString;
| }
|
| @Remove
| public void destroy() {}
| }
|
The Stack trace
| 16:38:39,914 INFO [UnidadSearchingAction] Loading gruposDisponibles...
| 16:38:39,930 INFO [STDOUT] Hibernate: select grupo0_.idgrupo as idgrupo51_, grupo0_.nombre as nombre51_, grupo0_.descripcion as descripc3_51_ from gpsgrupos grupo0_ order by grupo0_.nombre
| 16:38:39,952 INFO [UnidadSearchingAction] Size: 2
| 16:38:39,972 ERROR [STDERR] Nov 13, 2007 4:38:39 PM com.sun.facelets.FaceletViewHandler handleRenderException
| SEVERE: Error Rendering View[/registrounidad.xhtml]
| java.lang.NullPointerException
| at org.jboss.seam.framework.EntityIdentifier.<init>(EntityIdentifier.java:15)
| at org.jboss.seam.ui.converter.EntityConverterStore.put(EntityConverterStore.java:60)
| at org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:69)
| at org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67)
| at org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:123)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:502)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:757)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:811)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
| at org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
| at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
| at org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:94)
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| 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:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| 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.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104348#4104348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104348
18 years, 8 months
[JBoss Seam] - hibernate-annotations.jar versioning differs between SEAM 2.
by kfletcher2005
I found an issue while trying to use the @Digits hibernate validator which happens to resolve an issue very cleanly for me validating a backing bean with a Long attribute. I get a class not found exception in the app server using the jboss hibernate annotation libs for the 'org.hibernate.validator.Digits' class b/c it is not there. The version in JBOSS AS 4.2.1 is using version 3.2.1 of hibernate-annotations.jar and the version in SEAM 2.0 GA is using v3.3 where the validator classes have apparently be refactored into another jar called hibernate-validator.jar (apparently version 3.0 based on the MANIFEST.MF) which is altogether not present in jboss 4.2.1, but it is present in SEAM 2.0 GA.
There are 2 possible solutions that I can think of:
1) I could replace the version of of hibernate-annotations.jar and add hibernate-validator.jar in my local copy of jboss AS, however, that only fixes me locally.
2) I could introduce these jars into my ear file and possibly run into class collisions between the annotations and validation jars in the AS.
Regarding option 1, as for operations protocol, slipping in jars and swapping out jars in our production app server requires an act of congress.
Regarding option 2, I don't want to deal with class collisions between my ear file and the AS.
How do I a mitigate this problem of hibernate-annotation versioning between SEAM 2.0 & Jboss AS 4.2.1?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104347#4104347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104347
18 years, 8 months
[JBoss Seam] - Nested repeats bug
by msznapka
Hello.
I think that I found bug in nested repeats. I have following code:
| <h:commandLink action="#{repeatConversation.deleteItems}" value="commandLink"/><br/>
| <s:link action="#{repeatConversation.deleteItems}" value="sLink"/><br/>
| <ui:repeat value="#{repeatConversation.shoppingList.categories}" var="category">
| <ui:repeat value="#{category.items}" var="item">
| <h:inputText value="#{item.name}"/><br/>
| </ui:repeat>
| </ui:repeat>
|
| public String deleteItems() {
| Iterator<ItemCategory> iteratorCategories = shoppingList.getCategories().iterator();
| while(iteratorCategories.hasNext()) {
| Iterator<Item> iteratorItems = iteratorCategories.next().getItems().iterator();
| while(iteratorItems.hasNext()) {
| Item item = iteratorItems.next();
| if(item.getName().equalsIgnoreCase("thirdItem"))
| iteratorItems.remove();
| }
| }
| return null;
| }
|
So the code is simple, I am repeating through nested collections, rendering some string as a value of a input field and there are two links with the same functionality: delete third item. If you press h:commandLink, than the third item is deleted on the server correctly, but on the client it is rendered incorrectly. S:link renders all inputs correctly. Here is picture how it works:
Example
Delete directory jboss-seam-2.0.0.GA/examples/numberguess and copy directory from the example, build, deploy on jboss-4.2.1.GA and run http://localhost:8080/seam-numberguess in browser.
If this is not bug, please let me know how to solve it with h:commandLink, my app is waiting for solution ;)
Thx
msznapka
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104341#4104341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104341
18 years, 8 months