Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Weblogic EJB deployment problem (LocalObject Interface problem)

Posted on 2003-11-20
4
Medium Priority
?
1,627 Views
Last Modified: 2013-12-10
Right, can't quite work this one out. I have an EAR containing several local EJBs which I can deploy fine on Webshere / Orion. I decided that I'd try deploying these to Weblogic 7 App server today, as I'm going to be using that for some upcoming projects.

Using the deployment tool (Weblogic builder) i get the following errors when I try to open the EAR file:

///////////////////////////////////////////////////////////////
Inspecting input J2EE module engine-ejb.jar
[EarCMBean] ejb module uri=engine-ejb.jar

Loaded descriptor file META-INF/ejb-jar.xml
......
Discovered module type for engine-ejb.jar
Found EJB components. Initializing descriptors
Found EJBHome: pjg.ejb.SenderServiceLocalHome
Cannot determine bean class for interface 'pjg.ejb.SenderLocalService'
Found EJBHome: pjg.ejb.OpServiceLocalHome
Cannot determine bean class for interface 'pjg.ejb.OpLocalService'

Removing bean pjg/SenderServiceEJB
Removing bean pjg/OpServiceEJB

//////////////////////////////////////////////////////////////////

Using Weblogic admin console to deploy these I just get a compilation error. Now, I've done some investigation into the matter myself, and the Local Interfaces both have superinterfaces which describing the Business Method signatures ie:

// Superclass:
public interface SenderService {
      public mData send(mData msg);
}

// Local Interface:
public interface SenderLocalService
      extends SenderService, EJBLocalObject {
}

// Bean class:
public class SenderServiceBean
implements SenderService {

      public void ejbCreate() throws CreateException {
      }

      public mData send(mData msg) {
                    mData newMsg = ....
                    // blah blah
          return newMsg;
      }
....

// Other ejbMethods implemented
....
}


Like I say, this model seems to work fine with other app servers (although I can't see the point of the superinterfaces to be honest), but not with Weblogic. Now, when I get rid of the superinterfaces and put the business methods into the class which extends ejbLocalObject it all deploys very nicely, Weblogic just doesn't seem to like the fact that the Local Interface is extending both the sender superclass and EJBLocalObject.

So, in a nutshell, what I want to know is "Is there any reason that a Local Interface can't Extend both these classes?" It all seems to boil down to the app servers EJB class generation, but I'd like to know for sure!

If anyone needs any more info just let me know...

Cheers,

Pete  
 
0
Comment
Question by:pjgould
[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
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 9816536
First of all, it definitely seems very strange. Why should WebLogic Server care about this? It doesn't really make sense.

Can you please put the ejb-jar.xml file and the weblogic-ejb-jar.xml files here? It might help us...
0
 

Author Comment

by:pjgould
ID: 9823801
Hiya, Sure thing. Here's the ejb-jar.xml file before I run it through Weblogic Builder:

<?xml version="1.0"?>
<!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>Engine EJBs</description>

   <enterprise-beans>
      <session>
         <description>Core Service</description>
         <display-name>CoreServiceJAR</display-name>
         <ejb-name>pjg/CoreServiceEJB</ejb-name>
         <home>pjg.core.ejb.CoreServiceHome</home>
         <remote>pjg.core.ejb.CoreRemoteService</remote>
         <ejb-class>pjg.core.ejb.CoreServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
      </session>

      <session>
         <description>The sender service.</description>
            <display-name>SenderServiceJAR</display-name>
         <ejb-name>pjg/SenderServiceEJB</ejb-name>
         <local-home>pjg.ejb.SenderServiceLocalHome</local-home>
         <local>pjg.ejb.SenderLocalService</local>
         <ejb-class>pjg.ejb.SenderServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
         <env-entry>
            <description>Implementation Class</description>
            <env-entry-name>ImplClass</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>pjg.ejb.SenderServiceStub</env-entry-value>
         </env-entry>
      </session>

      <session>
         <description>The operator service.</description>
            <display-name>OpServiceJAR</display-name>
         <ejb-name>pjg/OpServiceEJB</ejb-name>
         <local-home>pjg.ejb.OpServiceLocalHome</local-home>
         <local>pjg.ejb.OpLocalService</local>
         <ejb-class>pjg.ejb.OpServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
         <env-entry>
            <description>Implementation Class</description>
            <env-entry-name>ImplClass</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>pjg.ejb.OpServiceStub</env-entry-value>
         </env-entry>
      </session>

   </enterprise-beans>
</ejb-jar>

At this point I don't have a weblogic-ejb-jar.xml (Do I need one - I thought that the builder should generate this).

Then I open my Ear file in the Weblogic Builder, and receive the message:

"Found ejb-jar.xml but couldn't find weblogic-ejb-jar.xml

Would you like new descriptors created for you? The existing ejb-jar.xml will be preserved".

To which I answered yes (otherwise I have an exception occuring as there's no weblogic-ejb-jar.xml).

Upon looking at the xml files that are created I have:


<ejb-jar>
  <description><![CDATA[Engine EJBs]]></description>
  <enterprise-beans>
    <session>
      <description><![CDATA[Core Service]]></description>
      <display-name>CoreServiceJAR</display-name>
      <ejb-name>pjg/CoreServiceEJB</ejb-name>
      <home>pjg.core.ejb.CoreServiceHome</home>
      <remote>pjg.core.ejb.CoreRemoteService</remote>
      <ejb-class>pjg.core.ejb.CoreServiceBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>
    </session>
  </enterprise-beans>

</ejb-jar>


and:

<weblogic-ejb-jar>
  <weblogic-enterprise-bean>
    <ejb-name>pjg/CoreServiceEJB</ejb-name>
    <stateless-session-descriptor>
      <pool>
      </pool>

      <stateless-clustering>
      </stateless-clustering>

    </stateless-session-descriptor>

    <transaction-descriptor>
    </transaction-descriptor>

    <jndi-name>pjg/CoreServiceEJB</jndi-name>
  </weblogic-enterprise-bean>
</weblogic-ejb-jar>

ie. it seems to have "lost" my local ejbs.

Am I using this tool in the wrong way?

Thanks.

Pete
0
 
LVL 9

Accepted Solution

by:
vzilka earned 1500 total points
ID: 9823870
In WLS 7.0 the builder tool is garbage. Tons of bugs. Don't even try it for MDB and JMS.
I enclose a link to the format of the weblogic-ejb-jar.xml http://edocs.bea.com/wls/docs70/ejb/reference.html#1026457

Basically you have to create the template for the files using the builder.
Then fix the ejb-jar.xml file so it will contain the local interfaces you require.
If needed (I don't think you have to, but post questions here if you need) edit weblogic-ejb-jar.xml and add the ejb-local-reference-description tag.

0
 

Author Comment

by:pjgould
ID: 9830748
Hiya, I got the ear deployed in the end.

Cheers for that.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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