Bug 13852 - Cannot generate EJB inheritance deployed code without debug info
Summary: Cannot generate EJB inheritance deployed code without debug info
Status: VERIFIED DUPLICATE of bug 11410
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows All
: P1 critical (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-15 20:01 EDT by Daniel Dunn CLA
Modified: 2002-06-03 07:33 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 Daniel Dunn CLA 2002-04-15 20:01:37 EDT
I used the standalone ejbDeploy tool with the non-debug version of jdtcore.jar 
applied.  Out of our 36 EJB groups, 30 of them were deployed successfully, but 
the other 6 couldn't be built (ContractEJB is one of them if you want to 
reproduce the problem).  


E:\nondeployedEJBs>ejbDeploy.bat WCSContract-ejb.jar E:\nondeployedEJBs 
E:\nondeployedEJBs\deployedEJBs\WCSContract-ejb.jar -nowarn -35 -keep -cp "wcsej
*** Note: Running the standalone deploytool from E:\BuildMachine\DeployTool\
Starting workbench.
Creating the project.
Importing file..
Generating deployment code
Building: /WCSContract-ejb.jar.
Invoking RMIC.
Building: /WCSContract-ejb.jar.
java.lang.ArrayIndexOutOfBoundsException: 11600ce/contract/objimpl
        at org.eclipse.jdt.internal.compiler.ClassFile.addAttributes
(ClassFile.java:313)
        at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode
(TypeDeclaration.java(Compiled Code))
        at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode
(TypeDeclaration.java:635)
        at 
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode
(CompilationUnitDeclaration.java:129)
        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:383)
        at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java
(Compiled Code))
        at 
org.eclipse.jdt.internal.core.builder.impl.AbstractImageBuilder.compile
(AbstractImageBuilder.java:90)
        at 
org.eclipse.jdt.internal.core.builder.impl.IncrementalImageBuilder.applySourceDe
lta(IncrementalImageBuilder.java:264)
        at 
org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.incrementalBuild
(JavaBuilder.java:210)
        at org.eclipse.jdt.internal.core.builder.impl.JavaBuilder.build
(JavaBuilder.java:54)
        at org.eclipse.core.internal.events.BuildManager$1.run
(BuildManager.java:93)
        at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:758)
        at org.eclipse.core.runtime.Platform.run(Platform.java:393)
        at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:114)
        at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:73)
        at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:198)
        at org.eclipse.core.internal.resources.Project.build(Project.java:91)
        at com.ibm.etools.ejbdeploy.plugin.JavacOperation.run
(JavacOperation.java:79)
        at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run
(BatchExtension.java:975)
        at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute
(BatchDeploy.java:122)
        at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:60)
        at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:240)
[*Error] An unexpected exception was thrown.  Halting execution.
Shutting down workbench.

An error occurred while compiling the .java code. Correct the code, and try 
again.
>com.ibm.etools.ejbdeploy.EJBDeploymentException(An error occurred while 
compiling the .java code. Correct the code, and try again.)
org.eclipse.core.internal.resources.ResourceException: Errors during build.
        at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:200)
        at org.eclipse.core.internal.resources.Project.build(Project.java:91)
        at com.ibm.etools.ejbdeploy.plugin.JavacOperation.run
(JavacOperation.java:79)
        at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run
(BatchExtension.java:975)
        at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute
(BatchDeploy.java:122)
        at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:60)
        at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:240)



I looked at the source code of the compiler 
(org.eclipse.jdt.internal.compiler.ClassFile).  I understand that the 
addAttributes method would construct the attribute information(debug info, 
inner class, deprecation, etc) in the class.  However, the method "forgets" to 
allocate memory when there is no debug information.  That is why it is throwing 
an ArrayIndexOutOfBoundsException.  I would suggest checking if enough memory 
has been allocated before the method stores the attributeNumber.
Comment 1 Olivier Thomann CLA 2002-04-16 09:39:48 EDT
Looks like a duplicate of 11410. Could you please try to reproduce with jdtcore.jar from the M4 
build?
Comment 2 Philipe Mulet CLA 2002-05-28 07:34:36 EDT
Closing, this was addressed in 2.0 stream.

*** This bug has been marked as a duplicate of 11410 ***
Comment 3 Philipe Mulet CLA 2002-06-03 07:33:00 EDT
Code is ok now
Comment 4 Philipe Mulet CLA 2002-06-03 07:33:13 EDT
Verified