activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gies <ag...@progress.com>
Subject Re: javax.naming.NameNotFoundException in Unix
Date Thu, 12 Mar 2009 08:41:07 GMT
That piece of documentation actually refers to the destination names  
inside ActiveMQ, in other words the physical destination names.
In JNDI you bind logical names to physical ones for the purpose of  
decoupling your application from the execution environment.
You may want to read up on JNDI on the java web site to get more  
details if required.

This having said, within J2EE server world the server has a JNDI  
implementation, but the actual implementation differs from product to  
product.
Please refer to the manual of your app server how you can register  
Administrative Objects (connection factories and destinations) in your
particular environment. Sometimes that involves working with a  
management console, sometime you need to change a configuration file.

Which app server are you using ?


Hope that helps
Andreas

On Mar 12, 2009, at 2:14 AM, kimjames wrote:

>
> Thanks!
>
> hm.. then How can I bind JNDI store and destination ?
> I 've read the manual below
>
> --------------------------------------------------------------------------------------------------
> < How do I create new destinations >
>
> "In ActiveMQ you do not have to create destinations up front before  
> you can
> use them. The ActiveMQ broker auto-creates the physical resources  
> associated
> with a destination on demand (i.e. when messages are sent to a new
> destination on a broker). "
> --------------------------------------------------------------------------------------------------
>
>
>
> Andreas Gies-3 wrote:
>>
>> Hi there,
>>
>> that actually tells you that the appender tried to look up a Queue
>> with the JNDI name AdminJMSQueue in the app servers
>> JNDI store and that destination has not been bound. Make sure, the
>> destination is bound in JNDI and that should fix the error.
>>
>> Best regards
>> Andreas
>>
>>
>> On Mar 9, 2009, at 3:42 AM, kimjames wrote:
>>
>>>
>>> When App server booted, App server tried to connect to JMS Server
>>> due to
>>> log4j setting.
>>> but failed,
>>>
>>> I 've got Exception blow
>>>
>>> ---------------------------------------------------------------------------------------
>>> log4j:WARN No appenders could be found for logger
>>> (org.apache.activemq.transport.WireFormatNegotiator).
>>> log4j:WARN Please initialize the log4j system properly.
>>> log4j:ERROR Error while activating options for appender named
>>> [jmsException].
>>> javax.naming.NameNotFoundException: AdminJMSQueue
>>>       at
>>> org 
>>> .apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:
>>> 225)
>>>       at javax.naming.InitialContext.lookup(Unknown Source)
>>>       at
>>> com
>>> .sds
>>> .anyframe
>>> .util.JMSQueueAppender.activateOptions(JMSQueueAppender.java:139)
>>>       at
>>> org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:
>>> 256)
>>>       at
>>> org
>>> .apache 
>>> .log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:
>>> 220)
>>>       at
>>> org
>>> .apache
>>> .log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:
>>> 150)
>>>       at
>>> org
>>> .apache
>>> .log4j
>>> .xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java: 
>>> 163)
>>>       at
>>> org
>>> .apache
>>> .log4j
>>> .xml
>>> .DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:
>>> 425)
>>>       at
>>> org
>>> .apache 
>>> .log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:
>>> 345)
>>>       at
>>> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:827)
>>>       at
>>> org
>>> .apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:
>>> 712)
>>>       at
>>> org
>>> .apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:
>>> 618)
>>>       at
>>> org
>>> .apache
>>> .log4j
>>> .helpers.OptionConverter.selectAndConfigure(OptionConverter.java: 
>>> 468)
>>>       at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
>>>       at java.lang.J9VMInternals.initializeImpl(Native Method)
>>>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
>>>       at org.apache.log4j.Logger.getLogger(Logger.java:104)
>>>       at
>>> org
>>> .apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:
>>> 229)
>>>       at
>>> org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:
>>> 65)
>>>       at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>> Method)
>>>       at
>>> sun
>>> .reflect
>>> .NativeConstructorAccessorImpl
>>> .newInstance(NativeConstructorAccessorImpl.java:67)
>>>       at
>>> sun
>>> .reflect
>>> .DelegatingConstructorAccessorImpl
>>> .newInstance(DelegatingConstructorAccessorImpl.java:45)
>>>       at java.lang.reflect.Constructor.newInstance(Constructor.java:
>>> 522)
>>>       at
>>> org
>>> .apache
>>> .commons 
>>> .logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:
>>> 529)
>>>       at
>>> org
>>> .apache
>>> .commons 
>>> .logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:
>>> 235)
>>>       at
>>> org
>>> .apache
>>> .commons 
>>> .logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:
>>> 209)
>>>       at
>>> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
>>>       at
>>> org
>>> .springframework
>>> .web.context.ContextLoader.<clinit>(ContextLoader.java:145)
>>>       at java.lang.J9VMInternals.initializeImpl(Native Method)
>>>       at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
>>>       at
>>> org.springframework.web.context.ContextLoaderListener.createContextLoader
>>> (ContextLoaderListener.java:53)
>>>       at
>>> org.springframework.web.context.ContextLoaderListener.contextInitialized
>>> (ContextLoaderListener.java:44)
>>>       at
>>> weblogic.servlet.internal.EventsManager
>>> $FireContextListenerAction.run(EventsManager.java:458)
>>>       at
>>> weblogic
>>> .security
>>> .acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java: 
>>> 321)
>>>       at weblogic.security.service.SecurityManager.runAs(Unknown
>>> Source)
>>>       at
>>> weblogic
>>> .servlet
>>> .internal 
>>> .EventsManager.notifyContextCreatedEvent(EventsManager.java:
>>> 168)
>>>       at
>>> weblogic
>>> .servlet
>>> .internal
>>> .WebAppServletContext.preloadResources(WebAppServletContext.java: 
>>> 1744)
>>>       at
>>> weblogic
>>> .servlet
>>> .internal.WebAppServletContext.start(WebAppServletContext.java:2909)
>>>       at
>>> weblogic
>>> .servlet.internal.WebAppModule.startContexts(WebAppModule.java:973)
>>>       at
>>> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
>>>       at
>>> weblogic.application.internal.flow.ModuleStateDriver
>>> $3.next(ModuleStateDriver.java:204)
>>>       at
>>> weblogic
>>> .application
>>> .utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>>>       at
>>> weblogic
>>> .application
>>> .internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>>>       at
>>> weblogic
>>> .application
>>> .internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>>>       at
>>> weblogic
>>> .application
>>> .internal
>>> .flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
>>>       at
>>> weblogic.application.internal.flow.ModuleStateDriver
>>> $3.next(ModuleStateDriver.java:204)
>>>       at
>>> weblogic
>>> .application
>>> .utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>>>       at
>>> weblogic
>>> .application
>>> .internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>>>       at
>>> weblogic
>>> .application
>>> .internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
>>>       at
>>> weblogic.application.internal.BaseDeployment
>>> $2.next(BaseDeployment.java:635)
>>>       at
>>> weblogic
>>> .application
>>> .utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
>>>       at
>>> weblogic
>>> .application.internal.BaseDeployment.activate(BaseDeployment.java: 
>>> 212)
>>>       at
>>> weblogic
>>> .application
>>> .internal
>>> .DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
>>>       at
>>> weblogic
>>> .deploy
>>> .internal
>>> .targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:
>>> 80)
>>>       at
>>> weblogic
>>> .deploy
>>> .internal 
>>> .targetserver.BasicDeployment.activate(BasicDeployment.java:
>>> 182)
>>>       at
>>> weblogic
>>> .deploy
>>> .internal
>>> .targetserver
>>> .BasicDeployment.activateFromServerLifecycle(BasicDeployment.java: 
>>> 359)
>>>       at
>>> weblogic.management.deploy.internal.DeploymentAdapter
>>> $1.doActivate(DeploymentAdapter.java:51)
>>>       at
>>> weblogic
>>> .management
>>> .deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:
>>> 196)
>>>       at
>>> weblogic.management.deploy.internal.AppTransition
>>> $2.transitionApp(AppTransition.java:30)
>>>       at
>>> weblogic
>>> .management
>>> .deploy
>>> .internal
>>> .ConfiguredDeployments.transitionApps(ConfiguredDeployments.java: 
>>> 233)
>>>       at
>>> weblogic
>>> .management
>>> .deploy
>>> .internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:
>>> 169)
>>>       at
>>> weblogic
>>> .management
>>> .deploy
>>> .internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java: 
>>> 123)
>>>       at
>>> weblogic
>>> .management
>>> .deploy
>>> .internal
>>> .DeploymentServerService.resume(DeploymentServerService.java:173)
>>>       at
>>> weblogic
>>> .management
>>> .deploy
>>> .internal 
>>> .DeploymentServerService.start(DeploymentServerService.java:
>>> 89)
>>>       at
>>> weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
>>>       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
>>>       at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
>>> ---------------------------------------------------------------------------------------
>>>
>>> What's the matter with that !?
>>>
>>> Specific environment is blow...
>>>
>>> 1. Environment
>>> 1) App Server : IBM UNIX Server
>>> 2) JMS Server : NT Server (ActiveMQ)
>>>
>>> 2. Settings & librarys
>>> 1) App Server Side Settings
>>>   - .../WEB-INF/classes/log4j.xml
>>> ........................................................................................................................
>>>   <appender name="jmsException"
>>> class="org.apache.log4j.net.JMSQueueAppender">
>>>
>>>
>>>
>>>   	
>>>
>>> 		
>>>
>>> 		
>>>
>>> 		<layout class="org.apache.log4j.PatternLayout">
>>>
>>>
>>>
>>>       </layout>
>>>
>>>   </appender>
>>> ........................................................................................................................
>>>
>>>   - .../WEB-INF/classes/jndi.property
>>> ........................................................................................................................
>>> java
>>> .naming
>>> .factory
>>> .initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>>>
>>> # use the following property to configure the default connector
>>> java.naming.provider.url=tcp://[NT Server IP]:61616
>>>
>>> # use the following property to specify the JNDI name the connection
>>> factory
>>> # should appear as.
>>> #connectionFactoryNames = connectionFactory, queueConnectionFactory,
>>> topicConnectionFactry
>>> connectionFactoryNames=QueueConnectionFactory
>>>
>>> # register some queues in JNDI using the form
>>> # queue.[jndiName] = [physicalName]
>>> queue.AdminJMSQueue=AdminJMSQueue
>>> ........................................................................................................................
>>> 2) App Server Side librarys
>>>   - .../WEB-INF/lib/activemq-core-5.2.0.jar
>>>
>>>
>>> 3) JMS Server Side Settings
>>>   - Default Setting
>>> 4) JMS Server Side librarys
>>>   - Default librarys
>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/javax.naming.NameNotFoundException-in-Unix-tp22406265p22406265.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>
>> ---
>> Mit freundlichen Grüssen - Kind Regards
>> Andreas Gies
>> Principal Consultant
>> Open Source Center of Competence
>>
>> Progress Software GmbH
>> Agrippinawerft 26
>> 50678 Köln
>>
>> E-Mail      	agies@progress.com
>> Direct Line 	+49 (0)9953 980349
>> Mobile      	+49 (0)170 5759611
>> Skype        	+44 (0)20 3239 2922
>> Skype       	+353 (0)1 443 4971
>> Skype       	+1 (0)781 262 0168
>>
>> http://www.progress.com
>> http://fusesource.com
>> http://open-source-adventures.blogspot.com
>>
>>
>>
>> -------------------------------------------------------
>> Progress Software GmbH
>> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
>> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
>> Amtsgericht Koeln, HRB 15620;
>> Geschaeftsfuehrung: David Ireland
>> -------------------------------------------------------
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/javax.naming.NameNotFoundException-in-Unix-tp22406265p22468036.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------

Mime
View raw message