From: Jantien S. <jan...@gx...> - 2007-10-09 13:13:49
|
Hi, =20 Last week I posted the mail below. Is there anyone who knows the answer already? Am I doing something wrong, or is there a bug in JPF? =20 Kind regards, Jantien Sessink =20 ________________________________ From: jav...@li... [mailto:jav...@li...] On Behalf Of Jantien Sessink Sent: Friday, October 05, 2007 3:51 PM To: jav...@li... Subject: [Javapathfinder-user] Bug in JPF or in my code????? =20 Hi, =20 I don't know if I have encountered a bug in JPF or that I'm doing something wrong. I have a program that uses the Map class from java.util. At some point I check if a key exists in the Map. This raises an exception when I run it in JPF while Eclipse runs the program without any exceptions.=20 I wrote the keys in the map and the key names derived from an array to the screen to check if the keys from the array (ntNames) exist in the map (ntdCache). As can be seen in the output of JPF below, the name in ntNames exists in ntdCache, while ntdCache.containsKey(ntNames[i]) returns false and reassess an exception. This is strange. But when I run the program in Eclipse, there are no exceptions. The part of code that creates the exception: =20 for (int i =3D 0; i < ntNames.length; i++) { if (!ntdCache.containsKey(ntNames[i])) { throw new NoSuchNodeTypeException(ntNames[i].toString()); } } =20 The outcome of Eclipse and JPF are below. I hope someone can help me, because I don't know if the problem is in my code or in JPF. If any of the above is not clear, I can give more explanation. =20 Kind regards, Jantien Sessink =20 ------------------------------------- JPF ----------------------------------------------------------------- JavaPathfinder v4.1 - (C) 1999-2007 RIACS/NASA Ames Research Center =20 =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D system under test application: nl.gx.firsthop.FirstHop.class =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D search started: 10/5/07 1:06 PM 1172 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting repository... Printing names from ntNames: {http://www.jcp.org/jcr/nt/1.0}base Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder Printing names from ntNames: {http://www.jcp.org/jcr/nt/1.0}base Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException: [{internal}versionStorage] failed to validate supertype s at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.validateNodeTypeDef (NodeTypeRegistry.java:1485) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.internalRegister(No deTypeRegistry.java:1311) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegi stry.java:746) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegi stry.java:120) at org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(Reposit oryImpl.java:515) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:262 ) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:528 ) at org.apache.jackrabbit.core.TransientRepository$2.getRepository(Transient Repository.java:249) at org.apache.jackrabbit.core.TransientRepository.startRepository(Transient Repository.java:270) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:338) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:368) at nl.gx.firsthop.FirstHop.main(FirstHop.java:31) Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.jcp.org/jcr/nt/1.0}base at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeTyp e(NodeTypeRegistry.java:1079) at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.create(EffectiveNo deType.java:202) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeTyp e(NodeTypeRegistry.java:1110) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.validateNodeTypeDef (NodeTypeRegistry.java:1469) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.internalRegister(No deTypeRegistry.java:1311) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegi stry.java:746) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegi stry.java:120) at org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(Reposit oryImpl.java:515) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:262 ) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:528 ) at org.apache.jackrabbit.core.TransientRepository$2.getRepository(Transient Repository.java:249) at org.apache.jackrabbit.core.TransientRepository.startRepository(Transient Repository.java:270) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:338) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:368) at nl.gx.firsthop.FirstHop.main(FirstHop.java:31) =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D error #1 gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty javax.jcr.RepositoryException: internal error: invalid built-in node type definition stored in org/apache/jackrabbit/cor e/nodetype/builtin_nodetypes.xml at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegi stry.java:753) at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegi stry.java:120) at org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(Reposit oryImpl.java:515) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:262 ) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:528 ) at org.apache.jackrabbit.core.TransientRepository$2.getRepository(Transient Repository.java:249) at org.apache.jackrabbit.core.TransientRepository.startRepository(Transient Repository.java:270) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:338) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository .java:368) at nl.gx.firsthop.FirstHop.main(FirstHop.java:31) =20 =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D trace #1 ------------------------------------------------------ transition #0 thread: 0 gov.nasa.jpf.jvm.choice.ThreadChoiceFromSet {>main} =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D snapshot #1 no live threads =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D results error #1: gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty "javax.jcr.RepositoryException: internal error: inv..." =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D search finished: 10/5/07 1:07 PM =20 ---------------------------------------------------- End JPF --------------------------------------------------- =20 ---------------------------------------------------- Eclipse --------------------------------------------------- Printing names from ntNames: {http://www.jcp.org/jcr/nt/1.0}base Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder Printing names from ntNames: {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}base Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder Printing names from ntNames: {http://www.jcp.org/jcr/nt/1.0}hierarchyNode Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder Printing names from ntNames: {http://www.jcp.org/jcr/nt/1.0}unstructured Printing names from ntdCache: {internal}versionStorage {http://www.jcp.org/jcr/mix/1.0}referenceable {http://www.jcp.org/jcr/nt/1.0}versionedChild {http://www.jcp.org/jcr/nt/1.0}versionLabels {http://www.jcp.org/jcr/nt/1.0}childNodeDefinition {http://www.jcp.org/jcr/mix/1.0}versionable {http://www.jcp.org/jcr/nt/1.0}resource {http://www.jcp.org/jcr/nt/1.0}file {http://www.jcp.org/jcr/nt/1.0}hierarchyNode {http://www.jcp.org/jcr/nt/1.0}base {http://www.jcp.org/jcr/nt/1.0}versionHistory {http://www.jcp.org/jcr/nt/1.0}version {http://www.jcp.org/jcr/nt/1.0}linkedFile {internal}root {internal}nodeTypes {http://www.jcp.org/jcr/nt/1.0}propertyDefinition {http://www.jcp.org/jcr/nt/1.0}frozenNode {http://www.jcp.org/jcr/nt/1.0}unstructured {http://www.jcp.org/jcr/nt/1.0}nodeType {http://www.jcp.org/jcr/nt/1.0}query {internal}system {http://www.jcp.org/jcr/mix/1.0}lockable {http://www.jcp.org/jcr/nt/1.0}folder =20 ----------------------------------------------------- End Eclipse --------------------------------------------- =20 |