Community
Participate
Working Groups
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.
Looks like a duplicate of 11410. Could you please try to reproduce with jdtcore.jar from the M4 build?
Closing, this was addressed in 2.0 stream. *** This bug has been marked as a duplicate of 11410 ***
Code is ok now
Verified