Index: src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java =================================================================== --- src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java (revision 109547) +++ src/main/java/org/jboss/ejb3/proxy/factory/ProxyFactoryHelper.java (working copy) @@ -711,11 +711,7 @@ // If for a Stateless Container if (isStateless) { - // Initialize error message - String specViolationErrorMessage = "EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \"" - + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in " - + homeInterface.getName(); - + // Get all methods with signature "create" createMethods = new ArrayList(); try @@ -727,7 +723,9 @@ // EJBTHREE-1156 catch (NoSuchMethodException e) { - throw new RuntimeException(specViolationErrorMessage); + throw new RuntimeException("EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \"" + + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in " + + homeInterface.getName()); } // Ensure only one create method is defined @@ -735,7 +733,9 @@ // EJBTHREE-1156 if (createMethods.size() > 1) { - throw new RuntimeException(specViolationErrorMessage); + throw new RuntimeException("EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \"" + + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in " + + homeInterface.getName()); } } else