java.lang.UnsupportedOperationException: Attribute applicable only for Service bindings.

Oracle Community | User594509-Oracle | 5 years ago
  1. 0

    BPEL Fails to Dequeue and Returns Runtime exception thrown by rmi server.

    Oracle Community | 5 years ago | User594509-Oracle
    java.lang.UnsupportedOperationException: Attribute applicable only for Service bindings.
  2. 0

    Attribute applicable only for Service bindings

    Oracle Community | 6 years ago | richard evans
    java.lang.UnsupportedOperationException: Attribute applicable only for Service bindings.
  3. 0

    Getting Warning Message in Oracle 11g1.1.1.4 Server -Causing server crash

    Oracle Community | 5 years ago | user4596929
    java.lang.UnsupportedOperationException: Attribute applicable only for Service bindings.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A DESCRIPTION OF THE REQUEST : Setting/getting a comment for an entry in a zip/jar archive is not possible via the zip file system provider. JUSTIFICATION : It would be nice if the com.sun.nio.zipfs.ZipFileSystem would support the same features as ZipFile/ZipOuputStream in order to be able to phase out the old-school APIs and use NIO for everything. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Setting/getting comments for archive entries is supported through NIO. ACTUAL - Trying to set the comment attribute yields the following exception: java.lang.UnsupportedOperationException: 'comment' is unknown or read-only attribute at com.sun.nio.zipfs.ZipFileAttributeView.setAttribute(ZipFileAttributeView.java:129) at com.sun.nio.zipfs.ZipPath.setAttribute(ZipPath.java:686) at com.sun.nio.zipfs.ZipFileSystemProvider.setAttribute(ZipFileSystemProvider.java:316) at java.nio.file.Files.setAttribute(Files.java:1805) Trying to read the comment attribute always returns 'null', even when a comment is set. ---------- BEGIN SOURCE ---------- import java.io.FileOutputStream; import java.io.IOException; import java.net.URI; import java.nio.charset.StandardCharsets; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import org.junit.Test; public class ZipFileSystemCommentTest { @Test public void getComment() throws IOException { Path archive = createOldschoolArchive(); try { Object comment = null; Object plain = ""; URI uri = URI.create("jar:" + archive.toUri()); try (FileSystem zipfs = FileSystems.newFileSystem(uri, new HashMap<>())) { comment = Files.getAttribute(zipfs.getPath("annotated.txt"), "comment"); plain = Files.getAttribute(zipfs.getPath("file.txt"), "comment"); } assertEquals("This is an entry with a comment", comment); assertNull(plain); } finally { Files.deleteIfExists(archive); } } @Test public void setComment() throws IOException { Path archive = Files.createTempFile(null, ".zip"); Files.deleteIfExists(archive); try { URI uri = URI.create("jar:" + archive.toUri()); Map<String, ?> env = Collections.singletonMap("create", "true"); try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) { Path entry = zipfs.getPath("test.txt"); Files.write(entry, text("some text")); Files.setAttribute(entry, "comment", "This is a comment"); } Object comment = null; try (FileSystem zipfs = FileSystems.newFileSystem(uri, new HashMap<String, String>())) { comment = Files.getAttribute(zipfs.getPath("test.txt"), "comment"); } assertEquals("This is a comment", comment); } finally { Files.deleteIfExists(archive); } } private Path createOldschoolArchive() throws IOException { Path archive = Files.createTempFile(null, ".zip"); try (ZipOutputStream out = new ZipOutputStream( new FileOutputStream(archive.toFile()))) { ZipEntry commented = new ZipEntry("annotated.txt"); commented.setComment("This is an entry with a comment"); out.putNextEntry(commented); out.write(text("Entry with comment")); out.putNextEntry(new ZipEntry("file.txt")); out.write(text("Entry without comment")); } return archive; } private byte[] text(String text) { return text.getBytes(StandardCharsets.UTF_8); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Other than using the legacy API, there is no immediate workaround. But it's trivial to extend the zip file system provider to support comments. The basic bits are already there. The functionality is just not exposed. When desired, I could setup a repository with the necessary changes.

    JDK Bug System | 3 months ago | Webbug Group
    java.lang.UnsupportedOperationException: 'comment' is unknown or read-only attribute
  6. 0

    UnsupportedOperationException in sml:ApplyConstruct

    Google Groups | 7 months ago | Unknown author
    java.lang.UnsupportedOperationException: Initial bindings not supported for remote queries, consider using a ParameterizedSparqlString to prepare a

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      Attribute applicable only for Service bindings.

      at oracle.fabric.management.composite.mbean.WSBinding.requireServiceBinding()
    2. oracle.fabric.management
      WSBinding.getEndpointAddressURI
      1. oracle.fabric.management.composite.mbean.WSBinding.requireServiceBinding(WSBinding.java:826)
      2. oracle.fabric.management.composite.mbean.WSBinding.getEndpointAddressURI(WSBinding.java:242)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1198.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames