This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 189061 - New EJB project creation yields "empty" ejb-jar.xml
Summary: New EJB project creation yields "empty" ejb-jar.xml
Status: CLOSED WORKSFORME
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.0 RC2   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 21:41 EDT by Carl Anderson CLA
Modified: 2007-06-04 13:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2007-05-24 21:41:08 EDT
This is a regression.

I was running the smoke test for the S-2.0RC1-200705241855 smoke test.  I created a Web 2.4 targeted at Apache 5.5 (which should not matter), then I created an Ear 1.4 targeted at WebSphere 6.0, and then I created an EJB 2.1, and during the creation I selected Add to Ear and chose the Ear I had just created.  When the creation ended, I saw 3 validation errors stating that the Deployment Descriptor for the EJB project could not be loaded.  I also saw that there was not a Deployment Descriptor node in the Project Explorer for that project.
I brought up the ejb-jar.xml in the XML editor, and it showed me an empty xml file that was marked as dirty.
I checked on disk, and the ejb-jar.xml file was there and had proper contents.
I did a refresh on the EJB project, and the validation errors disappeared, and the XML editor showed the appropriate contents.
Comment 1 Carl Anderson CLA 2007-05-24 21:42:11 EDT
From the .log file:

!ENTRY org.eclipse.wst.validation 4 0 2007-05-24 21:17:26.397
!MESSAGE 
*** ERROR ***: Thu May 24 21:17:26 EDT 2007    java.lang.reflect.InvocationTargetException
    	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:615)
    	at org.eclipse.wst.validation.internal.operations.WorkbenchContext.loadModel(WorkbenchContext.java:583)
    	at org.eclipse.jst.j2ee.internal.ejb.workbench.validation.EJBHelper.loadModel(EJBHelper.java:300)
    	at org.eclipse.wst.validation.internal.operations.WorkbenchContext.loadModel(WorkbenchContext.java:565)
    	at org.eclipse.jst.j2ee.model.internal.validation.EJBValidationContext.loadModel(EJBValidationContext.java:115)
    	at org.eclipse.jst.j2ee.model.internal.validation.EJBValidator.fullValidate(EJBValidator.java:376)
    	at org.eclipse.jst.j2ee.model.internal.validation.EJBValidator.commonValidate(EJBValidator.java:80)
    	at org.eclipse.jst.j2ee.model.internal.validation.EJBValidator.validateInJob(EJBValidator.java:104)
    	at org.eclipse.jst.j2ee.internal.ejb.workbench.validation.UIEjbValidator.validateInJob(UIEjbValidator.java:52)
    	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:65)
    	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: META-INF/ejb-jar.xml
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl.getDeploymentDescriptor(EJBJarFileImpl.java:121)
    	at org.eclipse.jst.j2ee.internal.ejb.workbench.validation.EJBHelper.loadEjbModel(EJBHelper.java:566)
    	... 13 more
    Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.EmptyResourceException: platform:/resource/SmokeEJB/ejbModule/META-INF/ejb-jar.xml
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil.getRoot(ArchiveUtil.java:440)
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.XmlBasedImportStrategyImpl.primLoadDeploymentDescriptor(XmlBasedImportStrategyImpl.java:42)
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.EjbJar11ImportStrategyImpl.loadDeploymentDescriptor(EjbJar11ImportStrategyImpl.java:87)
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.EjbJar11ImportStrategyImpl.importMetaData(EjbJar11ImportStrategyImpl.java:81)
    	at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl.getDeploymentDescriptor(EJBJarFileImpl.java:117)
    	... 14 more
Comment 2 Chuck Bridgham CLA 2007-05-29 09:07:07 EDT
See if you can figure out how to reproduce this.
Comment 3 Carl Anderson CLA 2007-06-04 13:51:07 EDT
I can't get this to fail anymore.  This must have been a fluke through a small window of opportunity.
Comment 4 Carl Anderson CLA 2007-06-04 13:51:33 EDT
Closing (unless I happen to find a way to reproduce.)