[EJB 3.0] - Critical Major Problem/Bug
by snau2005
Good day,
Sorry for writing post with such screaming subject, but at least for me it's very important problem.
I want to rise the same problem again, please read the first orginal thread also:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=120234
I thought that I solved temporrary the problem described in original thread with such trick:
if select count(*) return for example 2
but select f returns only 1 object. I execute again select with additional condition " and 1192011323161 = 1192011323161" (These numbers are just current time in milisecs). My goal was to show that select is new and unique and I thought that in such case jboss will execute this query and would not use its own cache. For a while I thought that this is working, but now sometimes when this bug occurs and I execute again query with additional condintion i getting correct count of objects for example 2, but in results List I getting the same object twice, not two different objects how schould be.
Also I noticed that if in persistence.xml set such values to false, maybe bug occurs not so often but for sure it occurs.
<property name="hibernate.cache.use_second_level_cache" value="false"/>
| <property name="hibernate.cache.use_query_cache" value="false" />
| <property name="hibernate.statement_cache.size" value="0"/>
|
I'm using Oracle 10.2.0.1.0 , jboss-4.2.0.GA
Sorry for writing post for the same issue second time and with such screaming subject, but at least for me it's very important problem. I'm waiting any comments and ideas.
I'm waiting any comments and ideas.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096901#4096901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096901
18Â years, 9Â months
[JBoss jBPM] - Bug in Mail.java
by lmichenaud
I think something is missing in case of attribute 'to'
Actual code :
public List getRecipients() {
| List recipients = new ArrayList();
| if (actors != null) {
| String evaluatedActors = evaluate(actors);
| List tokenizedActors = tokenize(evaluatedActors);
| recipients.addAll(resolveAddresses(tokenizedActors));
| }
| if (to != null) {
| String resolvedTo = evaluate(to);
| recipients.addAll(tokenize(resolvedTo));
| }
| return recipients;
| }
Proposal :
public List getRecipients() {
| List recipients = new ArrayList();
| if (actors != null) {
| String evaluatedActors = evaluate(actors);
| List tokenizedActors = tokenize(evaluatedActors);
| recipients.addAll(resolveAddresses(tokenizedActors));
| }
| if (to != null) {
| String resolvedTo = evaluate(to);
| List tokenizedActors = tokenize(resolvedTo);
| recipients.addAll(resolveAddresses(tokenizedActors));
| }
| return recipients;
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096900#4096900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096900
18Â years, 9Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Mapping relationship where database ID's are different forma
by david.spark
I'm trying to map a OneToOne relationship in a legacy database. The problem I have is that I keep getting the following error:
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: LocationID, expected: tinyint
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)...
My entity beans are setup as follows:
@Entity
| @Table(name="tblAccountManager")
| public class AccountManager implements Serializable {
|
| ...
|
| @OneToOne
| @JoinColumn(name="LocationID")
| private Branch branch;
@Entity
| @Table(name="web_location")
| @Name("Branch")
| public class Branch implements Serializable {
|
| private static final long serialVersionUID = -7280892867401735383L;
|
| @Id @GeneratedValue
| @Column(name = "Loc_ID")
| @org.hibernate.annotations.Type(type = "custom.hibernate.IntegerToByteUserType")
| private Integer id;
I guess the problem is that in the database tblAccountManager.LocationID is an int(11) where as web_location.Loc_ID is a tinyint(3). Is there any way to map this setup with annotations and without changing the database?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096895#4096895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096895
18Â years, 9Â months