[Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
by cpslo1999
I tried setting the DefaultDS as a XA Data Source using a datasource descriptor I found on the net (I can't vouch for it's correctness) and leaving my application's data source as a local-tx (like what is found in docs/examples/jca).
| <datasources>
| <xa-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/jbossdb</xa-datasource-property>
| <xa-datasource-property name="User">user</xa-datasource-property>
| <xa-datasource-property name="Password">pass</xa-datasource-property>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
|
| <track-connection-by-tx>true</track-connection-by-tx>
| <isSameRM-override-value>false</isSameRM-override-value>
| <no-tx-separate-pools/>
|
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </xa-datasource>
| </datasources>
|
My application deploys with this configuration, and my regression tests all run and pass. I do get an error on start up, however.
| 11:14:51,021 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=myapp.ear,jar=myapp-beans.jar,name=AgingImpl,service=EJB3
| 11:14:51,021 INFO [EJBContainer] STARTED EJB: myapp.control.aging.AgingImpl ejbName: AgingImpl
| 11:14:51,036 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
| myapp/AgingImpl/remote - EJB3.x Default Remote Business Interface
| myapp/AgingImpl/remote-myapp.client.control.aging.Aging - EJB3.x Remote Business Interface
|
| 11:14:51,239 ERROR [TimerImpl] Error invoking ejbTimeout
| org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped.
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:304)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
|
| ...(following INFO [JndiSessionRegistrarBase] Binding messages omitted)...
|
I haven't been able to find any information on this one yet, but I'm guessing that a persisted timer is firing before the container is ready for it.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225717#4225717
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225717
17 years
[JBoss Messaging] - Unknown column 'NODE_ID' in 'where clause'
by nvijsan
Hi,
I am trying to use jboss-messaging-1.4.2.GA-SP1 in jboss-4.2.1.GA and am stuck with this issue -
| 2009-04-15 10:46:18,238 (main) ERROR [org.jboss.messaging.util.ExceptionUtil] ServerPeer[0] startService
| com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'NODE_ID' in 'where clause'
| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
| at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
| at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153)
| at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager.retrievePreparedTransactions(JDBCPersistenceManager.java:336)
| at org.jboss.messaging.core.impl.tx.TransactionRepository.loadPreparedTransactions(TransactionRepository.java:176)
| at org.jboss.jms.server.ServerPeer.startService(ServerPeer.java:330)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
|
The database has been recreated to check whether the issue gets resolved, but that hasn't helped. Has anyone encountered this issue? Any thoughts on how this can be overcome?
Thanks,
Naga Vijayapuram
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225715#4225715
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225715
17 years
[Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
by cpslo1999
Progress update:
1) Copied the deploy/mysql-ds.xml file to deploy/app-mysql-ds.xml
2) Changed the JNDI name, changed the URL, changed the credentials in app-mysql-ds.xml
3) Restarted JBoss
-- No errors and no new warnings --
4) Deployed my JMS queues
-- No errors --
5) Deployed my app and I get a slew of warnings
| 09:50:27,318 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
| 09:50:27,318 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
| 09:50:27,318 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.cancelTimer()
| 09:50:27,334 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer(java.util.Date,long)
| 09:50:27,349 WARN [InterceptorRegistry] applicable interceptors is non-existent for public long myapp.control.aging.AgingImpl.getTimeRemaining()
| 09:50:27,365 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer()
| 09:50:27,381 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.ejbTimeout(javax.ejb.Timer)
| 09:50:27,381 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.cancelTimer()
| 09:50:27,396 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer(java.util.
| Date,long)
| 09:50:27,412 WARN [InterceptorRegistry] applicable interceptors is non-existent for public long myapp.control.aging.AgingImpl.getTimeRemaining()
| 09:50:27,427 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer()
| 09:50:27,443 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.ejbTimeout(javax.ejb.Timer)
| 09:50:27,459 INFO [AgingImpl] Initializing aging timer.
| 09:50:27,459 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
| 09:50:27,459 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
| 09:50:27,459 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.Object myapp.control.setting.SettingsImpl.get(myapp.client.control.setting.Key)
| 09:50:27,474 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.String myapp.control.setting.SettingsImpl.getRaw(myapp.client.control.setting.Key)
| 09:50:27,474 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.EnumMap myapp.control.setting.SettingsImpl.getAll()
| 09:50:27,490 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.Object myapp.control.setting.SettingsImpl.get(myapp.client.control.setting.Key)
| 09:50:27,506 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.String myapp.control.setting.SettingsImpl.getRaw(myapp.client.control.setting.Key)
| 09:50:27,506 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.EnumMap myapp.control.setting.SettingsImpl.getAll()
|
If my internet searching is correct, these can be safely ignored (http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/... the very bottom of the page).
The one that concerns me however is this one.
| 09:50:27,631 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource
| @26eac5
| 09:50:27,631 ERROR [AgingImpl] EJB Exception during create timer : javax.ejb.EJBException: Failed to create timer
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225707#4225707
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225707
17 years
[EJB/JBoss] - How to locate MDB MXbean via JNDI?
by tajh
I've searched the documentation and the forums, wasn't able to find this particular issue addressed anywhere.
I have a MDB (called MyMDB) deployed in a JAR, and I have a custom JMX bean deployed in a SAR. I would like to access the org.jboss.ejb.plugins.jms.JMSContainerInvokerMBean corresponding to my MDB so that the custom JMX bean can call the startDelivery() and stopDelivery() methods on the JMSContainerInvokerMBean. So far, I have been unable to locate the JMSContainerInvokerMBean in JNDI from within the SAR.
I have tried the following JNDI contexts, to no avail:
anonymous wrote : java:/comp/env/MyMDB
| java:/com/MyMDB
| java:/MyMDB
| local/MyMDB
| /MyMDB
| MyMDB
|
The JNDIView service in the JMX Console reports the following:
anonymous wrote : Ejb Module: MyMDB.jar
|
| java:comp namespace of the MyMDB bean:
|
| +- HandleDelegate (class: org.jboss.proxy.ejb.handle.HandleDelegateImpl)
| +- ORB (class: org.jacorb.orb.ORB)
| +- env (class: org.jnp.interfaces.NamingContext)
|
And of course I can access the desired JMSContainerInvokerMBean via the JMX console also, at something like the following:
anonymous wrote : jboss.j2ee
|
| * binding=message-driven-bean,jndiName=local/MyMDB@9049759,plugin=invoker,service=EJB
|
That number following the @ sign seems to be different every time I start JBoss, and this JNDI name seems to only apply from within the MDB's JAR scope itself. At first, I wasn't sure I could get access to the JMSContainerInvokerMBean from outside the MDB's JAR, but if the JMX Console can do it, I should be able to do it from within my custom JMX bean in my SAR.
So does anyone know the correct JNDI path to construct to get a handle to this?
For reference, I am running the following:
JBoss AS 4.2.2 GA
JBoss Messaging 1.0
Java SDK 1.5.0_12
And this is what my client JNDI lookup code looks like:
JMSContainerInvokerMBean mbean = null;
| try {
| Context context = new InitialContext();
| mbean = (JMSContainerInvokerMBean)context.lookup(jndiName);
| } catch (NamingException ne) {
| log.error("Unable to retrieve JMSContainerInvokerMBean at JNDI context " + jndiName, ne);
| } catch (ClassCastException ce) {
| log.error("Object at JNDI context " + jndiName + " is not instance of JMSContainerInvokerMBean", ce);
| }
Any help is appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225705#4225705
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225705
17 years