UUID MAC configuration
hi all, I am using VersionOneGenerator and I see that we need to configure the MAC addres in the xml file , I mean the uuid.state file .It works locally .But how do I give to other teams and ask them to work without having to enter the MAC address in the uuid.state file.I mean is there any better way to detect the MAC address automatically ? *My Idea is to give a jar file to different teams in my company to generate UUID's. * Thanks Pradeep
UUID number generation problem
hi all, I am trying to understand how the UUID generation works, I am trying to run the *code snippet 1 *,100 times, and it prints the same number 100 times, Is it not supposed to print a different number eachtime.And If I run the *code snippet 2 * 100 times, I get adifferent number each time .The documentation says *code snippet 1* is efficient than *code snippet 2. ,*forgive my ignorance *.* Please help ** ** ** ** *code snippet 1 :* ** for ( int i=0; i100; i++){ System.out.println(***+ UUID.nameUUIDFromString(namespace,new UUID(f807f2fc-b49b-4512-a787-92300367b932),UUID.SHA1_ENCODING)); } *code snippet 2 :* ** for ( int i=0; i100; i++){ System.out.println(*** +UUID.randomUUID().toString()); } Thanks Pradeep
UUID exception
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
commons id package code issue
Hi all, I am trying to downloadthe commons id package found at http://jakarta.apache.org/commons/sandbox/id/ , and write java program for generating UUID's , but how do I get the code ? jar , zip ? It takes me to a folders page , I guess I need to download from a repository ? , can some body point me in the right direction. Sorry for sending personal mail, I tried sending it to the groups , but not sure it went through. Thanks Pradeep