Discussions

EJB programming & troubleshooting: EJB deployment exception

  1. EJB deployment exception (3 messages)

    Hi everyone,

    I have an application. When generate deployment and rmic code with WSAD 5.1, everything is ok. But I got some exceptions when I use ant task wsejbdeploy to generate deployment code outside WSAD. What I can make sure is that the system generated code succssfully for some ejbs of this application but failed to do it for ejb 'Person'. 'Person' is a cmp entity bean with one field primary key(String) and it has two inherienced bean (user and parent). When searching the internet, I found people already posted this kind of exceptions.

    Thanks in advance.

    The exceptions are below:

    Error during generation of deployment code: Error generating Create query for bean Person (Abstract schema name=Person). Error=java.lang.IndexOutOfBoundsException: index=0, size=0.
    >com.ibm.etools.ejbdeploy.EJBDeploymentException (Error during generation of deployment code: Error generating Create query for bean Person (Abstract schema name=Person). Error=java.lang
    ndsException: index=0, size=0.)
    >com.ibm.etools.ejbdeploy.plugin.InternalErrorGenerationException (Error generating Create query for bean Person (Abstract schema name=Person). Error=java.lang.IndexOutOfBoundsException:
    =0)
    java.lang.IndexOutOfBoundsException: index=0, size=0
      at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java(Compiled Code))
      at com.ibm.ObjectQuery.crud.schema.RoleMap.getParentTable(RoleMap.java:122)
      at com.ibm.ObjectQuery.crud.schema.RoleMap.getOppositeTable(RoleMap.java:216)
      at com.ibm.ObjectQuery.crud.catalogbuilder.ViewMetadataBuilder.targetTableAlias(ViewMetadataBuilder.java:424)
      at com.ibm.ObjectQuery.crud.catalogbuilder.ViewMetadataBuilder.printOwnedRoleAsImplOn(ViewMetadataBuilder.java:369)
      at com.ibm.ObjectQuery.crud.catalogbuilder.ViewMetadataBuilder.printRoleAsImplOn(ViewMetadataBuilder.java:386)
      at com.ibm.ObjectQuery.crud.catalogbuilder.ViewMetadataBuilder.createImplementationString(ViewMetadataBuilder.java:114)
      at com.ibm.ObjectQuery.crud.catalogbuilder.ViewMetadataBuilder.create(ViewMetadataBuilder.java:57)
      at com.ibm.ObjectQuery.crud.catalogbuilder.BindingMetadataBuilder.createBeanAndView(BindingMetadataBuilder.java:83)
      at com.ibm.ObjectQuery.crud.catalogbuilder.MetadataBuilder.build(MetadataBuilder.java:41)
      at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.buildMetadata(MOFConfig.java:48)
      at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.metadata(MOFConfig.java:58)
      at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.<init>(MOFConfig.java:25)
      at com.ibm.ObjectQuery.crud.schema.DataStoreMap.oosqlConfig(DataStoreMap.java:560)
      at com.ibm.ObjectQuery.crud.schema.DataStoreMap.objectQueryMetadata(DataStoreMap.java:550)
      at com.ibm.ObjectQuery.crud.schema.DataStoreMap.getRuntimeMetadataOn(DataStoreMap.java:580)
      at com.ibm.ObjectQuery.crud.schema.DataStoreMap.getRuntimeMetadata(DataStoreMap.java:575)
      at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initCRUDQueries(QueryCache.java:129)
      at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initQueryCache(QueryCache.java:103)
      at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheHelper.<init>(QueryCacheHelper.java:30)
      at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.initQueries(QueryCacheCache.java:69)
      at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.init(QueryCacheCache.java:172)
      at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.generateQueries(EJBDeployOperation.java:1719)
      at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.getClassMapsForBackend(EJBDeployOperation.java:1667)
      at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doRun(EJBDeployOperation.java:1391)
      at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(EJBDeployOperation.java:1258)
      at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doit(EJBDeployOperation.java:929)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.invokeDeploymentCodegen(BatchExtension.java:1512)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.internalJarProcess(BatchExtension.java:512)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.runJarDeploy(BatchExtension.java:438)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.access$1(BatchExtension.java:403)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.run(BatchExtension.java:242)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.execute(BatchExtension.java:224)
      at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:187)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run(BootLoaderLoader.java:255)
      at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:133)
      at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:80)
      at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:307)

    Threaded Messages (3)

  2. The same Error[ Go to top ]

    Hey Jim, i have a exception like your.
    Did you find the solution? Why WAS is throwing this exception?
    Look my stack.

    Refreshing: /contract-ejb/ejbModule.

                                                                                   
      Updating.

                                                                                   
    [*Error] An unexpected exception was thrown. Halting execution.

                                                                                   
    Shutting down workbench.

    Error during generation of deployment code: index=0, size=0.
    >com.ibm.etools.ejbdeploy.EJBDeploymentException (Error during generation of deployment code: index=0, size=0.)
    java.lang.IndexOutOfBoundsException: index=0, size=0
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java(Compiled Code))
    at com.ibm.etools.ejbrdbmapping.impl.ForwardFlattenedFKComposerImpl.findColForSimpleAttribute(ForwardFlattenedFKComposerImpl.java:187)
    at com.ibm.etools.ejbrdbmapping.impl.ForwardFlattenedFKComposerImpl.findColForAttribute(ForwardFlattenedFKComposerImpl.java:195)
    at com.ibm.etools.ejbrdbmapping.impl.ForwardFlattenedFKComposerImpl.findColForAttribute(ForwardFlattenedFKComposerImpl.java:177)
    at com.ibm.etools.ejbrdbmapping.impl.ForwardFlattenedFKComposerImpl.getAttributeMaps(ForwardFlattenedFKComposerImpl.java:302)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.CMPAttributeMapHelper.createMapForRel(CMPAttributeMapHelper.java:244)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.CMPAttributeMapHelper.populateLists(CMPAttributeMapHelper.java:458)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.CMPAttributeMapHelper.initAttributeMapperList(CMPAttributeMapHelper.java:398)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheHelper.<init>(QueryCacheHelper.java:29)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.initQueries(QueryCacheCache.java:69)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.init(QueryCacheCache.java:172)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.generateQueries(EJBDeployOperation.java:1719)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.getClassMapsForBackend(EJBDeployOperation.java:1667)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doRun(EJBDeployOperation.java:1391)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(EJBDeployOperation.java:1258)x
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doit(EJBDeployOperation.java:929)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.invokeDeploymentCodegen(BatchExtension.java:1512)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.internalJarProcess(BatchExtension.java:512)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.runJarDeploy(BatchExtension.java:438)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.access$1(BatchExtension.java:403)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.run(BatchExtension.java:242)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.execute(BatchExtension.java:224)
    at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:187)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run(BootLoaderLoader.java:255)
    at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:133)
    at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:80)
    at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:309)

    Any tip?

    Thank you.
    Breno Leitão
  3. IndexOutOfBoundsException[ Go to top ]

    Breno,
    I have 10 Entity EJBs in an old project. I added a new table to the DB and to WebSphere schema, added one new Entity EJB. I have no problem to "Generate Deployment and RMIC Code" for this project (the new table and new bean are not mapped, so the new EJB is not an Enterprise bean for WebSphere). As soon as I map the new EJB to the new table, WebSphere cannot generate code even for the first EJB (old one) with IndexOutOfBoundsException. Could you give me some advice, please?
    Thank you.
    Simon Gerovich

    >com.ibm.etools.ejbdeploy.EJBDeploymentException (Error during generation of deployment code: Error generating Create query for bean AccountProfileEJB (Abstract schema name=AccountProfileEJB). Error=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0.)
    >com.ibm.etools.ejbdeploy.plugin.InternalErrorGenerationException (Error generating Create query for bean AccountProfileEJB (Abstract schema name=AccountProfileEJB). Error=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0)
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.lang.Throwable.<init>(Throwable.java)
    at java.lang.Throwable.<init>(Throwable.java)
    at java.util.ArrayList.RangeCheck(ArrayList.java)
    at java.util.ArrayList.get(ArrayList.java)
    at com.ibm.ObjectQuery.crud.queryplan.QueryResultDescriptor.initialize(QueryResultDescriptor.java:167)
    at com.ibm.ObjectQuery.crud.queryplan.QueryResultDescriptor.<init>(QueryResultDescriptor.java:31)
    at com.ibm.ObjectQuery.crud.queryplan.RdbQueryTemplate.createResultDescriptor(RdbQueryTemplate.java:56)
    at com.ibm.ObjectQuery.crud.queryplan.QuerySubplan.buildNativeQueryTemplates(QuerySubplan.java:82)
    at com.ibm.ObjectQuery.crud.queryplan.QuerySubplan.nativeQuery(QuerySubplan.java:291)
    at com.ibm.ObjectQuery.crud.queryplan.Subquery.initialize(Subquery.java:43)
    at com.ibm.ObjectQuery.crud.queryplan.Subquery.<init>(Subquery.java:28)
    at com.ibm.ObjectQuery.crud.queryplan.Query.initialize(Query.java:160)
    at com.ibm.ObjectQuery.crud.queryplan.Query.<init>(Query.java:28)
    at com.ibm.ObjectQuery.crud.queryplan.QueryCreator.basicCreateQuery(QueryCreator.java:110)
    at com.ibm.ObjectQuery.crud.queryplan.ReadQueryCreator.createGenericFinderQueryForOOSQLMetadata(ReadQueryCreator.java:138)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MetadataBuilderOnClass.query(MetadataBuilderOnClass.java:303)
    at com.ibm.ObjectQuery.crud.catalogbuilder.BindingMetadataBuilder.createTablesAndAliases(BindingMetadataBuilder.java:52)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MetadataBuilder.buildTablesAndAliases(MetadataBuilder.java:60)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MetadataBuilder.build(MetadataBuilder.java:35)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.buildMetadata(MOFConfig.java:48)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.metadata(MOFConfig.java:58)
    at com.ibm.ObjectQuery.crud.catalogbuilder.MOFConfig.<init>(MOFConfig.java:25)
    at com.ibm.ObjectQuery.crud.schema.DataStoreMap.oosqlConfig(DataStoreMap.java:555)
    at com.ibm.ObjectQuery.crud.schema.DataStoreMap.objectQueryMetadata(DataStoreMap.java:545)
    at com.ibm.ObjectQuery.crud.schema.DataStoreMap.getRuntimeMetadataOn(DataStoreMap.java:574)
    at com.ibm.ObjectQuery.crud.schema.DataStoreMap.getRuntimeMetadata(DataStoreMap.java:569)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initCRUDQueries(QueryCache.java:129)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCache.initQueryCache(QueryCache.java:103)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheHelper.<init>(QueryCacheHelper.java:30)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.initQueries(QueryCacheCache.java:69)
    at com.ibm.etools.ejbdeploy.gen20.jdbc.QueryCacheCache.init(QueryCacheCache.java:172)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.generateQueries(EJBDeployOperation.java:1719)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.getClassMapsForBackend(EJBDeployOperation.java:1667)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.doRun(EJBDeployOperation.java:1391)
    at com.ibm.etools.ejbdeploy.plugin.EJBDeployOperation.run(EJBDeployOperation.java:1258)
    at com.ibm.etools.ejbdeploy.ui.plugin.DeployRMICBeansOperation.generateDeployCode(DeployRMICBeansOperation.java:304)
    at com.ibm.etools.ejbdeploy.ui.plugin.DeployRMICBeansOperation.run(DeployRMICBeansOperation.java:570)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.ibm.etools.ejbdeploy.ui.plugin.DeployRunnableWithProgress.run(DeployRunnableWithProgress.java:92)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
  4. IndexOutOfBoundsException[ Go to top ]

    Breno,I have 10 Entity EJBs in an old project. I added a new table to the DB and to WebSphere schema, added one new Entity EJB. I have no problem to "Generate Deployment and RMIC Code" for this project (the new table and new bean are not mapped, so the new EJB is not an Enterprise bean for WebSphere). As soon as I map the new EJB to the new table, WebSphere cannot generate code even for the first EJB (old one) with IndexOutOfBoundsException. Could you give me some advice, please?Thank you.Simon


    Hi Simon,
      I'm experiencing the same problem about the generation of deployment code for an entity bean.
    It sounds strange that I've no problem with other 5 entity beans in the same project.

    Did you have solved the problem?

    Many thanks,
    Fulvio Bottoni - Rome