Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-963

NoSuchMethodError pushOwner(ServiceTarget,ServiceName)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.CR1
    • None
    • Naming
    • None

    Description

      In the JBoss AS-7.1.1.Final, I used the following code to do the JNDI binding/unbinding from the modules (not deployed in the deployment folder).

      public class JndiRegistry {

      private static final Log LOG= LogFactory.getLog(JndiRegistry.class);

      public static void bindToJndi(String name, Object object) {
      ServiceTarget serviceTarget = CurrentServiceContainer.getServiceContainer();
      if (serviceTarget != null) {
      WritableServiceBasedNamingStore.pushOwner(serviceTarget);
      try

      { InitialContext context = new InitialContext(); context.bind(name, object); }

      catch (NamingException e)

      { LOG.error("Error in binding the object in JNDI."); }

      }
      }

      public static void unbindFromJndi(String name){
      ServiceTarget serviceTarget = CurrentServiceContainer.getServiceContainer();
      if (serviceTarget != null) {
      WritableServiceBasedNamingStore.pushOwner(serviceTarget);
      try

      { InitialContext context = new InitialContext(); context.unbind(name); }

      catch (NamingException e)

      { LOG.error("Error in unbinding the object from JNDI."); }

      }
      }

      }

      With the EAP 6.1.0.Alpha, I am getting the error of "
      Caused by: java.lang.NoSuchMethodError: org.jboss.as.naming.WritableServiceBasedNamingStore.pushOwner(Lorg/jboss/msc/service/ServiceTarget;[Lorg/jboss/msc/service/ServiceName;)V",

      Attachments

        Activity

          People

            emartins@redhat.com Eduardo Martins
            jeff.yuchang_jira Jeff Yu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: