-
1. Re: Rather simple but doesn't work
peterj Oct 1, 2007 4:53 PM (in response to jwooten)I suspect that either
1) You did not install EJB3 into JBoss AS 4.0.5
2) You have the wrong EJB3 version installed in JBoss AS 4.0.5
My recommendation is to use JBoss AS 4.2.1. -
2. Re: Rather simple but doesn't work
jwooten Oct 2, 2007 10:28 AM (in response to jwooten)Did check this and confirmed that I did "default" installation. Uninstalled and reinstalled using EJB3 option. This allowed seam gen to create project and deploy it. It created a login page, but when I did the seam generate-entities, it created new classes for accessing the tables, but upon restarting the server, I get an error during startup of
10:25:57,996 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=seam_queuedb.ear,unitName=seam_queuedb
State: FAILED
Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: NEXT_ENTRY, expected: tinyblob
I Depend On:
jboss.jca:service=DataSourceBinding,name=seam_queuedbDatasource
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=seam_queuedb.ear,unitName=seam_queuedb
State: FAILED
Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: NEXT_ENTRY, expected: tinyblob
I Depend On:
jboss.jca:service=DataSourceBinding,name=seam_queuedbDatasource
And in the browser,
Cannot get value for expression '#{queueList.firstResult}'
How do I "fix" this? For this to be useful, it should handle these automatic generation things correctly. -
3. Re: Rather simple but doesn't work
jwooten Oct 2, 2007 10:47 AM (in response to jwooten)NEXT_ENTRY is a number, BTW
-
4. Re: Rather simple but doesn't work
jwooten Oct 2, 2007 11:42 AM (in response to jwooten)Following generated by seam generate-entities
The name in the table is a string and the other two entries
are ints, like 9050, and 10 ( this is in MySQL )
It trys to treat them as Serializeable and fails somehow.
How do I change this to use integers (i.e. provide the correct mapping)? I would think this would be straightforward for this simple table.
package com.shoulderscorp.queuedb;
// Generated Oct 1, 2007 4:04:08 PM by Hibernate Tools 3.2.0.b9
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;
/**
* Queue generated by hbm2java
*/
@Entity
@Table(name = "queue", catalog = "queue_db")
public class Queue implements java.io.Serializable {
private String name;
private Serializable nextEntry;
private Serializable entryIncr;
public Queue() {
}
public Queue(String name, Serializable nextEntry, Serializable entryIncr) {
this.name = name;
this.nextEntry = nextEntry;
this.entryIncr = entryIncr;
}
@Id
@Column(name = "NAME", unique = true, nullable = false, length = 32)
@NotNull
@Length(max = 32)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "NEXT_ENTRY", nullable = false)
@NotNull
public Serializable getNextEntry() {
return this.nextEntry;
}
public void setNextEntry(Serializable nextEntry) {
this.nextEntry = nextEntry;
}
@Column(name = "ENTRY_INCR", nullable = false)
@NotNull
public Serializable getEntryIncr() {
return this.entryIncr;
}
public void setEntryIncr(Serializable entryIncr) {
this.entryIncr = entryIncr;
}
} -
5. Re: Rather simple but doesn't work
peterj Oct 2, 2007 11:51 AM (in response to jwooten)Sorry, but I don't know that much about Seam. You might want to take this to the Seam forum http://www.jboss.com/index.html?module=bb&op=viewforum&f=231
-
6. Re: Rather simple but doesn't work
jwooten Oct 2, 2007 11:58 AM (in response to jwooten)Thanks for hint before about EJB3. that really helped.
-
7. Re: Rather simple but doesn't work
mortena Nov 6, 2007 10:45 AM (in response to jwooten)I have the exact same problem.
Jboss 4.2.2 no special setup or configuration.
How did you solve the problem? -
8. Re: Rather simple but doesn't work
wouterhartog Feb 25, 2008 5:53 PM (in response to jwooten)Me too; exact same problem.
Curious to know how this got solved...