[JBoss JIRA] Updated: (EJBTHREE-553) PrePersist callback method not called if entity's primery key is null
by Mark Menard (JIRA)
[ http://jira.jboss.com/jira/browse/EJBTHREE-553?page=all ]
Mark Menard updated EJBTHREE-553:
---------------------------------
Attachment: EJB3EventListener_v2.patch
This is an updated patch based on Michal's work. This patch is against hibernate-entitymanager-3.2.20.CR2.
> PrePersist callback method not called if entity's primery key is null
> ---------------------------------------------------------------------
>
> Key: EJBTHREE-553
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-553
> Project: EJB 3.0
> Issue Type: Bug
> Environment: jboss-4.0.4.CR2
> Reporter: Michal Borowiecki
> Attachments: EJB3EventListener_v2.patch
>
>
> When an entity is persisted which does not have its primary key set (and it is not annotated with GeneratedValue annotation), the @PrePersist callback method is not invoked.
> Instead the exception is thrown:
> Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.bluemedia.system.User
> at org.hibernate.id.Assigned.generate(Assigned.java:33)
> at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
> at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
> at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:617)
> at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:591)
> at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:595)
> at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:187)
> ... 64 more
> This is in conflict with ejb 3.0-pfd spec, which states (sec. 3.4.2) :
> "The PrePersist and PreRemove callback methods are invoked for a given entity before the respective EntityManager persist and remove operations for that entity are executed."
> Since the spec states that EntityManager's persist operation is executed after the PrePersist callback methods, setting the value of the primary key in a PrePersist callback method seems a reasonable use case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Created: (JBCACHE-777) FileCacheLoader can return null for get(fqn) breaking the JavaDoc requirement for CacheLoader.get(fqn)
by Galder Zamarreno (JIRA)
FileCacheLoader can return null for get(fqn) breaking the JavaDoc requirement for CacheLoader.get(fqn)
------------------------------------------------------------------------------------------------------
Key: JBCACHE-777
URL: http://jira.jboss.com/jira/browse/JBCACHE-777
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.4.0.SP1, 1.3.0.SP3
Reporter: Galder Zamarreno
Assigned To: Manik Surtani
Priority: Minor
FileCacheLoader can return a null value for get(fqn) which goes against the JavaDoc
requirements for that method:
/**
* Returns all keys and values from the persistent store, given a fully qualified name.
*
* NOTE that the expected return value of this method has changed from JBossCache 1.2.x
* and before! This will affect cache loaders written prior to JBossCache 1.3.0 and such
* implementations should be checked for compliance with the behaviour expected.
*
* @param name
* @return Map<Object,Object> keys and values for the given node. Returns
* null if the node is not found. If the node is found but has no
* attributes, this method returns an empty Map.
* @throws Exception
*/
If a get(fqn) operation occurrs before a put and the node (directory) does not exist, FCL returns
null when it should return an empty Map.
If the customer creates a custom cache loader which delegates to a FileCacheLoader, the
following misleading warning message is logged:
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] CacheLoader.get(Fqn) returned a null; assuming the node nodes not exist.
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] The CacheLoader interface has changed since JBossCache 1.3.x
10:52:10.839 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] Please see http://jira.jboss.com/jira/browse/JBCACHE-118
10:52:10.849 WARN [MessageListenerThread - Belvedere/Desk/CacheLoaderInterceptor] CacheLoader.get() should return an empty Map if the node does exist but doesn't have any attributes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Resolved: (JBAS-3350) NPE on web service deployment
by Remy Maucherat (JIRA)
[ http://jira.jboss.com/jira/browse/JBAS-3350?page=all ]
Remy Maucherat resolved JBAS-3350.
----------------------------------
Fix Version/s: JBossAS-5.0.0.Beta
Resolution: Done
Ok. I may remove that naming code in the future.
> NPE on web service deployment
> -----------------------------
>
> Key: JBAS-3350
> URL: http://jira.jboss.com/jira/browse/JBAS-3350
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Thomas Diesler
> Assigned To: Remy Maucherat
> Fix For: JBossAS-5.0.0.Beta
>
>
> tdiesler@TDDELL /cygdrive/d/svn/jbossws/trunk/src/test
> $ ant -Dtest=org.jboss.test.ws.wsse.WebClientTestCase one-test
> 2006-06-29 11:02:35,953 ERROR [org.apache.catalina.startup.ContextConfig] Parse error in application web.xml file at jndi:/localhost/jbossws-wsse-rpc/WEB-INF/web.xml
> java.lang.NullPointerException
> at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725)
> at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2751)
> at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
> at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
> <web-app version='2.4' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd'>
> <servlet>
> <servlet-name>Hello</servlet-name>
> <servlet-class>org.jboss.ws.integration.jboss.JBossServiceEndpointServlet</servlet-class>
> <init-param>
> <param-name>ServiceEndpointImpl</param-name>
> <param-value>org.jboss.test.ws.wsse.HelloJavaBean</param-value>
> </init-param>
> </servlet>
> <servlet>
> <servlet-name>RpcTestClientServlet</servlet-name>
> <servlet-class>org.jboss.test.ws.wsse.RpcTestClientServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>Hello</servlet-name>
> <url-pattern>/Hello</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>RpcTestClientServlet</servlet-name>
> <url-pattern>/RpcTestClientServlet</url-pattern>
> </servlet-mapping>
> <service-ref>
> <service-ref-name>service/HelloService</service-ref-name>
> <service-interface>javax.xml.rpc.Service</service-interface>
> <wsdl-file>WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
> <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
> <port-component-ref>
> <service-endpoint-interface>org.jboss.test.ws.wsse.Hello</service-endpoint-interface>
> </port-component-ref>
> </service-ref>
> </web-app>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Created: (JBXB-79) Array parameter is being appended rather than passed intact
by David Boeren (JIRA)
Array parameter is being appended rather than passed intact
-----------------------------------------------------------
Key: JBXB-79
URL: http://jira.jboss.com/jira/browse/JBXB-79
Project: JBoss XML Binding (JBossXB)
Issue Type: Bug
Reporter: David Boeren
When I call a webservice method and pass an object containing an array of another object type, the server receives the array with additional elements. The array elements that I pass are appended, so that if I send 1 element the server receives 81. If I send 80 elements, the server receives 160. There are always 80 element preceding the first one that I pass.
The value 80 comes from code in the object constructor that preinitializes the array to this size.
This form causes the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array = new CoilData[80];
}
This form likewise causes the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array;
public Coils() {
array = new CoilData[80];
}
}
This form does not cause the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array;
public Coils() {
}
}
Coils coils = new Coils();
coils.setArray(new CoilData[80]);
So, it has something to do with initializing it in the construction of the object.
Attached is a full Eclipse project exhibiting the bug that you can run on JBoss 4.0.4.GA with JBossWS.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months