1 Reply Latest reply on Dec 15, 2005 1:52 PM by Dan Brandt

    external context needs certificate

    c z Newbie

      I try to add the bea weblogic jndi namespace to jboss namespace as external context. according to the documentation I try this by deploying the following extjndi-service.xml within JBoss.

      <server>
      <mbean code="org.jboss.naming.ExternalContext"
       name="jboss.jndi:service=ExternalContext,jndiName=external/Bea">
       <attribute name="JndiName">external/Bea</attribute>
       <attribute name="CacheContext">true</attribute>
       <attribute name="Properties">
       java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
       java.naming.factory.host=t3://localhost
       java.naming.factory.port=7001
       java.naming.security.principal=weblogic
       java.naming.security.credentials=weblogic
       </attribute>
       <attribute name="InitialContext">javax.naming.InitialContext</attribute>
       <attribute name="RemoteAccess">true</attribute>
      </mbean>
      <mbean code="org.jboss.naming.JNDIView" name="DefaultDomain:service=JNDIView"/>
      </server>


      according to the server.log the deployment seems to be ok:

      ...
      2005-04-21 13:42:11,375 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: extjndi-service.xml
      2005-04-21 13:42:11,375 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-4.0.1/server/default/deploy/jms/extjndi-service.xml
      2005-04-21 13:42:11,375 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/jboss-4.0.1/server/default/deploy/jms/extjndi-service.xml -> file:/C:/jboss-4.0.1/server/default/deploy/jms/extjndi-service.xml


      but when I try to even start the jmx console on localhost to test the construction via JNDIView.list() I get the following error output:

      2005-04-21 13:43:23,430 ERROR [org.apache.commons.modeler.Registry] Error registering jboss.web:name=HttpRequest1,type=RequestProcessor,worker=http-0.0.0.0-8080
      java.lang.SecurityException: org.apache.commons.modeler.BaseModelMBean is not trusted, pd: ProtectionDomain (file:/C:/jboss-4.0.1/server/default/tmp/deploy/tmp12114commons-modeler.jar <no certificates>)
       org.jboss.mx.loading.UnifiedClassLoader3@1117a20{ url=file:/C:/jboss-4.0.1/server/default/deploy/jbossweb-tomcat50.sar/ ,addedOrder=10}
       <no principals>
       java.security.Permissions@552379 (
       (java.net.SocketPermission localhost:1024- listen,resolve)
       (java.net.SocketPermission localhost:1024- listen,resolve)
       (java.io.FilePermission C:\jboss-4.0.1\server\default\tmp\deploy\tmp12114commons-modeler.jar read)
       (java.io.FilePermission C:\jboss-4.0.1\server\default\deploy\jbossweb-tomcat50.sar read)
       (java.lang.RuntimePermission stopThread)
       (java.util.PropertyPermission java.version read)
       (java.util.PropertyPermission java.vm.name read)
       (java.util.PropertyPermission java.vm.vendor read)
       (java.util.PropertyPermission os.name read)
       (java.util.PropertyPermission java.vendor.url read)
       (java.util.PropertyPermission java.vm.specification.vendor read)
       (java.util.PropertyPermission os.version read)
       (java.util.PropertyPermission java.specification.vendor read)
       (java.util.PropertyPermission java.class.version read)
       (java.util.PropertyPermission java.specification.name read)
       (java.util.PropertyPermission file.separator read)
       (java.util.PropertyPermission os.arch read)
       (java.util.PropertyPermission java.vm.version read)
       (java.util.PropertyPermission java.vendor read)
       (java.util.PropertyPermission java.specification.version read)
       (java.util.PropertyPermission java.vm.specification.version read)
       (java.util.PropertyPermission java.vm.specification.name read)
       (java.util.PropertyPermission path.separator read)
       (java.util.PropertyPermission line.separator read)
      )
      
      
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1373)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:359)
       at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.init(Http11Protocol.java:670)
       at org.apache.tomcat.util.net.TcpWorkerThread.getInitData(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:672)
       at java.lang.Thread.run(Thread.java:534)
      


      I read the available documentation and checked the forum but couldn't find the info to solve that problem. actually I have no idea where to set the principal to gain the needed certificates.

      any information is warmly welcomed.

      thanks in advance,
      Chris


        • 1. Re: external context needs certificate
          Dan Brandt Newbie

          I'm curious if you ever found a solution to this. Your last error trace is very very similar to one we get in a clustered environment. Its very intermittent though. I would love to

          1) understand what might be causing this
          2) understand what the fix might be

          00:08:28,830 ERROR [Registry] Error registering jboss.web:name=JkRequest0,type=RequestProcessor,worker=jk-10209
          javax.management.InstanceAlreadyExistsException: jboss.web:name=JkRequest0,type=RequestProcessor,worker=jk-10209 already registered.
          at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:755)
          at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
          at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1397)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1392)
          at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:359)
          at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
          at org.apache.jk.common.ChannelSocket.registerRequest(ChannelSocket.java:436)
          at org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:443)
          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
          at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
          at java.lang.Thread.run(Thread.java:534)
          00:08:28,833 WARN [ChannelSocket] Error registering request