Question on EJB 2.1 using Netbeans 5.5 Beta 2. Cant understand error msg

"IOP00100006: (BAD_PARAM) Class com.sun.ejb.containers.EJBLocalObjectInvocationHandler is not Serializable"
org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
        at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
        at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
        at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
        at java.util.ArrayList.writeObject(ArrayList.java:569)
        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:585)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
        at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
        at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
        at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
        at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
        at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
        at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
        at web.customerList.processRequest(customerList.java:39)
        at web.customerList.doGet(customerList.java:72)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
|#]
java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
        java.io.NotSerializableException:
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:257)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:678)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:218)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
        at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
        at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
        at web.customerList.processRequest(customerList.java:39)
        at web.customerList.doGet(customerList.java:72)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Caused by: java.io.NotSerializableException:
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:250)
        ... 33 more
Caused by: org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
        at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
        at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
        at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
        at java.util.ArrayList.writeObject(ArrayList.java:569)
        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:585)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
        at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
        at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
        at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
        at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
        at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
        at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
        at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
        ... 31 moreTo start off, that is my error. I am following this http://www.netbeans.org/kb/50/quickstart-j2ee.html article and so far I can get the entire code working. Netbeans truly makes it easy!
Now I decided to expand on the example and so I used a caching service locator and added one more finder method to the Customer entity bean (CMP). It is a findAllCustomers method that returns a collection and the EJB QL I entered was as follows:
SELECT OBJECT(o) FROM Customer oI correspondingly added another business method to the session facade bean and I wrote a servlet that calls upon the caching service locator class and gets a reference to the session facade bean and calls the findAllCustomer method and gets back a List of all Customers. Then it takes the List, sticks it into the HttpServletRequest object and calls sendredirect to a JSP that is the view.
The JSP is straightforward in that I have a foreach jstl tag that is going to display the customers in a table format. So when I run the code the way it is, what happens when I access that servlet is that the it gets rerouted to the jsp page, but the table does not get displayed...but the above error gets posted in the Netbeans SJSAS console. I have never encountered that kind of error before so i am a bit stumped and don't know how to go about decoding that stacktrace.
Any pointers or suggestions or solutions (much prefer this one) would be great!
Thanks a lot. Sorry for the rather long post. If needed I can package up the entire project and send it to you.
Cheers,
Surya

