GartenUmgraben
Erfahrenes Mitglied
Moin...
Ich habe mich mal an ein Projekt gemacht um per EJB / CMP nen Datenbankkzugriff zu realisieren. Wenn ich alles in eine *.jar packe und im JBOSS 4.0 deploye geht alles, soll heissen er meckert nich rum..allerdings fehlt mir noch das "Drummherum" um die eigentlichen Beans.
Nun hab ich um die eigentlichen Beans noch Servlet ec. drum herum gebastelt und dass alles dann wie im JBOSS Tutorial beschrieben zu einer *.ear Datei zusammen packen lassen. Wenn ich die jedoch deploye bekomme ich die unten stehende JBOSS Fehlermeldung. Dass es wohl was mit dem Deploymentdescriptor zu tun hat weiss ich auch...aber kein Plan was genau er von mir will.
"The Bean Provide must specify the fully-quaified name of the Java class that implements the enterprise beans's business methods in the <ejb-class> element.
Class not found on'DB_2.ejb.Server.PersonBean': No ClassLoaders found for 'DB_2.ejb.Server.PersonBean'
(gleine Meldung nochmal für PersonServiceBean)
Kennt jmd diese Meldung bzw. weiss was ich evtl. mal überprüfen soll.
Ich sehe mal davon am hier den Kompletten Code zu posten... anbei jedoch mal der descriptor:
<ejb-jar >
<description><![CDATA[No Description.]]></description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session >
<description><![CDATA[Description for PersonService]]></description>
<display-name>PersonService</display-name>
<ejb-name>PersonService</ejb-name>
<home>DB_2.ejb.Service.interfaces.PersonServiceHome</home>
<remote>DB_2.ejb.Service.interfaces.PersonService</remote>
<ejb-class>DB_2.ejb.Service.PersonServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<entity >
<description><![CDATA[Description for Person]]></description>
<display-name>Person</display-name>
<ejb-name>Person</ejb-name>
<local-home>DB_2.ejb.Server.interfaces.PersonLocalHome</local-home>
<local>DB_2.ejb.Server.interfaces.PersonLocal</local>
<ejb-class>DB_2.ejb.Server.PersonBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Person</abstract-schema-name>
<cmp-field >
<description><![CDATA[]]></description>
<field-name>id</field-name>
</cmp-field>
<cmp-field >
<description><![CDATA[]]></description>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<description><![CDATA[Find Person by Name]]></description>
<query-method>
<method-name>findPersonByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(p) FROM Person AS p WHERE p.name=?1]]></ejb-ql>
</query>
<!-- Write a file named ejb-finders-PersonBean.xml if you want to define extra finders. -->
</entity>
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor >
<!--
To add additional assembly descriptor info here, add a file to your
XDoclet merge directory called assembly-descriptor.xml that contains
the <assembly-descriptor></assembly-descriptor> markup.
-->
<!-- finder permissions -->
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>
Ich habe mich mal an ein Projekt gemacht um per EJB / CMP nen Datenbankkzugriff zu realisieren. Wenn ich alles in eine *.jar packe und im JBOSS 4.0 deploye geht alles, soll heissen er meckert nich rum..allerdings fehlt mir noch das "Drummherum" um die eigentlichen Beans.
Nun hab ich um die eigentlichen Beans noch Servlet ec. drum herum gebastelt und dass alles dann wie im JBOSS Tutorial beschrieben zu einer *.ear Datei zusammen packen lassen. Wenn ich die jedoch deploye bekomme ich die unten stehende JBOSS Fehlermeldung. Dass es wohl was mit dem Deploymentdescriptor zu tun hat weiss ich auch...aber kein Plan was genau er von mir will.
"The Bean Provide must specify the fully-quaified name of the Java class that implements the enterprise beans's business methods in the <ejb-class> element.
Class not found on'DB_2.ejb.Server.PersonBean': No ClassLoaders found for 'DB_2.ejb.Server.PersonBean'
(gleine Meldung nochmal für PersonServiceBean)
Kennt jmd diese Meldung bzw. weiss was ich evtl. mal überprüfen soll.
Ich sehe mal davon am hier den Kompletten Code zu posten... anbei jedoch mal der descriptor:
<ejb-jar >
<description><![CDATA[No Description.]]></description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session >
<description><![CDATA[Description for PersonService]]></description>
<display-name>PersonService</display-name>
<ejb-name>PersonService</ejb-name>
<home>DB_2.ejb.Service.interfaces.PersonServiceHome</home>
<remote>DB_2.ejb.Service.interfaces.PersonService</remote>
<ejb-class>DB_2.ejb.Service.PersonServiceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<entity >
<description><![CDATA[Description for Person]]></description>
<display-name>Person</display-name>
<ejb-name>Person</ejb-name>
<local-home>DB_2.ejb.Server.interfaces.PersonLocalHome</local-home>
<local>DB_2.ejb.Server.interfaces.PersonLocal</local>
<ejb-class>DB_2.ejb.Server.PersonBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Person</abstract-schema-name>
<cmp-field >
<description><![CDATA[]]></description>
<field-name>id</field-name>
</cmp-field>
<cmp-field >
<description><![CDATA[]]></description>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<description><![CDATA[Find Person by Name]]></description>
<query-method>
<method-name>findPersonByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(p) FROM Person AS p WHERE p.name=?1]]></ejb-ql>
</query>
<!-- Write a file named ejb-finders-PersonBean.xml if you want to define extra finders. -->
</entity>
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor >
<!--
To add additional assembly descriptor info here, add a file to your
XDoclet merge directory called assembly-descriptor.xml that contains
the <assembly-descriptor></assembly-descriptor> markup.
-->
<!-- finder permissions -->
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>