I am trying to connect my AppServer ND 6.1.0.17 to a WebSphere Process Server 6.1.2
An application on the Process Server publishes messages to a topic on the Process Server.
I have an Message Driven Bean that consumes these messages.
So i create a new JMS Provider to connect to the Process Server and i create a connection factory and topic in the provider.
With OpenJMS this works and I receive messages published on the topic in OpenJMS.
But when my application wants to connect to the Process Server, I get the an error.
Since it says that the provider is null, can I assume that I need to set the classpath?
And if I need to set the classpath, does anyone know the jar files I need to collect for this to work?
BTW, Process Server runs on a Application Server, so I think the jar files for an Application Server will do fine.
All input is appreciated.
Richard
{code}[13-11-08 13:46:57:359 CET] 00000018 EJBContainerI I WSVR0057I: EJB jar started: ReceiveMSG.jar
[13-11-08 13:47:08:640 CET] 00000018 ConnectorRunt W J2CA0112W: Factory or provider name for jms/StationCF was null. The ObjectNames factory : provider : cannot be used by PMI to link the PMI statistics with the MBeans.
[13-11-08 13:47:09:843 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.09_0.txt
[13-11-08 13:47:09:890 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.09_0.txt
[13-11-08 13:47:09:953 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.09_1.txt
[13-11-08 13:47:09:968 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.09_1.txt
[13-11-08 13:47:10:062 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.10_0.txt
[13-11-08 13:47:10:093 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.10_0.txt
[13-11-08 13:47:10:156 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.10_1.txt
[13-11-08 13:47:10:187 CET] 00000018 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file E:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_00000018_08.11.13_13.47.10_1.txt
[13-11-08 13:47:10:203 CET] 00000018 MDBListenerIm W WMSG0019E: Unable to start MDB Listener Listen, JMSDestination jms/TestStation : javax.jms.IllegalStateException: CWSIA0025E: The method setExceptionListener is not permitted in this container.
at com.ibm.ws.sib.api.jms.impl.JmsConnectionImpl.setExceptionListener(JmsConnectionImpl.java:529)
at com.ibm.ejs.jms.JMSManagedConnection. (JMSManagedConnection.java:323)
at com.ibm.ejs.jms.JMSManagedTopicConnection.(JMSManagedTopicConnection.java:73)
at com.ibm.ejs.jms.GenericJMSManagedTopicConnectionFactory.createManagedConnection(GenericJMSManagedTopicConnectionFactory.java:91)
at com.ibm.ejs.jms.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:627)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1821)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1552)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2289)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:909)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:599)
at com.ibm.ejs.jms.JMSTopicConnectionFactoryHandle.createTopicConnection(JMSTopicConnectionFactoryHandle.java:84)
at com.ibm.ejs.jms.listener.MDBListenerImpl.createResources(MDBListenerImpl.java:424)
at com.ibm.ejs.jms.listener.MDBListenerImpl.internalStart(MDBListenerImpl.java:728)
at com.ibm.ejs.jms.listener.MDBListenerImpl.start(MDBListenerImpl.java:651)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.start(MDBListenerManagerImpl.java:634)
at com.ibm.ejs.jms.listener.MsgListenerPort.add(MsgListenerPort.java:227)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.startApplicationMDBs(MDBListenerManagerImpl.java:872)
at com.ibm.ejs.jms.listener.MDBListenerManagerImpl.stateChanged(MDBListenerManagerImpl.java:830)
at com.ibm.ws.runtime.component.MessageListenerImpl.stateChanged(MessageListenerImpl.java:188)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1255)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1121)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:235)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:230)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:829)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:949)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1486)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4042)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4139)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1491)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1090)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1081)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:974)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:351)
at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:205)
at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:680)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:484)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
{code}
A couple of pointers... Firstly, you shouldn't need to configure a new
JMS provider as the default messaging provider implementations in your
application server and process server are compatible. The error about
the exception listener is because you are trying to use a listener port
whereas, for the default messaging provider, you should be using an
activation spec. (Normally you'd get a warning to this effect but you
don't see this because you have defined a new provider.)
The steps you need are as follows:
- On the application server define a JMS topic on the default messaging
provider with the required topic space and topic names. Don't set the
bus name and just set these fields using the "other" option.
- On the application server defined a JMS activation spec on the default
messaging provider. This should point to your JMS topic, give the name
of the bus on the process server and, most importantly, set the provider
endpoints to point at your process server. See the InfoCenter for more
details on setting provider endpoints.
- Deploy your MDB against the activation spec.
Hope that helps!
Regards,
David
I have read the document, but now the errormessage does not make a lot of sense.
I am using a message driven bean and a Listener Port.
I have included the code and the ejb deployment descriptor so you can see it yourself. I am not using any of the forbidden functions, but maybe they are called on deployment.
So I think the error will be in the deployment description or in one of the servers.
To test the connection to the JMS provider I have written an J2SE application to send and receive messages.
Using the IBM Client libraries this works.
Again, all input is appreciated.
Richard
The code for the MDB:
{code}
import javax.jms.JMSException;
import javax.jms.TextMessage;
/**
* Bean implementation class for Enterprise Bean: Listen
*/
public class ListenBean
implements
javax.ejb.MessageDrivenBean,
javax.jms.MessageListener {
/**
*
*/
private static final long serialVersionUID = -2261282865038282574L;
private javax.ejb.MessageDrivenContext fMessageDrivenCtx;
/**
* getMessageDrivenContext
*/
public javax.ejb.MessageDrivenContext getMessageDrivenContext() {
return fMessageDrivenCtx;
}
/**
* setMessageDrivenContext
*/
public void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx) {
fMessageDrivenCtx = ctx;
}
/**
* ejbCreate
*/
public void ejbCreate() {
}
/**
* onMessage
*/
public void onMessage(javax.jms.Message msg) {
if( msg instanceof TextMessage )
{
try {
System.out.print("ListenBean received: ");
System.out.println(((TextMessage)msg).getText() );
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else
{
System.out.println("Received object:");
System.out.println(((Object)msg).getClass().toString());
}
}
/**
* ejbRemove
*/
public void ejbRemove() {
}
}
{code}
EJB Deployment Descriptor
{code}
ReceiveMSG
Listen
ejbs.ListenBean
javax.jms.MessageListener
Bean
javax.jms.Topic
destinationType
javax.jms.Topic
subscriptionDurability
NonDurable
acknowledgeMode
Auto-acknowledge
jms/TestStation
ReceiveMSGClient.jar
{code}
Regards,
David