[EJB 3.0] - failed to resolve to an ejb with a LocalHome
by sudhirkd
Hi , When I deploy my war under Jboss, I get this error.
(My local session bean name is AuthenticateUserBean. I used XDoclet to create code for my bean. I only edited web.xml.
Help is greatly appreciated.
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: 'ejb/AuthenticateUserLocalHome', with web.xml ejb-link: 'AuthenticateUser' failed to resolve to an ejb with a LocalHome)
Here are various snippets of various deployment descriptors,
web.xml
----------
<ejb-local-ref>
<ejb-ref-name>ejb/AuthenticateUserLocalHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.yourcompany.interfaces.AuthenticateUserLocalHome</local-home>
com.yourcompany.interfaces.AuthenticateUserLocal
<ejb-link>AuthenticateUser</ejb-link>
</ejb-local-ref>
jboss.xml
-----------
<ejb-name>AuthenticateUser</ejb-name>
<local-jndi-name>AuthenticateUserLocal</local-jndi-name>
<method-attributes>
</method-attributes>
ejb-jar.xml
-------------
<![CDATA[Description for AuthenticateUser]]>
<display-name>Name for AuthenticateUser</display-name>
<ejb-name>AuthenticateUser</ejb-name>
<local-home>com.yourcompany.interfaces.AuthenticateUserLocalHome</local-home>
com.yourcompany.interfaces.AuthenticateUserLocal
<ejb-class>com.yourcompany.ejb.AuthenticateUserSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972157#3972157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972157
19 years, 7 months
[EJB 3.0] - bean class has no local, webservice, or remote interfaces de
by aron-smith
This *was* working and while I have been making changes I didnt think I changed anything drastic.
My @Stateless PatientBean still implements a remote and local interface, both annotated with @Remote and @Local.
Where else can I look for problems?
4.0.4
2006-09-17 13:31:45,656 DEBUG [org.jboss.ejb3.Ejb3AnnotationHandler] found EJB3: ejbName=PatientBean, class=com.myproj.ejb.patient.PatientBean, type=STATELESS
2006-09-17 13:31:45,656 DEBUG [org.jboss.ejb3.ProxyDeployer] no declared remote bindings for : PatientBean
2006-09-17 13:31:45,656 DEBUG [org.jboss.ejb3.ProxyDeployer] there is remote interfaces for PatientBean
2006-09-17 13:31:45,656 DEBUG [org.jboss.ejb3.ProxyDeployer] default remote binding has jndiName of PatientBean/remote
java.lang.RuntimeException: bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface
at org.jboss.ejb3.ProxyFactoryHelper.getLocalInterfaces(ProxyFactoryHelper.java:105)
at org.jboss.ejb3.ProxyDeployer.initializeLocalBindingMetadata(ProxyDeployer.java:117)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972154#3972154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972154
19 years, 7 months
[EJB 3.0] - NotContextException while lookup remote stateless EJB 3.0
by pmoreau
I am trying to migrate EJB 2.0 application to EJB 3.0.
Deployment on Jboss server 4.0.4GA whith EJB3 configuration seems OK
But when running my EJB 3.0 client code, I get these exception :*
anonymous wrote :
| Failed
| javax.naming.NotContextException
|
| at org.jnp.server.NamingServer.lookup(NamingServer.java:285)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
| at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
| at java.lang.Thread.run(Thread.java:595)
| at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
| at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at RemoteCalcTest.main(RemoteCalcTest.java:38)
|
As I thought having done something wrong, I tried again with the Trailblazer demo with this simple client code :
| public static void main(String[] args) {
| try {
| InitialContext ctx = new InitialContext();
| ctx.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| ctx.addToEnvironment(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| ctx.addToEnvironment(Context.PROVIDER_URL,"localhost");
| RemoteCalculator cal = (RemoteCalculator) ctx.lookup(
| "EJB3Trail/RemoteCalculator/remote");
| double res = cal.calculate(10, 80, 0.05 , 100);
| System.out.println ("Resultat = " + res);
| } catch (Exception e) {
| System.out.println ("Failed");
| e.printStackTrace();
| }
|
I am running jdk 1.5.0_08 (tried also 07...) and have the following classpath in my Jboss IDE 2.0 project:
| <classpath>
| <classpathentry kind="src" path="src"/>
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
| <classpathentry kind="var" path="JBOSS40/client/jboss-ejb3-client.jar"/>
| <classpathentry kind="var" path="JBOSS40/client/jnp-client.jar"/>
| <classpathentry kind="var" path="JBOSS40/client/commons-logging.jar"/>
| <classpathentry kind="var" path="JBOSS40/client/jboss-common-client.jar"/>
| <classpathentry kind="output" path="bin"/>
| </classpath>
|
Trailblazer web application work fine, but I still get the NotContextException with the remote client.
Is something wrong or am I facing a bug?
Thanks for help...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972148#3972148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972148
19 years, 7 months