Hello,

I have the following problem with Jboss and CVS XDoclet:

My session doesn't find the local EJB cmp I want to get.

So with XDoclet I've defined UserBean.java

* @ejb.bean
* name="User"
* display-name="User"
* type="CMP"
* cmp-version="2.x"
* schema="WaUsers"
* jndi-name="ejb/webappointments/User"
* view-type="local"

Then UserSessionBean.java

* @ejb.bean name="UserSession"
* display-name="User Session Bean"
* type="Stateless"
* transaction-type="Container"
* jndi-name="ejb/webappointments/UserSession"
*
* @ejb.ejb-ref ejb-name="User"
* ref-name="mywebappointments/User"
*

and the function that throws NamingLookupException

/**
*
* Find a User by his name/id
* @param pUserId User's name. * @return Returns the User's data.
* @throws RemoteException Idnicates that the modification process failed
*
* @ejb.interface-method view-type="remote"
* @ejb.permission role-name="Admin,PoweredUser,User"
*
**/
public UserData getUserByPrincipalId(String pPrincipalId)
throws
RemoteException
{
try {
// Get User Entity Remote Interface
Context lContext = new InitialContext();
UserLocalHome lHome = (UserLocalHome) PortableRemoteObject.narrow(
lContext.lookup(
"java:comp/env/ejb/mywebappointments/User"
),
UserLocalHome.class
);
UserLocal lEntity = lHome.findByPrimaryKey( new UserPK(pPrincipalId) );
UserData lData = lEntity.getValueObject(); return lData;
}
catch ( FinderException fe ) { throw new EJBException( "User not found: " + fe.getMessage() );
}
catch ( NamingException ne ) { throw new EJBException( "Naming lookup failure: " + ne.getMessage() );
} }

____________________________________________________________

so the output is:


09:42:25,758 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Naming lookup failure: User not bound
at com.wingstech.webappointments.session.UserSessionBean.getUserByPrincipalId(UserSessionBean.java:710)
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:324)


Jndi view says


java:comp namespace of the UserSession bean:

+- env (class: org.jnp.interfaces.NamingContext)
| +- ejb (class: org.jnp.interfaces.NamingContext)
| | +- mywebappointments (class: org.jnp.interfaces.NamingContext)
| | | +- Role[link -> Role] (class: javax.naming.LinkRef)
| | | +- UserGroups[link -> UserGroups] (class: javax.naming.LinkRef)
| | | +- User[link -> User] (class: javax.naming.LinkRef)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- subject[link -> java:/jaas/appointmentsApp/subject] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/appointmentsApp] (class: javax.naming.LinkRef)


The new XDoclet CVS writes on jboss.xml
<entity>
<ejb-name>User</ejb-name>
<local-jndi-name>UserLocal</local-jndi-name>
</entity>

while the previous version wrote
<entity>
<ejb-name>User</ejb-name>
<local-jndi-name>User</local-jndi-name>
</entity>


I can't get out please help me!

Thanks in advance,
Kiuma



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to