We are not always able to retrieve a ProjectMember from a sourceElement lookup. The code in question is shown below. The problem is that this some times works and sometimes does not. A fairly reliable way to reproduce this error has been to perform the following steps. 1: Start with a clean user dir. 2: Open the "Application" project 3: Open the "Module" project 4: Open the output of the "Module" project. 5: Build the target "Ejb Module Jar" Once this bug occurs, an IDE restart is required to make it go away. To reproduce this you can grab a copy of http://f4jbuilder.czech:8080/ffjcbfiles/trunk/Continuous/Builds/FFJ-trunk-20031021-2204_f4j_ee.zip from the continuous build page. Any recent EE build should do. The "Application" and "Module" projects that reproduce this problem will be attached to this bug. This happens in a variety of situations to a number of people working on EE, the recipie above just happens to be a known way to reproduce the bug. For myself, I note that this only seems to occur on projects that were opened with an explict "project open". I have not seen this happen if the project is opened as a result of normal IDE startup. There are a few other people that may register interest in this bug and provide their own scenarios. public static PatternModel getPatternModel(SourceElement sourceElement) Line 237 throws FileStateInvalidException { if (sourceElement == null) throw new RuntimeException("No source element provided"); Lookup lookup = sourceElement.getLookup(); if (lookup == null) throw new RuntimeException("Source element has no lookup"); ProjectMember member = (ProjectMember) lookup.lookup(ProjectMember.class); if (member == null) throw new RuntimeException("Could not find project member"); Line 251 Result of lookup.toString() = "ProxyLookup(class=class org.openide.util.lookup.ProxyLookup)->[org.openide.util.Lookup$Empty@b02928, SimpleLookup[package com.beans;\n\npublic class SessionBean extends java.lang.Object implements javax.ejb.SessionBean {\n private javax.ejb.SessionContext context;\n \n public SessionBean() {}\n \n public void ejbCreate() {}\n \n public void ejbActivate() {}\n \n public void ejbPassivate() {}\n \n public void setSessionContext(javax.ejb.SessionContext ) {}\n \n public void ejbRemove() {}\n \n \n}], AbstractLookup[]]" java.lang.RuntimeException: Could not find project member at com.sun.s1s.jpe.model.PatternModel.getPatternModel(PatternModel.java:251) at com.sun.s1s.jpe.model.PatternModel.getPatternModel(PatternModel.java:272) at com.sun.s1s.jpe.model.metaclasses.ServiceImplementation.precompileComponents(ServiceImplementation.java:194) at com.sun.s1s.jpe.module.target.mdprocessor.Target.build(Target.java:57) at org.netbeans.api.compilation.CompilerStrategy$1.build(CompilerStrategy.java:52) at org.netbeans.api.compilation.CompilerEngine$CompilerJobRunnable.run(CompilerEngine.java:177) at org.openide.util.Task.run(Task.java:136) [catch] at org.netbeans.api.compilation.CompilerEngine$CompilerThread.run(CompilerEngine.java:213)