EJBs on JBoss Server

I have deployed my application on a JBoss server (4.0.5). I have two EJBs that hangs onto a static class called ServiceLocator for the class to use through the life of the object.. This class is a Singleton. Within the ejbCreate method, I check for the ServiceLocator class. If it is null, I call ServiceLocator.getInstance().
My problem is understanding this behavior. When I login to my application we go through EJB1. One of the things we do is call other ejbs for addtional information from EJB1. This is where the Service Locator becomes involved. Inside individual methods I use the ServiceLocator(sl) and fetch the appropriate EJB for use. The problem is the variable sl, is null when I attempt to use it within a business method.. When I change the code to call the class like ServiceLocator.getInstance() everything is fine. When I use a static initializer, the error goes away, too. From the log files, I see the ejbcontainer is calling ejbRemove() just prior to calling the ServiceLocator.
Can someone share their knowledge in this area? I was under the understanding that ejbCreate was the approach one should take for creating a instance/class-level variable. Having a class level variable seem to make sense and reduced the number of keystrokes.
Thank you for taking the time to read and explain.
Russ

I know perfectly well that Tomcat is servlet container. But this does not change the fact that JPA persistence works on tomcat. Or even i believe on a stand allown application. My question is if there is diference in the behaviour in the JPA standalone beans and the ones loaded in Application server. I believe that there is difference in the way that the application server manages tham and probably there is some kind of cache or I don't know.
The first difference I saw is that jboss loads and precompiles all queries on startup and also loads several instances of the JPA beans.
Can you confirm this or I am wrong?

