[JBoss Seam] - Re: geam-gen generate-entities error
by gaboo
Dunno If it's related to hibernate ot not, maybe. Please tell me if so and I will report the problem to hibernate.
Here is more information : if I have a char(X) column in a mysql table which is reverse engineered using generate-entities (which runs successfully) I get these errors in my jboss as output :
11:25:23,740 INFO [SchemaValidator] Running schema validator
| 11:25:23,740 INFO [SchemaValidator] fetching database metadata
| 11:25:23,763 INFO [TableMetadata] table found: lrb.abocc
| 11:25:23,763 INFO [TableMetadata] columns: [dt_bgn_test, dp_rglt_post, dp_use, dt_end_test, nb_div, nb_ren, dt_end, dt_creat, dt_bgn, nb_ofs, tx_tva, mt_ht, dt_modif, ct_pers, ct_ref, ty, lb, ct]
| 11:25:23,765 WARN [ServiceController] Problem starting service persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest
| javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
|
and then at the end :
11:25:26,212 INFO [StartupServletContextListener] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
| 11:25:26,250 INFO [EARDeployer] Started J2EE application: file:/home/gaboo/progs/jboss-4.0.5.GA/server/default/deploy/lrbseamtest.ear/
| 11:25:26,251 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest
| State: FAILED
| Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4)
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest
| State: FAILED
| Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4)
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996607#3996607
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996607
18 years, 10 months
[JBoss Messaging] - Jboss messaging not picking up messages
by mgajendr
Hi,
We are using JDK1.5 and Jboss messaging 1.0.1CR4 in production environment. We are using oracle based message persistence as well. The MDB's pick up the messages properly for 2/3 days and after that messages starts backing up in the JMS_MESSAGE table. The server will continue to process other messages coming in, even when there are bunch of messages stuck in limbo state. The number of messages getting backed up gradually increases, still the MDB ignore those messages and processes other incoming messages. The backed up messages in the table never get processed.
Even when we restart the Jboss messaging server, it does not pick up the messages existing in the JMS_MESSAGE table. We need to manually clean up all the messages and do a restart and this means, messages are lost.
What we would like to understand is
- Why Jboss is backing up messages and is there a way to solve it ?
- Is there a way to reset the messages in JMS_MESSAGE table so that they get picked up when we restart the messaging service ?
Also at times we get the following exceptions in the Jboss messaging server that is backing up the messages. Not able to reproduce this though, but occurs very randomly.
2006-12-27 17:04:56,054 ERROR [org.jboss.jms.server.endpoint.ServerConnectionEndpoint] Exception occured
org.jboss.messaging.core.tx.TransactionException: Failed to remove delivery 1453768
at org.jboss.jms.server.endpoint.ServerConsumerEndpoint$DeliveryCallback.afterCommit(ServerConsumerEndpoint.java:836)
at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:194)
at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:410)
at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:99)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:999)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:848)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:447)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:534)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:257)
------------------------
2006-12-27 17:04:56,357 ERROR [org.jboss.jms.server.endpoint.ServerConnectionEndpoint] Exception occured
javax.jms.IllegalStateException: Failed to acknowledge delivery null
at org.jboss.jms.server.endpoint.ServerConsumerEndpoint.acknowledgeTransactionally(ServerConsumerEndpoint.java:485)
at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.processTransaction(ServerConnectionEndpoint.java:768)
at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:351)
at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:99)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:999)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:848)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:447)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:534)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:257)
Any help on this is much appreciated.
Thanks,
-MG
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996604#3996604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996604
18 years, 10 months
[Messaging, JMS & JBossMQ] - Re: Sending Entities in Messages?
by Byorn
//use this send the object to the queue
public class SendMessagesViaMDB{
//method to get the queue connection
public static javax.jms.QueueConnection getQueueConnection( java.util.Hashtable environment ) throws javax.naming.NamingException, javax.jms.JMSException
{
// Obtain initial context
javax.naming.InitialContext initialContext = new javax.naming.InitialContext(environment);
try {
java.lang.Object objRef = initialContext.lookup(CONNECTION_FACTORY_JNDI_NAME);
return ((javax.jms.QueueConnectionFactory) objRef).createQueueConnection();
} finally {
initialContext.close();
}
}
/**
* TO BE CALLED IN THE CLIENT SIDE
* @param STUFF
*/
public void sendSTUFFViaMDB(Collection STUFF) {
QueueConnection queueConnection = null;
QueueSession jmsSession = null;
try {
queueConnection = getTravelAgentMailingServiceMDBQueueConnection();
jmsSession = queueConnection.createQueueSession(false,QueueSession.AUTO_ACKNOWLEDGE);
QueueSender sender = jmsSession.createSender(getQueueConnection(JNDI PROPS));
// create the message and set the content
ObjectMessage message = jmsSession.createObjectMessage();
message.setObject((ArrayList) STUFF)
//send the message
sender.send(message);
sender.close();
log.debug("Message is written to jms queue");
} catch (JMSException e) {
log.error("Sending message via jms failed", e);
} catch (NamingException e) {
log.error("Sending message via jms failed",e);
} catch(ModuleException moduleException) {
log.error("Sending message via jms failed", moduleException);
} finally {
if (queueConnection != null){
try {
queueConnection.close();
} catch (JMSException e) {
log.error("Closing jms queue connection failed", e);
}
}
if (jmsSession != null){
try {
jmsSession.close();
} catch (JMSException e) {
log.error("Closing jms session failed", e);
}
}
}
}
//THE MDB
public class MessagingServiceMDB implements MessageDrivenBean, MessageListener {
public void onMessage(Message message){
try {
ObjectMessage objMessage = (ObjectMessage)message;
ArrayList msgProfiles = (ArrayList)objMessage.getObject();
MyMessageManager manager = new MyMessageManager ();
manager.processMessages(msgProfiles);
} catch (JMSException jmsException) {
+ jmsException.getMessage(), jmsException);
} catch (Exception exception) {
+ exception.getMessage(), exception);
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996602#3996602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996602
18 years, 10 months
[JBoss jBPM] - Exception on scheduler launch
by Vlad Tepesch
Hello
First of all, sorry for my English, it's not my native language.
Now, the problem :
I'm using JBPM 3.1.2 with a JBoss 4.0 and I try to make a project on an Eclispe I haven't setup myself (so I don't really know wich plug in is installed).
When I try to laucnch the JBPM's Scheduler (using this code in my web.xml)
<servlet>
| <servlet-name>JbpmThreadsServlet</servlet-name>
| <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>JbpmThreadsServlet</servlet-name>
| <url-pattern>/threads</url-pattern>
| </servlet-mapping>
I receive exceptions on JBoss starting. (In fact, the exceptions appears in loop, so I think JBoss as start, and it's the scheduler which launch the Exception)
The exception threw is :
| java.sql.SQLException: Can't call rollback when autocommit=true
| at com.mysql.jdbc.Connection.rollback(Connection.java:4729)
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460)
| at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
| at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:154)
| at org.jbpm.svc.Services.close(Services.java:211)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
| 14:29:08,137 INFO [STDOUT] org.jbpm.persistence.JbpmPersistenceException: couldn't rollback hibernate session
| 14:29:08,137 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:156)
| 14:29:08,137 INFO [STDOUT] at org.jbpm.svc.Services.close(Services.java:211)
| 14:29:08,137 INFO [STDOUT] at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| 14:29:08,137 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:139)
| 14:29:08,137 INFO [STDOUT] at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
| 14:29:08,137 INFO [STDOUT] Caused by: org.hibernate.TransactionException: JDBC rollback failed
| 14:29:08,137 INFO [STDOUT] at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:170)
| 14:29:08,137 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:154)
| 14:29:08,137 INFO [STDOUT] ... 4 more
| 14:29:08,137 INFO [STDOUT] Caused by: java.sql.SQLException: Can't call rollback when autocommit=true
| 14:29:08,137 INFO [STDOUT] at com.mysql.jdbc.Connection.rollback(Connection.java:4729)
| 14:29:08,137 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535)
| 14:29:08,137 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460)
| 14:29:08,137 INFO [STDOUT] at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
| 14:29:08,137 INFO [STDOUT] at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
| 14:29:08,137 INFO [STDOUT] ... 5 more
| 14:29:08,137 ERROR [Services] problem closing service 'persistence'
| org.jbpm.persistence.JbpmPersistenceException: couldn't rollback hibernate session
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:156)
| at org.jbpm.svc.Services.close(Services.java:211)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
| Caused by: org.hibernate.TransactionException: JDBC rollback failed
| at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:170)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:154)
| ... 4 more
| Caused by: java.sql.SQLException: Can't call rollback when autocommit=true
| at com.mysql.jdbc.Connection.rollback(Connection.java:4729)
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460)
| at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
| at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
| ... 5 more
| 14:29:08,137 ERROR [CommandExecutorThread] org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't rollback hibernate session}
| 14:29:08,137 ERROR [SchedulerSession] org.hibernate.MappingException: Named query not known: SchedulerSession.findTimersByDueDate
| 14:29:08,137 INFO [SchedulerThread] runtime exception while executing timers
| org.jbpm.JbpmException: couldn't find timers from the database
| at org.jbpm.db.SchedulerSession.findTimersByDueDate(SchedulerSession.java:88)
| at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:106)
| at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
| Caused by: org.hibernate.MappingException: Named query not known: SchedulerSession.findTimersByDueDate
| at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
| at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
| at org.jbpm.db.SchedulerSession.findTimersByDueDate(SchedulerSession.java:82)
| ... 2 more
| 14:29:13,129 ERROR [SchedulerSession] org.hibernate.MappingException: Named query not known: SchedulerSession.findTimersByDueDate
| 14:29:13,129 ERROR [JDBCTransaction] JDBC rollback failed
| java.sql.SQLException: Can't call rollback when autocommit=true
| at com.mysql.jdbc.Connection.rollback(Connection.java:4729)
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:535)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:460)
| at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
| at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:154)
| at org.jbpm.svc.Services.close(Services.java:211)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:139)
| at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
| 14:29:13,160 INFO [SchedulerThread] runtime exception while executing timers
| org.jbpm.JbpmException: couldn't find timers from the database
| at org.jbpm.db.SchedulerSession.findTimersByDueDate(SchedulerSession.java:88)
| at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:106)
| at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
| Caused by: org.hibernate.MappingException: Named query not known: SchedulerSession.findTimersByDueDate
| at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
| at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
| at org.jbpm.db.SchedulerSession.findTimersByDueDate(SchedulerSession.java:82)
| ... 2 more
I try to search about this on google and I find some patchs at :
-http://fisheye.jboss.org/viewrep/JBPM/jbpm.3/jpdl/jar/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java?r1=1.4&r2=1.5
-http://jira.jboss.com/jira/secure/attachment/12312800/jbpm_session_already_closed_exception.patch
So, I patch my JBPM, rebuild the jar with ant but I always have this exceptions.
Did someone have a clue that can help me to find why this Exceptions is throwing ? (Or maybee just a method to set autocommit to false into a datasource file with the mysql driver ^^)
Thanks and goodbye
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996601#3996601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996601
18 years, 10 months