Hello HDF5 and JHDF5 users, 

I am trying to get the follow program to work but have not succeeded. Any 
suggestion and clarification is much appreciated.

Vang

###################CopyExample.java###############
package ch.systemsx.cisd.hdf5.examples;

import ch.systemsx.cisd.hdf5.HDF5Factory;
import ch.systemsx.cisd.hdf5.IHDF5Reader;
import ch.systemsx.cisd.hdf5.IHDF5Writer;

/**
 * Test copying of groups
 */
public class CopyExample
{

    public static void main(String[] args)
    {

        IHDF5Writer writer = HDF5Factory.configure("testcopy.h5").writer();
        IHDF5Writer testcopysource = 
HDF5Factory.configure("testcopysource.h5").writer();

         testcopysource.object().createGroup("/TestGroup");
        testcopysource.close();
        IHDF5Reader testcpsource = 
HDF5Factory.openForReading("testcopysource.h5") ;

        testcpsource.object().copy("/TestGroup", writer);
        writer.close();
        testcpsource.close();




    }

}
###################################
Error message: 

/usr/lib/jvm/java-7-oracle/bin/java -Didea.launcher.port=7540 
-Didea.launcher.bin.path=/home/user/bin/opt/idea-IU-139.659.2/bin 
-Dfile.encoding=UTF-8 -classpath 
/usr/lib/jvm/java-7-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-7-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfxrt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-7-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-7-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-7-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-7-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-7-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-7-oracle/jre/lib/ext/dnsns.jar:/home/user/repos
 
itories/github/TestJHDF5/target/classes:/home/user/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.10.2.jar:/home/user/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.10.2.jar:/home/user/repositories/github/TestJHDF5/lib/sis-jhdf5-batteries_included.jar:/home/user/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar:/home/user/.m2/repository/org/slf4j/slf4j-simple/1.7.5/slf4j-simple-1.7.5.jar:/home/user/.m2/repository/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.jar:/home/user/bin/opt/idea-IU-139.659.2/lib/idea_rt.jar
 com.intellij.rt.execution.application.AppMain 
ch.systemsx.cisd.hdf5.examples.CopyExample
Exception in thread "main" 
ncsa.hdf.hdf5lib.exceptions.HDF5SymbolTableException: Symbol table:Object 
already exists ["H5L.c line 1674 in H5L_link_cb(): name already exists"]
        at ch.systemsx.cisd.hdf5.hdf5lib.H5.H5Gcreate(Native Method)
        at ch.systemsx.cisd.hdf5.hdf5lib.H5GLO.H5Gcreate(H5GLO.java:59)
        at ch.systemsx.cisd.hdf5.HDF5.createGroup(HDF5.java:275)
        at 
ch.systemsx.cisd.hdf5.HDF5ObjectReadWriteInfoProviderHandler.createGroup(HDF5ObjectReadWriteInfoProviderHandler.java:144)
        at ch.systemsx.cisd.hdf5.examples.CopyExample.main(CopyExample.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to