romarcio 7 de mai. de 2010
Consegui fazer a configuração da seguinte forma:
<bean id= "jndiTemplate" class= "org.springframework.jndi.JndiTemplate" >
<property name= "environment" >
<props>
<prop key= "java.naming.factory.initial" > fr.dyade.aaa.jndi2.client.NamingContextFactory</prop>
<prop key= "java.naming.provider.host" > 172.16.1.151</prop>
<prop key= "java.naming.provider.port" > 1099</prop>
<prop key= "java.naming.factory.url.pkgs" > org.objectweb.jonas.naming</prop>
</props>
</property>
</bean>
Porém agora gera essa exceção:
2010 - 05 - 07 10 : 32 : 55 , 312 : SEVERE : http - 9000 - Processor22 : Cont extLoader . initWebApplicationContext : Cont ext initialization failed
or g . springframework . beans . factory . BeanCreationException : Error creating bean with name ' jmsConnectionFactory ' def ined in ServletContext resource [ / WEB - INF / spring - jms . xml ] : Invocation of init method failed ; nested exception is javax . naming . NamingException : Connection refused : connect [ Root exception is java . net . ConnectException : Connection refused : connect ]
Caused by : javax . naming . NamingException : Connection refused : connect [ Root exception is java . net . ConnectException : Connection refused : connect ]
at fr . dyade . aaa . jndi2 . client . SimpleNamingConnection . open ( SimpleNamingConnection . java : 157 )
at fr . dyade . aaa . jndi2 . client . SimpleNamingConnection . invoke ( SimpleNamingConnection . java : 122 )
at fr . dyade . aaa . jndi2 . client . NamingContextImpl . lookup ( NamingContextImpl . java : 123 )
at javax . naming . InitialContext . lookup ( InitialContext . java : 392 )
at or g . springframework . jndi . JndiTemplate$ 1. doInContext ( JndiTemplate . java : 123 )
at or g . springframework . jndi . JndiTemplate . execute ( JndiTemplate . java : 85 )
at or g . springframework . jndi . JndiTemplate . lookup ( JndiTemplate . java : 121 )
at or g . springframework . jndi . JndiTemplate . lookup ( JndiTemplate . java : 146 )
at or g . springframework . jndi . JndiLocatorSupport . lookup ( JndiLocatorSupport . java : 93 )
at or g . springframework . jndi . JndiObjectLocator . lookup ( JndiObjectLocator . java : 105 )
at or g . springframework . jndi . JndiObjectFactoryBean . lookupWithFallback ( JndiObjectFactoryBean . java : 197 )
at or g . springframework . jndi . JndiObjectFactoryBean . afterPropertiesSet ( JndiObjectFactoryBean . java : 184 )
at or g . springframework . beans . factory . support . Abs tractAutowireCapableBeanFactory . invokeInitMethods ( Abs tractAutowireCapableBeanFactory . java : 1201 )
at or g . springframework . beans . factory . support . Abs tractAutowireCapableBeanFactory . initializeBean ( Abs tractAutowireCapableBeanFactory . java : 1171 )
at or g . springframework . beans . factory . support . Abs tractAutowireCapableBeanFactory . createBean ( Abs tractAutowireCapableBeanFactory . java : 425 )
at or g . springframework . beans . factory . support . Abs tractBeanFactory$ 1. get Object ( Abs tractBeanFactory . java : 251 )
at or g . springframework . beans . factory . support . Def aultSingletonBeanRegistry . get Sin gleton ( Def aultSingletonBeanRegistry . java : 156 )
at or g . springframework . beans . factory . support . Abs tractBeanFactory . get Bean ( Abs tractBeanFactory . java : 248 )
at or g . springframework . beans . factory . support . Abs tractBeanFactory . get Bean ( Abs tractBeanFactory . java : 160 )
at or g . springframework . beans . factory . support . Def aultListableBeanFactory . preInstantiateSingletons ( Def aultListableBeanFactory . java : 284 )
at or g . springframework . cont ext . support . Abs tractApplicationContext . refresh ( Abs tractApplicationContext . java : 352 )
at or g . springframework . web . cont ext . Cont extLoader . createWebApplicationContext ( Cont extLoader . java : 244 )
at or g . springframework . web . cont ext . Cont extLoader . initWebApplicationContext ( Cont extLoader . java : 187 )
at or g . springframework . web . cont ext . Cont extLoaderListener . cont extInitialized ( Cont extLoaderListener . java : 49 )
at or g . apache . catalina . core . StandardContext . list enerStart ( StandardContext . java : 3795 )
at or g . apache . catalina . core . StandardContext . start ( StandardContext . java : 4252 )
at or g . objectweb . jonas . web . catalina55 . JOnASStandardContext . start ( JOnASStandardContext . java : 255 )
at or g . apache . catalina . core . Cont ainerBase . addChildInternal ( Cont ainerBase . java : 760 )
at or g . apache . catalina . core . Cont ainerBase . access$ 000 ( Cont ainerBase . java : 122 )
at or g . apache . catalina . core . Cont ainerBase$PrivilegedAddChild . run ( Cont ainerBase . java : 144 )
at java . security . AccessController . doPrivileged ( Native Method )
at or g . apache . catalina . core . Cont ainerBase . addChild ( Cont ainerBase . java : 738 )
at or g . apache . catalina . core . StandardHost . addChild ( StandardHost . java : 544 )
at or g . objectweb . jonas . web . catalina55 . CatalinaJWebContainerServiceImpl . doRegisterWar ( CatalinaJWebContainerServiceImpl . java : 596 )
at or g . objectweb . jonas . web . Abs JWebContainerServiceImpl . registerWar ( Abs JWebContainerServiceImpl . java : 969 )
at or g . objectweb . jonas . web . Abs JWebContainerServiceImpl . registerWarMBean ( Abs JWebContainerServiceImpl . java : 1053 )
at or g . objectweb . jonas . web . catalina55 . CatalinaJWebContainerServiceImpl . registerWarMBean ( CatalinaJWebContainerServiceImpl . java : 1182 )
at sun . reflect . GeneratedMethodAccessor255 . invoke ( Unknown Source )
at sun . reflect . DelegatingMethodAccessorImpl . invoke ( DelegatingMethodAccessorImpl . java : 25 )
at java . lang . reflect . Method . invoke ( Method . java : 597 )
at com . sun . jmx . mbeanserver . StandardMBeanIntrospector . invokeM2 ( StandardMBeanIntrospector . java : 93 )
at com . sun . jmx . mbeanserver . StandardMBeanIntrospector . invokeM2 ( StandardMBeanIntrospector . java : 27 )
at com . sun . jmx . mbeanserver . MBeanIntrospector . invokeM ( MBeanIntrospector . java : 208 )
at com . sun . jmx . mbeanserver . PerInterface . invoke ( PerInterface . java : 120 )
at com . sun . jmx . mbeanserver . MBeanSupport . invoke ( MBeanSupport . java : 262 )
at com . sun . jmx . int erceptor . Def aultMBeanServerInterceptor . invoke ( Def aultMBeanServerInterceptor . java : 836 )
at com . sun . jmx . mbeanserver . JmxMBeanServer . invoke ( JmxMBeanServer . java : 761 )
at or g . objectweb . jonas . jmx . ManagementReprImplJSR160 . invoke ( ManagementReprImplJSR160 . java : 177 )
at or g . objectweb . jonas . jmx . JonasManagementRepr . invoke ( JonasManagementRepr . java : 136 )
at or g . objectweb . jonas . webapp . jonasadmin . deploy . BaseDeployAction . deploy ( BaseDeployAction . java : 441 )
at or g . objectweb . jonas . webapp . jonasadmin . deploy . ApplyDeployConfirmAction . executeAction ( ApplyDeployConfirmAction . java : 86 )
at or g . objectweb . jonas . webapp . jonasadmin . JonasBaseAction . execute ( JonasBaseAction . java : 116 )
at or g . apache . struts . action . RequestProcessor . processActionPerform ( RequestProcessor . java : 431 )
at or g . apache . struts . action . RequestProcessor . process ( RequestProcessor . java : 236 )
at or g . apache . struts . action . ActionServlet . process ( ActionServlet . java : 1196 )
at or g . apache . struts . action . ActionServlet . doPost ( ActionServlet . java : 432 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 763 )
at javax . servlet . http . HttpServlet . service ( HttpServlet . java : 856 )
at sun . reflect . GeneratedMethodAccessor82 . invoke ( Unknown Source )
at sun . reflect . DelegatingMethodAccessorImpl . invoke ( DelegatingMethodAccessorImpl . java : 25 )
at java . lang . reflect . Method . invoke ( Method . java : 597 )
at or g . apache . catalina . security . SecurityUtil$ 1. run ( SecurityUtil . java : 244 )
at java . security . AccessController . doPrivileged ( Native Method )
at javax . security . auth . Subject . doAsPrivileged ( Subject . java : 517 )
at or g . apache . catalina . security . SecurityUtil . execute ( SecurityUtil . java : 276 )
at or g . apache . catalina . security . SecurityUtil . doAsPrivilege ( SecurityUtil . java : 162 )
at or g . apache . catalina . core . ApplicationFilterChain . int ernalDoFilter ( ApplicationFilterChain . java : 262 )
at or g . apache . catalina . core . ApplicationFilterChain . access$ 000 ( ApplicationFilterChain . java : 52 )
at or g . apache . catalina . core . ApplicationFilterChain$ 1. run ( ApplicationFilterChain . java : 171 )
at java . security . AccessController . doPrivileged ( Native Method )
at or g . apache . catalina . core . ApplicationFilterChain . doFilter ( ApplicationFilterChain . java : 167 )
at or g . apache . catalina . core . StandardWrapperValve . invoke ( StandardWrapperValve . java : 213 )
at or g . apache . catalina . core . StandardContextValve . invoke ( StandardContextValve . java : 172 )
at or g . apache . catalina . authenticator . AuthenticatorBase . invoke ( AuthenticatorBase . java : 525 )
at or g . objectweb . jonas . web . catalina55 . ResetAuthenticationValve . invoke ( ResetAuthenticationValve . java : 107 )
at or g . apache . catalina . core . StandardHostValve . invoke ( StandardHostValve . java : 127 )
at or g . apache . catalina . val ves . ErrorReportValve . invoke ( ErrorReportValve . java : 117 )
at or g . apache . catalina . core . StandardEngineValve . invoke ( StandardEngineValve . java : 108 )
at or g . apache . catalina . connector . CoyoteAdapter . service ( CoyoteAdapter . java : 174 )
at or g . apache . coyote . http11 . Http11Processor . process ( Http11Processor . java : 873 )
at or g . apache . coyote . http11 . Http11BaseProtocol$Http11ConnectionHandler . processConnection ( Http11BaseProtocol . java : 665 )
at or g . apache . to mcat . util . net . PoolTcpEndpoint . processSocket ( PoolTcpEndpoint . java : 528 )
at or g . apache . to mcat . util . net . LeaderFollowerWorkerThread . run It ( LeaderFollowerWorkerThread . java : 81 )
at or g . apache . to mcat . util . threads . ThreadPool$ Cont rolRunnable . run ( ThreadPool . java : 689 )
at java . lang . Thread . run ( Thread . java : 619 )
Caused by : java . net . ConnectException : Connection refused : connect
at java . net . PlainSocketImpl . socketConnect ( Native Method )
at java . net . PlainSocketImpl . doConnect ( PlainSocketImpl . java : 333 )
at java . net . PlainSocketImpl . connectToAddress ( PlainSocketImpl . java : 195 )
at java . net . PlainSocketImpl . connect ( PlainSocketImpl . java : 182 )
at java . net . SocksSocketImpl . connect ( SocksSocketImpl . java : 366 )
at java . net . Socket . connect ( Socket . java : 525 )
at fr . dyade . aaa . common . SocketFactory14 . createSocket ( SocketFactory14 . java : 64 )
at fr . dyade . aaa . jndi2 . client . SimpleNamingConnection . open ( SimpleNamingConnection . java : 151 )
... 84 more
Alguém tem alguma sugestão agora ?