Link to home
Start Free TrialLog in
Avatar of bibi-itke
bibi-itke

asked on

Service=EJB already registered

HI, I'm new in JBOSS. I'm deploying my project using JBOSS 4.0.5GA and Eclipse 3.2Europa.
I'm getting an error when starting the apllication Server, the error is Service=EJB already registered.
Can anyone help me? i've been looking for the solution over the internet but i haven't found any.

Thanks
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

same EJB is written twice either in jboss.xml or ejb-jar.xml
have you deployed any EJB's related ear.
Avatar of bibi-itke
bibi-itke

ASKER

I've got the same name in both files.
can you send the ear related xml files(jboss.xml and ejb-jar.xml) and server.log file.
I've use different name in both files but i still get the error

ejb-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><![CDATA[No Description.]]></description>
   <display-name>Generated by XDoclet</display-name>
 
   <enterprise-beans>
 
      <!-- Session Beans -->
      <session >
         <description><![CDATA[Description for MasterKeyLogic]]></description>
         <display-name>Name for MasterKeyLogic</display-name>
 
         <ejb-name>logic/MasterKeyLogic</ejb-name>
 
         <local-home>com.itke.rkl.logic.masterkey.interfaces.MasterKeyLogicLocalHome</local-home>
         <local>com.itke.rkl.logic.masterkey.interfaces.MasterKeyLogicLocal</local>
         <ejb-class>com.itke.rkl.logic.masterkey.ejb.MasterKeyLogic</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
 
      </session>
 
     <!--
       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 <session></session> 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 <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 XDoclet merge directory called message-driven-beans.xml that contains
       the <message-driven></message-driven> markup for those beans.
     -->
 
   </enterprise-beans>
 
   <!-- Relationships -->
 
   <!-- Assembly Descriptor -->
     <!--
       To specify your own assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
     -->
 
   <assembly-descriptor >
     <!--
       To specify additional security-role elements, add a file in the merge
       directory called ejb-security-roles.xml that contains them.
     -->
 
   <!-- method permissions -->
     <!--
       To specify additional method-permission elements, add a file in the merge
       directory called ejb-method-permissions.ent that contains them.
     -->
 
   <!-- transactions -->
     <!--
       To specify additional container-transaction elements, add a file in the merge
       directory called ejb-container-transactions.ent that contains them.
     -->
 
   <!-- finder transactions -->
 
   <!-- message destinations -->
     <!--
       To specify additional message-destination elements, add a file in the merge
       directory called ejb-message-destinations.ent that contains them.
     -->
 
   <!-- exclude list -->
     <!--
       To specify an exclude-list element, add a file in the merge directory
       called ejb-exclude-list.xml that contains it.
     -->
   </assembly-descriptor>
 
</ejb-jar>
 
 
jboss.xml
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
 
<jboss>
 
   <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 <session></session>, <entity></entity> and <message-driven></message-driven>
       markup for those beans.
     -->
 
      <session>
         <ejb-name>logic/MasterKeyLogic</ejb-name>
         <local-jndi-name>logic/MasterKeyLogicLocal</local-jndi-name>
 
        <method-attributes>
        </method-attributes>
      </session>
 
    <!--
      write a merge file jboss-webservices.ent for webservice-description 
    -->
 
   </enterprise-beans>
 
     <!--
       To specify your own assembly descriptor info here, add a file to your
       XDoclet merge directory called jboss-assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
     -->
   <assembly-descriptor>
    <!-- message destinations -->
     <!--
       To specify additional message-destination elements, add a file in the merge
       directory called jboss-message-destinations.ent that contains them.
     -->
   </assembly-descriptor>
 
   <resource-managers>
   </resource-managers>
 
  <!--
    | for container settings, you can merge in jboss-container.xml
    | this can contain <invoker-proxy-bindings/> and <container-configurations/>
  -->
 
</jboss>

Open in new window

server.log
anyway send the log and xml files.
i think connector/HSMConnectorLocal was defined twice in one of the xml files.other than this ear have u deployed any other ear?
No
find this jndi name connector/HSMConnectorLocal in the ear.
I'm new in jboss. how can I check it?
can you send the ear that u have deployed in ur jboss.
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
      <display-name>rkl-ea</display-name>
      <!--  
            <module id="Connector_ISO">
            <connector>RklConnector.rar</connector>
            </module>
      -->
      <module id="EJB_Endpoint">
            <ejb>RklEndpoint.jar</ejb>
      </module>
      <module id="EJB_HSM">
            <ejb>HSMInterface.jar</ejb>
      </module>
      <module id="EJB_DUPKTLogic">
            <ejb>RklDupkt.jar</ejb>
      </module>
      <module id="EJB_Switcher">
            <ejb>RklLogicFactory.jar</ejb>
      </module>
      <module id="EJB_MKLogic">
            <ejb>RklMasterKey.jar</ejb>
      </module>
      <module id="Java_RklCommon">
            <java>RklCommon.jar</java>
      </module>
      <!-- module id="Web_Console">
            <web>
                  <web-uri>RklWebConsole.war</web-uri>
                  <context-root>RklConsole</context-root>
            </web>
      </module -->
</application>

I run the same code in another machine and it worked, the problem might be with my JBOSS configuration.
Do you know which jboss configuration?
The server is running but gives me this error: "Could not create an appender"
i think you have sent me application.xml for the corresponding ear.by looking at this xml i cant judge much.where did you get this example?if you send me the link so that i will deploy the same ear in my jboss and tell you the results.

by looking at the xml i can tell you that in that ear you have 5 EJB jars are there.
problem here is the JNDI name connector/HSMConnectorLocal is defined twice in these jars.that means after given this  name in one of the  jar you can't give same name in another jar.find this?

            <ejb>RklEndpoint.jar</ejb>
            <ejb>HSMInterface.jar</ejb>
            <ejb>RklDupkt.jar</ejb>
            <ejb>RklLogicFactory.jar</ejb>
            <ejb>RklMasterKey.jar</ejb>
Why is it running on another pc?
i didnt get you.
I run the same project on another PC and it's working fine.
I'm suspecting the problem is with my JBOSS
deploy the same ear in another node i mean if you deploy default folder.now deploy it in all folder.
i didn't get you. Please explain.
I took the project and import it and load it on another pc and i run the server(JBOSS) from that PC and everything worked fine.
That why I'm sucspecting a configuration problem with the JBOSS on my PC
if its a configuration problem  take that jboss in ur PC from working  jboss and check whether its working or not.

presntly in which node u have deployed this ear.
I've replaced the Jboss on my PC and it's working.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for your help
I have another problem with the web console.
below is the error

org.apache.jasper.JasperException: Can't parse stream for /./inc/terminalsList.jspx Failed to execute JSP lifecycle.
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
      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)

post another question with full description what have u done?