users@glassfish.java.net

Re: Looking up a stateless session bean from a POJO in the Web tier

From: Sahoo <sahoo_at_sun.com>
Date: Fri, 09 May 2008 15:22:23 +0530

Can you tell how you are packaging. Send us output of 'jar tf <ear>' as
well as all 'jar tf' for all embeded jar/wars.

Sahoo

glassfish_at_javadesktop.org wrote:
>> You have an ear that contains both the war and the
>> ejb jar, right? I
>>
>
> Right.
>
>
>> don't see anything wrong in your stated
>> configuration. Looks like you
>> are doing this from NetBeans. Can you try deploying
>> the ear file using
>> the following command and see what happens?
>>
>> asadmin deploy --verify=true <path to your ear file>
>>
>>
>
> The same error:
> [code]
> Deploying application in domain failed; Error loading deployment descriptors for module [AcegiTicketEasy] -- Warning : Unable to determine local business vs. remote business designation for EJB 3.0 ref Unresolved Ejb-Ref ejb/UserManagerRef_at_jndi: @null_at_com.ticketeasy.UserManager_at_null@UserManagerImpl
> [/code]
>
>
>> Sahoo
>> glassfish_at_javadesktop.org wrote:
>>
>>> Hi Sahoo,
>>>
>>> I had a look at that before posting here but the
>>>
>> information there didn't work as well. In other
>> words, the following configuration is still not
>> working:
>>
>>> [b]ejb-jar.xml[/b]:
>>> [code]
>>> <?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>
>>>
>>>
>> ejb-name>UserManagerImpl</ejb-name>
>>
>> ejb-class>com.ticketeasy.business.UserManagerImpl</ejb
>> -class>
>>
>>> </session>
>>> </enterprise-beans>
>>>
>>> </ejb-jar>
>>> [/code]
>>>
>>> inside [b]web.xml[/b]:
>>> [code]
>>> <ejb-local-ref>
>>>
>>>
>> <ejb-ref-name>ejb/UserManagerRef</ejb-ref-name>
>> <local>com.ticketeasy.UserManager</local>
>> <ejb-link>UserManagerImpl</ejb-link>
>> </ejb-local-ref>
>>
>>> [/code]
>>>
>>> [b]My Lookup Code inside a POJO[/b]:
>>> [code]
>>> InitialContext ctx = new InitialContext();
>>> UserManager userManager = (UserManager)
>>>
>> ctx.lookup("java:comp/env/ejb/UserManagerRef");
>>
>>> [/code]
>>>
>>> [b]The error message:[/b]
>>> [code]
>>> Deploying application in domain failed; Error
>>>
>> loading deployment descriptors for module
>> [AcegiTicketEasy] -- Warning : Unable to determine
>> local business vs. remote business designation for
>> EJB 3.0 ref Unresolved Ejb-Ref
>> ejb/UserManagerRef_at_jndi:
>> @null_at_com.ticketeasy.UserManager_at_null@UserManagerImpl
>> Deployment error:
>> The module has not been deployed.
>> See the server log for details.
>> at
>> org.netbeans.modules.j2ee.deployment.devmodules.api.De
>> ployment.deploy(Deployment.java:166)
>>
>>> at
>>>
>> org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.ja
>> va:104)
>>
>>> at
>>>
>> org.apache.tools.ant.UnknownElement.execute(UnknownEle
>> ment.java:288)
>>
>>> at
>>>
>> sun.reflect.GeneratedMethodAccessor272.invoke(Unknown
>> Source)
>>
>>> at
>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega
>> tingMethodAccessorImpl.java:25)
>>
>>> at
>>>
>> java.lang.reflect.Method.invoke(Method.java:597)
>>
>>> at
>>>
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(Di
>> spatchUtils.java:105)
>>
>>> at
>>>
>> org.apache.tools.ant.Task.perform(Task.java:348)
>>
>>> at
>>>
>> org.apache.tools.ant.Target.execute(Target.java:357)
>>
>>> at
>>>
>> org.apache.tools.ant.Target.performTasks(Target.java:3
>> 85)
>>
>>> at
>>>
>> org.apache.tools.ant.Project.executeSortedTargets(Proj
>> ect.java:1329)
>>
>>> at
>>>
>> org.apache.tools.ant.Project.executeTarget(Project.jav
>> a:1298)
>>
>>> at
>>>
>> org.apache.tools.ant.helper.DefaultExecutor.executeTar
>> gets(DefaultExecutor.java:41)
>>
>>> at
>>>
>> org.apache.tools.ant.Project.executeTargets(Project.ja
>> va:1181)
>>
>>> at
>>>
>> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run
>> (BridgeImpl.java:277)
>>
>>> at
>>>
>> org.apache.tools.ant.module.run.TargetExecutor.run(Tar
>> getExecutor.java:460)
>>
>>> at
>>>
>> org.netbeans.core.execution.RunClassThread.run(RunClas
>> sThread.java:151)
>>
>>> Caused by: The module has not been deployed.
>>> at
>>>
>> org.netbeans.modules.j2ee.deployment.devmodules.api.De
>> ployment.deploy(Deployment.java:160)
>>
>>> ... 16 more
>>> [/code]
>>>
>>> Any ideas what I am probably doing wrong?
>>>
>>> Thanks in advance,
>>> Behrang
>>> [Message sent by forum member 'behrangsa'
>>>
>> (behrangsa)]
>>
>>>
>> http://forums.java.net/jive/thread.jspa?messageID=2734
>> 67
>>
>>>
>> ------------------------------------------------------
>> ---------------
>>
>>> To unsubscribe, e-mail:
>>>
>> users-unsubscribe_at_glassfish.dev.java.net
>>
>>> For additional commands, e-mail:
>>>
>> users-help_at_glassfish.dev.java.net
>>
>>>
>>>
>> ------------------------------------------------------
>> ---------------
>> To unsubscribe, e-mail:
>> users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail:
>> users-help_at_glassfish.dev.java.net
>>
> [Message sent by forum member 'behrangsa' (behrangsa)]
>
> http://forums.java.net/jive/thread.jspa?messageID=273477
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>