Metodo save Spring

4 respostas
Deluxe

public PK save(Tipo novoObj) throws PersistenceException { try { return (PK) getHibernateTemplate().save(novoObj); } catch (Exception e) { logger.error("Error:",e); throw new PersistenceException(e); } }

javax.faces.el.EvaluationException: br.com.ambiente.commons.support.dao.PersistenceException: org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
	org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
	org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
	com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
	com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

Alguem sabe pq isso ?

4 Respostas

G
Deluxe

pois é
nao entendi
nao da pra escrever em modo leitura???

G

pois eh … vc esta em modo somente leitura, read-only.

Deluxe

Resolvido

<props> <prop key="add*">PROPAGATION_REQUIRED </prop> <prop key="delete*">PROPAGATION_REQUIRED </prop> <prop key="update*">PROPAGATION_REQUIRED </prop> <prop key="save*">PROPAGATION_REQUIRED </prop> <prop key="get*">PROPAGATION_REQUIRED,readOnly </prop> </props>

Criado 9 de abril de 2009
Ultima resposta 9 de abr. de 2009
Respostas 4
Participantes 2