[Persistence, JBoss/CMP, Hibernate, Database] - Re: QuerySyntaxException Class is not mapped JBOSS 4.2.2GA E
by July Pyrra
As I said, I'm working with EJB3 so it shouldn't have to deal with the persistence.xml or hibernate.cfg.xml
persistence.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence>
|
| <persistence-unit name="App">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/applids</jta-data-source>
| </persistence-unit>
|
| </persistence>
|
Entity Account
| package datamodel.DAO;
|
| // Generated 13-may-2008 17:41:43 by Hibernate Tools 3.1.0.beta5
|
| import javax.persistence.Column;
| import javax.persistence.Entity;
| import javax.persistence.FetchType;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.JoinColumn;
| import javax.persistence.ManyToOne;
| import javax.persistence.Table;
|
| /**
| * Account generated by hbm2java
| */
| @Entity
| @Table(name = "account", catalog = "appli", uniqueConstraints = {})
| public class Account implements java.io.Serializable {
|
| // Fields
|
| private int idAccount;
|
| private SystemUser systemUser;
|
| private String uid;
|
| private String pwd;
|
| private Boolean status;
|
| // Constructors
|
| /** default constructor */
| public Account() {
| }
|
| /** minimal constructor */
| public Account(int idAccount, SystemUser systemUser) {
| this.idAccount = idAccount;
| this.systemUser = systemUser;
| }
|
| /** full constructor */
| public Account(int idAccount, SystemUser systemUser, String uid,
| String pwd, Boolean status) {
| this.idAccount = idAccount;
| this.systemUser = systemUser;
| this.uid = uid;
| this.pwd = pwd;
| this.status = status;
| }
|
| // Property accessors
| @Id @GeneratedValue
| @Column(name = "idAccount", unique = true, nullable = false, insertable = true, updatable = true)
| public int getIdAccount() {
| return this.idAccount;
| }
|
| public void setIdAccount(int idAccount) {
| this.idAccount = idAccount;
| }
|
| @ManyToOne(cascade = {}, fetch = FetchType.LAZY)
| @JoinColumn(name = "idSystem_User", unique = false, nullable = false, insertable = true, updatable = true)
| public SystemUser getSystemUser() {
| return this.systemUser;
| }
|
| public void setSystemUser(SystemUser systemUser) {
| this.systemUser = systemUser;
| }
|
| @Column(name = "uid", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
| public String getUid() {
| return this.uid;
| }
|
| public void setUid(String uid) {
| this.uid = uid;
| }
|
| @Column(name = "pwd", unique = false, nullable = true, insertable = true, updatable = true, length = 65535)
| public String getPwd() {
| return this.pwd;
| }
|
| public void setPwd(String pwd) {
| this.pwd = pwd;
| }
|
| @Column(name = "status", unique = false, nullable = true, insertable = true, updatable = true)
| public Boolean getStatus() {
| return this.status;
| }
|
| public void setStatus(Boolean status) {
| this.status = status;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153649#4153649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153649
17 years, 11 months
[Messaging, JMS & JBossMQ] - Intermittent blocking on JBoss 3.2.0 - suspect JMSDestinatio
by pdeshmuk
We have been experiencing intermittent blocking (everything slows down and then just hangs) in our application. We use JBoss 3.2.0 on the server and SWING clients on customer desktops. I did the thread dump analysis during and after blocking. Looks like we have many threads waiting on JMSDestinationManager:connectionClosing(). Here is a stack trace of one of the waiting thread:
State: waiting for monitor entry
org.jboss.mq.server.JMSDestinationManager:connectionClosing(JMSDestinationManager.java:542)
waiting to lock-->org.jboss.mq.server.JMSDestinationManager(0x92d5f398)
org.jboss.mq.server.JMSServerInterceptorSupport:connectionClosing(JMSServerInterceptorSupport.java:112)
org.jboss.mq.security.ServerSecurityInterceptor:connectionClosing(ServerSecurityInterceptor.java:61)
org.jboss.mq.server.TracingInterceptor:connectionClosing(TracingInterceptor.java:158)
org.jboss.mq.server.JMSServerInvoker:connectionClosing(JMSServerInvoker.java:114)
org.jboss.mq.il.oil.OILServerILService$Client:run(OILServerILService.java:397)
java.lang.Thread:run(Thread.java:534)
And the stack trace of the thread holding the moitor:
State: runnable
java.net.SocketInputStream:socketRead0
java.net.SocketInputStream:read(SocketInputStream.java:129)
java.io.BufferedInputStream:fill(BufferedInputStream.java:183)
java.io.BufferedInputStream:read(BufferedInputStream.java:201)
locked-->java.io.BufferedInputStream(0xa89c47f0)
java.io.ObjectInputStream$PeekInputStream:peek(ObjectInputStream.java:2123)
java.io.ObjectInputStream$BlockDataInputStream:readBlockHeader(ObjectInputStream.java:2303)
java.io.ObjectInputStream$BlockDataInputStream:refill(ObjectInputStream.java:2370)
java.io.ObjectInputStream$BlockDataInputStream:read(ObjectInputStream.java:2442)
java.io.ObjectInputStream$BlockDataInputStream:readByte(ObjectInputStream.java:2591)
java.io.ObjectInputStream:readByte(ObjectInputStream.java:845)
org.jboss.mq.il.oil.OILClientIL:waitAnswer(OILClientIL.java:200)
org.jboss.mq.il.oil.OILClientIL:close(OILClientIL.java:74)
locked-->org.jboss.mq.il.oil.OILClientIL(0xa89c39f0)
org.jboss.mq.server.JMSDestinationManager:connectionClosing(JMSDestinationManager.java:578)
locked-->org.jboss.mq.server.JMSDestinationManager(0x92d5f398)
org.jboss.mq.server.JMSServerInterceptorSupport:connectionClosing(JMSServerInterceptorSupport.java:112)
org.jboss.mq.security.ServerSecurityInterceptor:connectionClosing(ServerSecurityInterceptor.java:61)
org.jboss.mq.server.TracingInterceptor:connectionClosing(TracingInterceptor.java:158)
org.jboss.mq.server.JMSServerInvoker:connectionClosing(JMSServerInvoker.java:114)
org.jboss.mq.il.oil.OILServerILService$Client:run(OILServerILService.java:397)
java.lang.Thread:run(Thread.java:534)
We use non-persistent JMS Queues. I noticed that in addition to the AUTO_ACKNOWLEDGE on the QueueSession:
queueSession = getQueueConnection().createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE),
we are also sending a programmatic acknowledgement:
sendRequest.acknowledge()
Questions:
1. Can multiple acknowledges cause JMSDestinationManager to get confused and result in multiple waiting threads?
2. Is this issue related to a bug reported in JBoss 3.2.8 regarding NPE on JMSDestinationManager.connectionClosing (http://jira.jboss.com/jira/browse/JBAS-2973)? We don't see the NPE in our logs though.
Thanks in advance.
Prabodh Deshmukh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153632#4153632
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153632
17 years, 11 months