• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Home & Remote interface

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to EJB's & am trying to develop a simple stateless session bean

though i have written the remote, home, EJBclass & the client. I am unable to compile the home & client.
here is the code for it.

import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.rmi.Remote;

public interface Calculator extends EJBObject, Remote
{
public double dollarToRs(double dollars) throws RemoteException;
}


Home
//package Examples;
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
import java.rmi.Remote;
import javax.ejb.*;

public interface CalculatorHome extends EJBHome
{
public Calculator create() throws RemoteException,CreateException;
}


while compiling the home i get the error saying Calculator not found.
I have directly set the path & the classpath & then compiling the program. Is there anything else to be set ?
Kindly guide me
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you let me know whats in your classpath
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know whether to post this as a new topic or not, but the title of this thread caught my eye. I am having a problem using a Local object. To try and improve the speed that my application responds I am trying to change my app infrastructure.

At present I have a business delegate(BD) in the web tier calling a remote stateful bean from which this bean calls services on other beans and retains information required to do this. However if the BD gets too many requests in succession, as we are building a RIA, then it cannot access the stateful bean and fails the request, this causes a problem.

Top resolve this I want to set up statless beans to distribute the services, but a stateful bean to hold the required information to make the correct databas calls. However in order to maintain the ability to get the correct users stateful bean, i am trying to pass back the LocalHome element to the BD, so that every time it calls the services bean, it can pass the reference so that the services bean knows where to find the details of that user....

At present though I get

WARNING|sun-appserver-pe8.1_01|javax.enterprise.resource.corba._CORBA_.util|_ThreadID=35;|"IOP00100006: (BAD_PARAM) Class com.sun.ejb.containers.EJBLocalObjectInvocationHandler is not Serializable

Can anyone suggest why I am and what I can do to resolve the problem....

Cheers

Richard
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Betsy,

Can you please tell us little bit more about the way you compile your EJBs? Do you use ant or you just run a basic command line? Either way you need to specify how you set the classpath and what is the directory structure of your source files.
Regards.

Hi Richard,

As far as I can understand from your posting, you should probably not use SFSB at all. If you need to maintain user information than you better use the HttpSession. In a clustered environment using HttpSession is much more efficient than using SFSB. Another reason is that SFSB are well known for not scaling very well and they will always be a bottleneck in your application. In some extreme circumstances you can use special features that your container offers in order to improve performances. WebLogic for example provides a special deployment element (allow-concurrent-calls) that will make the SFSB multithreaded (which implies that you should code the SFSB thread-safe). My advice is that you better get rid of your SFSB and use HttpSession.
However if this is not possible, then you have another option heree: use the ejb handler. The only pitfall is that your SFSB instance is single threaded and returning the same handle to different clients will result in kind of ConncurrencyAccessException. Of course you can set the allow-concurrent-calls flag, but in my opinion is not worth the trouble.
Regards.
 
Richard Crouch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou for the response.

My problem here comes due to the front end that I am using. We are using a flash front end through OpenAMF remoting. This does not pass the HTTP session onto the business delegate, more importantly some, of the information stored in the SFSB we want as far into the application as possible so that it is not exposed. One way we could do it would be to grab an amount of this data from the database every time to use it to determine what info is required for the request.

This is fairly wasteful, and a waste of time. The other way considered is to rewrite a large number of our database procedures to get this data within them, and again this is far too large a task to take on, so I amstuck trying to hold each users information as far in the back end as possible.

How do I use EJBHandler, as the EJBLocal does not appear to have the method to get a handle to it? This is frustratingm, there must be some way of passing a reference to a Local EJB back to the cliet through the remote bean so that that client can ensure that it can call that same bean again?

Cheers for any help you can give...

Richard
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Richard,

Please help me to understand your design first. Currently you have:

(Here [...] means that they are remotely located from each other). It looks like you have kind of session fa�ade implemented through SFSBs rather than SLSBs. You�ve saying that you have both Web clients as well as RMI clients (by the way this is one of the few requirements that enforce maintaining state information through SFSBs rather than HttpSession; is good you�ve mentioned it). Next you want to rearchitect your application adding one more SLSB that acts like a "router":

Am I right? If not can you please correct me.
Regards.
 
