Re: Re: Re: Re: Re: Re: Re: cannot run client application using jclient

Guillaume Sauthier <[email protected]> Thu, 14 Apr 2011 14:26:51 +0200
Newsgroups gmane.comp.java.objectweb.jonas
Organization Objectweb Consortium
Message-ID <[email protected]>
Why don't you simply have :

@EJB
/private com.test.FacadeBeanRemote/ facade;

Without any descriptors...

--G

Le 14/04/2011 11:44, Benjamin Jailly a écrit :
> I opened the bug on JIRA.
> Yes I'm using EJB3.
>
> Benjamin
>
>
> Le 14 avr. 2011 à 11:25, Guillaume Sauthier a écrit :
>
>> OK, You may have another issue but please open a bug the for the NPE.
>>
>> Are you using EJB3 ?
>>
>> --G
>>
>> Le 14/04/2011 11:05, Benjamin Jailly a écrit :
>>> Hi Guillaume,
>>>
>>>
>>> I think it is a problem with my application-client.xml or 
>>> jonas-client.xml.
>>> my jar application needs to lookup an EJB located in the ejb-jar 
>>> (inside the ear).
>>>
>>> I'm currently trying to see the problem using ClientStubGen and I 
>>> just saw:
>>>
>>> /Digester.error : Parse Error at line 14 column 13: 
>>> cvc-complex-type.2.4.a: Invalid content was found starting with 
>>> element 'remote'. One of '{"http://java.sun.com/xml/ns/j2ee":home}' 
>>> is expected./
>>>
>>> My EJB has only a remote interface.
>>> Do I need to provide a home interface ??
>>> Can it be a problem with jonas-ejb-jar.xml ??
>>>
>>> Here is my of application-client.xml:
>>> /
>>> /
>>> /<?xml version="1.0" encoding="UTF-8"?>/
>>> /
>>> /
>>> /<application-client 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/application-client_1_4.xsd"/
>>> /
>>> //version="1.4">/
>>> /
>>> /
>>> /<display-name>Client Side</display-name>/
>>> //
>>> /<ejb-ref>/
>>> /<ejb-ref-name>ejb/FacadeBean</ejb-ref-name>/
>>> /<ejb-ref-type>Session</ejb-ref-type>/
>>> /<remote>com.test.FacadeBeanRemote</remote>/
>>> /</ejb-ref>/
>>> /
>>> /
>>> /</application-client>/
>>>
>>> and jonas-client.xml:
>>>
>>> /<?xml version="1.0" encoding="UTF-8"?>/
>>> /
>>> /
>>> /<jonas-client xmlns="http://www.objectweb.org/jonas/ns"/
>>> /
>>> //xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/
>>> /
>>> //xsi:schemaLocation="http://www.objectweb.org/jonas/ns/
>>> /http://www.objectweb.org/jonas/ns/jonas-client_4_0.xsd" >/
>>> /
>>> /
>>> /<jonas-ejb-ref>/
>>> /<ejb-ref-name>ejb/FacadeBean</ejb-ref-name>/
>>> /<jndi-name>JNDI_FacadeBean</jndi-name>/
>>> /</jonas-ejb-ref>/
>>> /</jonas-client>/
>>>
>>>
>>> Thanks for your time.
>>>
>>> Benjamin
>>>
>>>
>>> Le 14 avr. 2011 à 10:36, Guillaume Sauthier a écrit :
>>>
>>>> Hmmm
>>>> Can you open a bug on JIRA for this please ?
>>>>
>>>> Seems we forgot to assign the logger when EarClasspathManager is 
>>>> used for ApplicationClient (shame on us :) ) ...
>>>> --G
>>>>
>>>> Le 13/04/2011 15:04, Benjamin Jailly a écrit :
>>>>> ouuups, forgot to tell you :-)
>>>>>
>>>>> I tried with both 5.1.5 and 5.2.0.
>>>>>
>>>>> Benjamin
>>>>>
>>>>> Le 13 avr. 2011 à 13:48, Guillaume Sauthier a écrit :
>>>>>
>>>>>> Yeah, what version of JOnAS are you using ? :)
>>>>>> --G
>>>>>>
>>>>>>
>>>>>> Le 13/04/2011 12:48, Benjamin Jailly a écrit :
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I have an ear application myEntrepriseApp containing a war, an 
>>>>>>> ejb-jar and a jar client.
>>>>>>> The ear is built using Maven2.
>>>>>>>
>>>>>>> Deploying the ear application works fine. The webapp contained 
>>>>>>> in the war is also working properly.
>>>>>>>
>>>>>>> But when I try to run the jar client application, I have the 
>>>>>>> following error:
>>>>>>>
>>>>>>> /There was the following exception : null/
>>>>>>> /java.lang.NullPointerException/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> org.ow2.jonas.lib.cpmanager.EarClassPathManager.resolveClassPath(EarClassPathManager.java:281)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> org.ow2.jonas.lib.cpmanager.EarClassPathManager.getResolvedClassPath(EarClassPathManager.java:228)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> org.ow2.jonas.client.ClientContainer.extractAndAnalyzeEar(ClientContainer.java:1183)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> org.ow2.jonas.client.ClientContainer.start(ClientContainer.java:421)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> org.ow2.jonas.client.ClientContainer.main(ClientContainer.java:244)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at 
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at java.lang.reflect.Method.invoke(Method.java:597)/
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> //at org.ow2.jonas.client.boot.Bootstrap.main(Bootstrap.java:103)/
>>>>>>>
>>>>>>> I guess it doesn't find the manifest of the jar client, which is 
>>>>>>> at its good place in the compiled jar (META-INF/MANIFEST.MF).
>>>>>>>
>>>>>>> The command I'm using to launch the jar client is:
>>>>>>> jclient -nowsgen $JONAS_BASE/deploy/myEntrepriseApp-0.1-SNAPSHOT.ear
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> the pom.xml of the jar client is the following:
>>>>>>> /
>>>>>>> /
>>>>>>> /
>>>>>>> /
>>>>>>> /<?xml version="1.0"?>/
>>>>>>> /<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>>>>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd" 
>>>>>>> xmlns="http://maven.apache.org/POM/4.0.0"/
>>>>>>> /    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">/
>>>>>>> /<modelVersion>4.0.0</modelVersion>/
>>>>>>> /<parent>/
>>>>>>> /<artifactId>myEntrepriseApp</artifactId>/
>>>>>>> /<groupId>com.test</groupId>/
>>>>>>> /<version>0.1-SNAPSHOT</version>/
>>>>>>> /</parent>/
>>>>>>> /<groupId>com.test</groupId>/
>>>>>>> /<artifactId>myClientApp</artifactId>/
>>>>>>> /<version>0.1-SNAPSHOT</version>/
>>>>>>> /<name> myClientApp</name>/
>>>>>>> /<packaging>jar</packaging>/
>>>>>>> /<dependencies>/
>>>>>>> /</dependencies>/
>>>>>>> /<build>/
>>>>>>> /<plugins>/
>>>>>>> /<plugin>/
>>>>>>> /<groupId>org.apache.maven.plugins</groupId>/
>>>>>>> /<artifactId>maven-jar-plugin</artifactId>/
>>>>>>> /<version>2.3.1</version>/
>>>>>>> /<configuration>/
>>>>>>> /<archive>/
>>>>>>> /<manifest> /
>>>>>>> /<mainClass>com.test.Main</mainClass>/
>>>>>>> /<packageName>com.test</packageName>/
>>>>>>> /</manifest>/
>>>>>>> /</archive>/
>>>>>>> /</configuration>/
>>>>>>> /</plugin>/
>>>>>>> /</plugins>/
>>>>>>> /<finalName> myClientApp</finalName>/
>>>>>>> /</build>/
>>>>>>> /</project>/
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Did I miss something ?
>>>>>>>
>>>>>>> Thanks for your help.
>>>>>>>
>>>>>>>
>>>>>>> regards,
>>>>>>> Benjamin
>>>>>>> -----------------------------------------------------
>>>>>>> Benjamin Jailly
>>>>>>>
>>>>>>> Laboratoire Télécom Claude Chappe
>>>>>>> Équipe de recherche SATIN
>>>>>>> Bureau I012
>>>>>>>
>>>>>>> TELECOM Saint-Etienne
>>>>>>> 25 rue du Dr Rémy Annino
>>>>>>> 42 000 Saint-Étienne
>>>>>>>
>>>>>>> [email protected] 
>>>>>>> <mailto:[email protected]>
>>>>>>>
>>>>>> <Guillaume_Sauthier.vcf>
>>>>>
>>>>> -----------------------------------------------------
>>>>> Benjamin Jailly
>>>>>
>>>>> Laboratoire Télécom Claude Chappe
>>>>> Équipe de recherche SATIN
>>>>> Bureau I012
>>>>>
>>>>> TELECOM Saint-Etienne
>>>>> 25 rue du Dr Rémy Annino
>>>>> 42 000 Saint-Étienne
>>>>>
>>>>> [email protected] 
>>>>> <mailto:[email protected]>
>>>>>
>>>> <Guillaume_Sauthier.vcf>
>>>
>>> -----------------------------------------------------
>>> Benjamin Jailly
>>>
>>> Laboratoire Télécom Claude Chappe
>>> Équipe de recherche SATIN
>>> Bureau I012
>>>
>>> TELECOM Saint-Etienne
>>> 25 rue du Dr Rémy Annino
>>> 42 000 Saint-Étienne
>>>
>>> [email protected] 
>>> <mailto:[email protected]>
>>>
>> <Guillaume_Sauthier.vcf>
>
> -----------------------------------------------------
> Benjamin Jailly
>
> Laboratoire Télécom Claude Chappe
> Équipe de recherche SATIN
> Bureau I012
>
> TELECOM Saint-Etienne
> 25 rue du Dr Rémy Annino
> 42 000 Saint-Étienne
>
> [email protected] 
> <mailto:[email protected]>
>
Guillaume_Sauthier.vcf (text/x-vcard, 387 B)
begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:[email protected]
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
url:http://jonas.ow2.org
version:2.1
end:vcard