It sounds like you're attempting to pass Local EJB objects over a Remote interface, which is not permitted. EJBLocalObjects can not be passed outside the ejb tier. You'll need to either pull their data out into data access object classes (basically structs) or return EJBObjects.
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • HT1476 when i plug my phone into the usb port with the apple charger that came with my phone i get an error msg say charging not supported by this device.   But when i use a gigaware (radioshack brand) usb charger, no error msg.  Why?

    when i plug my phone into the usb port with the apple charger that came with my phone i get an error msg say charging not supported by this device.   But when i use a gigaware (radioshack brand) usb charger, no error msg.  Why?

    - Try restoring the iPod, first from backup and then try to factory settings/new iPod to rule out a software problem.
    - Look at the dock connector on the iPod. Look for abnormalities like bent or corroded contacts, foreign material and broken or cracked plastic.
    - Could you have damaged something when you took the iPod apart and replaced the Home button?

  • Using the ContactInsertOrUpdate method from the ContactWS but error msg rcv

    [This thread was migrated from the On Demand Developer Forum in the old Siebel Community]
    Corsa
    Contributor
    I am getting the following error I do not know why or how to work around
    it.
    Method 'SetFieldValue' of business component 'Contact' (integration
    component 'Contact') for record with search specification '[External <br/>
          System Id] = "123456"' returned the following error:"Access <br/>
    denied.(SBL-DAT-00542)"(SBL-EAI-04375)
    Does any out there have any ideas?
    Previously when I tried to do the same action I got the following message:
    Multiple matches found for instance of integration component 'Contact'
    using search specification '[External System Id] = "123456"' in the
    business component 'Contact', based on user key 'Contact User
    Key:3'.(SBL-EAI-04390)
    Both messages are baffling me. Please, please help
    Product: CRM OnDemand
    06-16-2006 04:35 AM
    Re: Using the ContactInsertOrUpdate method from the ContactWS but error
    msg rcvd
    BigSlick
    Valued Contributor
    Hi Corsa,
    Can you access the record in the online application. Perhaps someone has
    changed the access rights for this Contact on the Contact Team ?
    -BigSlick
    06-20-2006 12:33 PM
    Re: Using the ContactInsertOrUpdate method from the ContactWS but error
    msg rcvd
    Corsa
    Contributor
    I realise now that the field AccountID is readonly and cannot be assigned.
    I was attempting to assign contactsList[count].AccountId to a value . I
    believe, this is the reason I was getting the access denied error.
    06-23-2006 11:10 AM
    ==============================================================================
    Click on the board or message subject at the top to return.

    Ok, so I hit a bump in the road. Just when I think I understand something It doesn't work correctly.
    I implemented it I thought correctly. I looked up something on the sun website (core java) I used advice from here, and my professor finaly responded to me with almost identical instructions. So I did it
    my RationalNumber.java no looks like this.
    public class RationalNumber implements Comparable
    //.....Break to new section
      public  float compute ()
           float value = getNumerator() / getDenominator();
         return value;
       public int compareTo(RationalNumber op2)
           if (Math.abs(compute() - op2.compute()) < .0001)
              return 0; //Equal
          if (compute() > op2.compute())
            return + 1; //Rational Number bigger
          if (compute() < op2.compute())
               return - 1; //Rational Number Smaller
         }I thought that would work fine, but it gives me an error when I compile it:
    RationalNumber.java:8: RationalNumber is not abstract and does not override abstract method compareTo(java.lang.Object) in java.lang.Comparable
    public class RationalNumber implements Comparable
           ^So now what, making it abstract only creates more errors....
    Also, thanks ChuckBing, I'm glad you like the screen name, I've been using it for years.

  • I'm trying to install itunes to use with my new iphone and getting several error msgs

    on my desktop PC with Vista srvc pk 2.   Error msgs: 1) an error during install of assy "policy 8.8.MS VC80.CRT.type+"win32-policy" version="8.0.50727.6195" publicKeyToken= .... "x86"  2) service Apple mobile Device failed to start  3) Apple App Support not found Uninstall and reinstall itunes 
    Please help, if I don't get this installed and running real soon the phones going back

    First remove iTunes and all associated software
    Removing and Reinstalling iTunes, QuickTime ... - Support - Apple  for xp
    Removing and reinstalling iTunes, QuickTime, and ... - Support - Apple for vista or 7
    Before reinstalling disable your antivirus software and firewall.

  • Netbeans 5.0 beta: package org.jdesktop.layout does not exist

    This is a newbie question. I'm running netbeans 5.0 beta and put together a UI with the nice UI builder in netbeans. When I go to compile I get "package org.jdesktop.layout does not exist". I've updated my class path via the netbeans libaryar manager to include the jars swing-layout-0.7.jar and org-jdesktop-layout.jar but it is still not finding the class. What am I missing? Thanks!

    Do you get this error when selecting "run" from within NetBeans?
    When I create a project using Netbeans 5.0 beta using the form designer NetBeans automatically adds swing-layout-0.7.jar to the list of libraries in the libraries node in the project window. I didn't do anything fancy.
    Do you get this error if you create another project?
    it works fine for me.

  • Some questions on EJBs

    hi, i am an intermediate javaee developer but i have some questions on EJBs. sometimes i wonder why do i want to use EJBs in an application. if possible please use some illustrations.
    1) What problems do EJBs both session bean and message driven bean solve respectively. like what was the motivation behind creating ejbs.
    for ex, someone complained to me once that an app his company wrote took time to load large sets of data, and he asked if he should use EJBs, and i am like, does an EJB load data faster? though i think i said it could help, not because i was sure, but because u know the "Biig EJB", it has to solve it.
    2) why do people compare spring and ejbs, and sometimes prefer spring over ejbs.
    3) in what situations could an EJB be neccessary/advantageous, and what are the disadvantages if any.
    thanks.

    java_everywhere wrote:
    1) What problems do EJBs both session bean and message driven bean solve respectively. like what was the motivation behind creating ejbs.
    for ex, someone complained to me once that an app his company wrote took time to load large sets of data, and he asked if he should use EJBs, and i am like, does an EJB load data faster? though i think i said it could help, not because i was sure, but because u know the "Biig EJB", it has to solve it.It doesn't solve any problems, it is a framework that you can use to make your development (and maintenance) cycle easier IF you use it properly. For example, you get integrated JMS support through message driven beans, no extra work needed there. You get container managed transactions, which made my life a whole lot easier once I got over that phase of thinking the server is responsible for everything (it is not, you are still in the driver seat when it comes to transaction management). As part of that transaction management you get out of the box ORM support through the JPA specification. You can take advantage of the load balancing features of the server for heavy weight applications. etc. etc.
    In essence you shouldn't think in terms of what EJB technology gives you; what does the entire JEE platform give you, of which EJB technology is only a component?
    >
    2) why do people compare spring and ejbs, and sometimes prefer spring over ejbs.A real world example: when putting together Ikea furniture you can usually get very far with only using those little tools they give you in the package. However, sometimes you are forced to use a screwdriver, a hammer or a drill. And sometimes you use a screwdriver to keep something in place while using the little Ikea tool to put in a screw. Combining the screwdriver and the Ikea tool usually stems from experience where using only one of them took so much longer and was so much more frustrating to get the things done.
    Interesting how real world examples usually translate to software development as well. Why would you limit yourself to using only one tool when combining tools could give you more flexibility and could solve a problem easier because you use the strengths of both to compliment each other?
    3) in what situations could an EJB be neccessary/advantageous, and what are the disadvantages if any.All technology exists because there was some need for it. Need rises from requirements, so this question is not answered right here and now - it should be asked on a per project basis. I have this project with these requirements, how could EJB technology help here? How could Spring help? How could Struts 2.0 help? etc. etc.

  • How to set domain name to a site that was developed using netbeans

    I developed a website using netbeans.I want to give some DNS like site1.com to it.Where can i set that ?
    Thanks in advance

    1) You post questions in the wrong forum. (As you title says this is a Swing question).
    2) Not once in your last 10 postings have you ever bothered to reply to a posting to thank people for the help you have received.
    I seriously doubt you well ever get answers in the future.

  • Question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    "Anoushka" <[email protected]> writes:
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?Most protocols (IIOP, T3, JRMP) provide a slot for encoding a codebase
    in RMI requests. The codebase is usually an http URL that specifies
    where to get classes that are not currently available to the
    client. This URL is used to construct a java.net.URLClassLoader which
    then downloads classes on demand. These classes can include stubs,
    object arguments - pretty much anything you like. There are certain
    security restrictions on the URLClassLoader which is why you sometimes
    have to specifiy a security manager in a client. T3 will for
    preference generate stubs in the client rather than download them,
    however this is not allowed in an applet - and so in this case T3 will
    also download stubs from the server.
    The net of this is that you don't have to put very much at all in a
    client jar UNLESS you can't use the URLClassLoader. In that instance
    you have to put EVERYTHING you need in the client jar.
    HTH
    andy

  • JNDI problem using netbean

    i followed the documents in sun to use JNDI for database connection but i got an expection:
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    how can i solve it?
    thank you very much
    i followed http://www.netbeans.org/kb/50/using-netbeans/dbconn.html#pgfId-1156774 and also the procedures from the "help" in netbean:
    Accessing a Connection Pool from a Java Class
    Applications that are deployed to servers often need to access databases that reside on remote machines. You therefore have to set up a JDBC connection pool the server that points to the database. You then create a data source that connects to the connection pool and use the data source's JNDI name to acquire a connection to the database.
    To access a database from an enterprise application:
    1. (Optional) Create a service locator class to handle getting the reference to the database.
    2. Open the Java file from which you want to access the database. In the Source Editor, right-click the file and choose Enterprise Resources > Use Database.
    3. Enter a JNDI name for the database connection. This name must be the same as the JNDI name of the JDBC data source for the database on the target server.
    If you are deploying to the Sun Java System Application Server, you can also generate a connection pool and data source for the database connection by selecting the Create Server Resources checkbox. The resources are created under the project's Server Resources node.
    4. Select the database to which you want to connect in the Connection drop-down list. If the database is not listed, do the following:
    i) If the JDBC driver for the database server is not registered in the IDE, click Add Driver.
    ii) Click Add Connection to connect to the database.
    5. Under Service Locator Strategy, specify whether to generate inline lookup code or use an existing service locator. You can click the Browse to search for the service locator class name.
    6. Click OK.
    The Use Database command is only available in EJB module and web application projects.

    Exception in thread "main"
    javax.naming.NoInitialContextException: Need to
    specify class name in environment or system property,
    or as an applet parameter, or in an application
    resource file: java.naming.factory.initialYou need to pass the environment properties to the InitialContext constructor specifying the java.naming.factory.initial property and also the host name, I think. I read in your post that you are using Sun application server. The preferred method for lookup with Sun's server is Corba. So you need to set the org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort and have the appserver-rt.jar in the classpath.

  • GUI - Using NetBeans

    Hi,
    I am new to using NetBeans and have built a basic GUI using it. However, I want to change the background colour of my GUI to black and cant see how to do this using NetBeans. Please could someone explain to me how to do this.
    My code is as follows :-
    * GUIII.java
    * Created on 29 November 2007, 19:47
    package my.GUIII;
    public class GUIII extends javax.swing.JFrame {
    /** Creates new form GUIII */
    public GUIII() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jLabel1 = new javax.swing.JLabel();
    jDialog1 = new javax.swing.JDialog();
    jPanel1 = new javax.swing.JPanel();
    jButton5 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jLabel2 = new javax.swing.JLabel();
    jLabel1.setText("jLabel1");
    javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
    jDialog1.getContentPane().setLayout(jDialog1Layout);
    jDialog1Layout.setHorizontalGroup(
    jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 400, Short.MAX_VALUE)
    jDialog1Layout.setVerticalGroup(
    jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 300, Short.MAX_VALUE)
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Guiness Rugby League");
    setBackground(new java.awt.Color(0, 0, 0));
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
    jButton5.setText("Exit");
    jButton4.setText("Clear");
    jButton3.setText("Update Database");
    jButton2.setText("Read Database");
    jButton1.setText("Read File");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
    .addComponent(jButton1)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jButton2)
    .addGap(18, 18, 18)
    .addComponent(jButton3)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jButton4)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jButton5)
    .addGap(36, 36, 36))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(20, 20, 20)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jButton1)
    .addComponent(jButton3)
    .addComponent(jButton4)
    .addComponent(jButton5)
    .addComponent(jButton2))
    .addContainerGap(21, Short.MAX_VALUE))
    jLabel2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Blampied\\Desktop\\P_GPremLogo.gif")); // NOI18N
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(117, 117, 117)
    .addComponent(jLabel2))
    .addGroup(layout.createSequentialGroup()
    .addGap(25, 25, 25)
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 457, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap(42, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 446, Short.MAX_VALUE)
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
    pack();
    }// </editor-fold>
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new GUIII().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration
    }

    Use Component's setBackground method; See this tutorial that has examples of its use:
    http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html
    Please post future Swing questions in the Swing forum.

  • How to set JTable cell editable/non-editable dynamically using NetBean?

    I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
    Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
    How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
    thx.

    I know what coding i did, Yes u r right but im new to GUI programming only,
    That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
    U didnt get my question at all.
    Again the problem im facing is the table is already displayed with 2nd column uneditable.
    When some Action done on table, i need to make 2nd column editable at run time.
    Thanks if u provide me the solution instead of deciding what type of programmer im.

  • How does the Java Card simulator work? (Using NetBeans)

    Hi,
    I'm using NetBeans and am trying to simulate:
    Someone powering up the card, saving a value, and powering down... And then they power it up again, get the value, and power down.
    When I edit my APDU script to do the second part, the value I entered the first time is never stored, which probably means that when I 'run' my code, my application is loaded and everything is initialized again.
    How do I edit NetBeans to not install the application every time I hit 'run'? And not to initialize the values, so that when i power it up again, I can get a value stored in a previous running of a script?
    When I use powerup, powerdown and then powerup again, NetBeans doesn't powerup the simulator the second time. So understanding the Java Card Simulator would also help... where it is, how it runs, what options it runs with, etc.

    Hi Shane,
    I have not read anywhere else that the JC3 cards are not available, thank you so much for that tip! I am not doing it for research, but I am working on this alone and will have to deploy a card later on. I will be getting all the right versions now.
    I'll ask the question then, using just the JCDK:
    If I want to save a value on the card, and then need it at a later time, how do I go about it. Do I do the following?
    (1) Install the application on the card. (I know how to do this)
    (2) Run the simulator using -o "eeprom data filename"
    (3) Save the value using the APDU calls and Java code on the card + close connection.
    Code:
    public class MyApp extends Applet {
        private static byte[] data = {0x00, 0x00, 0x00};
        // Install method, method to register, process method that can call saveData or recallData, etc
        public static void saveData()
           // code to change data
           data = {0x01, 0x01, 0x01};
        public static byte[] recallData()
           // code to return data
           return data;
    }(4) Run the simulator using -i "eeprom data filename". get the value using recallData().
    Will selecting the app not make data initialize to {0x00, 0x00, 0x00} again?
    If I know this is the correct way of going about it, then I can work towards it getting done.
    From other examples I can see that this is probably the way it should work, but my data array always returns as {0x00, 0x00, 0x00}.

  • Using NetBeans getting gibrish instead of local

    Hi,
    Help will be appreciated,
    Using NetBeans (Using jdk1.6.0_01 and windows xp pro ) � Created properties file in local Hebrew but received gibrish in the final outcome, how can it be fixed ?

    Try posting this question on netbeans.org.

  • Parsing ejb-jar.xml using jaxb

    hi all,
    how to parse the ejb-jar.xml using jaxb? can anybody send the information about the API which we have to use to parse the ejb-jar.xml? (ejb2.0)
    i need the details about all ejbs in an application, (like jndi name, Home and Remote name). so, how can i parse the ejb descriptors?
    regards,
    panneer

    Hi Panneer,
    Well, parsing the EJB descriptors is, in principle, a task for the EJB container where they are deployed. From what you wrote I assume that you need to gather that kind of info to visualize in some (monitoring?) tool. Is that correct?
    If so, the question would be whether you have access to the EJB jar on the file system (before it's deployed) or you can only connect to the server with the already deployed EJBs. In the latter case, this information is shown in the [NWA plugins|http://help.sap.com/saphelp_nwce10/helpdata/en/0b/5b5a42ea221153e10000000a155106/frameset.htm]. There are also some [telnet commands|http://help.sap.com/saphelp_nw04/helpdata/en/79/3cf82ade038d45a21fbfdaee349b22/frameset.htm] in NW 04 and 7.0 (04s).
    If you have access to the EJB jar file, you can parse the descriptors using DOM or SAX, but I'm not aware of any pre-defined JAXB API for this purpose. Probably you can also generate the mapped classes yourself and use them, however I'm not sure how that works with DTD (because of EJB 2.0).
    HTH!
    \-- Vladimir

  • Hi questions on ejb??????

    hi everybody.... can you give my questions answers.........................
    if we write abstract class in case of home and object interface? and all the methods needed put in the Abstract class is the ejb code is working..... if yes...so why.... if no then why........

    Chunbo Huang <[email protected]> wrote:
    Hi,
    I have the following two questions on EJB while I am working a project based
    on EJB:
    (1) What is the guideline to implement a cluster-wise exclusive on EJB? In
    another word, I want to have only one EJB instance for a DB record to be
    created among all the cluster nodes. As far as I know, the EXCLUSIVE
    concurrent control setting in EJB deployment descriptor only works in the
    single node. Is that right?Yes.
    (2) Giving the RObean cachel invalidation process, if I use cacheHome
    interface to invaliate the corresponding RO beans, does this gurantee the
    ROBean will not read any out-of-date data? Or there are still a small window
    the ROBean may have the old data?Yes, there is a small window when RO bean can have the old data. If you invalidate
    beans manually (using CachingHome) make sure you do this after update transaction
    commits - that way RO bean will not read old data.
    Thanks!
    --chunbo--
    Dimitri

Maybe you are looking for