Sorting in EJB

At my wits end.
Currently I'm using CMP EJB-QL 2.0. I got a lot of problem sorting the return collection. whenever i insert this code into my Stateful ejb to perform the sorting, it always prompt error.
Collections.sort(productList, new Comparator() {
public int compare(Object o1, Object o2) {
ProductDetail product1 = (ProductDetail)o1;
ProductDetail product2 = (ProductDetail)o2;
return product1.getBrand().compareTo(product2.getBrand());
Error message:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: productController/ProductControllerBean$1
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.jav
a:350) at javax.rmi.CORBA.Util.wrapException(Util.java:277) at productController._ProductController_Stub.getAllProductsByBrand(Unkno
wn Source)
I tried to do basic sorting in the stateful session bean that extract data from the entity bean. ProductDetail is a helper class that implement io.java.io.Serializable. so is this possible the reason why i can't do the sorting?

the productList contain object of PollDetails. I insert collection return from entity bean to the pollList consist of pollDetails object.
My situation is like this
Stateful session bean access the entity bean. Entity bean return collection to session bean and session bean tries to sort the collection return by it. However, whenever i insert the comparator code into the session bean, it always prompt error... Any answer for that???
Comparator cmp = new Comparator() {
public int compare(Object o1, Object o2) {
String s1 = ((PollDetails)o1).getQuestion().toUpperCase();
String s2 = ((PollDetails)o1).getQuestion().toUpperCase();
return s1.compareTo(s2);
it always say unknown source.. but if i do all this in local environment it work perfectly...also if i remove this Collections.sort(productList, cmp).. the program work okay... So problem lies with session bean cannot manipulate collection??

Similar Messages

  • No repeated values and in ascendant sort

    Hi all,
    I'm trying to put this:
    SELECT DISTINCT month FROM Concert ORDER BY month ASC;
    (no repeated values and in ascendant sort) into EJB-QL. This is what I've worked out:
    SELECT DISTINCT OBJECT(o)
    FROM Concert AS o
    ORDER BY o.month ASC
    (month is a field in the bean )
    But this (and several tries later) doesn't work.
    What's wrong with it??
    The query is for a findAll method -without- input parameters which returns a collection, is here the error??? If so, how can I solve it?
    I'm totally lost and frustrated, I'd really appreciate some light
    Thanks a lot in advance

    Your query is currect if table name and attribute name are currect.
    Can you write what type of error is comming?

  • EJB New User Create Race Condition

    If I have an EJB that creates a new user account that does the following in the method:
    if username already exists then
    send error message to user
    else
    proceed with new user creation
    end if
    How do I prevent the following race condition:
    User1 EJB: user name does not exist
    User2 EJB: user name does not exist
    User1 EJB: create new user
    User2 EJB: create new user
    Thanks,
    Kurzweil4

    unfortunately, you don't. however, assuming you have a unique constraint in the database, you can do this, but it's tricky because you might not get the failure until the transaction is committed. i personally would handle this by having the "main" (remote) method call untransacted. make this method call a second local ejb with a transaction context of create-new. do the actual work within this second method call. when this second method returns, either the call succeeded, or you will get some sort of ejb transaction rollback exception. you can then handle this exception in the outer method call.

  • Jserver and EJB Scalability

    Hi all,
    I was wondering what other peoples expereinces with the scalability of EJBs and Jserver are. We are currently in development of a system that uses this technology, but have found that even the jndi lookup is slow.
    Also we seem to be able to open only 8-10 iiop connections to the db(this is possibly a large_pool issue).
    Lastly we are thinking about throwing BC4J(JBO) from Jdev3.1 into the mix and running them as EJBs but this is even slower.
    I would appreciate any ones comments about these issues and fixes.
    Thanks
    Mark

    Hi Mark. This is in answer to your email.
    The large_pool setting is interesting. It depends on your bean size. I have a bean that takes up around 75K per session. So, depending on the number of sessions, I need to increase the large pool to be a multiple of 75K and the number of expected connections. Remember that the large_pool is only a portion of your shared_pool. This means that your large pool cannot be larger than your shared_pool. Also note, that the
    large_pool defaults to 600K and that the java_pool is added to the overall total size of the SGA.
    Do you know why we need the large pool? It is because the EJB service uses Multi threaded Server(MTS). The large pool stores all session information. Normally this is placed outside of the SGA in the PGA, however, once we use MTS, all that goes into the large_pool, and thus the need to size it properly.
    Ahh, the number of connections is limited to the available free memory. Right now, I have sized my large pool to be around 2MB and that will allow for around 30 IIOP connections given my bean characteristics. So, you may find that you will have to add more memory if you are dealing with lots of connections. How many are you expecting?
    Lastly, how an IIOP connection is made is interesting. If you use the standard lookup, it will create one connection per client application or calling application routine. IE. Using sess_sh will create one connection
    per incarnation of this program. If you are using a threaded java application, using the standard lookup will result in one connection being used by all the threads. This may or may not be desirable. You would have to
    open up named sessions for each thread. You can see an example of this in the JavaBeans and Corba developers guide, page 4-33 under the section Starting a Named Session from a client.
    Starting multiple sessions is great sometimes. Oracle MTS will only allow so many sessions to be active. If you look at v$session and take not to the server column listed, you will see when that session is actually active. So, those connections are actually logical, as there are only so many MTS Servers that will do the actuall work. If you are severly hampered by memory issues, you may wish to create some sort of EJB
    session name pool, however, this could get complex due to load balancing issues etc. I would recommend having Oracle's MTS take care of your connections for you, however this means more shared_pool/large_pool requirements.
    Note on the JNDI Lookup. Yes, this is slow. So, I just perform the lookup once per session I am interested in creating, and always keep the reference to that object cached. So, yes it is slow using it the first time, after that, you get better performance. I would expect Oracle to come up with better performance as the product matures.
    Good luck!
    Brad
    null

  • Problems processing a large batch of data within a Weblogic 5.1 cluster

    I have about exhausted my sources of information on this, so I ask the
              experts:
              The project I am involved with is attempting to build a scheduled
              process on a 5.1 cluster which will retrieve hundreds to thousands of
              database rows from a small group of Oracle tables and then submit them
              into a legacy system for processing. The problems we face are:
              1. We cannot have duplicate data submitted from startup classes on
              different servers in the cluster
              2. We need the process to run if even only one machine in the cluster is
              available and therefore do not want to tie the process to a single
              machine
              3. We would prefer to distribute the workload across all servers
              currently available in the cluster, but this is not mandatory.
              One solution is to retrieve each record as an Entity bean, attempting to
              update it to "in process" and rejecting any failures thus utilizing
              database locking, but due to the large number of records being processed
              this is much too resource intensive as well as time consuming.
              We have looked into JMS based solutions, but it appears that JMS under
              5.1 is tied to a specific server (failing case 2).
              One acceptable approach that we have yet to find a way of implementing
              is to have a "singleton" session bean, only one of which exists on the
              cluster (though it may exist anywhere on the cluster). I have run
              across a number of other applications for just this sort of EJB, but is
              it possible to implement?
              Sadly, Weblogic 6.0 cannot be part of the solution as our company will
              not be adopting it until well after this project's delivery date.
              Are we missing something obvious?
              Many thanks!
              -Steve
              

    You have to have all the servers in the cluster polling for work out of the
              database. Use the database as a scheduling / routing mechanism. Use timers
              on each server in the cluster to kick off a "find me one thing to do"
              process every n minutes or seconds.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Steven Wicklund" <[email protected]> wrote in message
              news:[email protected]...
              > I have about exhausted my sources of information on this, so I ask the
              > experts:
              > The project I am involved with is attempting to build a scheduled
              > process on a 5.1 cluster which will retrieve hundreds to thousands of
              > database rows from a small group of Oracle tables and then submit them
              > into a legacy system for processing. The problems we face are:
              > 1. We cannot have duplicate data submitted from startup classes on
              > different servers in the cluster
              > 2. We need the process to run if even only one machine in the cluster is
              > available and therefore do not want to tie the process to a single
              > machine
              > 3. We would prefer to distribute the workload across all servers
              > currently available in the cluster, but this is not mandatory.
              >
              > One solution is to retrieve each record as an Entity bean, attempting to
              > update it to "in process" and rejecting any failures thus utilizing
              > database locking, but due to the large number of records being processed
              > this is much too resource intensive as well as time consuming.
              >
              > We have looked into JMS based solutions, but it appears that JMS under
              > 5.1 is tied to a specific server (failing case 2).
              >
              > One acceptable approach that we have yet to find a way of implementing
              > is to have a "singleton" session bean, only one of which exists on the
              > cluster (though it may exist anywhere on the cluster). I have run
              > across a number of other applications for just this sort of EJB, but is
              > it possible to implement?
              >
              > Sadly, Weblogic 6.0 cannot be part of the solution as our company will
              > not be adopting it until well after this project's delivery date.
              >
              > Are we missing something obvious?
              > Many thanks!
              > -Steve
              >
              

  • Architecture J2EE

    Hi,
    Im building a simple application and are planning on doing soo in J2EE (Im a complete newbie on the topic). Therefore Im doing some self-study. The application Im trying to build is the foolowing:
    1. There are 2 objects, user and result. Where the User can have many results.
    2. Through a JSP page the user can change their settings.
    3. An application will run ones a day and search a database depening on the user settings and find result wich will be stored along with the user.
    This is how Im building it:
    1. Using eclipse J2EE plugin. Creating a Enterprise application containing web module (jsp), ejb module (using xdoclet to build ejb).
    2. Exporting ear and deploying it on Jboss
    3. MySQL with hibernate to store data
    Now to my questions:
    1. How should I use EJBs in concern of user-login and persist objects? What sort of EJB should be used when? Does anyone know of any good tutorials?
    I have currently created one EJB (Stateless session bean), TestBean, which Im having trouble calling:
    String s = "none";
    try
    TestLocalHome testLocalHome = (TestLocalHome)new InitialContext().lookup("Test");
    TestLocal testBean = testLocalHome. create();
    s = testBean.sum(10,10);
    catch (Exception e)
    s=e.toString();
    The result on jboss is a list of the files and directories in my web-app ("Test" is the JNDI name in jboss.xml).
    2. How can I build my app that will scan a database ones a day and make it run within JBoss? Does anyone know how the "client application module" in eclipse is used?
    Any input is greatly appreciated!
    Kind regards

    You may want to look at Java EE 5/j2ee 1.4 samples which illustrate many types of ejbs and other resources.
    http://java.sun.com/javaee/reference/code/
    - sreeni

  • What's to stop people from connecting to my database?

    I have an applet that connects to a database and I was just thinking, people could just download the .jar that's in the html source unjar and decompile it. I know I've done it a few times to see how programs work, but my program works with games and compitition, it's something that people are going to try to cheat if they can and it has personal info of other users that they wouldn't want other people to know. With the ip, port and password to connect to my database all in the source code, what can I do to stop people from viewing all the data in database, or sending false data into the database from their own java program?

    With the ip, port and password to connect to my database
    all in the source code, what can I do to stop people
    from viewing all the data in database, or sending
    false data into the database from their own java
    program?Not a Java-specific topic, but certainly a concern.
    One traditional approach to controlling access is to use multiple users, with database views to isolate the base tables, and grants to prevent updates. For example, if you have a USER_DATA table, you can create a LOGIN_DATA view that only contains the USER_ID column. Grant SELECT on this view to a specific user, and don't grant UPDATE/INSERT/DELETE to that user.
    The problem with this approach is that your security code becomes byzantine. Which will probably make you look nto stored procedures for actual updates (or even such retrievals as a password check). This is also a good, traditional way to go, but now your application logic is split into two pieces: some of it lives in the applet, and some lives in the database.
    Which will probably lead you to some sort of EJB approach, isolating your database from the end user.

  • Problem in ADF Table Sorting Accessor Fields Generated from EJB 3

    Here are the things that I have done:
    1) created EJB entities for Employee and Department based on the HR schema
    2) created an HRFacade session bean
    3) generated DataControl
    4) created a browse page
    5) created an adf read only table with the following fields: employeeId, lastname, and departmentName with row selection, filtering and sorting enaabled.
    when I invoke sorting for the employeeId and lastname fields, the table sorts fine, but...
    when I invoke sorting on the departmentName field (an accessor field), the following error occured:
    WARNING: ADF: Adding the following JSF error message: Definition departmentName of type Attribute is not found in employeesFindAll.
    oracle.jbo.NoDefException: JBO-25058: Definition departmentName of type Attribute is not found in employeesFindAll.
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.findAttributeDef(JUCtrlValueBinding.java:589)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.findAttributeDef(JUCtrlValueBinding.java:559)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding.__setSortCriteria(FacesCtrlRangeBinding.java:247)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setSortCriteria(FacesCtrlHierBinding.java:346)
         at org.apache.myfaces.trinidad.component.UIXCollection.setSortCriteria(UIXCollection.java:464)
         at org.apache.myfaces.trinidad.component.UIXTable.setSortCriteria(UIXTable.java:196)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:260)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:147)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:787)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:280)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Is this a bug or a not supported feature?
    We been stack on this... Help!!!

    I have a similar problem but related to the creation of Project Gantt Chart.
    oracle.jbo.NoDefException: JBO-25058: No se ha encontrado la definiciĆ³n XXXView2 del tipo Atributo en YYYView1.
    this is happened when i try to create a Project Gantt Chart whit 2 view objects that have a parent-child relationship where XXXView2 (SUBTASKS) is the child and YYYView1 (TASK) is the parent.
    still not find the solution.
    This is the bug?

  • How to sort collections with EJB 2.0?

    As you know there is no ORDER BY statement in EJB QL; so I receive unsorted collection of objects from finder-methods. The process of Collections.sort() is very slow... Any ideas how to make a quick sort?

    Order by is a EJBQL 2.1 feature. It can be found in coming release of s1AS8.
    In JDK 1.4, merge sort is used in Collections.sort. It has a O(nlogn) algorithm. While quick sort only has an average O(nlogn) algorithm. If you are using custom Comparator, then you may to check about its implementation.

  • Ejb 3.0 on OC4J preview 4 CMR is this a BUG

    Exception [TOPLINK-48] (Oracle TopLink - 10g release 3 (10.1.3.0.0) (Build 05091
    2)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field [ENVINCIDE
    NTS.INCIDENTS_ID]. Only one may be defined as writable, all others must be spec
    ified read-only.
    Mapping: oracle.toplink.mappings.OneToOneMapping[incidents]
    Descriptor: RelationalDescriptor(model.Envincidents --> [DatabaseTable(ENVINCIDE
    NTS)])
    as I understand the CMR uses toplink somewhere under the hood.
    from the docs I got this...
    @OneToMany(cascade=PERSIST)
    @JoinColumn(name="MANAGER_ID", referencedColumnName="EMP_ID")
    public Collection getManagedEmployees() {
    return managedEmployees;
    TopLink defaults and equivalent code
    OneToManyMapping mapping = new OneToManyMapping();
    mapping.setIsReadOnly(false);
    mapping.setIsPrivateOwned(false);
    mapping.setAttributeName(attributeName);
    mapping.setReferenceClass(referenceClass);
    in Toplink mapping there is setIsReadOnly() but how do
    I specify this in ejb 3.0 annotations. I get the above error
    whenever I use any sort of relationship in my ejbs and have the
    same column defined as primary key in the table.

    Take a look at this forum Re: CMR in ejb 3.0
    You basically need to make one of your mappings as read-only and I would recommend doing it with your basic mapping as it is easier to maintain with the set of the @ManyToOne relationship.
    Doug

  • Deploy multiple instances of the same stateless session EJB

    I have a stateless session bean.
    The methods on the bean operate against DB tables.
    Q: Can I deploy multiple instances of the same stateless session bean, but specify a different JNDI/datasource name in the deployment descriptor?
    The method calls are all enclosed within a single invocation, just that I need to hit different databases (all with the same schema), and Id like to be able to lookup the EJB via a different JNDI name, and have the exact same functionality, just against different deployed datasources.
    Does the spec allow/support this?
    If not, any suggestions as to how to achieve this sort of functionality?
    Im using JBoss 3.2.1 on Solaris, so Im not sure whether or not this is a JBoss "issue" or a limitation of the EJB Spec (or me being just plain wrong and trying to do something the "wrong way")
    Nick

    I have a stateless session bean.
    The methods on the bean operate against DB tables.
    Q: Can I deploy multiple instances of the same
    stateless session bean, but specify a different
    JNDI/datasource name in the deployment descriptor?
    The method calls are all enclosed within a single
    invocation, just that I need to hit different
    databases (all with the same schema), and Id like to
    be able to lookup the EJB via a different JNDI name,
    and have the exact same functionality, just against
    different deployed datasources.
    Does the spec allow/support this?
    If not, any suggestions as to how to achieve this sort
    of functionality?
    Im using JBoss 3.2.1 on Solaris, so Im not sure
    whether or not this is a JBoss "issue" or a limitation
    of the EJB Spec (or me being just plain wrong and
    trying to do something the "wrong way")
    NickI haven't done it but judging from the deployment descriptors yes.
    For example if I have two bounded datasources java:/Database1 and java:/Database2
    Lets say I have a session bean called MySession, then in your ejb-jar.xml you would have (notice that the desc, display, and ejb-name are the only differences)
    <session>
    <description>MySessionAlpha</description>
    <display-name>MySessionAlpha</display-name>
    <ejb-name>MySessionAlpha</ejb-name>
    <home>com.mycorp.MySessionRemoteHome</home>
    <remote>com.mycorp.MySessionRemote</remote>
    <local-home>com.mycorp.MySessionLocalHome</local-home>
    <local>com.mycorp.MySessionLocal</local>
    <ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    <session>
    <description>MySessionBeta</description>
    <display-name>MySessionBeta</display-name>
    <ejb-name>MySessionBeta</ejb-name>
    <home>com.mycorp.MySessionRemoteHome</home>
    <remote>com.mycorp.MySessionRemote</remote>
    <local-home>com.mycorp.MySessionLocalHome</local-home>
    <local>com.mycorp.MySessionLocal</local>
    <ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    But now in the jboss.xml, we will have the following elements. What you may notice is that are bound to different remote and local jndi names. But the resource bindings are very different. The res-ref-name stays the same, but the jndi-name are different. I think this will work for you.
    <session>
    <ejb-name>MySessionAlpha</ejb-name> <jndi-name>ejb/com/mycorp/MySessionAlphaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionAlphaLocalHome</local-jndi-name>
    <resource-ref>
    <res-ref-name>jdbc/datasource</res-ref-name>
    <jndi-name>java:/Database1</jndi-name>
    </resource-ref>
    </session>
    <session>
    <ejb-name>MySessionBeta</ejb-name> <jndi-name>ejb/com/mycorp/MySessionBetaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionBetaLocalHome</local-jndi-name>
    <resource-ref>
    <res-ref-name>jdbc/datasource</res-ref-name>
    <jndi-name>java:/Database2</jndi-name>
    </resource-ref>
    </session>

  • Can two EARs contain the same ejb-name?

    Is it possible to have the same entity bean ejb-name in different EARs, referenced
    by different JNDI names?
    a.ear
    JNDI = ejb.a.MyBean
    ejb-name = MyBean
    b.ear
    JNDI = ejb.b.MyBean
    ejb-name = MyBean
    I get
    Unable to bind EJB Home Interface to the JNDI name: foo.MyBean. The error was:
    javax.naming.NameAlreadyBoundException: MyBean is already bound; remaining name
    'ejb.b'
    I'm using local entity beans and it seems they should be local to the EAR. I'm
    using 7.0.
    thanks,
    jeff

    Hi Jeff,
    Local beans are local to JVM not an application/module. If you need to refer them
    by different names for some reason use EJB references (a#mybean sort).
    S
    "Jeff White" <[email protected]> wrote:
    >
    Is it possible to have the same entity bean ejb-name in different EARs,
    referenced
    by different JNDI names?
    a.ear
    JNDI = ejb.a.MyBean
    ejb-name = MyBean
    b.ear
    JNDI = ejb.b.MyBean
    ejb-name = MyBean
    I get
    Unable to bind EJB Home Interface to the JNDI name: foo.MyBean. The
    error was:
    javax.naming.NameAlreadyBoundException: MyBean is already bound; remaining
    name
    'ejb.b'
    I'm using local entity beans and it seems they should be local to the
    EAR. I'm
    using 7.0.
    thanks,
    jeff

  • [BUG?] af:table table empty after descending sort and remove

    Hi,
    I think i found a bug.
    I have an af:table binded to an arraylist in a backingbean. This List consist of an object that represents two strings (value 1 and 2).
    Now when the table is loaded and I sort descending on one of the columns. After sorting i'll try to remove a row. The correct row is published to the bean with an af:setPropertyListener and removed from the arraylist. But when the table is rendered again there are no values in the table. But the arraylist still has all remaining values which will be shown after a sort again.
    Fun fact: it only happens when sorting descending.
    Anyone got an idea?
    The code:
    jspx:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:panelStretchLayout topHeight="50px" id="psl1">
              <f:facet name="top">
                <af:panelHeader text="Table with Data Values" id="ph1">
                  <f:facet name="context"/>
                  <f:facet name="menuBar"/>
                  <f:facet name="toolbar"/>
                  <f:facet name="legend"/>
                  <f:facet name="info"/>
                </af:panelHeader>
              </f:facet>
              <f:facet name="center">
                <af:panelCollection id="pc1">
                  <f:facet name="menus"/>
                  <f:facet name="toolbar"/>
                  <f:facet name="statusbar"/>
                  <af:table value="#{dataHandler.dataList}" var="row"
                            binding="#{dataHandler.rt}"
                            rowBandingInterval="0" id="t1">
                    <af:column sortable="true"  headerText="Value1" align="start"
                               id="c1" sortProperty="value1">
                      <af:inputText value="#{row.value1}" id="it1"/>
                    </af:column>
                    <af:column sortable="true" headerText="Value2" align="start"
                               id="c2" sortProperty="value2">
                      <af:inputText value="#{row.value2}" id="it2"/>
                    </af:column>
                    <af:column sortable="false" headerText="Actions"
                               id="c3" >
                      <af:commandLink id="verwijderRij" text="Verwijder" >
                          <af:setPropertyListener from="#{row}" to="#{dataHandler.verwijderRij}" type="action"/>
                          </af:commandLink>
                    </af:column>
                  </af:table>
                </af:panelCollection>
                <!-- id="af_one_column_header_stretched"  -->
              </f:facet>
            </af:panelStretchLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>the backing beans:
    package nl.ibr.view;
    public class MyDataObject {
      private String value1;
      private String value2;
        public MyDataObject(String value1, String value2) {
            super();
            this.value1 = value1;
            this.value2 = value2;
        public void setValue1(String value1) {
            this.value1 = value1;
        public String getValue1() {
            return value1;
        public void setValue2(String value2) {
            this.value2 = value2;
        public String getValue2() {
            return value2;
    package nl.ibr.view;
    import java.util.ArrayList;
    import java.util.List;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    public class DataHandler {
        private List<MyDataObject> dataList = new ArrayList<MyDataObject>();
        private RichTable rt;
        public DataHandler() {
          dataList.add(new MyDataObject("1","2"));
          dataList.add(new MyDataObject("3","7"));
          dataList.add(new MyDataObject("4","8"));
          dataList.add(new MyDataObject("5","9"));
        public void setDataList(List<MyDataObject> dataList) {
            this.dataList = dataList;
        public List<MyDataObject> getDataList() {
            return dataList;
        public void setVerwijderRij(Object row) {
          System.out.println("Listsize before delete: " + dataList.size());
          System.out.println("Delete row"  + row);
          dataList.remove(row);
          System.out.println("Listsize after delete: " + dataList.size());
          rt.setValue(dataList);
          System.out.println("Done delete method");
        public void setRt(RichTable rt) {
            this.rt = rt;
        public RichTable getRt() {
            return rt;
    }Jdev version information:
    About
    Oracle JDeveloper 11g Release 1 11.1.1.4.0
    Studio Edition Version 11.1.1.4.0
    Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
    Copyright © 1997, 2011 Oracle and/or its affiliates. All rights reserved.
    IDE Version: 11.1.1.4.37.59.23
    Product ID: oracle.jdeveloper
    Product Version: 11.1.1.4.37.59.23
    Version
    Component     Version
    =========     =======
    ADF Business Components     11.1.1.59.23
    Java(TM) Platform     1.6.0_21
    Oracle IDE     11.1.1.4.37.59.23
    SOA Composite Editor     11.1.1.4.0.56.82
    Versioning Support     11.1.1.4.37.59.23
    Properties
    Name     Value
    ====     =====
    awt.toolkit     sun.awt.windows.WToolkit
    ceditor.java.parse.large     1500
    ceditor.java.parse.small     300
    class.load.environment     oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level     CONFIG
    class.transfer     delegate
    compiler.vmargs     -Xmx512m
    EDITOR_J2SE_VERSION     1.5
    feedbackmanager.disable     false
    file.encoding     Cp1252
    file.encoding.pkg     sun.io
    file.separator     \
    http.agent     Mozilla/5.0 (Java 1.6.0_21; Windows XP 5.1 x86; en_US) ICEbrowser/v6_1_3
    http.nonProxyHosts     62.58.52.167|*.local|10.100.6.*|*.randstadrmdnext.nl|*.randstadrentreenext.nl|*.rsg|localhost|localhost.localdomain|127.0.0.1|::1|dp-60520.noa.nl.rsg|dp-60520
    http.proxyHost     proxy.noa.nl.rsg
    http.proxyPort     8080
    https.nonProxyHosts     62.58.52.167|*.local|10.100.6.*|*.randstadrmdnext.nl|*.randstadrentreenext.nl|*.rsg|localhost|localhost.localdomain|127.0.0.1|::1|dp-60520.noa.nl.rsg|dp-60520
    https.proxyHost     proxy.noa.nl.rsg
    https.proxyPort     8080
    ice.browser.forcegc     false
    ice.pilots.html4.ignoreNonGenericFonts     true
    ice.pilots.html4.tileOptThreshold     0
    ide.bootstrap.start     2915472833421
    ide.build     JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
    ide.conf     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\jdev\bin\jdev.conf
    ide.config_pathname     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\jdev\bin\jdev.conf
    ide.debugbuild     false
    ide.devbuild     false
    ide.editions     oracle.studio, oracle.j2ee, oracle.jdeveloper
    ide.extension.role.search.path     jdev/roles
    ide.extension.search.path     jdev/extensions:sqldeveloper/extensions
    ide.feedbackmanager.customer     false
    ide.firstrun     false
    ide.java.maxversion     1.7
    ide.java.minversion     1.6.0_04
    ide.launcherProcessId     1596
    ide.main.class     oracle.ide.boot.IdeLauncher
    ide.max.jar.handles     500
    ide.old.user.country     NL
    ide.old.user.language     nl
    ide.patches.dir     jdev/lib/patches
    ide.pref.dir     C:\Documents and Settings\ho01023\Application Data\JDeveloper
    ide.pref.dir.base     C:\Documents and Settings\ho01023\Application Data
    ide.product     oracle.jdeveloper
    ide.shell.enableFileTypeAssociation     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\jdeveloper.exe
    ide.splash.screen     splash.gif
    ide.startingArg0     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\jdeveloper.exe
    ide.startingcwd     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper
    ide.throttleLocale     true
    ide.user.dir     C:\Documents and Settings\ho01023\Application Data\JDeveloper
    ide.user.dir.var     JDEV_USER_HOME,JDEV_USER_DIR
    ide.work.dir     \\\JDeveloper
    ide.work.dir.base     \\CP-1000VS03\HOME104\HO01023
    ilog.propagatesPropertyEditors     false
    inJUIDesigntime     true
    insight.suppresshidden     true
    INSIGHT_OMIT_HIDDEN     true
    java.awt.graphicsenv     sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob     sun.awt.windows.WPrinterJob
    java.class.path     ..\..\ide\lib\ide-boot.jar
    java.class.version     50.0
    java.endorsed.dirs     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\endorsed
    java.ext.dirs     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
    java.home     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre
    java.io.tmpdir     C:\DOCUME~1\ho01023\LOCALS~1\Temp\
    java.library.path     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Apps\Oracle\Middleware_11_1_1_1_0\jdk160_11\bin;D:\Apps\apache-maven-2.0.9\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Windows Imaging\;C:\Program Files\jZip;D:\Apps\TortoiseSVN\bin;D:\Apps\SlikSvn\bin\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Tealeaf;
    java.naming.factory.initial     oracle.javatools.jndi.LocalInitialContextFactory
    java.naming.factory.url.pkgs     weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
    java.protocol.handler.pkgs     oracle.fabric.common.uddiurl.handler|oracle.jdevimpl.handler|weblogic.net
    java.runtime.name     Java(TM) SE Runtime Environment
    java.runtime.version     1.6.0_21-b51
    java.specification.name     Java Platform API Specification
    java.specification.vendor     Sun Microsystems Inc.
    java.specification.version     1.6
    java.vendor     Sun Microsystems Inc.
    java.vendor.url     http://java.sun.com/
    java.vendor.url.bug     http://java.sun.com/cgi-bin/bugreport.cgi
    java.version     1.6.0_21
    java.vm.info     mixed mode
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.specification.name     Java Virtual Machine Specification
    java.vm.specification.vendor     Sun Microsystems Inc.
    java.vm.specification.version     1.0
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     17.0-b17
    javax.rmi.CORBA.PortableRemoteObjectClass     weblogic.iiop.PortableRemoteObjectDelegateImpl
    javax.rmi.CORBA.UtilClass     weblogic.iiop.UtilDelegateImpl
    javax.xml.parsers.DocumentBuilderFactory     oracle.xml.jaxp.JXDocumentBuilderFactory
    jbo.debugoutput     silent
    jbo.showdebugwarningbanner     false
    jps.authz     NULL
    line.separator     \r\n
    oracle.adfm.usemds     false
    oracle.home     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\
    oracle.j2ee.extension.status     enabled
    oracle.jbo.usemds     false
    oracle.jdbc.Trace     true
    oracle.jdeveloper.webservice.hidePropertyOverride     false
    oracle.jdeveloper.webservice.showAllOwsmPolicyTypes     false
    oracle.mds.internal.config.override.emptystore     true
    oracle.security.jps.config     /C:/Documents and Settings/ho01023/Application Data/JDeveloper/system11.1.1.4.37.59.23/DefaultDomain/config/fmwconfig/jps-config-jse.xml
    oracle.soap.transport.noHTTPClient     true
    oracle.translated.locales     de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version     9.0.4
    org.omg.CORBA.ORBClass     weblogic.corba.orb.ORB
    org.omg.CORBA.ORBSingletonClass     weblogic.corba.orb.ORB
    os.arch     x86
    os.name     Windows XP
    os.version     5.1
    path.separator     ;
    reserved_filenames     con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sun.arch.data.model     32
    sun.awt.disablegrab     true
    sun.awt.keepWorkingSetOnMinimize     true
    sun.boot.class.path     ../lib/lwawt.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\resources.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\rt.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\sunrsasign.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\jsse.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\jce.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\lib\charsets.jar;D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\classes
    sun.boot.library.path     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdk160_21\jre\bin
    sun.cpu.endian     little
    sun.cpu.isalist     pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
    sun.desktop     windows
    sun.io.unicode.encoding     UnicodeLittle
    sun.java2d.noddraw     true
    sun.jnu.encoding     Cp1252
    sun.management.compiler     HotSpot Client Compiler
    sun.os.patch.level     Service Pack 3
    svnkit.sax.useDefault     true
    user.country     US
    user.dir     D:\Apps\Oracle\Middleware_11_1_1_4_0\jdeveloper\jdev\bin
    user.home     C:\Documents and Settings\ho01023
    user.language     en
    user.name     ho01023
    user.timezone     Europe/Berlin
    user.variant     
    wasp.location     ../../uddi
    weblogic.home     D:\Apps\Oracle\Middleware_11_1_1_4_0\wlserver_10.3\server
    weblogic.security.SSL.ignoreHostnameVerification     true
    weblogic.security.TrustKeyStore     DemoTrust
    windows.shell.font.languages     en
    Extensions
    Name     Identifier     Version     Status
    ====     ==========     =======     ======
    ADF Business Components     oracle.BC4J     11.1.1.4.37.59.23     Loaded
    ADF Business Components Dependency     oracle.bc4j.dependency     11.1.1.4.37.59.23     Loaded
    ADF Business Components Deployment     oracle.bc4jdt.deploy     11.1.1.4.37.59.23     Loaded
    ADF Business Components Modeler     oracle.adfbcdt.modeler     11.1.1.4.37.59.23     Loaded
    ADF Business Components Syscat     oracle.bc4j.syscat     0     Loaded
    ADF Business Components Tester     oracle.bc4j.tester     11.1.1.4.37.59.23     Loaded
    ADF Common Audit     oracle.adf.common.audit     0     Loaded
    ADF Context Debugger     oracle.adf.share.debug     11.1.1.4.37.59.23     Loaded
    ADF Controller Configuration Design Time     oracle.adf.controller.config.dt     11.1.1.4.37.59.23     Loaded
    ADF Data Visualizations Design Time Tests     oracle.dvt.dt     11.1.1.4.37.59.23     Loaded
    ADF Debugger     oracle.adf.debug     11.1.1.4.37.59.23     Loaded
    ADF Debugger Diagram Support     oracle.adf.debug.diagram     11.1.1.4.37.59.23     Loaded
    ADF Desktop Integration Design Time     oracle.adfdt.desktopintegration     11.1.1.4.37.59.23     Loaded
    ADF Faces Cache     oracle.webcache     11.1.1.4.37.59.23     Loaded
    ADF Faces Data Visualization Tools Help     oracle.dvt-faces-doc     11.1.1.0.0     Loaded
    ADF Faces Databinding Design Time     oracle.adf-faces-databinding-dt     11.1.1.4.37.59.23     Loaded
    ADF Faces Design Time     oracle.adf-faces-dt     11.1.1.4.37.59.23     Loaded
    ADF Faces Design Time Migration     oracle.adffacesdt.migration     11.1.1.4.37.59.23     Loaded
    ADF Faces Runtime Help     oracle.adf-faces-rt-doc     11.1.1.0.0     Loaded
    ADF Faces Skin Design Time     oracle.adf-faces-skin-dt     11.1.1.4.37.59.23     Loaded
    ADF JMX Data Control Designtime     oracle.adf.jmxdc     11.1.1.4.37.59.23     Loaded
    ADF Java Server Faces Diagram     oracle.adf.jsf.diagram     11.1.1.4.37.59.23     Loaded
    ADF Library Design Time     oracle.jdeveloper.adflibrary     11.1.1.4.37.59.23     Loaded
    ADF Lifecycle Design Time     oracle.adf.lifecycle.dt     11.1.1.4.37.59.23     Loaded
    ADF Management Pages     oracle.adf.management     11.1.1.4.37.59.23     Loaded
    ADF Menu Model Design-Time     oracle.adfmenudt     11.1.1.4.37.59.23     Loaded
    ADF Page Flow Design Time     oracle.adf.pageflow.dt     11.1.1.4.37.59.23     Loaded
    ADF Page Flow Design Time Extras     oracle.adf.pageflow.dt.extras     11.1.1.4.37.59.23     Loaded
    ADF Page Template DT     oracle.adf-faces-templating-dt     11.1.1.4.37.59.23     Loaded
    ADF Region Design Time     oracle.adf-faces-region-dt     11.1.1.4.37.59.23     Loaded
    ADF Struts Page Flow Modeler     oracle.struts.adf     11.1.1.4.37.59.23     Loaded
    ADF Struts and Model One Databinding     oracle.adf.struts.and.model.one.databinding.dt     11.1.1.4.37.59.23     Loaded
    ADF Swing     oracle.adfdt.swingcore     11.1.1.4.37.59.23     Loaded
    ADF View Debugging Design Time     adf.view.debugging.dt     11.1.1.4.37.59.23     Loaded
    ADFv Common Databinding     oracle.adf-view-databinding-dt     11.1.1.4.37.59.23     Loaded
    Ant     oracle.ant     11.1.1.4.37.59.23     Loaded
    Application Server Manager     oracle.jdeveloper.asnav     11.1.1.4.37.59.23     Loaded
    Application State - Application Navigator     oracle.ideimpl.appstate.appnav     11.1.1.4.37.59.23     Loaded
    Application State - Editors     oracle.ide.appstate.editors     11.1.1.4.37.59.23     Loaded
    Application State Manager     oracle.ide.appstate     11.1.1.4.37.59.23     Loaded
    Archive Compare     oracle.jdeveloper.archive-compare     11.1.1.4.37.59.23     Loaded
    BAM     oracle.bam     11.1.1     Loaded
    BI Beans Graph     oracle.bibeans     11.1.1.4.37.59.23     Loaded
    BM metamodel framework     oracle.bm.meta     11.1.1.4.37.59.23     Loaded
    Bug Reporter     oracle.jdeveloper.bugfiler     11.1.1.4.37.59.23     Loaded
    Business Modelers     oracle.bm     11.1.1.4.37.59.23     Loaded
    Check For Updates     oracle.ide.webupdate     11.1.1.4.37.59.23     Loaded
    Code Editor     oracle.ide.ceditor     11.1.1.4.37.59.23     Loaded
    Command Line Formatting Support     oracle.jdeveloper.ojformat     11.1.1.4.37.59.23     Loaded
    Command Line Make/Rebuild Support     oracle.jdevimpl.oj-compiler     11.1.1.4.37.59.23     Loaded
    Common Controller Design-Time     oracle.controller.dt     11.1.1.4.37.59.23     Loaded
    Common Page Flow Design-Time     oracle.pageflow.dt     11.1.1.4.37.59.23     Loaded
    Component Palette     oracle.ide.palette1     11.1.1.4.37.59.23     Loaded
    Controller to ADF Bindings Bridge     oracle.controller.bindings.dt     11.1.1.4.37.59.23     Loaded
    Database Connection Support     oracle.jdeveloper.db.connection     11.1.1.4.37.59.23     Loaded
    Database Features (JDeveloper)     oracle.jdeveloper.db     11.1.1.4.37.59.23     Loaded
    Database Features (SQLDeveloper in JDeveloper)     oracle.jdeveloper.db.navigator     11.1.1.4.37.59.23     Loaded
    Database Modeler     oracle.dbmodeler     11.1.1.4.37.59.23     Loaded
    Database Modeler Migration     oracle.dbmodeler.migrate     11.1.1.4.37.59.23     Loaded
    Database Object Dependency API Support     oracle.jdeveloper.db.dependency     11.1.1.4.37.59.23     Loaded
    Database Object Explorers     oracle.ide.db.explorer     11.1.1.4.37.59.23     Loaded
    Database Object Transfer Framework     oracle.jdeveloper.db.transfer     11.1.1.4.37.59.23     Loaded
    Database UI     oracle.ide.db     11.1.1.4.37.59.23     Loaded
    Design Time Resource Bundle Variable Resolver     oracle.jdeveloper.resourcebundle.resolver.dt     11.1.1.4.37.59.23     Loaded
    Diagram Framework     oracle.diagram     11.1.1.4.37.59.23     Loaded
    Diagram Framework Toplink extensions     oracle.diagram.toplink     11.1.1.4.37.59.23     Loaded
    Diagram Javadoc Extension     oracle.diagram.javadoc     11.1.1.4.37.59.23     Loaded
    Diagram Thumbnail     oracle.diagram.thumbnail     11.1.1.4.37.59.23     Loaded
    Diagram to XMLEF Bridge     oracle.diagram.xmlef     11.1.1.4.37.59.23     Loaded
    Diff/Merge     oracle.ide.diffmerge     11.1.1.4.37.59.23     Loaded
    EJB     oracle.ejb     11.1.1.4.37.59.23     Loaded
    EJB Modeler     oracle.ejbmodeler     11.1.1.4.37.59.23     Loaded
    Editor Tint     oracle.ide.ceditor-tint     11.1.1.4.37.59.23     Loaded
    Editor Tint (Java)     oracle.jdeveloper.ceditor-tint-java     11.1.1.4.37.59.23     Loaded
    Extended IDE Platform     oracle.javacore     11.1.1.4.37.59.23     Loaded
    Extension Designtime Core     oracle.jdeveloper.extensiondt.core     11.1.1.4.37.59.23     Loaded
    Extension Designtime UI     oracle.jdeveloper.extensiondt.ui     11.1.1.4.37.59.23     Loaded
    External Tools     oracle.ide.externaltools     11.1.1.4.37.59.23     Loaded
    Feedback     oracle.ide.feedback     11.1.1.4.37.59.23     Loaded
    File Support     oracle.ide.files     11.1.1.4.37.59.23     Loaded
    Fusion Application Overview Definition     oracle.ide.appoverview.fusion.definition     11.1.1.4.37.59.23     Loaded
    Fusion Web Application (ADF) Template     oracle.adf.webapp.template     11.1.1.4.37.59.23     Loaded
    Go to File     oracle.ide.gotofile     11.1.1.4.37.59.23     Loaded
    Go to Java Type     oracle.jdeveloper.gotojava     11.1.1.4.37.59.23     Loaded
    HTML     oracle.html     11.1.1.4.37.59.23     Loaded
    Help System     oracle.ide.help     11.1.1.4.37.59.23     Loaded
    History Support     oracle.jdeveloper.history     11.1.1.4.37.59.23     Loaded
    IDE Reports Extension     oracle.ide.report     11.1.1.4.37.59.23     Loaded
    Import/Export Support     oracle.ide.importexport     11.1.1.4.37.59.23     Loaded
    Index Migrator support     oracle.ideimpl.indexing-migrator     11.1.1.4.37.59.23     Loaded
    J2EE     oracle.j2ee     11.1.1.4.37.59.23     Loaded
    J2EE     oracle.j2ee.webapp.ve     11.1.1.4.37.59.23     Loaded
    J2EE     oracle.j2ee.webapp.ve.facelets     11.1.1.4.37.59.23     Loaded
    J2EE CSS     oracle.css     11.1.1.4.37.59.23     Loaded
    J2EE Faces Config     oracle.j2ee.facesconfig     11.1.1.4.37.59.23     Loaded
    J2EE Web App     oracle.j2ee.webapp     11.1.1.4.37.59.23     Loaded
    J2EE-ADRS     oracle.j2ee.adrs     11.1.1.4.37.59.23     Loaded
    J2ee extension help     oracle.j2ee.help     11.1.1.0.0     Loaded
    JDeveloper     oracle.jdeveloper     11.1.1.4.37.59.23     Loaded
    JDeveloper Runner     oracle.jdeveloper.runner     11.1.1.4.37.59.23     Loaded
    JGoodies Forms     oracle.jdeveloper.jgoodies     11.1.1.4.37.59.23     Loaded
    JPublisher     oracle.jdeveloper.db.jpub     11.1.1.4.37.59.23     Loaded
    JSON Language support     oracle.jdeveloper.json     11.1.1.4.37.59.23     Loaded
    JUnit Integration     oracle.jdeveloper.junit     11.1.1.4.37.59.23     Loaded
    JViews Registration Addin     oracle.diagram.registration     11.1.1.4.37.59.23     Loaded
    Java Annotation Inspector     oracle.jdeveloper.annotation.inspector     11.1.1.4.37.59.23     Loaded
    Java Breadcrumbs     oracle.jdeveloper.ceditor-breadcrumbs-java     11.1.1.4.37.59.23     Loaded
    Java Class Modeler     oracle.javamodeler     11.1.1.4.37.59.23     Loaded
    Java Modeler Toplink extensions     oracle.javamodeler.toplink     11.1.1.4.37.59.23     Loaded
    Java Server Faces Page Flow Modeler     oracle.jsfmod     11.1.1.4.37.59.23     Loaded
    Java Structure Compare     oracle.jdeveloper.java-compare     11.1.1.4.37.59.23     Loaded
    Java Type Search     oracle.jdeveloper.searchbar.java     11.1.1.4.37.59.23     Loaded
    Java extension help     oracle.java.help     11.1.1.0.0     Loaded
    JavaBeans, Swing, and AWT     oracle.swingawt     11.1.1.4.37.59.23     Loaded
    JavaScript Language Support     oracle.ide.javascript     11.1.1.4.37.59.23     Loaded
    Jdeveloper UI Editor     oracle.jdeveloper.uieditor     11.1.1.4.37.59.23     Loaded
    Jdeveloper XML Extension     oracle.jdeveloper.xml     11.1.1.4.37.59.23     Loaded
    Legacy Controller Design-Time     oracle.controller.bm.dt     11.1.1.4.37.59.23     Loaded
    Legacy Preferences integration for BM     oracle.modeler.bm.prefs     11.1.1.4.37.59.23     Loaded
    Log Window     oracle.ide.log     11.1.1.4.37.59.23     Loaded
    MDS Extension     oracle.mds     11.1.1.4.37.59.23     Loaded
    MOF Ide Integration     oracle.mof.ide     11.1.1.4.37.59.23     Loaded
    MOF Modeler Integration     oracle.modeler.mof     11.1.1.4.37.59.23     Loaded
    Mac OS X Adapter     oracle.ideimpl.apple     11.1.1.4.37.59.23     Loaded
    Modeler Framework     oracle.modeler     11.1.1.4.37.59.23     Loaded
    Modeler Framework Common Layer     oracle.modeler.common     11.1.1.4.37.59.23     Loaded
    Modelling migration from BM     oracle.modeler.bm.migrate     11.1.1.4.37.59.23     Loaded
    Navigator     oracle.ide.navigator     11.1.1.4.37.59.23     Loaded
    Nightly Indexing support     oracle.ideimpl.indexing-rt     11.1.1.4.37.59.23     Loaded
    OAR/MAR/SAR Deployment Support Extension     oracle.deploy.orapp     11.1.1.4.37.59.23     Loaded
    OWSM Policy Manager Installer     oracle.jdeveloper.webservice.wsmpm.installer     11.1.1.4.37.59.23     Loaded
    Object Gallery     oracle.ide.gallery     11.1.1.4.37.59.23     Loaded
    Object Viewer     oracle.sqldeveloper.oviewer     11.1.1.64.46     Loaded
    Offline Database     oracle.jdeveloper.offlinedb     11.1.1.4.37.59.23     Loaded
    Offline Database Import/Generate     oracle.jdeveloper.offlinedb.transfer     11.1.1.4.37.59.23     Loaded
    Offline Database Reports Extension     oracle.jdeveloper.offlinedb.report     11.1.1.4.37.59.23     Loaded
    Offline Database SXML     oracle.jdeveloper.offlinedb.sxml     11.1.1.4.37.59.23     Loaded
    Offline Database User Properties     oracle.jdeveloper.offlinedb.userprops     11.1.1.4.37.59.23     Loaded
    Offline Database User Properties SXML     oracle.jdeveloper.offlinedb.userprops.sxml     11.1.1.4.37.59.23     Loaded
    Oracle BPEL 1.1 Designer     oracle.bpel.v1.designer     11.1.1.4.0.56.82     Loaded
    Oracle BPEL 1.1 Designer Plugins     oracle.bpel.v1.designer.plugins     11.1.1.4.0.56.82     Loaded
    Oracle BPEL 2.0 Designer     oracle.bpel.v2.designer     11.1.1.4.0.56.82     Loaded
    Oracle BPEL 2.0 Designer Plugins     oracle.bpel.v2.designer.plugins     11.1.1.4.0.56.82     Loaded
    Oracle BPEL Designer Shared Code     oracle.bpel.designer.shared     11.1.1.4.0.56.82     Loaded
    Oracle BPM DVM     oracle.bpm.dvm     11.1.1.4.0.56.82     Loaded
    Oracle BPM XREF     oracle.bpm.xref     11.1.1.4.0.56.82     Loaded
    Oracle Business Rules Designer     oracle.bpm.rules     11.1.1.4.0.56.82     Loaded
    Oracle Database Browser     oracle.sqldeveloper.thirdparty.browsers     11.1.1.64.46     Loaded
    Oracle Enterprise Repository Editor     oracle.jdeveloper.oereditor     11.1.1.4.37.59.23     Loaded
    Oracle Events Designer     oracle.bpm.events     11.1.1.4.0.56.82     Loaded
    Oracle Fabric Plugins     oracle.sca.modeler.plugins     11.1.1.4.0.56.82     Loaded
    Oracle Human Task Designer     oracle.bpm.workflow     11.1.1.4.0.56.82     Loaded
    Oracle IDE     oracle.ide     11.1.1.4.37.59.23     Loaded
    Oracle JDevloper Deployment Core Module     oracle.deploy.core     11.1.1.4.37.59.23     Loaded
    Oracle MDS Design time     oracle.mds.dt     11.1.1.4.37.59.23     Loaded
    Oracle Mobile ADF     oracle.wireless.dt     11.1.1.4.37.59.23     Loaded
    Oracle Page Templates     oracle.adf-page-template-samples     11.1.1.4.37.59.23     Loaded
    Oracle SOA Composite Editor     oracle.sca.modeler     11.1.1.4.0.56.82     Loaded
    Oracle SOA Mediator     oracle.sca.mediator     11.1.1.4.0.56.82     Loaded
    Oracle SQL Developer     oracle.sqldeveloper     11.1.1.64.46     Loaded
    Oracle SQL Developer Reports     oracle.sqldeveloper.report     11.1.1.64.46     Loaded
    Oracle SQL Developer Worksheet     oracle.sqldeveloper.worksheet     11.1.1.64.46     Loaded
    Oracle User Messaging Service Client Extension     oracle.ums.jdev     11.1.1.4.0     Loaded
    Oracle XML Schema Support     oracle.sqldeveloper.xmlschema     11.1.1.64.46     Loaded
    PL/SQL Debugger     oracle.jdeveloper.db.debug.plsql     11.1.1.4.37.59.23     Loaded
    PROBE Debugger     oracle.jdeveloper.db.debug.probe     11.1.1.4.37.59.23     Loaded
    Peek     oracle.ide.peek     11.1.1.4.37.59.23     Loaded
    Persistent Storage     oracle.ide.persistence     11.1.1.4.37.59.23     Loaded
    Profiler     oracle.jdeveloper.profiler     11.1.1.4.37.59.23     Loaded
    Properties File Support     oracle.jdeveloper.props     11.1.1.4.37.59.23     Loaded
    Property Inspector     oracle.ide.inspector     11.1.1.4.37.59.23     Loaded
    Quick Start Features for Web Applications     quickstart.webapp.dt     11.1.1.4.37.59.23     Loaded
    QuickDiff     oracle.ide.quickdiff     11.1.1.4.37.59.23     Loaded
    REST Web Services     oracle.jdeveloper.webservice.rest     11.1.1.4.37.59.23     Loaded
    Refactoring     oracle.jdeveloper.refactoring     11.1.1.4.37.59.23     Loaded
    Replace With     oracle.ide.replace     11.1.1.4.37.59.23     Loaded
    Reports Extension     oracle.javatools.report     11.1.1.4.37.59.23     Loaded
    Resource Bundle Support     oracle.ide.resourcebundle     11.1.1.4.37.59.23     Loaded
    Resource Bundle Support for Properties Files     oracle.jdeveloper.resourcebundle.props     11.1.1.4.37.59.23     Loaded
    Resource Catalog Application Server Adapter     oracle.jdeveloper.asadapter     11.1.1.4.37.59.23     Loaded
    Resource Catalog DB UI extension     oracle.jdeveloper.db.rcadapter.ui     11.1.1.4.37.59.23     Loaded
    Resource Catalog Database Adapter     oracle.jdeveloper.rcdbadapter     11.1.1.4.37.59.23     Loaded
    Resource Catalog WSIL Adapter     oracle.jdeveloper.rcwsiladapter     11.1.1.4.37.59.23     Loaded
    Resource Lookup     oracle.jdeveloper.rclookup     11.1.1.4.37.59.23     Loaded
    Runner     oracle.ide.runner     11.1.1.4.37.59.23     Loaded
    SQL*Plus Integration     oracle.jdeveloper.db.sqlplus     11.1.1.4.37.59.23     Loaded
    SQLJ     oracle.jdeveloper.sqlj     11.1.1.4.37.59.23     Loaded
    Search Bar     oracle.ide.searchbar     11.1.1.0.0     Loaded
    SearchBar Commands     oracle.ide.searchbar.commands     11.1.1.4.37.59.23     Loaded
    Searchbar Preferences     oracle.ide.searchbar.preferences     11.1.1.4.37.59.23     Loaded
    Snippet Window     oracle.sqldeveloper.snippet     11.1.1.64.46     Loaded
    Struts Page Flow Modeler     oracle.struts     11.1.1.4.37.59.23     Loaded
    Studio     oracle.studio     11.1.1.4.37.59.23     Loaded
    Studio extension help     oracle.studio.help     11.1.1.0.0     Loaded
    Template     oracle.ide.ceditor-template     11.1.1.4.37.59.23     Loaded
    TopLink     oracle.toplink     11.1.1.4.37.59.23     Loaded
    Trinidad Databinding Design Time     oracle.trinidad-databinding-dt     11.1.1.4.37.59.23     Loaded
    Trinidad Design Time     oracle.trinidad-dt     11.1.1.4.37.59.23     Loaded
    UDDI Resource Catalogue Provider     oracle.jdevimpl.uddiadapter     11.1.1.4.37.59.23     Loaded
    UML XMI     oracle.uml.v2.xmi     11.1.1.4.37.59.23     Loaded
    UML v2     oracle.uml.v2     11.1.1.4.37.59.23     Loaded
    UML v2 Activity Modeler     oracle.uml.v2.activity     11.1.1.4.37.59.23     Loaded
    UML v2 Class Diagram     oracle.uml.v2.clazz     11.1.1.4.37.59.23     Loaded
    UML v2 Migration     oracle.uml.v2.migrate     11.1.1.4.37.59.23     Loaded
    UML v2 Sequence Diagram     oracle.uml.v2.sequence     11.1.1.4.37.59.23     Loaded
    UML v2 Transformation to Java     oracle.uml.v2.umljava     11.1.1.4.37.59.23     Loaded
    UML v2 Use Case Diagram     oracle.uml.v2.usecase     11.1.1.4.37.59.23     Loaded
    UML2 Modelers Common Classes     oracle.uml.v2.modeler     11.1.1.4.37.59.23     Loaded
    URL Connection Designtime     oracle.jdevimpl.urlconn     0     Loaded
    VHV     oracle.ide.vhv     11.1.1.4.37.59.23     Loaded
    Versioning Support     oracle.jdeveloper.vcs     11.1.1.4.37.59.23     Loaded
    Versioning Support for Subversion     oracle.jdeveloper.subversion     11.1.1.4.37.59.23     Loaded
    Virtual File System     oracle.ide.vfs     11.1.1.4.37.59.23     Loaded
    WSDL Chooser     oracle.jdeveloper.wsdllookup     11.1.1.0.0     Loaded
    WSDL web services extension     oracle.jdevimpl.wsdl     11.1.1.4.37.59.23     Loaded
    Web Browser and Proxy     oracle.ide.webbrowser     11.1.1.4.37.59.23     Loaded
    Web Services     oracle.jdeveloper.webservice     11.1.1.4.37.59.23     Loaded
    WebDAV Connection Support     oracle.jdeveloper.webdav2     11.1.1.4.37.59.23     Loaded
    WebStart     oracle.j2ee.webstart     11.1.1.0.0     Loaded
    XML Compare     oracle.jdeveloper.xml-compare     11.1.1.4.37.59.23     Loaded
    XML Editing Framework IDE Extension     oracle.ide.xmlef     11.1.1.4.37.59.23     Loaded
    XML Editing Framework Java Integration     oracle.jdeveloper.xmlef     11.1.1.4.37.59.23     Loaded
    XSL Mapper     oracle.bpm.mapper     11.1.1.4.0.56.82     Loaded
    adf-deploy-dt     oracle.adfdt.common.deploy     11.1.1.4.37.59.23     Loaded
    adf-deploy-dt-mds     oracle.adfdt.common.deploy.mds     11.1.1.4.37.59.23     Loaded
    adf-installer-ide     adf.installer.dt     11.1.1.4.37.59.23     Loaded
    adf-logging-dt     oracle.adf.logging.dt     11.1.1.4.37.59.23     Loaded
    adf-model-debugger-dt     oracle.adf-model-debugger-dt     11.1.1.4.37.59.23     Loaded
    adf-model-sqldc-ide     oracle.adfm.sqldc     11.1.1.4.37.59.23     Loaded
    adf-model-tools     oracle.adf.model.tools     11.1.1.4.37.59.23     Loaded
    adf-security-policy-dt     oracle.adfdtinternal.adf-security-policy-dt     11.1.1.4.37.59.23     Loaded
    adf-share-audit     oracle.adf-share-audit     11.1.1.4.37.59.23     Loaded
    adf-share-deploy-dt     oracle.adf.share.deploy.dt     11.1.1.4.37.59.23     Loaded
    adf-share-dt     oracle.adf.share.dt     11.1.1.4.37.59.23     Loaded
    adfm-business-editor-deploy     oracle.adf.businesseditor.deploy     11.1.1.4.37.59.23     Loaded
    adfm-business-editor-ide     oracle.adf.model.businesseditor     11.1.1.4.37.59.23     Loaded
    adfm-business-editor-settings-ide     oracle.adfm.businesseditor.settings     11.1.1.4.37.59.23     Loaded
    adfmcoredt-xdf     oracle.adfm.xdf     11.1.1.4.37.59.23     Loaded
    adfquerylovdt     oracle.adf-faces-query-and-lov-dt     11.1.1.4.37.59.23     Loaded
    appoverview     oracle.ide.appoverview     11.1.1.4.37.59.23     Loaded
    asnav-weblogic     oracle.jdeveloper.asnav.weblogic     11.1.1.4.37.59.23     Loaded
    audit     oracle.ide.audit     11.1.1.4.37.59.23     Loaded
    audit-core     oracle.ide.audit.core     11

    Hi Harry (and others),
    I have seen similar behavior. It seems like the client side rendering for some reason has a hard time processing the collection model wrapping the ArrayList in this particular case. The table renders empty. After sorting in ascending order, the rows are all back (visible) again.
    Is anyone aware of issues with the rich table based directly on ArrayList (in combination with a changing set of values and/or sorting)? (seems like a corner case but is still not uncommon). Is there any indication that wrapping the ArrayList in a CollectionModel ourselves might be required?
    Harry: do you know whether this issue is introduced with PS3 (11.1.1.4) or already existed in previous releases?
    kind regards,
    Lucas

  • Error while deploy a simple EJB

    Hi , I'm having a problem while trying to deploy a ear [witch only contains a EJB ] in weblogic 10.01 AKA 10mp1 ,
    java.lang.NoClassDefFoundError
         at org.apache.log4j.Logger.getLogger(Logger.java:104)
         at MyClass.<clinit>(MyClass.java:62)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:354)
         at java.lang.Class.newInstance(Class.java:307)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:222)
    A little more info
    MyClass.java:62 = private static Logger log = Logger.getLogger(MyClass.class);
    I also have try
    MyClass.java:62 = private static Logger log = Logger.getRootLogger();
    Both with the same result.
    My Log4j properties are simple
    #==================================================================
    #std-out Logger Configuration
    #==================================================================
    log4j.appender.std-out=org.apache.log4j.ConsoleAppender
    log4j.appender.std-out.target=System.out
    log4j.appender.std-out.layout=org.apache.log4j.PatternLayout
    log4j.appender.std-out.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %c %x - %m\n
    log4j.rootCategory=${root.log}, std-out
    Also have Try Hard Code Properties , but having the same error.
    static {
         PatternLayout out=new PatternLayout("%d{dd MMM yyyy HH:mm:ss,SSS} [%t] %-5p %c %x - %m\n");     
         ConsoleAppender appender=new ConsoleAppender(out);
         appender.setTarget(ConsoleAppender.SYSTEM_OUT);     
         Logger.getRootLogger().addAppender(appender);
    I'm aware of a "bug" of Weblogic 9.2 to 10.02 that weblogic adds first his jars instead the web-inf\lib jars I have added this xml's to the weblogic-application.xml
         <wls:prefer-application-packages>
              <wls:package-name>org.apache.log4j.*</wls:package-name>
         </wls:prefer-application-packages>
    Please note a add the weblogic-application.xml in ejb META-INF folder , as well in the EAR META-INF folder
    That doesn't resolve my problem has you can imagine already
    I'm using log4j 1.2.15 and log4j extras both download from maven repository
    I'll really appreciate some sort of guide since this problem is really annoying me
    Regards
    Carlos Ortiz
    PS. If you need more info , please ask I will facilitate as much as I can

    Yes I Have double check
    Edited by: khrono on Jul 20, 2009 8:32 AM

  • EJB 3.0 EntityManager null on JBoss 4.2

    Hi ,
    I am developing an application in EBJ 3.0.
    My application is properly deployed on JBoss 4.2 application server but when I am trying to persist data I am getting EntityManaget always null.
    My Mail Id is : [email protected]
    following is my code Please help me...........
    My datasource for oracle
    D:\jboss-4.2.2.GA\server\default\deploy\oracle-ds.xml
    <datasources>
    <local-tx-datasource>
    <jndi-name>OracleDS</jndi-name>
    <connection-url>jdbc:oracle:thin:@serverIp:1521:SID</connection-url>
    <!--
    Here are a couple of the possible OCI configurations.
    For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm
    <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
    or
    <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
    Clearly, its better to have TNS set up properly.
    -->
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>V2RND</user-name>
    <password>V2RND</password>
    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
    <!-- Checks the Oracle error codes and messages for fatal errors -->
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
    -->
    <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
    -->
    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
    <metadata>
    <type-mapping>Oracle9i</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>
    Entity Bean
    com.ntpl.v2hralign.master.entity.Department
    package com.ntpl.v2hralign.master.entity;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Table;
    @Entity
    @Table(name="MASTER_DEPARTMENT")
    public class Department implements Serializable {
    @Id
    @Column(name="DEPT_ID")
    private int deptId;
    @Column(name="DEPT_NAME")
    private String deptName;
    private static final long serialVersionUID = 1L;
    public Department() {
    super();
    public int getDeptId() {
    return this.deptId;
    public void setDeptId(int deptId) {
    this.deptId = deptId;
    public String getDeptName() {
    return this.deptName;
    public void setDeptName(String deptName) {
    this.deptName = deptName;
    Remote Interface
    package com.ntpl.v2hralign.master.session;
    import javax.ejb.Remote;
    @Remote
    public interface DepartmentRemote {
    public void createDepartment(int deptId, String deptName);
    package com.ntpl.v2hralign.master.session;
    import javax.annotation.Resource;
    import javax.ejb.Stateless;
    import javax.naming.InitialContext;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    import javax.persistence.PersistenceContextType;
    import org.hibernate.mapping.Component;
    import org.jboss.aspects.Injected;
    import com.ntpl.v2hralign.master.entity.Department;
    @Stateless
    public class DepartmentSession implements DepartmentRemote {
    @PersistenceContext EntityManager entityManager;
    //@Injected protected EntityManager entityManager;
    /*EntityManagerFactory emf = Persistence.createEntityManagerFactory("V2HRAlign");
    EntityManager entityManager = emf.createEntityManager();*/
    /*protected EntityManager entityManager;
    public EntityManager getEntityManager() {
    if (entityManager == null){
    try{
    System.out.println("hi dear not yet get anaything");
    entityManager = (EntityManager)(new InitialContext()).lookup("java:comp/ejb/EntityManager");
    } catch (Exception e){};
    return entityManager;
    @Override
    public void createDepartment(int deptId, String deptName) {
    //entityManager = getEntityManager();
    Department department = new Department();
    department.setDeptId(deptId);
    department.setDeptName(deptName);
    System.out.println("entityManager="+entityManager);
    entityManager.persist(department);
    persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="V2HRAlign">
    <jta-data-source>java:/OracleDS</jta-data-source>
    <class>com.ntpl.v2hralign.master.entity.Department</class>
    <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
    <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="hibernate.hbm2ddl.auto" value="create"/>
    <property name="hibernate.show_sql" value="true" />
    </properties>
    </persistence-unit>
    </persistence>
    Client Program
    package com.ntpl.v2hralignclient.master.client;
    import javax.ejb.EJB;
    import com.ntpl.v2hralign.master.session.DepartmentRemote;
    import com.ntpl.v2hralign.master.session.DepartmentSession;
    public class DepartmentClient {
    * @param args
    @EJB
    public static DepartmentRemote department = new DepartmentSession();
    public static void main(String[] args) {
    department.createDepartment(1, "Software");
    Error -------------------------------
    entityManager=null
    Exception in thread "main" java.lang.NullPointerException
    at com.ntpl.v2hralign.master.session.DepartmentSession.createDepartment(DepartmentSession.java:54)
    at com.ntpl.v2hralignclient.master.client.DepartmentClient.main(DepartmentClient.java:20)
    ---------------------------------------------------------------------------------------------------------------------------------------

    the problem is in your client code. you are instantiating the EJB locally. that is not what you want. you should be looking up the remote ejb using a Context object. look for information on setting up a client program to contact jboss using jndi.

Maybe you are looking for

  • JCO Problem - (102) RFC_ERROR_COMMUNICATION/Group PUBLIC not found

    Hi all, I installed the u201CSAP NetWeaver 7.01 - ABAP Trial Versionu201D and the u201CEHP1 for SAP NetWeaver Composition Environment 7.1 - Preview Versionu201D on same machine (drive u201CDu201D) and both are working. My intention is to learn WebDyn

  • Scheduling Schema Owner in Oracle Apps EUL

    Hi All, Here is pertinent information about my Discoverer configuration: OracleBI Discoverer 10g (10.1.2.2) Oracle Business Intelligence Discoverer Plus 10g (10.1.2.54.25) Discoverer Model - 10.1.2.54.25 Discoverer Server - 10.1.2.54.25 End User Laye

  • Credit card payment through iReceivables

    Hi All, I am lookign at a way to test credit card payment through iReceivables without interfacing to any actual payment gateways. Basically I want to see the data flow in IR when a payemnt is done using IR using IReceivables. It will be really appre

  • How to download jsk for webcenter sites 11.1.1.8

    How to download jsk for webcenter sites 11.1.1.8

  • I have no sound with Time Warner Cable website. How do I fix this?

    I'm trying to listen to my voicemail messages from the computer and it won't work in Firefox. Time Warner tells me I need to use a different browser and I don't understand as I get sound from Firefox while listening to Pandora and other sites.