1 2 Previous Next 21 Replies Latest reply on Nov 20, 2006 5:30 PM by alrubinger

    Can't get a stateless session bean to work - JNDI can't find

    azavia

      Hi,

      I've been trying to create a very simple example of a stateless session bean in EJB3. I get the following error:

      exception
      
      org.apache.jasper.JasperException: Exception in JSP: /index.jsp:14 
      11: <body>
      12: <%
      13: InitialContext context = new InitialContext();
      14: Math math = (Math)context.lookup("Math/MathBean/remote");
      15: %>
      16: <p>2 + 2: <%=math.add(2, 2) %>.</p>
      17: </body>  
      Stacktrace:
       org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      javax.servlet.ServletException: remote not bound
       org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
       org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      javax.naming.NameNotFoundException: remote not bound
       org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
       org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
       org.jnp.server.NamingServer.getObject(NamingServer.java:543)
       org.jnp.server.NamingServer.lookup(NamingServer.java:296)
       org.jnp.server.NamingServer.lookup(NamingServer.java:270)
       org.jnp.server.NamingServer.lookup(NamingServer.java:270)
       org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
       org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
       javax.naming.InitialContext.lookup(Unknown Source)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:56)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      JDK version is 1.6, working with JBoss 4.0.5, JBoss EJB3 RC9, and the JBoss Eclipse IDE.

      I've deployed the ear and war files. When that didn't work, I also deployed the jar file. I have MathEJB.jar containing the bean, MathWeb.war containing the web files (index.jsp), and Math.ear containing MathEJB.jar, MathWeb.war, and application.xml.

      I've been somewhat following http://docs.jboss.org/ejb3/app-server/tutorial/stateless/stateless.html.

      I should also note that JBoss Eclipse IDE won't automatically deploy the files; I have to manually copy them. When I try to "run" them, it says those type of modules can't run.

      Apparently I can't attach files, so I'll copy the code.

      Math/src/com/azavia/math/Math.java:

      package com.azavia.math;
      
      import javax.ejb.Remote;
      
      @Remote
      public interface Math {
      
       int add(int a, int b);
      
      }
      


      Math/src/com/azavia/math/MathBean.java:

      package com.azavia.math;
      
      import java.io.Serializable;
      
      import javax.ejb.Stateless;
      
      @Stateless
      public class MathBean implements Math, Serializable {
      
       /**
       * Serial version UID
       *
       * Field used for serialization
       */
       private static final long serialVersionUID = 2976407238222758431L;
      
       public int add(int a, int b) {
       return a + b;
       }
      
      }
      


      Math/docroot/index.jsp:

      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
       pageEncoding="ISO-8859-1"%>
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <%@page import="javax.naming.InitialContext"%>
      <%@page import="com.azavia.math.Math"%>
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <title>Math</title>
      </head>
      <body>
      <%
      InitialContext context = new InitialContext();
      Math math = (Math)context.lookup("Math/MathBean/remote");
      %>
      <p>2 + 2: <%=math.add(2, 2) %>.</p>
      </body>
      </html>


      Math/src/META-INF/application.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <application version="1.4"
       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_1_4.xsd">
       <display-name>Math</display-name>
       <module>
       <ejb>MathEJB.jar</ejb>
       </module>
       <module>
       <web>
       <web-uri>MathWeb.war</web-uri>
       <context-root>/math</context-root>
       </web>
       </module>
      </application>
      


      Thanks for any help.

        • 1. Re: Can't get a stateless session bean to work - JNDI can't
          sbucknor

          Hi all, I have a similar issue too. I am experimenting with EJB3 deployed on JBoss 4.0.5 (the jar installer version). The deployed jar file (called SimpleSession.ejb3) has 2 classes:- SimpleSession.class (remote interface) and SimpleSessionBean.class (the bean). This deploys with no issues but from a JSP client calling the EJB with the following code

          String theString = null;
          InitialContext ctx = new InitialContext(); simpleSession=(SimpleSession)ctx.lookup(SimpleSession.class.getName());
          theString = simpleSession.sayHello();

          I get the following error message:

          10:52:55,968 ERROR [STDERR] javax.naming.NameNotFoundException: beans.SimpleSession not bound
          10:52:55,968 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
          10:52:55,968 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
          10:52:55,968 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
          10:52:55,968 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
          10:52:55,968 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          10:52:55,968 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          10:52:55,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          Etc....

          I also noted that the bean was registered with JBoss from the service=JNDIView parameter on the jmx-comsole.
          Does anyone have an idea of what could be wrong here. Any Help will be much apreciated.

          • 2. Re: Can't get a stateless session bean to work - JNDI can't
            itty06

            Is it Math.ear or math.ear

            Try deleting the ear and create again. I once had similar problem and when I rebuilt everything was fine.

            Also you could do this

            @Stateless(name="com.azavia.Math")

            in your bean

            access using math/com.azavia.Math/remote

            This is what happened to my ejb. First I could not access using the way you are doing.. But when I gave a name, it was all fine.
            Then later, I switched back to first way, it worked.

            • 3. Re: Can't get a stateless session bean to work - JNDI can't
              azavia

              Thanks for the replies.

              The remote interrface is com.azavia.math.Math

              In the JNDI view, I see the top level Math, and then under that, MathBean, but no remote.

              When I don't use remote and just lookup Math/MathBean, it is able to look it up, but I can't cast it to Math.

              I did see something at http://docs.jboss.org/ejb3/app-server/tutorial/ear/ear.html mentioning that JBoss doesn't yet support EARs from JAVA ee 5? Does this mean that I can't use ear files?

              How stable is the JBoss EJB implementation at this point? It's a lot better than EJB 2.0, I just want to make sure it is stable enough.

              • 4. Re: Can't get a stateless session bean to work - JNDI can't
                azavia

                Hi,

                I was trying to follow the skeleton project given at http://wiki.jboss.org/wiki/Wiki.jsp?page=StarterSkeletonEclipseProject to see if i could get that to work. It seems like if it'd work, it'd be a lot easier.

                However, where are the web files supposed to go, such as the jsp, etc? It didn't seem to discuss that at all, or give an example of it. Also, I noticed that the deployment script only deploys the ear file, not the war.

                If it is worthwhile, I'd love to use this skeleton project, if I could resolve the above, since it covers a lot more than the ejb3 project that comes with the JBoss IDE plug-in.

                Thanks for the help.

                • 5. Re: Can't get a stateless session bean to work - JNDI can't
                  mazz

                  Yeah, I built that skeleton project as a start to my EJB3 prototype project I was working on (http://golfchairman.sourceforge.net/ is what the skeleton project is growing up into but even that project doesn't have any webapp to it yet).

                  I thought that skeleton project was simple and worked enough for it to be helpful/useful to others to get started, so I posted it on the wiki.

                  I never got to the webapp part of it. It only builds the EJB3 in an ear.

                  Feel free to update it with an example war and get it to deploy.

                  • 6. Re: Can't get a stateless session bean to work - JNDI can't
                    azavia

                     

                    "mazz@jboss.com" wrote:
                    Yeah, I built that skeleton project as a start to my EJB3 prototype project I was working on (http://golfchairman.sourceforge.net/ is what the skeleton project is growing up into but even that project doesn't have any webapp to it yet).

                    I thought that skeleton project was simple and worked enough for it to be helpful/useful to others to get started, so I posted it on the wiki.

                    I never got to the webapp part of it. It only builds the EJB3 in an ear.

                    Feel free to update it with an example war and get it to deploy.


                    Ah. Well it is a great example and great for a skeleton, I just don't know enough about the build.xml file yet to know how to include the web part of it.

                    Maybe I can study up on it a bit though and try to get a web app going. I can see a lot of potential in it, especially with the hibernate generation.

                    • 7. Re: Can't get a stateless session bean to work - JNDI can't
                      azavia

                      OK, I still can't get this darn thing to work. I'm still getting the "remote not bound" exception.

                      Not much has changed since my first post, except I'm usingthat skeleton now, but the code is mostly still the same.

                      Any clue what it could be? I'm exasperated.

                      • 8. Re: Can't get a stateless session bean to work - JNDI can't
                        azavia

                        Hi,

                        I've made progress. Not sure why, but the error has changed to:

                        java.lang.ClassCastException: $Proxy75 cannot be cast to com.azavia.calculator.ejb.Calculator


                        The line is:

                        Calculator calculator = (Calculator)context
                         .lookup("CalculatorApplication/CalculatorBean/remote");


                        Have tried redeploying a few times, and restarting JBoss, to no avail.

                        • 9. Re: Can't get a stateless session bean to work - JNDI can't
                          azavia

                          Hi,

                          It started working. Had to remove the reference to the EJB jar from the war file.

                          I still don't know why I had the original problem with the remote interface not being bound. But it works now.

                          But I'm having a slight other problem related to this.

                          I tried creating a message bean. It wasn't very clear to me whether you can just name a queue within the @MessageDriven annotation, or if you have to specify it in XML somewhere?

                          Also,when I run the application, I get the following:

                          01:29:21,093 INFO [TomcatDeployer] deploy, ctxPath=/CalculatorWeb, warUrl=.../tmp/deploy/tmp65603CalculatorWeb-exp.war/
                          01:29:21,234 INFO [EARDeployer] Init J2EE application: file:/C:/jboss/server/all/deploy/CalculatorApplication.ear
                          01:29:21,640 INFO [Ejb3Deployment] EJB3 deployment time took: 250
                          01:29:21,687 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=golf' to JNDI name 'java:golf'
                          01:29:21,687 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=ejb3-project with dependencies:
                          01:29:21,687 INFO [JmxKernelAbstraction] jboss.jca:name=ejb3ProjectDS,service=DataSourceBinding
                          01:29:21,718 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,name=CalculatorBean,service=EJB3 with dependencies:
                          01:29:21,875 INFO [EJBContainer] STARTED EJB: com.azavia.calculator.ejb.CalculatorBean ejbName: CalculatorBean
                          01:29:21,937 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,name=Hello,service=EJB3 with dependencies:
                          01:29:21,937 INFO [EJBContainer] STARTED EJB: com.azavia.calculator.ejb.Hello ejbName: Hello
                          01:29:21,968 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/azavia/testmdb
                          01:29:21,968 WARN [MessagingContainer] destination not found: queue/azavia/testmdb reason: javax.naming.NameNotFoundException: queue/azavia/testmdb
                          01:29:21,968 WARN [MessagingContainer] creating a new temporary destination: queue/azavia/testmdb
                          01:29:21,984 INFO [azavia/testmdb] Bound to JNDI name: queue/azavia/testmdb
                          01:29:22,015 INFO [EJB3Deployer] Deployed: file:/C:/jboss/server/all/tmp/deploy/tmp65604CalculatorApplication.ear-contents/CalculatorEJB.jar
                          01:29:22,015 INFO [TomcatDeployer] deploy, ctxPath=/calculator, warUrl=.../tmp/deploy/tmp65604CalculatorApplication.ear-contents/CalculatorWeb-exp.war/
                          01:29:22,234 INFO [EARDeployer] Started J2EE application: file:/C:/jboss/server/all/deploy/CalculatorApplication.ear
                          01:29:22,234 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
                          
                          --- MBeans waiting for other MBeans ---
                          ObjectName: persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=ejb3-project
                           State: NOTYETINSTALLED
                           I Depend On:
                           jboss.jca:name=ejb3ProjectDS,service=DataSourceBinding
                          
                          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                          ObjectName: jboss.jca:name=ejb3ProjectDS,service=DataSourceBinding
                           State: NOTYETINSTALLED
                           Depends On Me:
                           persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=ejb3-project


                          It runs, but I get the above warnings. I'm not exactly sure why.

                          I really appreciate the replies and help people have given here.

                          • 10. Re: Can't get a stateless session bean to work - JNDI can't
                            jaikiran

                             

                            I Depend On:
                            jboss.jca:name=ejb3ProjectDS,service=DataSourceBinding


                            Looks like some resource in your application is dependent on "ejb3ProjectDS"
                            which hasnt been deployed.



                            • 11. Re: Can't get a stateless session bean to work - JNDI can't
                              azavia

                              Hi,

                              I'm not sure why it's not being deployed. I see some references to the ds in the proect, but I don't see how it woul be deployed or how it is not.

                              I've uploaded the project to http://www.azavia.com/Calculator.zip, and the full output from the console below, which is the result of going to http://localhost:8080/calculator/message.html

                              10:05:52,968 INFO [Server] Starting JBoss (MX MicroKernel)...
                              10:05:52,968 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
                              10:05:52,968 INFO [Server] Home Dir: C:\jboss
                              10:05:52,968 INFO [Server] Home URL: file:/C:/jboss/
                              10:05:52,968 INFO [Server] Patch URL: null
                              10:05:52,968 INFO [Server] Server Name: all
                              10:05:52,968 INFO [Server] Server Home Dir: C:\jboss\server\all
                              10:05:52,968 INFO [Server] Server Home URL: file:/C:/jboss/server/all/
                              10:05:52,968 INFO [Server] Server Log Dir: C:\jboss\server\all\log
                              10:05:52,968 INFO [Server] Server Temp Dir: C:\jboss\server\all\tmp
                              10:05:52,968 INFO [Server] Root Deployment Filename: jboss-service.xml
                              10:05:54,187 INFO [ServerInfo] Java version: 1.6.0-rc,Sun Microsystems Inc.
                              10:05:54,187 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.6.0-rc-b104,Sun Microsystems Inc.
                              10:05:54,187 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                              10:05:55,546 INFO [Server] Core system initialized
                              10:05:59,453 INFO [WebService] Using RMI server codebase: http://localhost:8083/
                              10:05:59,468 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
                              10:06:03,625 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://127.0.0.1:3873/]
                              10:06:04,515 INFO [AspectDeployer] Deployed AOP: file:/C:/jboss/server/all/deploy/ejb3-interceptors-aop.xml
                              10:06:09,750 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
                              10:06:11,671 INFO [SnmpAgentService] SNMP agent going active
                              10:06:11,734 INFO [AspectDeployer] Deployed AOP: file:/C:/jboss/server/all/deploy/tc5-cluster.sar/tc5-cluster.aop
                              10:06:12,171 INFO [InterceptorChainFactory] interceptor chain is:
                              class org.jboss.cache.interceptors.CallInterceptor
                              class org.jboss.cache.interceptors.PessimisticLockInterceptor
                              class org.jboss.cache.interceptors.UnlockInterceptor
                              class org.jboss.cache.interceptors.ReplicationInterceptor
                              class org.jboss.cache.interceptors.TxInterceptor
                              class org.jboss.cache.interceptors.CacheMgmtInterceptor
                              10:06:12,640 INFO [STDOUT]
                              -------------------------------------------------------
                              GMS: address is localhost:1593
                              -------------------------------------------------------
                              10:06:15,328 INFO [TreeCache] viewAccepted(): [localhost:1593|0] [localhost:1593]
                              10:06:15,328 INFO [TreeCache] TreeCache local address is localhost:1593
                              10:06:15,343 INFO [TreeCache] State could not be retrieved (we are the first member in group)
                              10:06:15,343 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
                              10:06:15,703 INFO [DefaultPartition] Initializing
                              10:06:15,843 INFO [STDOUT]
                              -------------------------------------------------------
                              GMS: address is localhost:1602 (additional data: 14 bytes)
                              -------------------------------------------------------
                              10:06:18,484 INFO [DefaultPartition] Number of cluster members: 1
                              10:06:18,484 INFO [DefaultPartition] Other members: 0
                              10:06:18,484 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
                              10:06:18,484 INFO [DefaultPartition] State could not be retrieved (we are the first member in group)
                              10:06:18,500 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 0, delta: 0) : [127.0.0.1:1099]
                              10:06:18,500 INFO [DefaultPartition] I am (127.0.0.1:1099) received membershipChanged event:
                              10:06:18,500 INFO [DefaultPartition] Dead members: 0 ([])
                              10:06:18,500 INFO [DefaultPartition] New Members : 0 ([])
                              10:06:18,500 INFO [DefaultPartition] All Members : 1 ([127.0.0.1:1099])
                              10:06:18,593 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=localhost/127.0.0.1
                              10:06:18,671 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /127.0.0.1:1102, group=230.0.0.4, HA-JNDI address=127.0.0.1:1100
                              10:06:20,140 WARN [TreeCache] Using deprecated config element CacheLoaderFetchPersistentState. This element will be removed in future, please use CacheLoaderConfiguration instead.
                              10:06:20,140 WARN [TreeCache] Using legacy cache loader config mechanisms.
                              10:06:20,140 WARN [TreeCache] Using deprecated config element CacheLoaderFetchTransientState. This element will be removed in future, replaced with FetchInMemoryState.
                              10:06:20,140 WARN [TreeCache] Calls to setFetchStateOnStartup are ignored; configure state transfer using setFetchInMemoryState and any cache loader's FetchPersistentState property
                              10:06:20,156 WARN [TreeCache] Using deprecated config element CacheLoaderClass. This element will be removed in future, please use CacheLoaderConfiguration instead.
                              10:06:20,156 WARN [TreeCache] Using deprecated config element CacheLoaderConfig(Properties). This element will be removed in future, please use CacheLoaderConfiguration instead.
                              10:06:20,156 WARN [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used
                              10:06:20,203 WARN [TreeCache] Using deprecated configuration element 'EvictionPolicyProvider'. This is only provided for 1.2.x backward compatibility and may disappear in future releases.
                              10:06:20,234 INFO [InterceptorChainFactory] interceptor chain is:
                              class org.jboss.cache.interceptors.CallInterceptor
                              class org.jboss.cache.interceptors.EvictionInterceptor
                              class org.jboss.cache.interceptors.PessimisticLockInterceptor
                              class org.jboss.cache.interceptors.CacheLoaderInterceptor
                              class org.jboss.cache.interceptors.UnlockInterceptor
                              class org.jboss.cache.interceptors.ReplicationInterceptor
                              class org.jboss.cache.interceptors.CacheStoreInterceptor
                              class org.jboss.cache.interceptors.TxInterceptor
                              class org.jboss.cache.interceptors.CacheMgmtInterceptor
                              10:06:20,265 INFO [STDOUT]
                              -------------------------------------------------------
                              GMS: address is localhost:1611
                              -------------------------------------------------------
                              10:06:22,281 INFO [TreeCache] TreeCache local address is localhost:1611
                              10:06:22,281 INFO [TreeCache] viewAccepted(): [localhost:1611|0] [localhost:1611]
                              10:06:22,296 INFO [TreeCache] State could not be retrieved (we are the first member in group)
                              10:06:22,359 WARN [TreeCache] Using deprecated configuration element 'EvictionPolicyProvider'. This is only provided for 1.2.x backward compatibility and may disappear in future releases.
                              10:06:22,359 INFO [InterceptorChainFactory] interceptor chain is:
                              class org.jboss.cache.interceptors.CallInterceptor
                              class org.jboss.cache.interceptors.EvictionInterceptor
                              class org.jboss.cache.interceptors.PessimisticLockInterceptor
                              class org.jboss.cache.interceptors.UnlockInterceptor
                              class org.jboss.cache.interceptors.ReplicationInterceptor
                              class org.jboss.cache.interceptors.TxInterceptor
                              class org.jboss.cache.interceptors.CacheMgmtInterceptor
                              10:06:22,421 INFO [STDOUT]
                              -------------------------------------------------------
                              GMS: address is localhost:1618
                              -------------------------------------------------------
                              10:06:24,421 INFO [TreeCache] viewAccepted(): [localhost:1618|0] [localhost:1618]
                              10:06:24,421 INFO [TreeCache] TreeCache local address is localhost:1618
                              10:06:24,421 INFO [TreeCache] State could not be retrieved (we are the first member in group)
                              10:06:25,437 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000E8000102000000000A3132372E302E302E31000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000006400000000000000010000000000000024000000220000007E0000000000000001000000103136392E3235342E3134332E313336000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
                              10:06:25,578 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000E8000102000000000A3132372E302E302E31000DC8000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000006400000000000000010000000000000024000000220000007E0000000000000001000000103136392E3235342E3134332E313336000DC9004000000000000000000000001004010008060667810201010100000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
                              10:06:26,796 INFO [Embedded] Catalina naming disabled
                              10:06:26,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
                              10:06:26,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
                              10:06:27,234 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
                              10:06:27,234 INFO [Catalina] Initialization processed in 375 ms
                              10:06:27,234 INFO [StandardService] Starting service jboss.web
                              10:06:27,234 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
                              10:06:27,265 INFO [StandardHost] XML validation disabled
                              10:06:27,281 INFO [Catalina] Server startup in 47 ms
                              10:06:27,500 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/httpha-invoker.sar/invoker.war/
                              10:06:27,953 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
                              10:06:28,625 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
                              10:06:28,796 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp23450jbossws.sar-contents/jbossws-exp.war/
                              10:06:28,984 INFO [TomcatDeployer] deploy, ctxPath=/juddi, warUrl=.../deploy/juddi-service.sar/juddiws.war/
                              10:06:29,156 INFO [RegistryServlet] Loading jUDDI configuration.
                              10:06:29,187 INFO [RegistryServlet] Resources loaded from: /WEB-INF/juddi.properties
                              10:06:29,187 INFO [RegistryServlet] Initializing jUDDI components.
                              10:06:29,671 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy-hasingleton/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
                              10:06:29,953 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
                              10:06:30,718 INFO [MailService] Mail Service bound to java:/Mail
                              10:06:31,062 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
                              10:06:31,125 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
                              10:06:31,187 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
                              10:06:31,250 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
                              10:06:31,421 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
                              10:06:31,468 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
                              10:06:31,578 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
                              10:06:31,578 INFO [QuartzResourceAdapter] start quartz!!!
                              10:06:31,640 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
                              10:06:31,671 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
                              10:06:31,671 INFO [RAMJobStore] RAMJobStore initialized.
                              10:06:31,671 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
                              10:06:31,671 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
                              10:06:31,671 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
                              10:06:33,328 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                              10:06:33,562 INFO [A] Bound to JNDI name: queue/A
                              10:06:33,562 INFO [B] Bound to JNDI name: queue/B
                              10:06:33,562 INFO [C] Bound to JNDI name: queue/C
                              10:06:33,562 INFO [D] Bound to JNDI name: queue/D
                              10:06:33,562 INFO [ex] Bound to JNDI name: queue/ex
                              10:06:33,578 INFO [testTopic] Bound to JNDI name: topic/testTopic
                              10:06:33,593 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                              10:06:33,593 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
                              10:06:33,593 INFO [testQueue] Bound to JNDI name: queue/testQueue
                              10:06:33,625 INFO [UILServerILService] JBossMQ UIL service available at : localhost/127.0.0.1:8093
                              10:06:33,640 INFO [DLQ] Bound to JNDI name: queue/DLQ
                              10:06:33,796 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                              10:06:33,843 INFO [TomcatDeployer] deploy, ctxPath=/CalculatorWeb, warUrl=.../tmp/deploy/tmp23491CalculatorWeb-exp.war/
                              10:06:34,078 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                              10:06:34,234 INFO [EARDeployer] Init J2EE application: file:/C:/jboss/server/all/deploy/CalculatorApplication.ear
                              10:06:34,796 INFO [Ejb3Deployment] EJB3 deployment time took: 375
                              10:06:34,859 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=calculator' to JNDI name 'java:calculator'
                              10:06:34,859 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=calculator with dependencies:
                              10:06:34,859 INFO [JmxKernelAbstraction] jboss.jca:name=CalculatorDS,service=DataSourceBinding
                              10:06:35,000 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,name=CalculatorBean,service=EJB3 with dependencies:
                              10:06:35,203 INFO [EJBContainer] STARTED EJB: com.azavia.calculator.ejb.CalculatorBean ejbName: CalculatorBean
                              10:06:35,281 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,name=Hello,service=EJB3 with dependencies:
                              10:06:35,312 INFO [EJBContainer] STARTED EJB: com.azavia.calculator.ejb.Hello ejbName: Hello
                              10:06:35,359 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/azavia/testmdb
                              10:06:35,359 WARN [MessagingContainer] destination not found: queue/azavia/testmdb reason: javax.naming.NameNotFoundException: queue/azavia/testmdb
                              10:06:35,359 WARN [MessagingContainer] creating a new temporary destination: queue/azavia/testmdb
                              10:06:35,375 INFO [azavia/testmdb] Bound to JNDI name: queue/azavia/testmdb
                              10:06:35,437 INFO [EJB3Deployer] Deployed: file:/C:/jboss/server/all/tmp/deploy/tmp23492CalculatorApplication.ear-contents/CalculatorEJB.jar
                              10:06:35,437 INFO [TomcatDeployer] deploy, ctxPath=/calculator, warUrl=.../tmp/deploy/tmp23492CalculatorApplication.ear-contents/CalculatorWeb-exp.war/
                              10:06:35,796 INFO [EARDeployer] Started J2EE application: file:/C:/jboss/server/all/deploy/CalculatorApplication.ear
                              10:06:35,984 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
                              
                              --- MBeans waiting for other MBeans ---
                              ObjectName: persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=calculator
                               State: NOTYETINSTALLED
                               I Depend On:
                               jboss.jca:name=CalculatorDS,service=DataSourceBinding
                              
                              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                              ObjectName: jboss.jca:name=CalculatorDS,service=DataSourceBinding
                               State: NOTYETINSTALLED
                               Depends On Me:
                               persistence.units:ear=CalculatorApplication.ear,jar=CalculatorEJB.jar,unitName=calculator
                              
                              
                              10:06:36,093 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
                              10:06:36,328 INFO [ChannelSocket] JK: ajp13 listening on localhost/127.0.0.1:8009
                              10:06:36,328 INFO [JkMain] Jk running ID=0 time=0/16 config=null
                              10:06:36,375 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 43s:391ms
                              10:06:50,000 INFO [STDOUT] Hey!
                              10:06:55,000 INFO [STDOUT] I'm gettin' some messages.
                              


                              By the way, I know that message bean has nothing to do with a calculator, but, I didn't feel like making another project. :)

                              • 12. Re: Can't get a stateless session bean to work - JNDI can't
                                azavia

                                It looks like I fixed that problem. I had to change the jndi name in calculator-ds.xml, because apparently it was conflicting with something else.

                                Now there's only one issue left:

                                11:30:33,031 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/azavia/testmdb
                                11:30:33,031 WARN [MessagingContainer] destination not found: queue/azavia/testmdb reason: javax.naming.NameNotFoundException: queue/azavia/testmdb
                                11:30:33,031 WARN [MessagingContainer] creating a new temporary destination: queue/azavia/testmdb
                                


                                So how do you create a new message queue, without getting those warning messages?

                                Thanks again.

                                • 13. Re: Can't get a stateless session bean to work - JNDI can't
                                  itty06

                                  The destination property needs to be a queue or topic JNDI.

                                  Try looking up for
                                  ctx.lookup("queue/azavia/testmdb");


                                  if you get exception, it will complain while deploying EJB

                                  • 14. Re: Can't get a stateless session bean to work - JNDI can't
                                    azavia

                                    Yeha I know, but how do you create that queue? I mean how do you specify that such a queue at that jndi name should be created? that's what I'm not understanding.

                                    Thanks for the reply.

                                    1 2 Previous Next