Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1627

Could not create configuration when ejb module is deployed in openejb 4.0-SNAPSHOT on Apache Karaf

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce the error :

      1) Install Apache Karaf - 2.2.1 - http://karaf.apache.org/index/community/download.html

      2) Edit the /etc/jre.properties file and comment the following lines in jre-6

      #javax.xml.bind, \
      #javax.xml.bind.annotation, \
      #javax.xml.bind.annotation.adapters, \
      #javax.xml.bind.attachment, \
      #javax.xml.bind.helpers, \
      #javax.xml.bind.util, \

      and add after jre-1.6= \
      sun.misc, \

      3) Edit the /etc/config.properties file and replace the text with the following

      org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,!com.sun.xml.internal.bind.,sun.,com.sun.,javax.transaction,javax.transaction.

      4) Create 'apps' and 'conf' directories in the karaf.home directory

      5) Compile OpenEJB :: Container maven project with my patch

      6) Install the following bundles + features by copy / paste the text in karaf console started usign the command --> bin/karaf

      features:install spring/3.0.5.RELEASE
      
      install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/1.7.0
      install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/1.7.0
      install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.8.0
      install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/1.7.0
      
      install -s mvn:commons-cli/commons-cli/1.2
      install -s mvn:commons-pool/commons-pool/1.5.4
      install -s mvn:commons-collections/commons-collections/3.2.1
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-beanutils/1.8.2_2
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/1.1.4c_5
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/1.8.3_2
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javassist/3.9.0.GA_2
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.wsdl4j/1.6.2_5
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.1.1_1
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.1_3_6
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_3
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_3
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_3
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/1.6.2_3
      install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.6_1
      
      install -s mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/
      install -s mvn:org.apache.geronimo.components/geronimo-connector/3.1/
      install -s mvn:org.apache.geronimo.components/geronimo-transaction/3.1
      install -s mvn:org.apache.geronimo.specs/geronimo-validation_1.0_spec/1.1
      install -s mvn:org.apache.geronimo.specs/geronimo-interceptor_1.1_spec/1.0
      install -s mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.7.1/ 
      install -s mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
      install -s mvn:org.apache.geronimo.specs/geronimo-servlet_3.0_spec/1.0/
      install -s mvn:org.apache.geronimo.specs/geronimo-jacc_1.1_spec/1.0.2
      install -s mvn:org.apache.geronimo.specs/geronimo-jaxr_1.0_spec/2.0.0
      install -s mvn:org.apache.geronimo.specs/geronimo-jaxrs_1.1_spec/1.0
      install -s mvn:org.apache.geronimo.specs/geronimo-jaxrpc_1.1_spec/2.1
      install -s mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
      install -s mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.6_spec
      install -s mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
      install -s mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1
      install -s mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
      install -s mvn:org.apache.geronimo.specs/geronimo-ejb_3.1_spec/1.0.2
      install -s mvn:org.apache.geronimo.specs/geronimo-el_2.2_spec
      install -s mvn:org.apache.geronimo.specs/geronimo-jsp_2.2_spec/1.0
      install -s mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.2
      install -s mvn:org.apache.geronimo.specs/geronimo-annotation_1.1_spec/1.0.1
      install -s mvn:org.apache.geronimo.specs/geronimo-jcdi_1.0_spec
      install -s mvn:org.apache.geronimo.specs/geronimo-atinject_1.0_spec
      install -s mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec
      install -s mvn:org.apache.geronimo.specs/geronimo-saaj_1.3_spec/1.1/
      
      install -s wrap:mvn:net.sf.scannotation/scannotation/1.0.2
      install -s mvn:org.apache.openwebbeans/openwebbeans-spi/1.1.0
      install -s mvn:org.apache.openwebbeans/openwebbeans-impl/1.1.0
      install -s mvn:org.apache.openwebbeans/openwebbeans-ee/1.1.0
      install -s mvn:org.apache.openwebbeans/openwebbeans-ejb-common
      install -s mvn:org.apache.openwebbeans/openwebbeans-ejb/1.1.0
      install -s mvn:org.apache.xbean/xbean-asm-shaded/3.7
      install -s mvn:org.apache.xbean/xbean-finder-shaded/3.8-SNAPSHOT
      install -s mvn:org.apache.xbean/xbean-naming/3.8-SNAPSHOT
      install -s mvn:org.apache.xbean/xbean-reflect/3.8-SNAPSHOT
      install -s mvn:org.apache.xbean/xbean-spring/3.7
      install -s mvn:org.apache.activemq/activemq-core/5.5.0
      install -s mvn:org.apache.activemq/kahadb/5.5.0
      install -s mvn:org.apache.activemq/activemq-console/5.5.0
      install -s mvn:org.apache.activemq/activemq-ra/5.5.0
      install -s mvn:org.apache.activemq/activemq-pool/5.5.0
      install -s mvn:org.apache.activemq/activemq-karaf/5.5.0
      install -s mvn:org.apache.activemq/activemq-spring/5.5.0
      install -s mvn:org.apache.bval/org.apache.bval.bundle/0.3-incubating
      
      install -s mvn:org.apache.openejb/openejb-api/4.0.0-SNAPSHOT
      install -s mvn:org.apache.openejb/openejb-core/4.0.0-SNAPSHOT
      install -s mvn:org.apache.openejb/openejb-javaagent/4.0.0-SNAPSHOT
      install -s mvn:org.apache.openejb/openejb-jee/4.0.0-SNAPSHOT
      install -s mvn:org.apache.openejb/openejb-loader/4.0.0-SNAPSHOT
      install -s mvn:org.apache.openejb/openejb-core-osgi/4.0.0-SNAPSHOT
      

      Restart karaf

      7) Copy / paste the ejb module = jar file provided in attachment in apps directory

      Error generated

      10:21:30,173 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | openejb.home = /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi
      10:21:30,173 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | openejb.base = /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi
      10:21:33,669 | INFO  | ogress.com:2181) | ClientCnxn                       | .zookeeper.ClientCnxn$SendThread 1116 | 42 - org.fusesource.fabric.fabric-linkedin-zookeeper - 1.0.0.SNAPSHOT | Client session timed out, have not heard from server in 10169ms for sessionid 0x0, closing socket connection and attempting reconnect
      10:21:35,270 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
      10:21:35,272 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
      10:21:35,273 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Configuring Service(id=My Stateless Container, type=Container, provider-id=Default Stateless Container)
      10:21:35,333 | INFO  | ogress.com:2181) | ClientCnxn                       | .zookeeper.ClientCnxn$SendThread 1000 | 42 - org.fusesource.fabric.fabric-linkedin-zookeeper - 1.0.0.SNAPSHOT | Opening socket connection to server nbwfhakelman.americas.progress.com/10.30.50.129:2181
      10:21:36,098 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Configuring enterprise application: /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
      10:21:36,369 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Auto-deploying ejb GreaterImpl: EjbDeployment(deployment-id=GreaterImpl)
      10:21:36,399 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Enterprise application "/Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar" loaded.
      10:21:36,399 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Using 'openejb.deployments.classpath=false'
      10:21:36,399 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Creating TransactionManager(id=Default Transaction Manager)
      10:21:36,523 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Creating SecurityService(id=Default Security Service)
      10:21:36,612 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Creating Container(id=My Stateless Container)
      10:21:36,819 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Assembling app: /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
      10:21:36,899 | INFO  | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Undeploying app: /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
      10:21:37,238 | ERROR | FelixStartLevel  | root                             | pache.openejb.util.JuliLogStream   95 |  -  -  | Application could not be deployed:  /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar
      org.apache.openejb.OpenEJBException: Creating application failed: /Users/charlesmoulliard/Applications/apache-karaf-2.2.1-dosgi/apps/camel-example-remote-ejb-2.8-SNAPSHOT.jar: Could not create Configuration.
      	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:796)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:466)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:376)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:288)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.OpenEJB.init(OpenEJB.java:276)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.OpenEJB.init(OpenEJB.java:255)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]
      	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)[126:org.apache.openejb.loader:4.0.0.SNAPSHOT]
      	at org.apache.openejb.core.osgi.impl.Activator.start(Activator.java:55)[198:org.apache.openejb.core-osgi:4.0.0.SNAPSHOT]
      	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)[org.apache.felix.framework-3.0.9.jar:]
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)[org.apache.felix.framework-3.0.9.jar:]
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)[org.apache.felix.framework-3.0.9.jar:]
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)[org.apache.felix.framework-3.0.9.jar:]
      	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)[org.apache.felix.framework-3.0.9.jar:]
      	at java.lang.Thread.run(Thread.java:680)[:1.6.0_24]
      Caused by: javax.validation.ValidationException: Could not create Configuration.
      	at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:175)
      	at org.apache.openejb.assembler.classic.ValidatorBuilder.getConfig(ValidatorBuilder.java:97)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:70)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:42)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:535)[128:org.apache.openejb.core:4.0.0.SNAPSHOT]
      	... 19 more
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.RangeCheck(ArrayList.java:547)[:1.6.0_24]
      	at java.util.ArrayList.get(ArrayList.java:322)[:1.6.0_24]
      	at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:173)
      	... 23 more
      
      

      I think that the issue comes from a classloading issue

        Attachments

        1. new-features-file.patch
          138 kB
          Charles Moulliard
        2. osgiOpenEJBServer-OpenEJD.patch
          24 kB
          Charles Moulliard
        3. modifyImportExportPackage.patch
          16 kB
          Charles Moulliard
        4. change-range.patch
          1 kB
          Charles Moulliard
        5. change-range.patch
          1 kB
          Charles Moulliard
        6. camel-example-remote-ejb-2.8-SNAPSHOT.jar
          10 kB
          Charles Moulliard
        7. missing-packages-openejb.patch
          2 kB
          Charles Moulliard

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmoulliard Charles Moulliard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: