EJB BMP slow?

Hello,
I don't understand why people use EJB's if it is so slow. I am trying
to do simple GET and SET methods on the current bean in memory, where
each GET and SET method calls ejbLoad() and ejbStore() which are
extremely resource intensive so they are very slow. Are there ways
around this?
I don't see why someone would want to do use EJB's when it is so
slow...doesn't make sense. I must be missing something. Anyone?
Tim :-)

ck388 <[email protected]> wrote:
I don't understand why people use EJB's if it is so slow. I am trying
to do simple GET and SET methods on the current bean in memory, where
each GET and SET method calls ejbLoad() and ejbStore() which are
extremely resource intensive so they are very slow. Are there ways
around this?
I don't see why someone would want to do use EJB's when it is so
slow...doesn't make sense. I must be missing something. Anyone?using bmp, it's up to you to optimize the expensive db calls.
keep a dirty bit for each field and only commit it in your ejbStore
when it's actually been changed, etc.
if your object-relational mappings are not complex, you can bind your
entity to the db through cmp, and then the container does the sql and
the optimizations for you.
____________________}John Flinchbaugh{______________________
| [email protected] http://www.hjsoft.com/~glynis/ |
~~Powered by Linux: Reboots are for hardware upgrades only~~

Similar Messages

  • Where to Instantiate a DAO in an EJB BMP?

    We are using DAOs with our EJB BMPs..
    My question is what method should the DAO be Instantiated in?
    I have seen it done in the:
    1) ejbActivate (seems to cause a null pointer error on the weblogic server)
    2) setEntityContext method
    3) all methods that use the dao object.

    This depends a bit on how your DAOs are built, but you certainly don't want to instantiate a new DAO every time you need one. Unnecessary object creation is not a Good Thing.
    Generally speaking, an instance variable populated upon bean instantiation works just fine (i.e private MyDao dao = new MyDao();). If your DAO is serializable and doesn't contain any transient info of it's own, you're pretty much done since the DAO will get serialized when the bean is passivated.
    If it does contain transient data/resources (and it probably shouldn't) you can set/remove them during ejbActivate/ejbPassivate.
    If the DAO is not serializable (and it probably should be), then instantiating one during ejbActivate should not be a problem. What was the exact cause of the NPE you got?

  • EJB BMP Starter

    I have some key basic questions on BMP Entity Beans. I have been looking at the sample application at http://developers.sun.com/tools/javatools/documentation/s1s5/accountapp.html.
    1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP Entity Bean that i mapped to a specific table know about the previous data. In the sample application above, there is a loadRow method (Adding private methods to perform database calls, step 10). In it, it says:
    String selectStatement = "select balance from account where id = ? ";
    PreparedStatement prepStmt = con.prepareStatement(selectStatement);
    prepStmt.setString(1,this.id);
    Where does this.id came from? It is not set anywhere but in the ejbCreate() method. For example, if my client program just wants to list the balance from accounts table bound to an id without inserting new rows into the database, how would that happen? It confuses me since ejbCreate method is called automatically everytime i use a bean and it contains SQL insert statements.
    2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4) it says:
    public void ejbActivate() {
    id = (String) context.getPrimaryKey();
    } What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB (from db mapping)? If so how do i reference to it without any class names?
    3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and servlets using session beans to access database data) that can guide me. If someone knows the place of such an example I would be very much greatful.
    I seem to be unable to grab the logic of EJB BMP. Answers to these questions would be helpful.
    Thanks in advance.

    Greetings,
    1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP
    Entity Bean that i mapped to a specific table know about the previous data. In the sampleThe container will not have any beans representing the new data until the client attempts to find them.
    String selectStatement = "select balance from account where id = ? ";
    PreparedStatement prepStmt = con.prepareStatement(selectStatement);
    prepStmt.setString(1,this.id);
    Where does this.id came from? It is not set anywhereAs shown below, it is grabbed out of the EJBObject (which gets it as a consequence of either a create or finder method call), when a bean instance is "activated" - or, 'swapped in' from the free pool and associated with the EJBObject.
    but in the ejbCreate() method. For example, if myThe ejbCreate method returns an instance of the Primary Key class which the container stores in the EJBObject. In this case, the PK class is type String and referenced by the variable 'id'.
    client program just wants to list the balance from accounts table bound to an id without inserting
    new rows into the database, how would that happen? ItPresumably, the client knows the "primary key" of the entity (the unique tuple from the accounts table which the EB represents), it wants to access and uses that as the argument to a findByPrimaryKey call against the home object.
    confuses me since ejbCreate method is called automatically everytime i use a bean and it contains
    SQL insert statements.Er, no. The bean's ejbCreate method is called by the container as a consequence of the client calling the corresponding create method on the home. It does not happen "automatically", but only as a consequence of the client wanting to create a new entity in the application - and, accordingly, in the underlying persistence resource. If the client does not want to create a new entity but, rather, use an existing one, then it calls an appropriate finder method to locate the instance and get a reference to it.
    2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4)
    it says:
    public void ejbActivate() {
    id = (String) context.getPrimaryKey();
    Refer again to the above...
    What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB
    (from db mapping)? If so how do i reference to it without any class names?It is indeed the private member of AccountBean (see step 7 under "Adding a create method to the bean" of section 4).
    3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and
    servlets using session beans to access database data) that can guide me. If someone knows the
    place of such an example I would be very much greatful.It would appear that you require more grounding in the fundamentals of EJB generally - particularly with regard to their lifecycle and state transitions. Start with the specification. Then take a look at J2EE core design patterns...
    I seem to be unable to grab the logic of EJB BMP.
    Answers to these questions would be helpful.
    Thanks in advance.Regards,
    Tony "Vee Schade" Cook

  • Ejb BMP never commits even with transactions

    I have serious problems with any EJB running inside the Oracle8i server, Linux Rh6.2/Oracle 8.1.7.0.1
    ALL code does not perist its data, but it sielently fails. For instance take
    $ORACLE_HOME/javavm/demo/examples/ejb/transactions/clientside
    I changed the last line in Client.java from crollback to commit()...
    I run this program twice:
    Beginning salary = 3000.0
    End salary = 3300.0
    Beginning salary = 3000.0
    End salary = 3300.0
    The second invocation should show the beginning salary as 3300.0
    In essance ALL of my EJBs are showing simular behavior. This problem is also seen in ALL of the examples. My environment uesed to work, but I can't figure out what changed to make every EJB-BMP nonpersistant.
    any help would be greatly appreciated.
    thanks,
    -rick

    I don't think my probmem is related to an exception being lost because no exceptions are throws, I have alot of trace information and I always see complete method calls through ejbCreate, ejbStore, et. al.
    My problem is that a transaction never gets commited, even when the JTS is used. Infact I have this piticular problem with ALL Oracle BMP-EJBs
    I'm just going to have to open a ITAR, guess thats want support is for. I'm just perplexed as to why it worked last week, and now the demos can't save their state.
    a bit scarie for something that may one day be in production.

  • Ejb - BMP Finder

    Hello,
    I wrote an appliation which connects to EJB.
    I use BMP, and wrote a finder in the CustomerBean which sets
    records of customers table to a com.borland.dx.dataset.DataSetData (which is serializable)
    I tried to do this:
    public DataSetData ejbFindAll() throws FinderException {}
    but I get an error that a finder can't return a DataSetData,
    only a collection or the bean.
    can I write other function which will return DataSetData,
    and to write it's definition in the Home interface?
    it means not using finders.
    Thanks.

    Thanks for your reply.
    According to your reply, I shouldn't use Entity Beans,
    only remote Session Beans.
    Is it accepted to write in this way, while using the
    EJB technologic?
    I write an applet GUI, which contains swing and borland
    components like JdbTable.
    It will take a long time to add the records to the collection
    in the Entity Bean,
    and move the collection to dataset in the applet.
    I will be happy to hear your advice.
    Thanks,
    Anat

  • EJB bmp persistence

    hi,
    I was reading tutorials on BMP.
    I found that in all the tutorial they have mentioned that it involves writting queries ourself.
    So by using a BMP means 'writing the query alone' or is there any service that has to be provided.
    Also can u broach me abt the services that are taken care in a CMP.

    There some limitations of CMPs.. Some of them are..
    1. Limitations of type of data sources that may be supported by a container for CMPs
    2. EJB QL cant handle complex queries
    Some advantages..
    1. easier to create/manage than BMPs
    2. If you need CMR then you may need to use CMPs
    3. Optmization of SQL by containers
    venkk
    http://www.venkks.net/

  • Workshop 10 EJB compilation SLOW

    Hi!
    I upgraded yesterday my project (EJB + 3 Web Sites) from 9.2 to Workshop 10. When I tried to compile it it took about 15 minutes to compile my EJB project. To compare, it took only seconds to compile it on 9.2. It has only about 20 beans! I tried to recreate project from the scratch and install Workshop 10 on another computer. It is always the same. Sometimes it is OK for 2-3 times, but after that becomes slow again. It just freezes at 38% (comld be any number). Please help.

    I don't know eactly when a patch will be available; I added a note to the CCE CR that covers this bug indicating the urgency and referecing this thread.
    As Bill indicated, you should open a ticket and generate a case # if you are under support.
    Until a patch is available, you may be able to mitigate the issue by temporarily removing the dependency between the web projects and the EJB project via the "J2EE Module Dependencies" project properties page while you develop the EJBs. Once the EJB src is stable (and the EJB annotation processor will therefore not be triggered during build cycles), you can add back the dependencies to enable development of the beehive-based web projects. This will only mitigate the problem since a full build will still be triggered under certain circumstances, e.g. a clean, and iterative development of the web apps will likely necessitate modification of the EJB logic.

  • Ejb client to ejb communication- slow performance ?

    I think BEA has a very nasty implementation of ejb client to ejb server communication.
    When a client looks up a an ejb component it gets a t3client eastablishing a socket connection to the ejb server (WL server).
    For one client VM there is one such client and all ejb client to server packets go through this one socket. To me it seems to be a major bottleneck for performance.
    Any body has any info ideas on how to get around this.

    What makes you think it's a bottleneck? It nearly always greatly improves performance.
    -- Rob
    Vyask wrote:
    I think BEA has a very nasty implementation of ejb client to ejb server communication.
    When a client looks up a an ejb component it gets a t3client eastablishing a socket connection to the ejb server (WL server).
    For one client VM there is one such client and all ejb client to server packets go through this one socket. To me it seems to be a major bottleneck for performance.
    Any body has any info ideas on how to get around this.

  • Getting deep on Entities EJBs life-cicle... need some undertanding!

    Hi,
    i got a question over an Entity EJB (BMP or CMP as they life-cicle is pretty much the same) life-cicle.
    I've search over some books and there's a step that all of them seem to miss (or just don't be to explicit).
    There are 3 stages for an entity EJB.
    - no state
    - pool
    - ready
    The transition i'd like some help is the pool -> ready transition.
    When i use ejbCreate() is pretty simple, that's not the case.
    Then, there're only left one more way, through the ejbActivate() -> ejbLoad() methods.
    Here's my point...
    All the books i read describe the ejbFind() methods being on the pool stage (an arrow coming from it and going to it). This is exactly where i disagree!
    Suppose i have a CMPon pool rigth now and i also have a SessionBean holding a reference to that CMPLocalHome interface. Note that at this point, the CMP is still on pool.
    Then, from my client, i call a method on SessionBean that does something like the following.
              try {
                   CMPLocal cmpLocal = cmpLocalHome.findByPrimaryKey(addressID);
                   if (cmpLocal != null){
                        String data = cmpLocal.getMyDataString();
              } catch (FinderException e) {
                   System.out.println("Error: " + e);
                   e.printStackTrace();
                                              }As u can see, i just obtained a Local interface from the LocalHome interface i had before.
    After that, i called a getter method of the CMP bean, by that its pretty obvious that my CMP bean has got to be transitioned to the ready state, as it was associated with database data.
    Here goes my question,
    When exactly did the container called ejbActivate() -> ejbLoad()??? In other words, how exactly did my CMP bean get to the ready stage?
    Thank you so much,
    ltcmelo

    First of all, what an example! Great!
    But ... i still miss one little part of the process, actually the one i`m really interested to know!
    Follow my thougths.
    When i call the ejbFind() method, i call it on a bean that is on the pool. All the entities EJB life-cicle diagrams i`ve seen, show the bean still on the pool after the ejbFind() method, wich means that just AFTER the ejbFind() the beans is NOT yet associated to any database data. That`s what the literature says.
    The point is... i got returned from ejbFind() method a LocalInterface for a Bean, wich means that the bean is NOW associated with database data, as i have NOW a local interfaces that i can call any business (or setter and getter ) method of that bean.
    As you all said, the bean must have passed through the ejbActivate() -> ejbLoad() methods (supposing there was no other bean in the ready state).
    One way i can think of that is that the container invoked ejbActivate() -> ejbLoad() just AFTER any invokation of any finder method. I cannot view it in other way ( is ther any other way??? ) ! So, why is it not part of the j2ee specification ( i mean, something that specifies to "always call ejbActivate() -> ejbLoad after any finder method"????
    Thanks,
    ltcmelo

  • Stateless EJB expose as web service

    I use JDeveloper 10.1.3.0.4 created the folllowing EJB:
    BMP: ProductEntityEJB
    Stateless session bean: ProductSessionEJB
    After i generated session bean web service via web service wizard and
    deploy the web service by the generated deployment file,
    the error occurred:
    ---- Deployment started. ---- 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:16
    Target platform is Standalone OC4J 10g 10.1.3 (oc4j).
    Wrote EJB JAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\EjbWebServices.jar
    Wrote EAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\JDevFYP-JDevFYPWS-EJB-WS.ear
    Uploading file JDevFYP-JDevFYPWS-EJB-WS.ear ...
    Application Deployer for JDevFYP-JDevFYPWS-EJB-WS STARTS.
    Copy the archive to C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear begins...
    Unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Done unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear ends...
    Starting application : JDevFYP-JDevFYPWS-EJB-WS
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Processing EJB module: EjbWebServices.jar
    application : JDevFYP-JDevFYPWS-EJB-WS is in failed state
    Operation failed with error:
         Missing class: fypws.bean.product.ProductSessionEJBBean
         Dependent class: com.evermind.server.ejb.deployment.BeanDescriptor
         Loader: oc4j:10.1.3
         Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\SAP\JSF\jdevstudio1013\j2ee\home\oc4j.jar
    This load was initiated at JDevFYP-JDevFYPWS-EJB-WS.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
         1. Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/applications/ejb1/ejb1.jar (from <ejb> in C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\ejb1)
         This code-source is available in loader ejb1.root:0.0.0.
    Deployment failed
    Elapsed time for deployment: 2 seconds
    #### Deployment incomplete. #### 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:18
    How can i solve it??

    Can you try and see if installing JDeveloper into a directory with no spaces in it (i.e not in \JDeveloper Workspace\) solves the problem?

  • BMP Transactions

    Hello,
    Is there a way to group using transactions a block of GETTER or SETTER
    methods in EJB BMP? Right now i'm trying to call a bunch of GETTER and
    SETTER methods to get and set the bean property values. Each GET or
    SET requires a call to ejbLoad and ejbStore and is pretty resource
    intensive so it takes a while for it to process. Is there a way to
    group these GETs and SETs into a transaction so ejbLoad and ejbStore
    only get called once when the transaction commits?
    I've looked around on the web and i found out that there's something
    called BEAN MANAGED TRANSACTIONS and CONTAINER MANAGED
    TRANSACTIONS.....with BEAN MANAGED TRANSACTIONS you would have to
    create a seperate SESSION bean to call your ENTITY bean methods...i
    think. I don't want to have a to create a new bean to do this. Also
    for CONTAINER MANAGED TRANSACTIONS...how does that work? Is it
    automatic?
    Any help would be appreciated,
    Thanks!
    Tim :-)

    Deyan,
    True most containers support other tx attributes for entity beans. However looking
    at the question I thought the person needed a way to bean demarcate txs.
    S
    "Deyan D. Bektchiev" <[email protected]> wrote:
    Sri,
    The EJB spec mandates vendor support for the three attributes you list
    but vendors can (and most do, including Weblogic Server) support
    "Never", "NotSupported" and "Supports" attributes. In fact until recent
    versions "Supports" was the default setting for EJBs and maybe still
    is
    because of cost of migration.
    Otherwise I agree that if someone knows what they are doing then
    BMT/UserTransaction is fine to use, but one drawback of BMT is that you
    can never participate in the callers transaction.
    --dejan
    sri wrote:
    BY the spec entity beans can only have required, requires new or mandatorytx attributes.
    So for my stuff to work it has to be either required or mandatory. Ishould have
    said that. While you are right that the method in session bean can beset to required
    etc to accomplish this but it restricts the method from programaticallycontrolling
    tx demaration within the method (for e.g., depending on a var to eithermake two
    or three calls under one tx).
    Also this can't be accomplished if the call is made from web container.
    S
    "Deyan D. Bektchiev" <[email protected]> wrote:
    The methods on the Entity EJB should be marked with TX attribute of
    Required or Supports for this to work as you want it.
    An even easier way is to make all calls from a session bean's method
    marked with a TX attribute of either Required or RequiresNew -- then
    the
    container will handle the transaction demarcation automatically foryou.
    Dejan
    Sri wrote:
    Here you go:
    javax.transaction.UserTransaction ut = mySessionCtx.getUserTransaction();
    ut.begin();
    myEntityBean1.someMethod();
    myEntityBean2.someOtherMethod();
    //so on....
    ut.commit();
    Of course I assumed saved session ctx when container called setSessionCtx().
    If
    you do it in the web container you can look for tx manager from JNDI
    and from
    that get user tx as:
    javax.transaction.TransactionManager tm = myCtx.lookup("...");
    javax.transaction.UserTransaction ut = tm.getTransaction();
    Once you have UT you are in business. Also in the past JTA/JTS did
    not
    specify
    the JNDI string to use to get Transaction manager and think it's still
    the case
    (there might be some recomendation) so to get the string connect to
    a running
    WLS through admin console and view JNDI tree for TM.
    Hope this helps,
    S
    [email protected] (ck388) wrote:
    Could you go into more detail as in how to demarcate the transaction?
    Do i do this in the client? Can i get an example?
    Thanks,
    Tim :-)
    "Sri" <[email protected]> wrote in message news:<[email protected]>...
    From: "Sri" <[email protected]>
    Sender: "Sri" <[email protected]>
    Reply-To: "Sri" <[email protected]>
    Subject: Re: BMP Transactions
    Newsgroups: weblogic.developer.interest.ejb
    X-User-Info: 162.115.164.197
    References: <[email protected]>
    NNTP-Posting-Host: 162.115.164.197
    X-Original-NNTP-Posting-Host: 162.115.164.197
    Message-ID: <[email protected]>
    Date: 2 May 2003 10:29:53 -0800
    X-Trace: newsgroups.bea.com 1051896593 162.115.164.197 (2 May 2003
    10:29:53 -0800)
    X-Original-Trace: 2 May 2003 10:29:53 -0800, 162.115.164.197
    Organization: BEA NEWS SITE
    Lines: 33
    XPident: Unknown
    Path: newsgroups.bea.com!not-for-mail
    Xref: newsgroups.bea.com weblogic.developer.interest.ejb:37694
    Hi,
    If you demarcate the transaction at the caller then you would not
    have
    this problem.
    The ejbLoad() would be called before first getter/setter and store
    sometime after
    last getter/setter and commit if commited. I assumed the called
    is
    an entity bean.
    S
    [email protected] (ck388) wrote:
    Hello,
    Is there a way to group using transactions a block of GETTER or
    SETTER
    methods in EJB BMP? Right now i'm trying to call a bunch of GETTER
    and
    SETTER methods to get and set the bean property values. Each GET
    or
    SET requires a call to ejbLoad and ejbStore and is pretty resource
    intensive so it takes a while for it to process. Is there a way
    to
    group these GETs and SETs into a transaction so ejbLoad and ejbStore
    only get called once when the transaction commits?
    I've looked around on the web and i found out that there's something
    called BEAN MANAGED TRANSACTIONS and CONTAINER MANAGED
    TRANSACTIONS.....with BEAN MANAGED TRANSACTIONS you would haveto
    create a seperate SESSION bean to call your ENTITY bean methods...i
    think. I don't want to have a to create a new bean to do this.Also
    for CONTAINER MANAGED TRANSACTIONS...how does that work? Is it
    automatic?
    Any help would be appreciated,
    Thanks!
    Tim :-)

  • Free EJB Quick reference guide handbook?

    I needing one, I dont have money to buy a book and the mastering ejb2
    ebook dont allow printing(I tried to crack
    and uncrypt but the software is trial and only uncrack 68 pages, and the quick reference
    start at 620!)
    Any idea where I can get it?
    I want one with general information, syntax, diagrams so I
    dont need to keep opening a browser.
    Googling didnt help too much

    The EJB spec is that best book there is on EJBs. Slow reading, but worth it. (One of the few books worth printing - 4 pages per sheet double sided).
    Figure out xdoclet while you're at it, saves lots of grief or get yourself a decent IDE with a J2EE plugin and let it do the work - don't be lazy though, work out what's going on.

  • Why use helper classes?

    I am confused about the purpose of helper classes when using EJB's. Is the idea simply to make the code more maintainable? To separate data access code from the business logic? To aid the reuse of code? Why should I choose to use a helper class rather than creating a new EJB to do the job?
    I have been unable to find any comprehensive articles, and am a bit confused!
    Thanks in advance.

    - split out code into distinct functional models
    - split out code that can be reused effectively elsewhere
    - wrap objects that need to be passed to other modules as a whole
    - performance (EJBs are slow compared to standard beans)
    - keep code shorter (per file/method) so it's easier to read and maintain
    etc. etc.

  • How to create a jar, deploy and run it

    I extract the example bmp-simple.ear into class file and xml files.
    I create jar by the command
    jar cvf bmp-simpleEjb.jar META-INF samples
    (The java program are in package samples.ejb.bmp.simple.ejb; ) Suitable xml are stored in directory META-INF.
    Finally I jar all the jars into a bmp-simple.ear file, I can deploy it by admin console in j2ee 1.4, but when I run it, the following errors are shown
    I:\jdk14b\domains\domain1\applications\j2ee-apps\bmp-simple>appclient -client bm
    p-simpleClient.jar -name StorageBinClient -textauth
    Mar 23, 2004 4:19:52 PM com.sun.enterprise.appclient.Main <init>
    WARNING: ACC003: Application threw an exception.
    java.lang.ClassNotFoundException:
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at com.sun.enterprise.appclient.Main.<init>(Main.java:365)
    at com.sun.enterprise.appclient.Main.main(Main.java:105)
    If I create ear file from sun 's jar file, I can run it.
    If I create ear file from class and xml, I cannot run it
    The server I am using: J2EE(TM) Application Server 1.4 Developer Release (build b44-dr)
    Thanks for any help! (I repost and rewrite this question)

    please see the response to your question yesterday.

  • Unknown tag name: [session] in XML node: [toplink-configuration].

    I get this exception at runtime, running TOPLink as persistence manager for my BMP WL7 beans. My sessions.xml validates according to the sessions_4_5.dtd file supplied with TOPLink, but yet I get this excpetion. Below is my complete sessions.xml, as well as teh header of the exception stack
    Sessions.xml
    <?xml version="1.0" encoding="US-ASCII"?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink for JAVA 4.5//EN" "sessions_4_5.dtd">
    <toplink-configuration>
         <session>
              <name>entitySession</name>
              <project-class>za.co.discovery.legalentity.persistence.TOPLinkProject</project-class>
              <session-type>
                   <server-session/>
              </session-type>
              <login>
                   <uses-external-connection-pool>true</uses-external-connection-pool>
                   <uses-external-transaction-controller>true</uses-external-transaction-controller>
              </login>
              <external-transaction-controller-class>oracle.toplink.jts.wls.WebLogicJTSExternalTransactionController</external-transaction-controller-class>
              <enable-logging>true</enable-logging>
              <logging-options>
                   <log-debug>false</log-debug>
                   <log-exceptions>true</log-exceptions>
                   <log-exception-stacktrace>true</log-exception-stacktrace>
                   <print-thread>false</print-thread>
                   <print-session>true</print-session>
                   <print-connection>true</print-connection>
                   <print-date>false</print-date>
              </logging-options>
         </session>
    </toplink-configuration>
    and the stack trace:
    1) testAll(za.co.discovery.legalentity.ejb.test.ClassVersionTest)java.rmi.RemoteException: Exception in ejbFindByPrimaryKey; nested exception is:
         EXCEPTION [TOPLINK-7094] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: LOCAL EXCEPTION STACK:
    EXCEPTION DESCRIPTION: Several [2] SessionLoaderExceptions were thrown:
    EXCEPTION [TOPLINK-9002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unable to load Project class [za.co.discovery.legalentity.persistence.TOPLinkProject].
    INTERNAL EXCEPTION: java.lang.ExceptionInInitializerError
    EXCEPTION [TOPLINK-9001] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unknown tag name: [session] in XML node: [toplink-configuration].
    INTERNAL EXCEPTION: java.lang.reflect.InvocationTargetException
    TARGET INVOCATION EXCEPTION: java.lang.NullPointerException
         at oracle.toplink.exceptions.SessionLoaderException.finalException(Unknown Source)
         at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getDescriptor(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getWrapperPolicy(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.findByPrimaryKey(Unknown Source)
         at oracle.toplink.ejb.bmp.BMPEntityBase.findByPrimaryKey(Unknown Source)
         at za.co.discovery.legalentity.ejb.LegalEntityEJB.ejbFindByPrimaryKey(LegalEntityEJB.java:67)
    all help appreciated!
    thanks
    Alwyn ([email protected])

    Hi Alwyn
    I've seen this exact problem before when the sessions.xml file has been parsed by a different version of xerces from the one provided in TopLink. Is this a possibility?
    JIM

Maybe you are looking for

  • Re: Finder and many more won't open?

    Hey, So about a month ago, I had a problem with my MB Pro (mid-2009) where it wouldn't boot. Took it up to the apple store and they wiped it and re-installed Lion. A few weeks later and I tried to uninstall the Messages beta and was prompted to resta

  • N8 User - Launch OVI maps, the phones restart

    Dear All, Everytome i open OVI maps the phone restart, just got it about 2 weeks now Please help any one. Or NOKIA can answer

  • Being Bombarded By Spam Bot in My Messages Inbox

    For the past several weeks, I've been bombarded by some spambot that sends me their playlist. It's always the same playlist ("New Playlist 5"), but it's a different user every time.  The usernames are always a string of pseudo-random characters (e.g.

  • FireWire HD(10.4.7) starts G5 2.5DP tower but won't boot iMac G5.Any ideas?

    I use my bootable FW HD (Oxford 911 chips) with 10.4.7 installed to troubleshoot other Macs. It readily boots the G5 tower; however, when trying to boot an iMac G5 1.8Ghz, after trying for a few minutes I get a gray circle with a line through it. Any

  • I'm getting forum emails even though I am not subscribed

    I susbscribe to messages that I post or that I have responded to, but suddenly, I'me getting every message that's posted to the Illustrator forum. Make it stop!