Geronimo
  1. Geronimo
  2. GERONIMO-4275

PCEnhancer java.lang.OutOfMemoryError: Java heap space

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.0.3, 2.1.3, 2.1.4, 2.2
    • Component/s: persistence
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      Sun jdk 1.5
      jtds driver 1.2.2 (MSSQL)
      Windows XP
      -Xms1024m -Xmx1024m
      -XX:MaxPermSize=256m

      Description

      I got this error when I am deploying application:

      02 Sep 2008 10:11:38,046 INFO [RMI TCP Connection(14)-192.168.1.122] (OpenEJB.startup.java:70) - Assembling app: C:\Documents and Settings\xxx\Local Settings\Temp\geronimo-deploymentUtil27842.jar
      257594 xxx WARN [RMI TCP Connection(14)-192.168.1.122] openjpa.Enhance - An exception was thrown while attempting to perform class file transformation on "net/.../yyy":
      java.lang.OutOfMemoryError: Java heap space
      at java.util.ArrayList.ensureCapacity(ArrayList.java:169)
      at java.util.ArrayList.add(ArrayList.java:351)
      at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:676)
      at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:575)
      at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:500)
      at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:302)
      at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:241)
      at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:212)
      at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:127)
      at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:176)
      at org.apache.geronimo.persistence.TransformerWrapper.transform(TransformerWrapper.java:43)
      at org.apache.geronimo.transformer.TransformerCollection.transform(TransformerCollection.java:43)
      at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:52)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:308)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:260)
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:430)
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
      at java.lang.Class.privateGetPublicMethods(Class.java:2519)
      at java.lang.Class.getMethods(Class.java:1406)
      at org.apache.openejb.assembler.classic.InterceptorBindingBuilder.build(InterceptorBindingBuilder.java:185)
      at org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:54)
      at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:489)

      There is nothing special in relation @OneToMany @ManyToOne (Hibernate tool generated mappings for two tables - In database there is relation on this two tables):

      First class has this property:

      private Set<yyy> yyy= new HashSet<yyy>(0);

      private Set<CustomerAccount> customerAccounts = new HashSet<CustomerAccount>(0);
      @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "xxx")
      public Set<yyy> getYyys()

      { return this.yyy; }

      public void setYys(Set<yyy> yyys)

      { this.yyys = yyy; }

      Second class has this propertie:

      private Xxx xxx;

      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumns(

      { @JoinColumn(name = "aaa", referencedColumnName = "aaa"), @JoinColumn(name = "bbb", referencedColumnName = "bbb") }

      )
      public Customer getXxx()

      { return this.xxx; }

      public void setXxx(XXX xxx)

      { this.xxx= xxx; }

        Activity

        Ljuba created issue -
        Donald Woods made changes -
        Field Original Value New Value
        Fix Version/s 2.2 [ 12312965 ]
        Fix Version/s 2.1.3 [ 12313316 ]
        Fix Version/s 2.0.3 [ 12313315 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 2.1.4 [ 12313380 ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ljuba
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development