Solved

Service=EJB already registered

Posted on 2008-10-21
28
1,407 Views
Last Modified: 2013-12-15
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
0
Comment
Question by:bibi-itke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 14
  • 14
28 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22773935
same EJB is written twice either in jboss.xml or ejb-jar.xml
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22773945
have you deployed any EJB's related ear.
0
 

Author Comment

by:bibi-itke
ID: 22774100
I've got the same name in both files.
0
Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774130
can you send the ear related xml files(jboss.xml and ejb-jar.xml) and server.log file.
0
 

Author Comment

by:bibi-itke
ID: 22774142
I've use different name in both files but i still get the error
0
 

Author Comment

by:bibi-itke
ID: 22774165

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
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774168
anyway send the log and xml files.
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774189
i think connector/HSMConnectorLocal was defined twice in one of the xml files.other than this ear have u deployed any other ear?
0
 

Author Comment

by:bibi-itke
ID: 22774198
No
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774208
find this jndi name connector/HSMConnectorLocal in the ear.
0
 

Author Comment

by:bibi-itke
ID: 22774222
I'm new in jboss. how can I check it?
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774230
can you send the ear that u have deployed in ur jboss.
0
 

Author Comment

by:bibi-itke
ID: 22774254
<?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>

0
 

Author Comment

by:bibi-itke
ID: 22774273
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?
0
 

Author Comment

by:bibi-itke
ID: 22774277
The server is running but gives me this error: "Could not create an appender"
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774286
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>
0
 

Author Comment

by:bibi-itke
ID: 22774358
Why is it running on another pc?
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774366
i didnt get you.
0
 

Author Comment

by:bibi-itke
ID: 22774385
I run the same project on another PC and it's working fine.
I'm suspecting the problem is with my JBOSS
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774392
deploy the same ear in another node i mean if you deploy default folder.now deploy it in all folder.
0
 

Author Comment

by:bibi-itke
ID: 22774415
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
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774430
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.
0
 

Author Comment

by:bibi-itke
ID: 22774478
I've replaced the Jboss on my PC and it's working.
Thanks
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774530
great;
0
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 500 total points
ID: 22774669
if you think that i help in this post and assign the  points and close this post.
0
 

Author Closing Comment

by:bibi-itke
ID: 31508649
thanks for your help
0
 

Author Comment

by:bibi-itke
ID: 22774740
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)

0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22774769
post another question with full description what have u done?
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse compiler vs Installed JREs option 3 121
servlet filter example 37 101
arguments to jar 5 45
Select statement in @Query (JPA Repository) - SpringMVC 2 57
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question