Similar Messages

  • How can I access an EJB in JBoss Server?

    I'm using JBoss 3.0.3 and I have two Jboss servers. I trying access an EJB Entity in B by an Session in machine A. What should I do for it?

    just define the different server path in the description xml file
    <jndi-name>jnp://serverA(B)/....</jndi-name>

  • Calling EJB on JBoss server

    Hi All,
    I am new to ColdFusion. As per my project requirement, I want
    to call an EJB deployed on JBoss which is in another domain. Please
    guide/suggest me some tutorial with example to get this done. Is
    there any need to deploy some jar files to ColdFusion Application
    server?
    Thanks in Advance,
    Surendra.

    There are no 'objects' in the standard Java API that would allow one to do that easily. And depending on the logging interface it might not be possible at all.
    Using the socket interface one can create a telnet session and by handling the telnet commands in java one could log in and run a remote session. However to do that in the standard API requires a non-trivial amount of code. I believe there are commercial interfaces that provide this.
    If the logging in is actually via windows network then JNI would have to be used, along with Runtime.exec() to run the executable. The actual interface to log into a "network" computer has nothing to do with java so you might try a different forum/list for that info - something specific to windows. Or look it up in the Microsoft Developer library using either the CD or the online version. To interact with that will require JNI.

  • How to deploy Enterprise JavaBeans in JBoss server.pls help me

    anybody can help me,how to deploy SessionBeans,CMP,BMP,JMS in jb oss server.pls explain me the steps for how to deploy EJB in JBoss server.what are the steps i have to follow.

    Hi Chris,
    Yes, I have created a MSI package for the application  and installed it on the server.
    I have created the run time package for powerbuilder and install it on the server.
    I have installed the DB Client drivers also.
    Can you please help me on how to the configure the application pools, as i never worked on this stuffs,In developemnt enviornment just click on the run webservice and its there .
    Regards
    Subrat

  • How to run EJB with JSP as client on TOMCAT - JBOSS server

    Hi all,
    I am having my EJB component successfully deployed on JBOSS server. My core-java client is able to access the same. But when I use the JSP page which is on Tomcat server, I am getting following exception. Please help me out.
    Exception Report:
    org.apache.jasper.JasperException: sealing violation
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:125)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:161)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:171)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
         at java.lang.Thread.run(Thread.java:484)
    Root Cause:
    java.lang.SecurityException: sealing violation
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:648)
         at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:987)
         at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:906)
         at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:136)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Class.java:237)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:123)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:161)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:171)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
         at java.lang.Thread.run(Thread.java:484)
    Please let me know what the problem is as I am new to EJB.
    Thanx a lot
    Unmesh

    Hi
    Even i have the same problem...
    i have deployed the ejb in jboss..
    but i cannot even run the core-java client program
    can u pls mail me the code...
    and the directory path
    thanks a lot
    cheers
    simreen

  • Stateless Session Bean + EJB Question + Jboss

    Hello,
    If I have a stateless session bean on a linux machine and it works locally what do i need to do to access a method in the session bean from a remote windows machine.
    I would like to be able to execute my client jar file on a windows machine and have it access the jboss server on the linux machine. what do i need to do?
    i have the session bean working locally on both windows and linux machine. do i need to to have a JSP/Servlet to access the session bean? can the session bean not be accessed directly? what should my classpath look like? do I need to include extra jar files in my client jar file.?
    Thanks,
    Joyce

    Thanks guys for the help but I am still a little lost.
    My Client windows machine has the client jar file and all the other jar files. This is my client class
    package helloworld.client;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    import java.util.Properties;
    import helloworld.interfaces.HelloWorldHome;
    import helloworld.interfaces.HelloWorld;
    public class HelloClient
         public static void main(String[] args)
              Hashtable prop = new Hashtable();
              prop.put ("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
              prop.put ("java.naming.provider.url","jnp://172.16.220.160:1099");
              prop.put ("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
              try
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("ejb/helloworld/HelloWorld");
                   System.out.println(obj);
                   HelloWorldHome home = (HelloWorldHome)javax.rmi.PortableRemoteObject.narrow(obj, HelloWorldHome.class);
                   HelloWorld helloWorld = home.create();
                   String str = helloWorld.sayHelloEJB("JOYCE is COOL");
                   System.out.println(str);
                   helloWorld.remove();
              catch(Exception e)
                   e.printStackTrace();
    I get a NullPointer ie the home object is null. The IP address is the IP of the Linux machine that has Jboss running on.
    Questions are:
    1. Do I need to have Tomcat running on my client machine if I am to connect via HTTP? Does this alter my client code.?
    2. My JNDI lookup is what is causing the problem. Does my jboss.xml and my ejb-jar.jar look okay to you.
    jboss.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <jndi-name>ejb/helloworld/HelloWorld</jndi-name>
    </session>
    </enterprise-beans>
    <resource-managers>
    </resource-managers>
    </jboss>
    ejb-jar.jar
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description>No Description.</description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <description><![CDATA[No Description.]]></description>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <home>helloworld.interfaces.HelloWorldHome</home>
    <remote>helloworld.interfaces.HelloWorld</remote>
    <ejb-class>helloworld.session.HelloWorldBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    -->
    <!-- Entity Beans -->
    <!--
    To add entity beans that you have deployment descriptor info for, add
    a file to your merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    -->
    <!-- Message Driven Beans -->
    <!--
    To add message driven beans that you have deployment descriptor info for, add
    a file to your merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    -->
    </enterprise-beans>
    <!-- Relationships -->
    <!-- Assembly Descriptor -->
    <assembly-descriptor >
    <!-- finder permissions -->
    <!-- transactions -->
    <!-- finder transactions -->
    </assembly-descriptor>
    </ejb-jar>
    Do I need RMI ? Do I need to concern myself with CORBA? All Im looking for is a step by step to understanding what I need to configure? Is their some way I can debug?
    Thanks alot,
    Joyce

  • Error while running jBoss server from console

    I am facing a problem regarding running of Jboss server,When i am giving the run.bat command from my console a lot of lines of code is being displayed rapidly and the cursor is coming to a halt after giving the following message"[Error,Default] at java.lang.thread.run(Unknown Source)"What should i do now ?And when i am tryng to
    run the client class then also an error is coming.So,if u please provide me the appropiate instruction to run my ejb application then it will be of much help to me.Please provide the info as early as possible as my worh came to sttodstill due to this problem

    how can anybody help you? Let me cut down your story to what you are precisely saying:
    Hello. JBoss isn't working on my computer, it is giving me an error, I don't know how to fix it. Please help me.I would want to help you, but I cannot. Why don't you start by figuring out how to copy paste the output from the command prompt so that you can post it here?

  • Error while starting JBOSS Server

    We had deployed OIM 10g on a JBOSS server for testing purposes. While starting the server i am able to see some errors in the error log. The design console is working fine and there is no issues. But the admin console is not opening properly.I am curious to know what might cause this problem even though we use this test environment sparingly. I am getting the following error trace while starting the server.
    ERROR[JMSContainerInvoker] Reconect failed: JMS provider failure detected: javax.naming.Name Not Found Exception: XAConnectionFactory not bound.
    Also some more log trace
    INFO Started J2EE application file c:...//XellerateFull.ear
    ERROR[URLDeployment Scanner] Incomplete Deployment listing:
    --- Mbeans waiting for other MBeans---
    Object Name: jboss: service=Hypersonic, database=local DB
    state=FAILED
    Reason : java.sql.SQlException: User not found:SA
    Please let me know if any of the experts could help me out in solving this issue.
    Regards,
    Durgaprasad

    Getting the following error after changing the hypersonic directory name
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@e3404f
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@e3404f
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@e3404f
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@e3404f
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@e3404f
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Creating DLQHandler
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Creating DLQHandler
    2012-08-06 08:18:27,765 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Reconnect failed: JMS provider failure detected:
    java.lang.NullPointerException
         at org.apache.xerces.dom.ParentNode.nodeListItem(Unknown Source)
         at org.apache.xerces.dom.ParentNode.item(Unknown Source)
         at org.jboss.metadata.MetaData.getChildrenByTagName(MetaData.java:65)
         at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:88)
         at org.jboss.ejb.plugins.jms.DLQHandler.importXml(DLQHandler.java:393)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:604)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.run(JMSContainerInvoker.java:1471)
         at java.lang.Thread.run(Thread.java:595)
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Creating DLQHandler
    2012-08-06 08:18:27,765 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Initialization failed DLQHandler
    javax.naming.NameNotFoundException: XAConnectionFactory not bound
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
         at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
         at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:151)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
         at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:605)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.run(JMSContainerInvoker.java:1471)
         at java.lang.Thread.run(Thread.java:595)
    ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Reconnect failed: JMS provider failure detected:
    javax.naming.NameNotFoundException: XAConnectionFactory not bound
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
         at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
         at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:151)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
         at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:605)
         at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.run(JMSContainerInvoker.java:1471)
         at java.lang.Thread.run(Thread.java:595)
    Edited by: Durgaprasad on Aug 6, 2012 5:25 AM

  • Problem with clustering with JBoss server

    Hi,
    Its a HUMBLE REQUEST TO THE EXPERIENCED persons.
    I am new to clustering. My objective is to attain clustering with load balencing and/or Failover in JBoss server. I have two JBoss servers running in two diffferent IP addresses which form my cluster. I could succesfully perform farm (all/farm) deployment
    in my cluster.
    I do believe that if clustering is enabled; and if one of the server(s1) goes down, then the other(s2) will serve the requests coming to s1. Am i correct? Or is that true only in the case of "Failover clustering". If it is correct, what are all the things i have to do to achieve it?
    As i am new to the topic, can any one explain me how a simple application (say getting a value from a user and storing it in the database--assume every is there in a WAR file), can be deployed with load balencing and failover support rather than going in to clustering EJB or anything difficult to understand.
    Kindly help me in this mattter. Atleast give me some hints and i ll learn from that.Becoz i could n't find a step by step procedure explaining which configuration files are to be changed to achieve this (and how) for achiving this. Also i could n't find Books explaining this rather than usual theorectical concepts.
    Thanking you in advance
    with respect
    abhirami

    hi ,
    In this scenario u can use the load balancer instead of fail over clustering .
    I would suggest u to create apache proxy for redirect the request for many jboss instance.
    Rgds
    kathir

  • Problem with clustering with JBoss server---help needed

    Hi,
    Its a HUMBLE REQUEST TO THE EXPERIENCED persons.
    I am new to clustering. My objective is to attain clustering with load balencing and/or Failover in JBoss server. I have two JBoss servers running in two diffferent IP addresses which form my cluster. I could succesfully perform farm (all/farm) deployment
    in my cluster.
    I do believe that if clustering is enabled; and if one of the server(s1) goes down, then the other(s2) will serve the requests coming to s1. Am i correct? Or is that true only in the case of "Failover clustering". If it is correct, what are all the things i have to do to achieve it?
    As i am new to the topic, can any one explain me how a simple application (say getting a value from a user and storing it in the database--assume every is there in a WAR file), can be deployed with load balencing and failover support rather than going in to clustering EJB or anything difficult to understand.
    Kindly help me in this mattter. Atleast give me some hints and i ll learn from that.Becoz i could n't find a step by step procedure explaining which configuration files are to be changed to achieve this (and how) for achiving this. Also i could n't find Books explaining this rather than usual theorectical concepts.
    Thanking you in advance
    with respect
    abhirami

    hi ,
    In this scenario u can use the load balancer instead of fail over clustering .
    I would suggest u to create apache proxy for redirect the request for many jboss instance.
    Rgds
    kathir

  • Read this: cocoon , ejb and jboss

    hi all ,
    read this , working on cocoon .
    Integrating cocoon with jBoss
    Download cocoon-war-2.1.7.war and then we have to
    deploy that to the jboss server , to deploy that , we
    started jboss server in standard mode and then copied
    the cocoon war file to
    /usr/local/jboss-4.0.0/server/standard/deploy/ folder
    and in the server console we got the message saying
    that the perticular war file is being deployed .Then
    run the cocoon home page using
    http://localhost:8080/cocoon-war-2.1.7/ .
    Deploying ejb in cocoon
    To deployment ejb in cocoon you should have an ejb
    container , so we have to integrate ejb with any
    application server , here we are using jBoss server.
    Here i'm using a js (java script ) file to invoke an
    ejb client , i'm using the command
    var query = new Packages.hibernate.logging.Query();
    where hibernate.logging is the package and Query is
    the bean's client , and Packages is the inbuilt
    keyword for accessing packages. Then from the client
    you can call the bean class as we normally calling the
    bean. If you are using data base in the bean you have
    to configure the cocoon.xconf file as
    <datasources>
    <jdbc logger="core.datasources.personnel"
    name="personnel">
    <pool-controller max="10" min="5"/>
    <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
    <user>sa</user>
    <password/>
    </jdbc>
    <jdbc name ="hibernatedbds">
    <pool-controller min = "5" max = "10" />
    <dburl>jdbc:postgresql://192.168.0.129:5432/hibernatedb</dburl>
    <user>xxxxx</user>
    <password/>
    </jdbc>
    and in the bean calss we can access the database as
    public String xxxxxxx(String user, String
    password,Session session) throws RemoteException
         try
         if(session == null)
              System.out.println("Session is null");
         Transaction tx = session.beginTransaction();
         org.hibernate.Query q = session.createQuery("from
    hibernate.logging.User as user where user.users =
    :users and      user.password = :passwords");
         q.setString("users",user);
         q.setString("passwords",password);
         List list = q.list();
         tx.commit();
         if(list.isEmpty())
              return "false";
         catch(Exception e)
              e.printStackTrace();
              System.out.println("Called EJB");
              return "true";
    and in the client program we'll give
    String value = remote.Validate(user,password,session);
    to access the remote method
    when the program is ready and compiled create the jar
    file and then deploy it to the deploy folder of jboss
    and a copy od the same jar file to the
    cocoon/WEB-INF/lib/. Then you can run the program .
    regards
    Peeths

    And ? What happens next?
    Gosh! That suspense is killing me...

  • EJB on JBoss error

    Hi all;i have an EJB Message Driven that is tring to call another EJB, but i have this exception:
    exception
    12:39:31,187 INFO [STDOUT] Message Driven Bean got message org.jboss.mq.SpyObjectMessage {
    Header {
    jmsDestination : QUEUE.BBkEvtMgrQueue
    jmsDeliveryMode : 2
    jmsExpiration : 0
    jmsPriority : 4
    jmsMessageID : ID:13-10960223709261
    jmsTimeStamp : 1096022370926
    jmsCorrelationID: null
    jmsReplyTo : null
    jmsType : null
    jmsRedelivered : true
    jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=5}
    jmsPropReadWrite: false
    msgReadOnly : true
    producerClientId: ID:13
    12:39:31,187 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException, causedBy:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
    at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319)
    at org.jboss.ejb.Container.invoke(Container.java:743)
    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)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
    at $Proxy161.create(Unknown Source)
    at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:206)
    at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
    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)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
    at org.jboss.ejb.Container.invoke(Container.java:723)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
    at org.jboss.mq.SpySession.run(SpySession.java:347)
    at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
    at java.lang.Thread.run(Thread.java:534)
    12:39:31,197 INFO [STDOUT] [StandardWorkflowServiceFactory,ERROR] Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    javax.transaction.TransactionRolledbackException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:214)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
    at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
    at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
    at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319)
    at org.jboss.ejb.Container.invoke(Container.java:743)
    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)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
    at $Proxy161.create(Unknown Source)
    at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:206)
    at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
    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)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
    at org.jboss.ejb.Container.invoke(Container.java:723)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
    at org.jboss.mq.SpySession.run(SpySession.java:347)
    at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
    ... 51 more
    12:39:31,197 ERROR [BbkCmdRcvBean] com.bbk.evtmgr.ejbs.BbkCmdRcvBean
    de.danet.an.workflow.api.FactoryConfigurationError: Cannot create WorkflowEngineEJB: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:220)
    at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
    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)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
    at org.jboss.ejb.Container.invoke(Container.java:723)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
    at org.jboss.mq.SpySession.run(SpySession.java:347)
    at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
    at java.lang.Thread.run(Thread.java:534)
    12:39:31,197 INFO [STDOUT] Finishing onMessageOn JBoss forum i have received this response:
    There is a packaging conflict that is resulting in the type(s) being passed into the ejb container to be seen as incompatible. This can happen when two ejb deployments are interacting via call by reference and one is redeployed and invalidates the common type system.Now i'm a newbie in EJB technology and so i don't know ho to solve the problem.... can anybody help me?
    I post my ejb-jar.xml:
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <![CDATA[No Description.]]>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called session-beans.xml that contains
    the markup for those beans.
    -->
    <!-- Entity Beans -->
    <!--
    To add entity beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called entity-beans.xml that contains
    the markup for those beans.
    -->
    <!-- Message Driven Beans -->
    <message-driven >
    <![CDATA[<!-- begin-user-doc --> You can insert your documentation for 'BbkCmdRcvBean'.]]>
    <ejb-name>BbkCmdRcvBean</ejb-name>
    <ejb-class>com.bbk.evtmgr.ejbs.BbkCmdRcvBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    <security-identity>
    <run-as>
    <role-name>StaffManagementRole_0</role-name>
    </run-as>
    </security-identity>
    </message-driven>
    <!--
    To add message driven beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    -->
    </enterprise-beans>
    <!-- Relationships -->
    <!-- Assembly Descriptor -->
    <assembly-descriptor >
    <!--
    To add additional assembly descriptor info here, add a file to your
    XDoclet merge directory called assembly-descriptor.xml that contains
    the <assembly-descriptor></assembly-descriptor> markup.
    -->
    <!-- finder permissions -->
    <method-permission >
    <![CDATA[description not supported yet by ejbdoclet]]>
    <role-name>StaffManagementRole_0</role-name>
    <![CDATA[description not supported yet by ejbdoclet]]>
    <ejb-name>BbkCmdRcvBean</ejb-name>
    <method-name>*</method-name>
    </method-permission>
    <!-- transactions -->
    <!-- finder transactions -->
    <container-transaction >
    <ejb-name>BbkCmdRcvBean</ejb-name>
    <method-name>*</method-name>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>and my jboss.xml:
    jboss.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
    <security-domain>java:/jaas/danetworkflow</security-domain>
    <enterprise-beans>
    <!--
    To add beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called jboss-beans.xml that contains
    the , and <message-driven></message-driven>
    markup for those beans.
    -->
    <message-driven>
    <ejb-name>BbkCmdRcvBean</ejb-name>
    <destination-jndi-name>queue/BBkEvtMgrQueue</destination-jndi-name>
    </message-driven>
    </enterprise-beans>
    <resource-managers>
    </resource-managers> Thanks

    Hello,
    I'm also having a similar exception, but, in a totally different situation. Mine is while instantiating an
    stateless session bean through its Home interface. Now the catch is this: the client is contained
    within a WAR which contains servlet code and from within this context I'm trying to create the EJB.
    The EJB is contained within a separate EAR.
    Could this be a strange packaging requirement, that needs explicit dependency information in the
    deployment descriptors of the deplyed archives?
    I'm using JBoss 3.2.5, default configuration. Thanks for any help!
    Here is the relevant stack trace in the client:
    [cactus] Testcase: testRestart(com.mycomp.myproj.scheduler.SchedulerLifecycleTest): Caused an ERROR
    [cactus] java.rmi.ServerException: EJBException:; nested exception is:
    [cactus] javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract com.mycomp.myproj.scheduler.ejb.S
    chedulerEjb com.mycomp.myproj.scheduler.ejb.SchedulerEjbHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    [cactus] java.lang.RuntimeException: java.rmi.ServerException: EJBException:; nested exception is:
    [cactus] javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract com.mycomp.myproj.scheduler.ejb.S
    chedulerEjb com.mycomp.myproj.scheduler.ejb.SchedulerEjbHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
    [cactus] at com.mycomp.myproj.scheduler.BaseModuleTestCase$SchedulerEjbFacadeProxy.<init>(BaseModuleTestCase.java:77)
    [cactus] at com.mycomp.myproj.scheduler.BaseModuleTestCase.initScheduler(BaseModuleTestCase.java:475)
    [cactus] at com.mycomp.myproj.scheduler.BaseModuleTestCase.setUp(BaseModuleTestCase.java:481)
    [cactus] at com.mycomp.myproj.scheduler.SchedulerLifecycleTest.setUp(SchedulerLifecycleTest.java:38)
    [cactus] at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
    [cactus] at (...)
    This is the one in JBoss server log:
    2004-10-18 21:02:54,086 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging,
    method=public abstract com.mycomp.myproj.scheduler.ejb.SchedulerEjb com.mycomp.myproj.scheduler.ejb.SchedulerEjbHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
         at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319)
         at org.jboss.ejb.Container.invoke(Container.java:743)
         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)
         at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
         at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
         at $Proxy49.create(Unknown Source)
         at com.mycomp.myproj.scheduler.BaseModuleTestCase$SchedulerEjbFacadeProxy.<init>(BaseModuleTestCase.java:75)
         at com.mycomp.myproj.scheduler.BaseModuleTestCase.initScheduler(BaseModuleTestCase.java:475)
         at com.mycomp.myproj.scheduler.BaseModuleTestCase.setUp(BaseModuleTestCase.java:481)
         at com.mycomp.myproj.scheduler.CreateScheduleTest.setUp(CreateScheduleTest.java:81)
         at junit.framework.TestCase.runBare(TestCase.java:125)
         at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
         at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)

  • Tomcat client + JBOSS server

    Regarding to JBossIDE-Tutorial.pdf I worked through this tutorial and I reached my first EJB
    Now I�m trying to deploy the application as clent and server using Tomcat 5.5 and JBOSS 4.2.0GA ( on two different host placed in the same lan )
    I have the same project on the JBOSS and the new one in Tomcat
    In Tomcat I copied only the interfaces and servlet because I want to call the EJB method from Tomcat application container
    I modified the code of ComputeServlet.java in this way
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingCotextFactory");
    env.put(Context.PROVIDER_URL, "jnp://192.168.0.13:1099");
    Context context = new InitialContext(env);
    Object ref = context.lookup("ejb/Fibo");
    home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);during the lookup method I reach the same error message
    --------javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.0.13:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 192.168.0.13:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.0.13:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
    it seams that the Tomcat client doesn�t reach the JBOSS server
    I wonder if anyone could give me any suggestion
    Many many thanks

    ok many thanks
    now all work properly
    the real problem was the ip address of JBOSS Server
    I found interesting faq at this link
    -> http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss42FAQ
    Frequently Asked Questions about the JBoss4.2 Release
    1. . Why can't I connect to the server remotely? All the services appear to be bound to localhost only.
    * That's correct before 4.2.0.GA jboss always bound to the any address "0.0.0.0". You wouldn't believe how many people would put unprotected instances of JBoss on the internet, or even on their own local LAN. Now you have to explicitly choose to do that, so it takes some thinking about before you revert to the old default behaviour with the "-b' option of jboss. e.g.
    ./run.sh -b 0.0.0.0
    For Windows, use
    run.bat -b 0.0.0.0

  • PermGen space: out of memmory error comming while running the jboss server on ATG10.2

    Hi Guys,
    I am getting out of memmory error while running the jboss server on ATG10.2.
    using jboss-eap.5.1 + atg 10.2 + jdk1_6_28 version + mysql.
    edited the run.conf file with below given settings in atg10.2 documentation. But still getting the issue.
    JAVA_OPTS="-server -Xms2048m -Xmx3072m -XX:MaxPermSize=768m
    -XX:MaxNewSize=768m -Dsun.rmi.dgc.server.gcInterval=3600000 –
    Dsun.rmi.client.gcInterval=3600000"
    Pelase suggest if you have any ideas.
    Thank you.

    Hi,
    Please use recommended settings:
    JAVA_OPTS="-server -Xms512m -Xmx1024m -XX:MaxPermSize=512m
    -XX:MaxNewSize=512m -Dsun.rmi.dgc.server.gcInterval=3600000 –
    Dsun.rmi.client.gcInterval=3600000"
    This will work fine.
    Regards,
    RahulV

  • How to read JBoss server 'app.properties' file in the deployed Flex application?

    Hi, my current Flex project is using LCDS server to make call (Remote object call and Data managements services' call) to the backend Java services and consume data to render. I have defined the AMF and RTMP channels in the services-config.xml file and destinations for the Java services' in the remoting-config.xml and data-management-config.xml files.
         <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://localhost:8080/eqcFlex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>false</polling-enabled>
                </properties>
         </channel-definition>
    As of now both the Flex application WAR file and Java services EAR files are depolyed on the JBoss server on my machine, therefore I can hardcode the endpoint URL as http://localhost:8080 in the services-config file and hit the Java services.
    But the requirement is that the Flex application WAR file needs to be deployed on JBoss servers deployed on different machines and hence the endpoint URL cann't be hardcoded in the services-config.xml file. Is there a way we can pick up the endpoint URL from the JBoss server's app.properties file so that we can dynamically create channels in Actionscript code and make call to the backend services with dynamic endpoint URL?

    But in Command prompt I found out that My properties file by name
    'cedrelay.properties' is not recognised by web.xml.My web.xml structure is
    How does web.xml "recognize" anything?
    You specify the properties file as an init parameter. Do you read it in the init method of the servlet? If so, what does the code look like for reading the properties file?
    You'll have better luck if you put that properties file in WEB-INF/classes and load it as a resource input stream from the CLASSPATH.
    %

Maybe you are looking for