Community
Participate
Working Groups
Build Identifier: 3.2 In an adopter product following exception is thrown in cases when the name of EJb class contains invaild value. at org.eclipse.jst.j2ee.ejb.internal.impl.EnterpriseBeanImpl.getEjbClass(EnterpriseBeanImpl.java:791) at org.eclipse.jst.j2ee.ejb.internal.impl.EnterpriseBeanImpl.eGet(EnterpriseBeanImpl.java:1088) at org.eclipse.jst.j2ee.ejb.internal.impl.SessionImpl.eGet(SessionImpl.java:248) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1012) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1004) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:999) at org.eclipse.wst.common.internal.emf.resource.Translator.getMOFValue(Translator.java:601) at org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterImpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1409) at org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterImpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1775) at org.eclipse.wst.xml.core.internal.emf2xml.EMF2DOMSSEAdapter.notifyChanged(EMF2DOMSSEAdapter.java:222) at org.eclipse.wst.sse.core.internal.provisional.AbstractNotifier.notify(AbstractNotifier.java:201) Reproducible: Always
Created attachment 173683 [details] Patch The problem can be fixed by simply returning null from a method in JavaClassTranslator. This is the class which reflects the class based on a given name. The null value for the JavaClass is handled in upsteam chain
approved
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Requesting approval since the code is not handling the invalid case and the error thrown conveys no meaningful information to the users of the product. * Is there a work-around? If so, why do you believe the work-around is insufficient? No * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? By running editing scenarios of ejb-jar.xml * Give a brief technical overview. Who has reviewed this fix? JavaClassTranslator reflects the class based on user input name. When the value is invalid such as . , ? the class is not reflected/loaded properly and not so user friendly message and exception is logged. Chuck Bridgham has reviewed the fix. * What is the risk associated with this fix? The fix is safe since it catches the thrown exception and return null which is handled properly in upstream stack.
Committed to HEAD for WTP 3.2.1 and WTP 3.3