Problem Deploying an MDB

K

Ken Baltrinic

If this is not the correct group for this post, please inform me.

I am attempting to set up an variation of the log4j JMSSink that is actually
an Message Driven Bean. This seems pretty straight forward but I have never
messed with MDBs before and am new to log4j. All is good, apparently until
I go to deploy my bean. Then I getting a error:
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not
created

I am using the Sun J2EE SDK 1.4 server and have the following JSM resources
setup on the server:
- jms/log4jConnectionFactory (ConnectionFactory)
- jms/log4jTopic (Destination)
- log4jTopic (Physical Destination)

Can anyone give me a hand with this?

Below is my bean code, the descriptor xml and the error with stack trace, in
that order.

Thanks for the help,
Ken

package ref;

import javax.jms.*;
import javax.ejb.*;
import org.apache.log4j.*;
import org.apache.log4j.spi.*;
import org.apache.log4j.xml.DOMConfigurator;

public class log4jJMSSinkMDB implements MessageDrivenBean, MessageListener {


public void onMessage(javax.jms.Message message) {

try {

if(message instanceof ObjectMessage) {

ObjectMessage objectMessage = (ObjectMessage) message;

LoggingEvent event = (LoggingEvent)
objectMessage.getObject();

//we prepend 'remote' to all logger names because this sink
will run
//in the same container as components that log to it. This
alows us
//to create distinct behaviors in the configuration file for
classes
//logging to the JSMSink and the JMSSink's own logging
action.
//Without this the JMSSink would log to itself!
Logger remoteLogger = Logger.getLogger("remote." +
event.getLoggerName());

remoteLogger.callAppenders(event);

} else {

Logger logger = Logger.getLogger(log4jJMSSinkMDB.class);
logger.warn("Received message is of type
"+message.getJMSType()
+", was expecting ObjectMessage.");

}

} catch(JMSException jmse) {

Logger logger = Logger.getLogger(log4jJMSSinkMDB.class);
logger.error("Exception thrown while processing incoming
message.",
jmse);
}
}

public void ejbCreate(){

}

public void ejbRemove() throws javax.ejb.EJBException {
}

public void setMessageDrivenContext(javax.ejb.MessageDrivenContext
messageDrivenContext)
throws javax.ejb.EJBException {
}

}

<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
version="2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"<display-name>log4jJMSSinkMDB</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>log4jJMSSinkMDB</ejb-name>
<ejb-class>ref.log4jJMSSinkMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Topic</message-destination-type>
<message-destination-link>jms/log4jTopic</message-destination-link>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>log4jJMSSinkMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

[#|2004-09-23T12:36:57.246-0400|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=13;|LDR5004:
UnExpected error occured while creating ejb container
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not
created : ejb/log4jJMSSinkMDB
at
com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:296)
at
com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:232)
at
com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)
at
com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:189)
at
com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:196)
at
com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:477)
at
com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at
com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:96)
at
com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:205)
at
com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:156)
at
com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:480)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:448)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:432)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:299)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:107)
at
com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multicastEvent(ManagedServerInstance.java:3880)
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:324)
at
com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:181)
at
com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.java:86)
at
com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(ConfigMBeanBase.java:680)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
at
com.sun.enterprise.deployment.phasing.DeploymentService.multicastEvent(DeploymentService.java:341)
at
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:284)
at
com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:115)
at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:74)
at
com.sun.enterprise.deployment.phasing.DeploymentService.executePhases(DeploymentService.java:233)
at
com.sun.enterprise.deployment.phasing.DeploymentService.deploy(DeploymentService.java:150)
at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:275)
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:324)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:287)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:280)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
at $Proxy1.invoke(Unknown Source)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
at
com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
at
com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:536)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
at
com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
at java.lang.Thread.run(Thread.java:534)
|#]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top