Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 70734 invoked from network); 25 Jan 2006 12:28:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jan 2006 12:28:12 -0000 Received: (qmail 64474 invoked by uid 500); 25 Jan 2006 12:27:57 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 64452 invoked by uid 500); 25 Jan 2006 12:27:57 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 64441 invoked by uid 99); 25 Jan 2006 12:27:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 04:27:57 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.71.66.12] (HELO mailadmin.newmedia.no) (212.71.66.12) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jan 2006 04:27:56 -0800 Received: (qmail 10597 invoked by uid 1009); 25 Jan 2006 12:27:33 -0000 Message-ID: <20060125122733.10596.qmail@mailadmin.newmedia.no> References: <20060124105009.28347.qmail@mailadmin.newmedia.no> <74e15baa0601240739g5df33416v6bb97b3d16872613@mail.gmail.com> <20060124163407.12007.qmail@mailadmin.newmedia.no> <74e15baa0601240840o164bb2dekb8932471199102e6@mail.gmail.com> <20060124205222.23902.qmail@mailadmin.newmedia.no> <2654CC78-0312-4E64-A763-A7AA0743BEEE@yahoo.com> <20060124213120.6501.qmail@mailadmin.newmedia.no> <74e15baa0601241400y37f7a58bte47cfd65e92be876@mail.gmail.com> <20060124222704.26859.qmail@mailadmin.newmedia.no> In-Reply-To: <20060124222704.26859.qmail@mailadmin.newmedia.no> From: "Stein =?iso-8859-1?Q?Kr=E5b=F8l?=" To: user@geronimo.apache.org Subject: Re: Reference question Date: Wed, 25 Jan 2006 12:27:33 GMT Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Finally got my EJBs and my webapp working!! Had to pack it in an ear to get classes for the EJB deploy in Geronimo. One thing I notised with my webapp: When I redeploy it was not properly deleted in config-store. Got a lot of folders there like this 40 war WEB-INF lib helper.jar (which is a jar i included in my webapps.) Is this right? My current webapp folder is 78! Anyway thanks for all help so far. Stein Kr�b�l Stein Kr�b�l writes: > The error now: > Error: Unable to distribute my-webapp-1.0.war: Error processing > 'remote' element for EJB Reference 'ejb/BCalcREJB' for module > 'my-webapp-1.0': Remote interface class not found: > com.tellussoft.Test.BonusCalculator > -------------------------------------------------- > web.xml: > ?xml version="1.0" encoding="UTR-8"?> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > still with: > > ejb/BCalcREJB > Session > com.tellussoft.Test.BonusCalculatorHome > com.tellussoft.Test.BonusCalculator > > -------------------------------------------------- > geronimo-web.xml: > ?xml version="1.0" encoding="UTR-8"?> > xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" > configId="M yWebApp-1.0" > parentId="test-ejb-1.0.1"> > -------------------------------------------------- > openejb-jar.xml: > > > xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" > xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" > xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1" > xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0" > xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0" > inverseClassloading="false" > configId="test-ejb-1.0.1"> > -------------------------------------------------- > ejb-jar.xml: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" > version="2.1"> > -------------------------------------------------- > What about my other question: files in geronimo after deploing? > Stein > > Aaron Mulder writes: > >> Your ejb-jar.xml should not have a configId or parentId -- those are >> Geronimo tags. So that's causing the error below, and removing that >> stuff from ejb-jar.xml should fix it. >> >> Your openejb-jar.xml correctly has configId="test-ejb-1.0.1" -- that's >> good. >> >> However, your geronimo-web.xml has parentid="test-ebj-1.0.1" -- as >> David pointed out this should be parentId not parentid, and also the >> value should be test-ejb-1.0.1 (to match the configId in >> openejb-jar.xml) and not test-ebj-1.0.1 (which does not match >> anything!). >> >> Thanks, >> Aaron >> >> On 1/24/06, Stein Kr�b�l wrote: >>> I see what you mean, but this is now the errormessage: >>> >>> Invalid deployment descriptor: [error: cvc-complex-type.3.2.1: >>> Attribute not allowed (no wildcards allowed): configId in element >>> web-app@http://java.sun.com/xml/ns/j2ee, error: >>> cvc-complex-type.3.2.1: Attribute not allowed (no wildcards >>> allowed): parentId in element >>> web-app@http://java.sun.com/xml/ns/j2ee] >>> -------------------------------------------------- >>> Is ther someting with the deployment of the EJB when it's not possible >>> to se the classes in Geronimo filesystem? >>> >>> Stein >>> >>> >>> David Jencks writes: >>> >>> > According to our deployer the actual plan you are deploying has a >>> typo, >>> > parentid (lower case i) instead of parentId (upper case I) >>> > >>> > hope this helps >>> > david jencks >>> > >>> > On Jan 24, 2006, at 8:52 PM, Stein Kr�b�l wrote: >>> > >>> >> Thank you for your response! >>> >> >>> >> The error now is: >>> >> C:\web\geronimo-1.0\bin>deploy --user system --password manager >>> deploy >>> >> c:\project\my-webapp\target\my-webapp-1.0.war >>> >> Error: Unable to distribute my-webapp-1.0.war: Unable to load first >>> >> parent of configuration MyWebApp-1.0 >>> >> No configuration with id: test-ebj-1.0.1 >>> >> ------------------------------------------------------ >>> >> Header of web.xml: >>> >> web-app xmlns="http://java.sun.com/xml/ns/j2ee" >>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> >> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >>> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >>> >> version="2.4"> >>> >> When I put configId and parentID here I got error when deployd: >>> >> Error: Unable to distribute my-webapp-1.0.war: xml problem >>> >> Invalid deployment descriptor: [error: cvc-complex-type.3.2.1: >>> >> Attribute not allowed (no wildcards allowed): parentid] >>> >> Descriptor: >> >> parentid="test-ebj-1.0.1" >>> >> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" >>> >> xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0"> >>> >> It is here I have: >>> >> >>> >> ejb/BCalcREJB >>> >> Session >>> >> com.tellussoft.Test.BonusCalculatorHome >>> >> com.tellussoft.Test.BonusCalculator >>> >> >>> >> -------------------------------------------------------- >>> >> Header of geronimo.xml: >>> >> >> >> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" >>> >> configId="MyWebApp-1.0" >>> >> parentId="test-ebj-1.0.1"> >>> >> (so this cased the error abowe...) >>> >> -------------------------------------------------------- >>> >> ejb-jar.xml: >>> >> >>> >> >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> >> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >>> >> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" >>> >> version="2.1" >>> >> configId="test-ejb-1.0.1"> >>> >> -------------------------------------------------------- >>> >> openejb.xml: >>> >> >> >> xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" >>> >> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0" >>> >> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1" >>> >> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0" >>> >> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0" >>> >> inverseClassloading="false" >>> >> configId="test-ejb-1.0.1"> >>> >> -------------------------------------------------------- >>> >> Stein >>> >> Give me more options please! I'm in a hurry... >>> >> >>> >> Aaron Mulder writes: >>> >>> In your geronimo-web.xml (the one with the EJB reference) add a >>> >>> parentId attribute to the web-app element right after the configId. >>> The >>> >>> parentId of the WAR file should be set to be the same as the >>> >>> configId of the EJB JAR file. That will add the EJB JAR classes to >>> >>> the class path of the WAR so it should be able to access the EJB >>> >>> classes. Thanks, >>> >>> Aaron On 1/24/06, Stein Kr�b�l wrote: >>> >>>> The thing is (as posted earlier) that when I put >>> >>>> >>> >>>> ejb/BCalcREJB >>> >>>> Session >>> >>>> com.tellussoft.Test.BonusCalculatorHome >>> >>>> com.tellussoft.Test.BonusCalculator >>> >>>> >>> >>>> I get an error when deploying: >>> >>>> Error: Unable to distribute my-webapp-1.0.war: Error processing >>> >>>> 'remote' element for EJB Reference 'ejb/BCalcREJB' for module >>> >>>> 'MyWebApp-1.0': Remote interface class not found: >>> >>>> com.tellussoft.Test.BonusCalculator >>> >>>> ------------------------------------ >>> >>>> In my openejb-jar: >>> >>>> >>> >>>> >>> >>>> BCalcREJB >>> >>>> ejb/BCalcREJB >>> >>>> >>> >>>> >>> >>>> Now, I beleave the class files in the ejb.jar fil should be found >>> in >>> >>>> the file structure of Geronimo, but they are not there. >>> >>>> ------------------------------------ >>> >>>> In config-store/index.properties: >>> >>>> ... >>> >>>> geronimo/client-security/1.0/car=14 >>> >>>> test-ejb-1.0.1=59 >>> >>>> geronimo/geronimo-gbean-deployer/1.0/car=17 >>> >>>> ... >>> >>>> and in >>> >>>> configstore/59 >>> >>>> ejb 6kb >>> >>>> META-INF/config.ser 18kb >>> >>>> ------------------------------------ >>> >>>> Structure of test-ejb-1.0.1.jar: >>> >>>> META-INF/openejb-jar.xml >>> >>>> META-INF/ejb-jar.xml >>> >>>> META-INF/MANIFEST.MF >>> >>>> com/tellussoft/Test/LocalBonusCalculatorHome.class >>> >>>> com/tellussoft/Test/LocalBonusCalculator.class >>> >>>> com/tellussoft/Test/BonusCalculatorHome.class >>> >>>> com/tellussoft/Test/LocalBonusCalculatorBean.class >>> >>>> com/tellussoft/Test/BonusCalculator.class >>> >>>> ------------------------------------- >>> >>>> What am I doing wrong? >>> >>>> I'm a little desperate case I have to get this to work by tomorrow. >>> >>>> Stein >>> >>>> Aaron Mulder writes: >>> >>>> > You need an EJB Reference in your WAR (in Geronimo, a web app >>> can't >>> >>>> > look up an EJB in JNDI unless there's an EJB Reference in the >>> >>>> > web.xml). It's easiest if your EJB JAR and WAR are deployed as >>> part >>> >>>> > of an EAR so you can use an in the EJB Reference in >>> >>>> web.xml >>> >>>> > and then you don't need any Geronimo-specific information. If >>> the >>> >>>> EJB >>> >>>> > JAR and WAR are deployed separately, you'll probably need a >>> >>>> > geronimo-web.xml that maps the EJB reference in web.xml to the >>> >>>> correct >>> >>>> > EJB in the EJB JAR. See, for example, >>> >>>> > >>> >>>> > http://chariotsolutions.com/geronimo/web-plan.html#id2591236 >>> >>>> > using the geronimo-web.xml syntax described at >>> >>>> > http://chariotsolutions.com/geronimo/web-plan.html#web-plan-refs >>> >>>> > >>> >>>> > Anyway, once your EJB reference is set up, if the EJB reference >>> name >>> >>>> > is ejb/BCalcREJB then you'll look it up in JNDI at >>> >>>> > java:comp/env/ejb/BCalcREJB (generally, it's java:comp/env/ [name >>> of >>> >>>> > EJB reference]) >>> >>>> > >>> >>>> > Thanks, >>> >>>> > Aaron >>> >>>> > >>> >>>> > On 1/24/06, Stein Kr�b�l wrote: >>> >>>> >> Help! >>> >>>> >> I have deployed my first EJB modul without error. >>> >>>> >> >>> >>>> >> ejb-jar.xml: >>> >>>> >> >>> >>>> >> >>> >>>> >> >> >>>> >> '-//Sun Microsystems, Inc.//DTD Enterprise >>> >>>> JavaBeans 2.0//EN' >>> >>>> >> 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'> >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> Stateless Session Bean with Remote >>> >>>> >> Interfaces >>> >>>> >> BCalcREJB >>> >>>> >> com.tellussoft.Test.BonusCalculatorHome >>> >>>> >> com.tellussoft.Test.BonusCalculator >>> >>>> >> com.tellussoft.Test.LocalBonusCalculatorHome>> >>>> local-home> >>> >>>> >> com.tellussoft.Test.LocalBonusCalculator >>> >>>> >> com.tellussoft.Test.BonusCalculatorBean>> >>>> ejb-class> >>> >>>> >> Stateless >>> >>>> >> Container >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> I'm trying to connect to it with a servlet in an standalone war. >>> >>>> >> What is the correct syntax for the lookup method? >>> >>>> >> Object homeObject = context.lookup >>> >>>> ("java:comp/ejb/BCalcREJB"); >>> >>>> >> I have tried all the variants I can think of! >>> >>>> >> BCalcREJB >>> >>>> >> java:comp/env/ejb/BCalcREJB >>> >>>> >> java:comp/env/BCalcREJB >>> >>>> >> ejb/BCalcREJB >>> >>>> >> Is there any other method to verify JNDI names tied to a EJBs? >>> >>>> >> >>> >>>> >> Stein >>> >>>> >> >>> >>>> >> >>> >>>> >>> > >>> >>> >