com.sonicsw.sonicmq.asi.jndiloader.JNDILoader: NoPermissionException: createSubcontext JNDI operation not allowed when calling from outside NamingServer's VM in JBoss EAP 5
Issue
- Using Sonic JCA 8.5 to connect to set up connection to Sonic MQ server. The same adapter worked on jboss-5.1.0.GA but when we migrated to EAP 5.2, it did not work. We are seeing errors like this below:
Caused by: javax.naming.NameNotFoundException: SonicJMS not bound
[INFO ] com.sonicsw.sonicmq.asi.jndiloader.JNDILoader:
javax.naming.NoPermissionException: createSubcontext JNDI operation not allowed when calling from outside NamingServer's VM.
at org.jnp.server.NamingServerGuard.createSubcontext(NamingServerGuard.java:92)
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:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at com.sun.proxy.$Proxy102.createSubcontext(Unknown Source)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:1163)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:1143)
at javax.naming.InitialContext.createSubcontext(InitialContext.java:464)
at com.sonicsw.sonicmq.asi.jndiloader.JNDILoader.doBind(JNDILoader.java:328)
at com.sonicsw.sonicmq.asi.jndiloader.JNDILoader.endElement(JNDILoader.java:275)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
...
The sonic-jndiloader-conf.xml contains:
<jndiEnvironment>
<property name="java.naming.provider.url">jnp://localhost:1099</property>
<property name="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</property>
<property name="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</property>
<property name="java.naming.referral">throw</property>
</jndiEnvironment>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
