java - NoInitialContextException when deploying MDB on custom resource adapter -
i developed resource adapter use within application ear, deployed in jboss 5.1. after playing around annotations , xml files, came following setup.
ejb-jar.xml
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> <enterprise-beans> <message-driven> <display-name>myupdateservice</display-name> <ejb-name>myupdateservice</ejb-name> <ejb-class>com.my.package.myupdateservice</ejb-class> <messaging-type>com.my.other.package.adapterlistener</messaging-type> <transaction-type>bean</transaction-type> </message-driven> </enterprise-beans> </ejb-jar>
jboss.xml
<?xml version="1.0" encoding="utf-8"?> <!doctype jboss public "-//jboss//dtd jboss 4.0//en" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"> <jboss> <enterprise-beans> <message-driven> <ejb-name>myupdateservice</ejb-name> <activation-config> <activation-config-property> <activation-config-property-name>parameter1</activation-config-property-name> <activation-config-property-value>value1</activation-config-property-value> </activation-config-property> <activation-config-property> <activation-config-property-name>parameter2</activation-config-property-name> <activation-config-property-value>value2</activation-config-property-value> </activation-config-property> </activation-config> <resource-adapter-name>myear.ear#adaptor.rar</resource-adapter-name> <depends>jboss.jca:service=rardeployment,name='myear.ear#adaptor.rar'</depends> </message-driven> </enterprise-beans> </jboss>
myupdateservice
@transactionattribute(transactionattributetype.not_supported) public class euronextupdateservice implements multicastlistener, messagedrivenbean { [snip] }
i tried combinations of annotations opposed xml files, however, same result: beans deployed fine, myupdateservice
bean. resource adapter does send messages bean, can process fine.
while can work adapter this, do following exception in log, rid of:
2011-02-23 11:15:54,640 warn [org.jboss.resource.adapter.jms.inflow.jmsactivation] (workmanager(2)-75) failure in jms activation org.jboss.resource.adapter.jms.inflow.jmsactivationspec@26af5ca9(ra=org.jboss.resource.adapter.jms.jmsresourceadapter@157024fc destination=/topic/mytopic destinationtype=javax.jms.topic tx=false ack=auto-acknowledge durable=false reconnect=10 provider=java:/defaultjmsprovider user=null maxmessages=1 minsession=1 maxsession=1 keepalive=60000 usedlq=true dlqhandler=org.jboss.resource.adapter.jms.inflow.dlq.genericdlqhandler dlqjndiname=queue/dlq dlquser=null dlqmaxresent=0) javax.naming.noinitialcontextexception: cannot instantiate class: org.jnp.interfaces.namingcontextfactory [root exception java.lang.illegalstateexception: baseclassloader@26780d3c{vfszip:/opt/jboss-5.1.0.ga/server/default/deploy/myear.ear/} classloader not connected domain (probably undeployed?) class org.jnp.interfaces.namingcontextfactory] @ javax.naming.spi.namingmanager.getinitialcontext(namingmanager.java:657) @ javax.naming.initialcontext.getdefaultinitctx(initialcontext.java:288) @ javax.naming.initialcontext.init(initialcontext.java:223) @ javax.naming.initialcontext.<init>(initialcontext.java:175) @ org.jboss.util.naming.util.lookup(util.java:179) @ org.jboss.resource.adapter.jms.inflow.jmsactivation.setupjmsprovideradapter(jmsactivation.java:397) @ org.jboss.resource.adapter.jms.inflow.jmsactivation.setup(jmsactivation.java:346) @ org.jboss.resource.adapter.jms.inflow.jmsactivation$setupactivation.run(jmsactivation.java:729) @ org.jboss.resource.work.workwrapper.execute(workwrapper.java:205) @ org.jboss.util.threadpool.basictaskwrapper.run(basictaskwrapper.java:260) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) @ java.lang.thread.run(thread.java:662) caused by: java.lang.illegalstateexception: baseclassloader@26780d3c{vfszip:/opt/jboss-5.1.0.ga/server/default/deploy/myear.ear/} classloader not connected domain (probably undeployed?) class org.jnp.interfaces.namingcontextfactory @ org.jboss.classloader.spi.base.baseclassloader.loadclassfromdomain(baseclassloader.java:793) @ org.jboss.classloader.spi.base.baseclassloader.loadclass(baseclassloader.java:441) @ java.lang.classloader.loadclass(classloader.java:248) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:247) @ com.sun.naming.internal.versionhelper12.loadclass(versionhelper12.java:46) @ javax.naming.spi.namingmanager.getinitialcontext(namingmanager.java:654) ... 12 more
any ideas?
cheers, che
Comments
Post a Comment