Richard Crouch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pretty much bang on the nail there.

Yes I want to have SLSB that will act as a router by being able to call the SFSB or not, dependent on whether they need any additional static info from the SFSB. This should prevent the bottleneck that I am getting at the moment as multiple requests will just generate multiple "router" SLSBs. Some of which will not require any additional information from the SFSB and the others will only tie up the SFSB for a minimal amount of time while getting the info they need. Obviously the problem with my current architecture is that the SFSB is locked until the whole transaction through all the beans is processed.

Now the problem comes with trying to access the correct SFSB in this new architecture. If I generate it from the SLSB("router") then when another request that requires information off of that bean comes in, how can the new SLSB know which bean to get. Hence looking at passing around the Local reference, though this appears to not work due to it not being serializable.

I can see how this can be done, using a primary key with entity beans, but I do not wish to(and can't) use entity beans as I do not want any record mapped to my database by the beans...

Does that make it any easier to help me? sorry :-s

Cheers if you can

Richard
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Richard,

Next thing I�m trying to understand is the nature of your problem. It occurs to me that your problem is related to the increasing number of client requests to the current SFSB. In theory (at least) the container doesn�t pool SFSB instances but it might cache them. This is what WebLogic does. The container also provides special deployment tags that will allow you controlling the size of the cache (in a similar manner you control the size of the pool for SLSBs), as well as the activation/passivation algorithms (LRU or NRU). Because your problem occurs due to the increasing number of client requests you might encounter one of the following:
  • There are no more bean instances in the pool (all of them are enlisted in transactions) and the next transaction is blocked until one instance will become available. It is possible that the blocking transaction to extend the transaction time out and you�ll get an appropriate exception. If that�s the case you can try to increase the size of the cache or to increase the transaction timeout interval. Check your container documentation.
  • The current settings for the size of your SLSB cache is to high and the container will create a high number of bean instances resulting in memory problems.


  • The reason I�m telling you all of these is because you might be able to stabilize your system without any coding effort, but only changing some configuration settings. I think we should first understand the nature of your problems before going with any solution.
    Another reason is that your solution might not work.


    Yes I want to have SLSB that will act as a router by being able to call the SFSB or not, dependent on whether they need any additional static info from the SFSB. This should prevent the bottleneck that I am getting at the moment as multiple requests will just generate multiple "router" SLSBs. Some of which will not require any additional information from the SFSB and the others will only tie up the SFSB for a minimal amount of time while getting the info they need. Obviously the problem with my current architecture is that the SFSB is locked until the whole transaction through all the beans is processed.


    In my opinion the bolded part of your answer is fallacious. The reason is that the current client thread will reserve the SFSB instance not only for the period of the method invocation (the call from SLSB to SFSB in order to get the static information), but for the duration of the entire transaction. Hence you�ll face the same problem again. Moreover the behavior I described in 1. for your SFSB will remain the same for the new SLSB. The only difference would be that this time you need to tune the instance pool rather then the cache. You�ve got to understand that long transactions and high number of client requests is something that the EJB container might not support that easily. However in order to go any further can you help me to understand the exact nature of your problem? Is similar to the scenario I described in 1?
     
    Betsy Camel
    Ranch Hand
    Posts: 119
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    hi
    i am running the program from the command line. here is the command
    javac -classpath c:\Program Files\Java\jdk1.5.0_04\lib\j2ee.jar Calculator.java
    Please let me know the steps to be followed to run the program
    Thanks
    Betsy
     
    Ranch Hand
    Posts: 1683
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    What is the package name for your classes? If you do not have a package, then you must create one.
     
    Valentin Tanase
    Ranch Hand
    Posts: 704
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Betsy,


    i am running the program from the command line. here is the command
    javac -classpath c:\Program Files\Java\jdk1.5.0_04\lib\j2ee.jar Calculator.java
    Please let me know the steps to be followed to run the program
    Thanks


    You need to provide the path to all your source files, including Calculator of course. If those classes are located within the current folder then you just add it to the classpath:

    similar you can add any valid OS path to the classpath if needed.
    However Roger has a good point. I don�t remember the details, but not providing a package name for your beans will result in subtle classloading errors later on in your application (I guess that some containers will not be able to load the classes if a package name is not provided). Better do it sooner than latter.
    Regards.
     
    Betsy Camel
    Ranch Hand
    Posts: 119
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    i get this error on deploying in weblogic

    weblogic.management.ManagementRuntimeException: javax.management.InstanceNotFoundException: mydomain:Application=Stateless,Name=Stateless,Type=EJBComponent
    at weblogic.management.configuration.EJBComponentMBean_Stub.getApplication()Lweblogic.management.configuration.ApplicationMBean;(EJBComponentMBean_Stub.java:125)
    at weblogic.management.console.utils.MBeans.getRecentDeploymentTasksFor(Lweblogic.management.configuration.ComponentMBean Ljava.util.Collection;(MBeans.java:1272)
    at weblogic.management.console.webapp._domain.__ejbcomponent._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(__ejbcomponent.java:900)
    at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl V(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(ServletStubImpl.java:315)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(RequestDispatcherImpl.java:322)
    at weblogic.servlet.jsp.PageContextImpl.forward(Ljava.lang.String V(PageContextImpl.java:150)
    at weblogic.management.console.actions.ForwardAction.perform(Lweblogic.management.console.actions.ActionContext Lweblogic.management.console.actions.Action;(ForwardAction.java:35)
    at weblogic.management.console.actions.internal.ActionServlet.doAction(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(ActionServlet.java:173)
    at weblogic.management.console.actions.internal.ActionServlet.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(ActionServlet.java:85)
    at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl V(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6718)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction Ljava.lang.Object;(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction Ljava.lang.Object;(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl V(WebAppServletContext.java:3764)
    at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread V(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread V(Unknown Source)
    Caused by: javax.management.InstanceNotFoundException: mydomain:Application=Stateless,Name=Stateless,Type=EJBComponent
    at com.sun.management.jmx.MBeanServerImpl.getMBean(Ljavax.management.ObjectName Ljava.lang.Object;(MBeanServerImpl.java:1683)
    at com.sun.management.jmx.MBeanServerImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.String Ljava.lang.Object;(MBeanServerImpl.java:1155)
    at weblogic.management.internal.RemoteMBeanServerImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.String Ljava.lang.Object;(RemoteMBeanServerImpl.java:288)
    at weblogic.management.internal.MBeanProxy.getAttribute(Ljava.lang.String Ljava.lang.Object;(MBeanProxy.java:610)
    at weblogic.management.internal.MBeanProxy.invokeForCachingStub(Ljava.lang.String;[Ljava.lang.Object Ljava.lang.Object;(MBeanProxy.java:442)
    at weblogic.management.configuration.EJBComponentMBean_Stub.getApplication()Lweblogic.management.configuration.ApplicationMBean;(EJBComponentMBean_Stub.java:118)
    ... 24 more



    can anyone tell me why it is so?
     
    Valentin Tanase
    Ranch Hand
    Posts: 704
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    This doesn�t look to me like a common deployment exception. It might be something wrong with your environment. How did you do the deployment? Are you using hot deployment? Are you using wl console? No matter what, in order to redeploy your application I�d advice you to follow the next steps:
  • Stop your WebLogic instance(s).
  • Remove the entire content of the next folder(s): /$BEA_HOME/ user_projects/domains/$MY_DOMAIN/$MYSERVER(s). (for versions of WebLogic prior to 8.x the path is slightly different).
  • Restart your WebLogic server instance(s).
  • Deploy your application (in case it was not deployed before. Check the content of config.xml to find out whether it was deployed or not).


  • This will basically help you to restart fresh Weblogic instances. Let me know if you�ll get the same error.
    Regards.
     
    Betsy Camel
    Ranch Hand
    Posts: 119
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I am still getting the following

    Exception:weblogic.management.ApplicationException: prepare failed for Hello Module: Hello Error: Exception preparing module: EJBModule(Hello,status=NEW) Unable to deploy EJB: C:\bea\user_projects\domains\mydomain\myserver\upload\Hello.jar from Hello.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'Examples.HelloBean' at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.classloaders.GenericClassLoader V(MBeanDeploymentInfoImpl.java:550) at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.classloaders.GenericClassLoader;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lweblogic.utils.jars.VirtualJarFile V(MBeanDeploymentInfoImpl.java:232) at weblogic.ejb20.deployer.EJBDeployer.prepare(Lweblogic.utils.jars.VirtualJarFile;Ljava.lang.ClassLoader;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Ljavax.naming.Context;Ljava.util.Map V(EJBDeployer.java:1324) at weblogic.ejb20.deployer.EJBModule.prepare(Ljava.lang.ClassLoader V(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.j2ee.J2EEApplicationContainer$Component;Z)V(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules([Lweblogic.j2ee.J2EEApplicationContainer$Component;Ljava.lang.String;Z)V(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare([Lweblogic.j2ee.J2EEApplicationContainer$Component;[Ljava.lang.String;Ljava.lang.String;Ljava.lang.String V(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(Ljava.lang.String;[Lweblogic.management.configuration.ComponentMBean;[Ljava.lang.String V(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer()V(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer()Z(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;ZLjava.lang.StringBuffer Z(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread V(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest V(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread V(Unknown Source)

    [Deployer:149033]preparing application Hello on myserver
    [Deployer:149033]failed application Hello on myserver
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application Hello on myserver.: Exception:weblogic.management.ApplicationException: prepare failed for Hello Module: Hello Error: Exception preparing module: EJBModule(Hello,status=NEW) Unable to deploy EJB: C:\bea\user_projects\domains\mydomain\myserver\upload\Hello.jar from Hello.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'Examples.HelloBean' at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.classloaders.GenericClassLoader V(MBeanDeploymentInfoImpl.java:550) at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.classloaders.GenericClassLoader;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lweblogic.utils.jars.VirtualJarFile V(MBeanDeploymentInfoImpl.java:232) at weblogic.ejb20.deployer.EJBDeployer.prepare(Lweblogic.utils.jars.VirtualJarFile;Ljava.lang.ClassLoader;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Ljavax.naming.Context;Ljava.util.Map V(EJBDeployer.java:1324) at weblogic.ejb20.deployer.EJBModule.prepare(Ljava.lang.ClassLoader V(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.j2ee.J2EEApplicationContainer$Component;Z)V(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules([Lweblogic.j2ee.J2EEApplicationContainer$Component;Ljava.lang.String;Z)V(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare([Lweblogic.j2ee.J2EEApplicationContainer$Component;[Ljava.lang.String;Ljava.lang.String;Ljava.lang.String V(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(Ljava.lang.String;[Lweblogic.management.configuration.ComponentMBean;[Ljava.lang.String V(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer()V(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer()Z(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;ZLjava.lang.StringBuffer Z(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread V(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest V(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178) at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread V(Unknown Source) .











    My ejb-jar.xml looks like this

    <!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>
    <enterprise-beans>
    <session>
    <ejb-name>Hello</ejb-name>
    <home>Examples.HelloHome</home>
    <remote>Examples.Hello</remote>
    <ejb-class>Examples.HelloBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>


    Please help
    [ November 14, 2005: Message edited by: Betsy Camel ]
     
    Roger Chung-Wee
    Ranch Hand
    Posts: 1683
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I suggest you post your code as well.

    Also, are your fully qualified names correct? For instance, should the package be examples rather than Examples. And what is your classpath setting?
     
    Valentin Tanase
    Ranch Hand
    Posts: 704
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Betsy,


    C:\bea\user_projects\domains\mydomain\myserver\upload\Hello.jar from Hello.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'Examples.HelloBean' at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos


    I guess that there is definitely something wrong with your package structure. You need to specify the full name of the package of your classes as well as the structure of the Hello.jar file. Post the deployment descriptors (ejb-jar.xml & weblogic-ejb-jar.xml) for your bean as well. By the way if you�re using any weblogic deployment tasks or strategies (other than wl console) you better repeat the steps as I mentioned in the previous posting, before deploying. Otherwise you might encounter strange error messages again. The better and most reliable way to deploy app to WebLogic is to run the server(s) in production mode (check for PRODUCTION_MODE inside the startWebLogic/startManagedWebLogic scripts; this should be set to true) and to use the wl console.
    Regards.
     
    Hug your destiny! And hug this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic