1 2 Previous Next 22 Replies Latest reply on Oct 16, 2007 6:35 PM by 666705 Go to original post
      • 15. Re: Failed to load java type corresponding to e=application !!
        666705
        I'd also like to point out that after manually changing all the ejb/XXX references to ejb-XXX (and a laundry list of other tweaks as well), the app finally ran as expected.
        • 16. Re: Failed to load java type corresponding to e=application !!
          666705
          Thank you for confirming it. That's certainly the same issue.
          -- Rob

          WLS Blog http://dev2dev.bea.com/blog/rwoollen/
          • 17. Error in deploying a simple EJB 3.0
            666705
            Hi ,

            I am getting the following error while deploying my simple ejb of version 3.0 in Weblogic 9.2.


            Exception preparing module: EJBModule(build) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Error processing annotations: java.lang.NullPointerException.

            During my evaluation of Weblogic 9.2 for EJB 3.0 , I have got the following questions.

            EJB Specification states that EJB's in EJB 3.0 can be developed and deployed without the need of deployment descriptors. I have created a simple EJB with two file Env.java and EnvBean.java and the source code is given below.
            a) I just complied these class files and when I was trying to deploy without ejb-jar.xml and weblogic-ejb-jar.xml, the console was not at all allowing me to deploy.Why is this so?
            b) After I created a META-INF file under root of classes directory by placing ejb-jar.xml with empty <enterprise-beans> element, console was allowing me to deploy with errors in parsing ejb-jar.xml. The error was either session/entity/mdb is a required under <enterprise-beans> element. Why is this required when there are several examples stating <enterprise-beans> element can be empty.
            c) Later I updated ejb-jar.xml with <session> element under <enterprise-beans> with the following values. I got the above error when deployed with this change.

            I had been struggling to deploy this simple bean for almost a day.Pleas point me if there is any documentation that solves my stated problem or if there is a solution.Thanks in advance.

            regards
            Karim

            ejb-jar.xml
            <?xml version="1.0" encoding="UTF-8"?>

            <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">

            <enterprise-beans>

            <session>

            <description>This is the stateless ejb</description>

            <display-name>Env Bean</display-name>

            <ejb-name>EnvBean</ejb-name>

            </session>

            </enterprise-beans>

            </ejb-jar>

            Env.java

            package examples ;


            public interface Env {

            public void display();

            }

            EnvBean.java

            package examples;

            import javax.ejb.Remote;

            import javax.ejb.Stateless;


            @Stateless

            @Remote(Env.class)

            public class EnvBean implements Env {


            public void display() {

            System.out.println("Welcome to EJB 3.0");

            }


            }
            • 18. Re: Failed to load java type corresponding to e=application !!
              666705
              We hit the same issue. Unfortunately, it's non-trivial for us to change our ejb-names to remove the /. I haven't been able to confirm when this bug will be fixed and it's now September! It certainly wasn't addressed in the latest WLS 9.2 I downloaded from the website. I lobbed in a support issue referencing this bug. The person that replied claimed it was going to be fixed in a couple of weeks. I'm not confident in that estimate. Any update here?
              • 19. Re: Failed to load java type corresponding to e=application !!
                666705
                It's still an open bug in our system. I don't have any additional information on a fix date.

                I would suggest contacting support again and ensuring that they know this is a high priority fix for you.
                -- Rob

                WLS Blog http://dev2dev.bea.com/blog/rwoollen/
                • 20. Re: Failed to load java type corresponding to e=application !!
                  666705
                  I'm getting a similiar error except with WLS10.0 with the following persistence.xml file. Any thoughts? I've also validated the xml against the xsd, so i know i'm conforming to it.

                  <?xml version="1.0"?>

                  <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                  version="1.0">
                  <persistence-unit name="bookingDatabase" transaction-type="JTA">
                  <provider>org.hibernate.ejb.HibernatePersistence</provider>
                  <jta-data-source>java:/DefaultDS</jta-data-source>
                  <properties>
                  <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                  <property name="hibernate.show_sql" value="true"/>
                  <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
                  <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
                  <!-- alternative
                  <property name="jboss.entity.manager.factory.jndi.name"
                  value="java:/jpaBookingEntityManagerFactory"/>
                  -->
                  </properties>
                  </persistence-unit>
                  </persistence>
                  • 21. Re: Failed to load java type corresponding to e=application !!
                    666705
                    I'm getting the same error when trying to deploy (Jboss SEAM JPA example). But my persistence.xml file is little different

                    <?xml version="1.0" encoding="UTF-8"?>
                    <persistence>
                    <persistence-unit name="bookingDatabase" transaction-type="JTA">
                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
                    <jta-data-source>examples-dataSource-demoPool</jta-data-source>
                    <properties>
                    <property name="hibernate.dialect"
                    value="org.hibernate.dialect.PointbaseDialect"/>
                    <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                    <property name="hibernate.show_sql" value="true"/>
                    <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
                    <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
                    <!-- alternative
                    <property name="jboss.entity.manager.factory.jndi.name"
                    value="java:/jpaBookingEntityManagerFactory"/>
                    -->
                    </properties>
                    </persistence-unit>
                    </persistence>

                    Please let me know if anyone made this thing working under Weblogic 10.

                    Thanks

                    I'm getting a similiar error except with WLS10.0 with
                    the following persistence.xml file. Any thoughts?
                    I've also validated the xml against the xsd, so i
                    know i'm conforming to it.

                    <?xml version="1.0"?>

                    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                    >
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    > xsi:schemaLocation="http://java.sun.com/xml/ns/persis
                    tence
                    http://java.sun.com/xml/ns/persistence/persistence_1_
                    0.xsd"
                    version="1.0">

                    <persistence-unit name="bookingDatabase" transaction-type="JTA">

                    <provider>org.hibernate.ejb.HibernatePersistence
                    </provider>




                    <jta-data-source>java:/DefaultDS</jta-data-source>
                    <properties>

                    <property name="hibernate.hbm2ddl.auto" value="create-drop"/>


                    <property name="hibernate.show_sql" value="true"/>

                    <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>


                    <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

                    <!-- alternative

                    <property name="jboss.entity.manager.factory.jndi.name"
                    >
                    value="java:/jpaBookingEntityManagerFactory"/>
                    -->
                    </properties>
                    </persistence-unit>
                    </persistence>
                    • 22. Re: Failed to load java type corresponding to e=application !!
                      666705
                      Hi Rob,

                      I am getting below error: Is this same one that you discussed earlier in this form? If it is same, Could you please explain the resolution in detail?

                      Error:

                      <Unable to load descriptor /home/suppala/projects/soe/staging/lib/tmp_externalor
                      derservice.jar/META-INF/ejb-jar.xml of module tmp_externalorderservice.jar. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS W
                      ERE FOUND
                      [java] problem: cvc-complex-type.2.3: Element 'ejb-jar@http://java.sun.com/xml/ns/javaee' with element-only content type cannot have text conten
                      t.:<null>
                      [java] problem: cvc-complex-type.2.3: Element 'enterprise-beans@http://java.sun.com/xml/ns/javaee' with element-only content type cannot have te
                      xt content.:<null>
                      [java] problem: cvc-complex-type.2.3: Element 'session@http://java.sun.com/xml/ns/javaee' with element-only content type cannot have text conten
                      t.:<null>
                      [java] problem: cvc-datatype-valid.1.1: string value '<?xml version="1.0"?> <!DOCTYPE ejb-jar PUBLIC '-..Sun Microsystems, Inc...DTD Enterprise
                      JavaBeans 1.1..EN' 'http:..java.sun.com.j2ee.dtds.ejb-jar_1_1.dtd'> <ejb-jar> <enterprise-beans> <session> <ejb-name>ExternalOrderService<.ejb-name> <h
                      ome>com.att.absvic.webservices.external.ExternalOrderHome<.home> <remote>com.att.absvic.webservices.external.ExternalOrderEJB<.remote> <ejb-class>com.a
                      tt.absvic.webservices.external.ExternalOrderBean<.ejb-class> <session-type>Stateless<.session-type> <transaction-type>Container<.transaction-type> <.se
                      ssion> <.enterprise-beans> <assembly-descriptor> <container-transaction> <method> <ejb-name>ExternalOrderService<.ejb-name> <method-name>*<.method-name
                      <.method> <trans-attribute>Required<.trans-attribute> <.container-transaction> <.assembly-descriptor> <.ejb-jar> ' does not match pattern for ejb-nam
                      eType in namespace http://java.sun.com/xml/ns/javaee:<null>
                      [java] problem: Key ejb-name-key@http://java.sun.com/xml/ns/javaee is missing field with xpath: 'javaee:ejb-name':<null>
                      [java] problem: cvc-complex-type.2.3: Element 'assembly-descriptor@http://java.sun.com/xml/ns/javaee' with element-only content type cannot have
                      text content.:<null>
                      [java] problem: cvc-complex-type.2.3: Element 'container-transaction@http://java.sun.com/xml/ns/javaee' with element-only content type cannot ha
                      ve text content.:<null>
                      [java] problem: cvc-complex-type.2.3: Element 'method@http://java.sun.com/xml/ns/javaee' with element-only content type cannot have text content
                      .:<null>
                      [java] problem: cvc-datatype-valid.1.1: string value '<?xml version="1.0"?> <!DOCTYPE ejb-jar PUBLIC '-..Sun Microsystems, Inc...DTD Enterprise
                      JavaBeans 1.1..EN' 'http:..java.sun.com.j2ee.dtds.ejb-jar_1_1.dtd'> <ejb-jar> <enterprise-beans> <session> <ejb-name>ExternalOrderService<.ejb-name> <h
                      ome>com.att.absvic.webservices.external.ExternalOrderHome<.home> <remote>com.att.absvic.webservices.external.ExternalOrderEJB<.remote> <ejb-class>com.a
                      tt.absvic.webservices.external.ExternalOrderBean<.ejb-class> <session-type>Stateless<.session-type> <transaction-type>Container<.transaction-type> <.se
                      ssion> <.enterprise-beans> <assembly-descriptor> <container-transaction> <method> <ejb-name>ExternalOrderService<.ejb-name> <method-name>*<.method-name
                      <.method> <trans-attribute>Required<.trans-attribute> <.container-transaction> <.assembly-descriptor> <.ejb-jar> ' does not match pattern for ejb-nam
                      eType in namespace http://java.sun.com/xml/ns/javaee:<null>

                      Thanks
                      Srinivas
                      1 2 Previous Next