Have a look at the documentation here: http://jakarta.apache.org/commons/sandbox/id/uuid.html
The test cases in the src/test directory might also be useful. Phil On 1/10/07, Pradeep Arumalla <[EMAIL PROTECTED]> wrote:
Hi all, below is what I am trying to do and see if it generates a unique Id everytime I run in a loop, and I get this exception.I know there should be a file with java -d option *" org.apache.commons.id.uuid.config.resource.filename" ,* but what should the file contain.Please help, if any body has done this before. UUID ns = UUID.fromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8"); System.out.println("******* "+ns.timeUUID()); java.lang.RuntimeException: java.lang.IllegalStateException: No value set for system property: org.apache.commons.id.uuid.config.resource.filename at org.apache.commons.id.uuid.NodeManagerImpl.init(NodeManagerImpl.java :64) at org.apache.commons.id.uuid.NodeManagerImpl.currentNode( NodeManagerImpl.java:96) at org.apache.commons.id.uuid.VersionOneGenerator.nextUUID( VersionOneGenerator.java:99) at org.apache.commons.id.uuid.UUID.timeUUID(UUID.java:417) at org.apache.commons.id.uuid.UUIDTest.testNameUUIDFromStringSha1( UUIDTest.java:313) 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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196) Caused by: java.lang.IllegalStateException: No value set for system property: org.apache.commons.id.uuid.config.resource.filename at org.apache.commons.id.uuid.state.ReadOnlyResourceStateImpl.load( ReadOnlyResourceStateImpl.java:100) at org.apache.commons.id.uuid.NodeManagerImpl.init(NodeManagerImpl.java :62) ... 17 more