Entity Beans not getting garbage collected

Hi,
I am developing an application that is using EJBs utilizing several common design patterns (i.e. Session Facade, DAO, and Fast Lane Reader). All of the patterns used have come from books by Sun Microsystems Press.
As I have understood the pattern, the Session Facade pattern uses Stateless Session Beans (SLSB) to implement a desired functionality and accesses the entity beans locally. The results from the entity beans are placed into Value Objects and passed back to the client separating any direct access with the entity beans from the client. In my case, I am using BMP for my entity beans.
The problem I am seeing with Optimizeit is that none of my entity beans are getting garbage collected despite no references to them. The SLSB creates what entities it needs to perform a task at the local level, puts the data into a value object and goes out of scope.
Shouldn't the entity beans get removed if the object that references them has gone away or am I missing something?
Is there a proper way to set an entity bean (or any EJB for that matter) for garbage collection.
thanks in advance for any help...

You might even discover that entity beans can get created even before you use them.
Your application server creates "pools" of bean instances that it can use when it needs to. It is part of this role, and is done in order to optimize performances.
You cannot force them to be garbage collected. Even if you stop referencing them, the app server will.
When your create references to a bean, it (usually) won't create an instance. It will take an existing one, and load data into it, using ejbCreate or ejbActivate.
Hope this helps.
/Stephane

Similar Messages

  • Ejb3 entity bean not generating valid sql for postgres 8.1

    Hello,
    I originally posted this on the jboss seam board as I ran across this error on a seam test example, but it seems it's more generally applicable to ejb3 entity beans not generating sql that postgres can understand. I'll post my message below, all replies are appreciated.
    I'm going through the hello world example from the seam book, and I'm getting an error I cannot resolve, that with an auto generated sql statement, that's not valid for postgres 8.1, the database I'm on. Here's my error:
    17:40:31,370 INFO [STDOUT] Hibernate: select next value for person_id_seq from dual_person_id_seq
    17:40:31,394 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 42601
    17:40:31,394 ERROR [JDBCExceptionReporter] ERROR: syntax error at or near "value"
    17:40:31,396 FATAL [application] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get next sequence value
    javax.faces.el.EvaluationException: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get next sequence value
    Here's the table definition
    - create table Person (id bigint not null, name varchar(255), primary key (id))
    - create table dual_person_id_seq (zero integer)
    - create sequence person_id_seq start with 1 increment by 1
    and here's the entity bean:
    @Entity
    @Name("person")
    @Table(name="person")
    @SequenceGenerator(name="person_sequence", sequenceName="person_id_seq")
    public class Person implements Serializable {
    private long id;
    private String name;
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="person_sequence")
    public long getId() { return id;}
    public void setId(long id) { this.id = id; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    How do I get it to generate a valid sql statement for postgres?

    I think you should try putting the sequence generator annotation over the primary key field. Try it and be sure it works.
    regards,
    Michael

  • RMI server object getting garbage collected

    Hi all,
    I have seen a number of posts regarding the ConnectException and found that this can occur in a number of situations.
    I am having a problem here.
    I am having an RMI server that is always up and running. And the server object gets requests from the client at regular intervals. But, when the server object is not receiving any requests for a long time (ex: 1 day), then I think the remote object itself is getting garbage collected. And so, tough I am able to get the remote reference using the lookup method, I am getting "Connection refused to host: 192.168.0.216; nested exception is:
         java.net.ConnectException: Connection refused" when I call a method using this reference.
    I believe that this is because the server object getting garbage collected as there are no requests for the server since long. Please correct me if my assumption is wrong.
    I want to know, after how much time the server object gets garbage collected if no requests are received. But, my requirement is that the server object should always be available and WHENEVER a client request comes then that should be processed. What should I do to accomplish this task.
    If any one have any suggestions, please reply as soon as possible.
    Thanks in advance,
    srik4u

    You might do some research into using an activatable remote object. You run rmid (the rmi activation deamon) and register a subclass of java.rmi.activation.Activatable (instead of the usual UnicastRemoteObject) with it. With an activatable object, the remote reference to the activatable object doesn't need to have a live object behind it. If an activatable object is not running (ie: it hasn't been constructed yet, or it has been garbage collected ...as in your case) a remote reference to the object can still be exported to a client. The first time the client calls a method on the remote object, the activation service on the server sees the object is not active, and activates the object for the client. If the object is running ...it is rmi as usual. But if it gets gc'd again, the next invocation on the remote object will trigger the activation service again.
    (The above explanation paraphrases author David Flanagan from Java Enterprise in a Nutshell, O'Reilly)
    I have only built one of these, which loosely followed an example from the above mentioned book. It's a whole other ballgame over and above a regular rmi object. But like anything else, if you dig in and get your head wrapped around it, it eventually makes sense. Ok, why lie ...it confused the hell out of me and left me a little queasy. But you know the drill, by the time you build a few of them it will probably seem as easy as mapping the human genome, right? At any rate, it seems like what you might be after ...so have a look at it. Good luck, and wear your lifejacket.

  • MessageDriven Beans not getting called with new messages

    I have a system in which data is collected by a number of applications and sent as messages to JMS topics. I also have message-driven beans hosted on weblogic that receive these messages and convert some of the data into entity beans for storage in the database. The problem I have is that occasionally some of the message-driven beans will stop processing messages, which will lead to messages 'backing up'. If left unchecked, the messages start to consume a lot of memory, so I have put message quotas in place to limiit this growth, but the fundamental problem is that the messages are not getting processed. I considered that the MDBs that stop working may be hung up on something internal or are hung up in the database (Oracle 10), but the DB enterprise manager says that there are no blocked sessions, and the monitor data for MDBs says that there are no active objects.
    What is happening here? I am using the monitor pages for the Weblogic console, so from that I can see that messages have not been processed, and that there are no MDBs currently processing messages, but there doesn't seem to be enough clues to pin down what is happening. Where should I be looking?

    Tom:
    Thanks for the very quick reply. I have looked in the logs, and only see error messages when the message quotas are reached. I have looked at the transaction statistics in the monitor console, and it gives zero rollbacks and timeouts. However, I have not tried a thread dump, and will try that when I get into work tomorrow.
    Here are some answers to your questions:
    * What is your version and service-pack? (I recall that there were one or two long since fixed bugs that could cause stalls.)
    I believe my version is 9.22.
    * Are the problem topics running on the same weblogic server as the MDB?
    Yes
    * Are subscriptions durable?
    No
    * Are you using "distributed topics"?
    I think so; the applications that are sending the messages are on processors other than the weblogic server. Is that what you mean by distributed topic?
    * You write that you are using multiple MDBs but only some stall. Is it the same ones each time?
    Not sure. We want to make sure that we get all the diagnostic information we can before restarting the server because we're not sure if this problem will happen again within 5 minutes, or if it will run weeks. It had run stints of a couple weeks before this point without having this problem.

  • URL class is not being garbage collected

    I have created two instances of the URL class to specify a file location for each image. I use com.symantec.itools.javax.swing.icons.ImageIcon class to display images specified by each URL instance as icons inside a button. The setImageLocation method(URL location) of the ImageIcon class sets the location to be displayed by this icon. The following is the code snippets used to create the ImageIcon instances:
    private URL greenIconURL;
    private URL redIconURL;
    com.symantec.itools.javax.swing.icons.ImageIcon green_icon = new com.symantec.itools.javax.swing.icons.ImageIcon();
    com.symantec.itools.javax.swing.icons.ImageIcon red_icon = new com.symantec.itools.javax.swing.icons.ImageIcon();
    try
    greenIconURL = new java.net.URL
    ("file:./images/greenline.gif");
    green_icon.setImageLocation(greenIconURL);
    catch (java.net.MalformedURLException error) { }
    try
    redIconURL = new java.net.URL
    ("file:./images/redline.gif");
    red_icon.setImageLocation(redIconURL);
    catch (java.net.MalformedURLException error) { }
    I am using JProbe 5.0.1 Memory to determine the loitering objects when I remove the button from the JInternalFrame. I am using Java 1.2.2_08 version. The JProbe Memory Leak Doctor indicates that each URL instance has a reference to an entry in a HashMap table. The reference graph from the root set has a reference to SoftCache to HashMap to HashMap$Entry. To make this URL instance eligible for garbage collection, JProbe Memory Leak Doctor indicates I must remove the entry from the HashMap. How do I get access to this HashMap to remove the entry? If this is a problem with the version of the JDK, please let me know. Thank you in advance for your assistance.

    <root>Statics
    -->sun.misc.SoftCache->java.util.HashMap->java.util.Has
    Map$Entry[]->java.util.HashMap$Entry->java.net.URL
    I do not an instance of HashMap in my class.
    Therefore, the HashMap is either created by URLclass
    or the
    com.symantec.itools.javax.swing.icons.ImageIcon
    class.SoftCache seems to have a normal HashMap inside
    it/* Hash table mapping keys to ValueCells */
    private Map hash;but if that is the HashMap in JProbe
    information then the URL would have to be a key in
    the map - otherwise there'd be another object in the
    chain of class SoftCache.ValueCell
    are you certain that the java.net.URL's in that
    hashmap are your ones?
    out of curiosity - are you certain that the URL's are
    the/a problem (are you getting an OutOfMemoryError?)
    asjfThe button that contains the URL's is the only one on the JInternalFrame. The JProbe Memory Debugger displays the java.net package name, the URL class name, the count (2), and the Count Change (+2). When I remove the button from the JInternalFrame, the aforementioned numbers on the Instance Summary remain the same. The snapshot of the Java Heap reveals that the two instances of the URL class are still there. The Memory Leak Doctor shows the reference graph from the root set:
    <root>Statics->SoftCache->HashMap->HashMap$Entry[]->HashMap$Entry->URL
    When I right click on the arrow between HashMap$Entry[] and HashMap$Entry to remove the reference, I receive the message: "Congratulations this object can be garbage collected..." It appears like private instance of Map in SoftCache is holding a strong reference.
    I am not getting an OutOfMemoryError exception.

  • Entity beans not loaded due to problem loading WebLogic_RDBMS.jar dynamically

    Hi,
    I'm new to WebLogic so bear with me! When I start WebLogic (using
    Microsofts SDK for Java 4.0), all me session beans load up fine, but none of
    my entity beans load. The error I get for each is:
    [EJB]: Server cannot load: d:\weblogic\lib\persistence\WebLogic_RDBMS.jar
    dynamically. Attempting to load from classpath
    ... and then it goes on to say that it could not deploy the entity bean jar
    file giving a list of possible reasons. I'm guessing that the problem stems
    from the fact that the persistence jar file could not be loaded (correct me
    if I'm wrong!).
    Has anyone come across this before? I have included the WebLogic_RDBMS.jar
    file in my classpath when I start WebLogic to see if this would help but to
    no avail.
    Any help would be really appreciated.
    Thanks,
    Ciaran

    Please see my response in the ejb newsgroup.
    -- Rob
    Ciaran Diver wrote:
    >
    Hi,
    I'm new to WebLogic so bear with me! When I start WebLogic (using
    Microsofts SDK for Java 4.0), all me session beans load up fine, but none of
    my entity beans load. The error I get for each is:
    [EJB]: Server cannot load: d:\weblogic\lib\persistence\WebLogic_RDBMS.jar
    dynamically. Attempting to load from classpath
    ... and then it goes on to say that it could not deploy the entity bean jar
    file giving a list of possible reasons. I'm guessing that the problem stems
    from the fact that the persistence jar file could not be loaded (correct me
    if I'm wrong!).
    Has anyone come across this before? I have included the WebLogic_RDBMS.jar
    file in my classpath when I start WebLogic to see if this would help but to
    no avail.
    Any help would be really appreciated.
    Thanks,
    Ciaran--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • Entity beans not understood

    hello,
    I am new to ejb. I know that I have come to the right technology and now to the right forum. I have got quite a good grasp on session beans but I don't understand the entity beans.
    I have a couple of questions.
    Firstly if every bean represents a single record in a database then what's th logic behind having these beans in the first place. suppose I have about 10 milion records in one of my table then does that mean I have 10000000 instences of that entity bean? and what will be the advantage of such an arrangement.
    secondly, do I always need entity beans to manage data from a database? I mean what is wrong if I do all that in a session bean? I do connect to a database with jdbc in servlets and jsp, so what is the problem in doing same in a session bean.
    and one general question, how heavy is the remote object on the client machine, what I am asking is, if when I locate the bean using the home interface or home object if you like it, I get access to the remote object. so how heavy is the remote object when I download it on my client machine?
    thanks
    Krishnakant.

    Hi,
    If you want to have 10 million records it is not necessarily 10 million Entity Beans will be instatiated. EJB container pools the EntityBeans and uses then accordingly.
    Writing DataBase code in Servlets/JSP is not a good idea. If you want to get the benefits of layered Architecture we have to follow certain design patterns. DB operations can be handled trhu EntityBeans are DAO factories.

  • EJB 3.0 entity tables not getting created

    I'm trying to use EJB 3.0 and can't seem to get JDeveloper to create a table in the database for an EJB 3.0 entity.
    I'm using JDeveloper Studio Edition Version 10.1.3.1.0.3914 on WinXP SP 2, Java 1.5.0_06, with Oracle Express, running in the debugger using the embedded OC4J server.
    I have created 1 entity (Customer), 1 stateless session bean (CustomerFacade), and 1 JSF (index.jspx, which allows data entry to create a Customer entity). I'm able to input fields for a Customer instance on the index.jspx form, and transmit that to the CustomerFacadeBean to persist. The call to em.persist(entity) returns without error, however, when the transaction is committed, I get the following exception indicating that the table CUSTOMER does not exist.
    Partial Exception Trace:
    javax.faces.FacesException: #{customer.saveCustomer}: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    The full stack trace is at the bottom of this message if that will help.
    I want to generate the database schema from the EJB entities, and have setup persistence.xml to do so -- at least I think so.
    Following is all the relevant data. I sure hope someone can help with this. I've been struggling with various problems for days (for something that should just easily work) and I'm on a tight schedule. Please help!!
    persisence.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <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"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="SmashPU">
    <properties>
    <property name="toplink.logging.level" value="FINEST"/>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    </properties>
    </persistence-unit>
    </persistence>
    Customer.java
    package com.toolcafe.model;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.TableGenerator;
    import javax.persistence.Version;
    @Entity
    @NamedQuery(name = "Customer.findAll", query = "select o from Customer o")
    @SequenceGenerator(name="myseq")
    public class Customer implements Serializable {
    private Integer id;
    private Integer version;
    private String firstName;
    private String lastName;
    private String emailAddr;
    public Customer() {
    @Id
    public Integer getId() {
    return id;
    public void setId(Integer id) {
    this.id = id;
    @Version
    public Integer getVersion() {
    return version;
    public void setVersion(Integer version) {
    this.version = version;
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getEmailAddr() {
    return emailAddr;
    public void setEmailAddr(String emailAddr) {
    this.emailAddr = emailAddr;
    Database Info:
    I created a schema called, "SMASH", in Oracle Express.
    he Offline Database Sources contain the Customer table, but only the ID and VERSION columns, as does the Oracle Express schema.
    Exception Trace:
    javax.faces.FacesException: #{customer.saveCustomer}: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:105)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 25 more
    Caused by: javax.ejb.EJBException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701); nested exception is: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBUtils.createEJBException(EJBUtils.java:365)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBUtils.createEJBException(EJBUtils.java:356)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.AbstractEJBObject.OC4J_handleUncheckedException(AbstractEJBObject.java:396)
         at CustomerFacade_RemoteProxy_51ldkeg.persistEntity(Unknown Source)
         at form.CustomerForm.saveCustomer(CustomerForm.java:66)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 26 more
    Caused by: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
         javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBTransactionManager.end(EJBTransactionManager.java:141)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:57)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         ... 33 more
    Caused by: javax.transaction.RollbackException: returning error in transaction: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.checkForRollbackOnlyWhileInCommit(ApplicationServerTransaction.java:582)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:247)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:130)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransactionManager.commit(ApplicationServerTransactionManager.java:433)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ejb.EJBTransactionManager.end(EJBTransactionManager.java:132)
         ... 39 more
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    Call:INSERT INTO CUSTOMER (ID, EMAILADDR, LASTNAME, VERSION, FIRSTNAME) VALUES (?, ?, ?, ?, ?)
         bind => [null, [email protected], Hart, 1, Rick]
    Query:InsertObjectQuery(com.toolcafe.model.Customer@11ca701)
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:295)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:639)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:688)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:477)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:675)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:199)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:331)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:176)
         at oracle.toplink.essentials.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:192)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:457)
         at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:74)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:635)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:599)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:495)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:130)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:283)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:67)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:536)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:123)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:95)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2218)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:254)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:175)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2638)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1030)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:353)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1112)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2428)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:177)
         at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:116)
         at oracle.toplink.essentials.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:76)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.callBeforeCompletion(ApplicationServerTransaction.java:1019)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.ApplicationServerTransaction.doCommit(ApplicationServerTransaction.java:246)
         ... 42 more
    Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
         at oracle.oc4j.sql.proxy.PreparedStatementBCELProxy.executeUpdate(PreparedStatementBCELProxy.java:37)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:632)
         ... 78 more

    You have to add the property toplink.ddl-generation.output-mode to your persistence.xml file, for example:
    <?xml version="1.0" encoding="windows-1252" ?>
    <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"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="model">
    <jta-data-source>jdbc/jdm-akoDS</jta-data-source>
    <properties>
    <property name="toplink.logging.level" value="INFO"/>
    <property name="toplink.target-database" value="Oracle"/>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    <property name="toplink.ddl-generation.output-mode" value="database"/>
    </properties>
    </persistence-unit>
    </persistence>

  • RMI Remote reference is getting garbage collected

    Hi,
    I'm using Weblogic 5.1, on Windows NT.
    I have RMI remote object on the server side, and my client is an applet.
    In the applet I use JNDI to get the reference of the server object, and
    use it. The problem is after sometime ( like 10 min or so) I get
    weblogic.rmi.NoSuchObjectException
    and at the WLServer console I see
    ' <DGCServer> tried to renew lease for 1 lost reference'.
    At the server side, I bind the object using JNDI.
    I want thsi reference to be available all the time in the applet.
    any help is appreciated.
    thanks,
    Abdul.

    Refer to my post on misc. Do not cross-post.
    Cheers - Wei
    aroshan <@cisco.com> wrote in message news:[email protected]..
    Hi,
    I'm using Weblogic 5.1, on Windows NT.
    I have RMI remote object on the server side, and my client is an applet.
    In the applet I use JNDI to get the reference of the server object, and
    use it. The problem is after sometime ( like 10 min or so) I get
    weblogic.rmi.NoSuchObjectException
    and at the WLServer console I see
    ' <DGCServer> tried to renew lease for 1 lost reference'.
    At the server side, I bind the object using JNDI.
    I want thsi reference to be available all the time in the applet.
    any help is appreciated.
    thanks,
    Abdul.

  • CF 8 JVM memory is not being garbage collected.

    I am baffled by something I am seeing on my QA server. I have
    an app that we load tested but when the test completed the JVM
    memory used was not released. I used CF Server Monitor to watch the
    memory usage and sometimes it spiked to the max and either the app
    failed or I got timeout exceptions.
    This is the only app running on this server and the testing
    completed over an hour ago but the memory has not been released
    yet.
    CF Admin settings:
    Maximum JVM Heap Size (MB) 512
    The CF Server JVM Setting arguments include: -server
    -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m
    -XX:+UseParallelGC
    I found a script that uses java.lang.Runtime and
    java.lang.management.managementFactory that dumps a JVM memory
    usage profile The latest dump follows:
    JVM Monitor - ColdFusion Server - Enterprise v8,0,1,195765
    JVM Memory Monitor - struct
    Heap Memory Usage - Committed 481 MB
    Heap Memory Usage - Initial 0.00 MB
    Heap Memory Usage - Max 493 MB
    Heap Memory Usage - Used 437 MB
    JVM - Free Memory 44.0 MB
    JVM - Max Memory 493 MB
    JVM - Total Memory 481 MB
    JVM - Used Memory 449 MB
    Memory Pool - Code Cache - Used 8.80 MB
    Memory Pool - PS Eden Space - Used 6.37 MB
    Memory Pool - PS Old Gen - Used 428 MB
    Memory Pool - PS Perm Gen - Used 52.4 MB
    Memory Pool - PS Survivor Space - Used 3.50 MB
    Non-Heap Memory Usage - Committed 62.8 MB
    Non-Heap Memory Usage - Initial 18.3 MB
    Non-Heap Memory Usage - Max 240 MB
    Non-Heap Memory Usage - Used 61.2 MB
    According to the CF Server Monitor JVM memory usage builds up
    to 477 MB then the app fails or timesout.
    Session Scope memory usage: 0.27 KB
    Application Scope memory usage: 1.370 KB
    Server Scope memory usage: 3.12 KB
    Since the test ended JVM Memory Usage has dropped back to 438
    MB?
    Besides CFAdmin nothing else is running on this CF Server.
    I've read several other memory related topics but none of them have
    helped.
    Can someone tell me why the memory isn't being release? How
    can I further troubleshoot the problem?
    Thx
    pwp

    > Adam Cameron wrote:
    >
    The maximum stable heap size I've managed to get is around
    > 1.0-1.2GB, on a win32 system. On Solaris (running a
    32-bit JVM),
    > about 1.4GB. It *seems* like GC doesn't actually clear
    out RAM
    > properly if more than that much RAM is being
    addressed.
    >
    > Yes, there is a well-known
    >
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19359&sliceId=1
    Not really what I was talking about. One might be able to get
    the CF
    instance to *start* with 1.8GB allocated to the heap, but it
    won't actually
    work. I've managed to get a server to idle for a reasonable
    length of time
    on 1.5GB, but as soon as the thing started to ramp up, it
    face-planted,
    once it started actually trying to *use* the higher end of
    the RAM
    allocated to it. At 1.2GB, it'll seem to run OK for a
    reasonable length of
    time, but eventually it starts leaking memory; at around 1GB,
    it was pretty
    stable.
    Hence my comment about it being *stable* at that allocation.
    Not that "it
    simply won't start if more than 1.8GB is allocated to it".
    My point was that your rule of thumb:
    maximum heap size(Xmx) = RAM(in MB) / (2 * number of servers
    using the
    JVM)
    Is not a very good one. Plug 4GB RAM (so a small server) and
    one CF
    instance into that equation. Your rule suggests I should be
    allocating 2GB
    to the heap. Which - as you yourself pointed out - won't
    work.
    Adam

  • SSRS: CRM Entity Form not getting open from Custom Reports

    Clicking the specific record on report is not redirecting to the corresponding entity record form on ms crm 2013.
    The expression we used on action to open the url is-
    =IIF(IsNothing(Parameters!CRM_URL.Value), system.DBNull.value, Parameters!CRM_URL.Value & "?ID={" & Fields!Contract_GUID.Value.ToString() & "}&LogicalName=ubs_contracts")
    When we try to redirect , IE says - cannot display the webpage.
    Please suggest.

    URL should be
    http://servername/orgname/main.aspx?id={ Fields!Contract_GUID.Value.ToString() }&pagetype=entityrecord&etn=ubs_contracts
    Regards, Saad

  • EJB3.0 session bean not getting compiled with wlappc

    My EJB class is  as follows,
    import javax.ejb.EJBException;
    import javax.ejb.Stateless;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    import javax.interceptor.ExcludeDefaultInterceptors;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.servlet.http.HttpSession;
    import weblogic.wsee.context.ContextNotFoundException;
    import weblogic.wsee.context.WebServiceContext;
    import weblogic.wsee.context.WebServiceSession;
    @WebService(serviceName ="SpectrumReportWebService",targetNamespace ="http://spectrum.west.com/spectrum/SpectrumReportWebService")
    @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,use=SOAPBinding.Use.LITERAL,parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
    @Stateless
    @TransactionAttribute(TransactionAttributeType.NEVER)
    @ExcludeDefaultInterceptors
    public class MySimpleEJB implements MySimpleEJBInterface{
    @webMethod()
    public void authenticateUser(String username,String password){
    WebServiceSession ses = null;
            try {
                // Get the current session context.
                ses = WebServiceContext.currentContext().getSession();
                // Store the Session ID in log4j MDC map
                HttpSession HttpSes = (HttpSession) ses.getUnderlyingSession();
                MDC.put("SESSION_ID", HttpSes.getId());
                // Store the user name in log4j MDC map
                if (user == null) {
                    MDC.put("USER_NAME", ses.getAttribute("USER_NAME"));
                else {
                    MDC.put("USER_NAME", user);
                    ses.setAttribute("USER_NAME", user);
            catch (ContextNotFoundException e) {
                LOG.error("Session setup in setSessionInfo() failed");
                throw new Exception(e);
    My authenticattion logic here
    When I try to compile this file using wlappc ant task, The ant task throws an exception. The exception details are as follows,
    [wlappc] <Aug 18, 2014 11:25:25 AM CDT> <Error> <J2EE> <BEA-160231> <Unable to identify application type for ReportWebService>
       [wlappc] weblogic.application.compiler.NoClaimsFactoryException: Unable to find a suitable factory among registered factories
       [wlappc] at weblogic.application.compiler.FactoryManager.create(FactoryManager.java:110)
       [wlappc] at weblogic.application.compiler.ToolsFactoryManager.createStandaloneModule(ToolsFactoryManager.java:118)
       [wlappc] at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:40)
       [wlappc] at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
       [wlappc] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
       [wlappc] at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
       [wlappc] at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:27)
       [wlappc] at weblogic.application.compiler.BaseCompiler.compile(BaseCompiler.java:19)
       [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:101)
       [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:35)
       [wlappc] at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
       [wlappc] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
       [wlappc] at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
       [wlappc] at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:27)
       [wlappc] at weblogic.application.compiler.Appc.runBody(Appc.java:203)
       [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:158)
       [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:115)
       [wlappc] at weblogic.application.compiler.Appc.main(Appc.java:263)
       [wlappc] at weblogic.appc.main(appc.java:14)
       [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [wlappc] at java.lang.reflect.Method.invoke(Method.java:597)
       [wlappc] at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:301)
       [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.privateExecute(Appc.java:261)
       [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:164)
       [wlappc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
       [wlappc] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [wlappc] at java.lang.reflect.Method.invoke(Method.java:597)
       [wlappc] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
       [wlappc] at org.apache.tools.ant.Task.perform(Task.java:348)
       [wlappc] at org.apache.tools.ant.Target.execute(Target.java:392)
       [wlappc] at org.apache.tools.ant.Target.performTasks(Target.java:413)
       [wlappc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
       [wlappc] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
       [wlappc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
       [wlappc] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
       [wlappc] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
       [wlappc] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
       [wlappc] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
    Any help on this will be much appreciated. I don't find any help from the Oracle documentation on this.

    Rajesh,
    Is this 12.1.1?
    There are 2 releases after 12.1.1: 12.1.2 and 12.1.3. These 2 version are very different from 12.1.1 and they run in JDK 7 only.
    Would it be possible to try with 12.1.3?
    WebLogic Server 12c (12.1.1), WebLogic Server 11g (10.3.6) and Previous Releases
    Best Regards
    Luz

  • Oracle JVM Garbage Collection not executing

    I am experiencing a problem with garbage collection when running a java stored procedure in an 9.2.0.3.0 Oracle database running on a Windows 2k computer.
    I have created a simple java class that represents a tree structure. Each instance of the class has a reference to it's parent and a Vecotor of all it's children. Each instance also has a Vector to hold name value pairs. I ran a program that creates 30 instances with 50 children each for a total of 1500 instances. Each instance has 30 properties(name value pairs).
    By using the debugger in JDeveloper and breakpoints I can watch the javaw.exe process's use of RAM.
    Start up: 6,788mb
    After creation of 1500 instances: 17,720
    After releasing all objects and calling System.gc(): 7,156
    I deploy the package to my Oracle database and perform the exact same routine using breakpoints and test procedures in plsql Developer. Using the breakpoints and watching the oracle.exe process's use of RAM I see:
    Start up: 81,116mb
    After creation of 1500 instances: 94,952
    After releasing all objects and calling System.gc(): 95,036
    When run in Oracle the resources are not released. Is there somthing special that needs to be called to get the garbage collector to do it's job when running in an Oracle database?
    Execution Instructions and source:
    run app.main from jdeveloper and app.main2 as a plsql stored procedure. I have included my test procedure at the end and the plsql stored procedure package declarations. I used debuggers and breakpoints to watch the process, there is probably a way to do this by outputting the current memory being used by I didn't know how. If you use debuggers and breakpoints then when running in JDeveloper put your breakpoints on the 3 assignments of breakpointVar in SimpleClass.main(...). When running the stored procedure test block put them on the 3 assignments of breakpoint_var in there.
    package mypackage2;
    public class app {
    private static SimpleClass topObject;
    public static void main(String[] args) {
    int breakpointVar;
    breakpointVar = 0;
    main2(30, 50);
    breakpointVar = 1;
    release();
    breakpointVar = 2;
    public static void main2(int numParents, int numChildren){
    SimpleClass temp;
    SimpleClass child;
    topObject = new SimpleClass();
    for(int i = 0; i < numParents; i ++){
    temp = new SimpleClass();
    addProperties(temp, 30);
    topObject.addChild(temp);
    for(int j = 0; j < numChildren; j++){
    child = new SimpleClass();
    addProperties(child, 30);
    temp.addChild(child);
    public static void release(){
    topObject.releaseAllDecendents();
    topObject.release();
    System.gc();
    private static void addProperties(SimpleClass toAddTo, int numProps){
    cimxProperty toAdd;
    for(int i = 0; i < numProps; i ++){
    toAdd = new cimxProperty("prop "+i,"value "+i);
    toAddTo.addProperty(toAdd);
    package mypackage2;
    import java.util.Vector;
    public class SimpleClass {
    private Vector _children;
    private Vector _props;
    private SimpleClass _parent;
    public SimpleClass() {
    _children = new Vector(10, 5);
    _props = new Vector(10, 5);
    _parent = null;
    public void addChild(SimpleClass toAdd) {
    toAdd._parent = this;
    _children.add(toAdd);
    public SimpleClass getChild(int index){
    return (SimpleClass)_children.get(index);
    public void addProperty(cimxProperty toAdd){
    _props.add(toAdd);
    public cimxProperty getProperty(int index) {
    return (cimxProperty)_props.get(index);
    public void releaseAllDecendents()
    SimpleClass temp;
    //remove all references to the the parent object from the children.
    for(int i = 0; i < _children.size(); i ++)
    temp = (SimpleClass)this._children.get(i);
    temp.releaseAllDecendents();
    temp._parent = null;
    temp._props.clear();
    temp._children.clear();
    temp = null;
    this._children.clear();
    public void release() {
    this._parent = null;
    this._children.clear();
    this._props.clear();
    package mypackage2;
    public class cimxProperty
    private static String _dateFormat = "MM/DD/YYYY HH:MI:SS";
    private String name;
    private String value;
    private String dataType;
    public cimxProperty()
    name = "";
    value = "";
    dataType = "";
    public cimxProperty(String Name, String Value)
    name = Name;
    value = Value;
    dataType = "UNKNOWN";
    public cimxProperty(String Name, String Value, String DataType)
    name = Name;
    value = Value;
    dataType = DataType;
    public String toString()
    return name + "["+dataType + "]: " + value;
    public void setName(String name)
    this.name = name;
    public String getName()
    return name;
    public void setValue(String value)
    this.value = value;
    public String getValue()
    return value;
    public void setDataType(String DataType)
    this.dataType = DataType;
    public String getDataType()
    return dataType;
    CREATE OR REPLACE PACKAGE JAVA_MEMORY_TEST AUTHID CURRENT_USER AS PROCEDURE release; PROCEDURE main2(p_num_parents IN NUMBER, p_num_children IN NUMBER); END JAVA_MEMORY_TEST;
    CREATE OR REPLACE PACKAGE BODY JAVA_MEMORY_TEST AS PROCEDURE release AS LANGUAGE JAVA NAME 'mypackage2.app.release()'; PROCEDURE main2(p_num_parents IN NUMBER, p_num_children IN NUMBER) AS LANGUAGE JAVA NAME 'mypackage2.app.main2(int, int)'; END JAVA_MEMORY_TEST;
    declare
    number breakpoint_var
    begin
    -- Call the procedure
    breakpoint_var := 0;
    java_memory_test.main2(30, 50);
    breakpoint_var := 1;
    java_memory_test.release();
    breakpoint_var := 2;
    end;

    When run in Oracle the resources are not released. Is there somthing special that needs to
    be called to get the garbage collector to do it's job when running in an Oracle database?Curious - I was always under the impression that you can not force garbage collection. All you could do was request it, and the JVM was free to do that when it was "good 'n ready", usually in a separate thread.
    I gather this from the API docs for system.gc() where it says "Calling this method suggests that the Java virtual machine expend effort ..." and the word "suggests" imlies that it is not required to run.

  • Creating entity beans with auto numbered primary key

    I have two entity bean with a CMR between them. I am successfully creating the first one but when I try and create the child entity bean I get a NullPointerException.
    Now I think this is because the gernerated code tries to get the primary key of the created entity bean and this is not set as it is set using a auto number in the database (An oracle sequence and trigger).
    Is there anyway i can get round this problem?
    Thanks in advance,
    Adrian

    This is the auto generated code:
         public dmd.sync.ejbs.entity.AppliancePackInfoLocal create_Local(dmd.sync.dataobjects.dto.AppliancePackInfoDTO appliancePackInfoDTO, dmd.sync.ejbs.entity.AmppLocal amppLocal) throws javax.ejb.CreateException, java.rmi.RemoteException {
              BeanO beanO = null;
              dmd.sync.ejbs.entity.AppliancePackInfoLocal result = null;
              boolean createFailed = false;
              boolean preCreateFlag = false;
              try {
                   beanO = super.createBeanO();
                   dmd.sync.ejbs.entity.AppliancePackInfoBean bean = (dmd.sync.ejbs.entity.AppliancePackInfoBean) beanO.getEnterpriseBean();
                   preCreateFlag = super.preEjbCreate(beanO);
                   bean.ejbCreate(appliancePackInfoDTO, amppLocal);
                   Object ejsKey = keyFromBean(bean);
                   result = (dmd.sync.ejbs.entity.AppliancePackInfoLocal) super.postCreate_Local(beanO, ejsKey, true);
                   bean.ejbPostCreate(appliancePackInfoDTO, amppLocal);
                   super.afterPostCreate(beanO, ejsKey);
    It must be falling over on the last line as it calls the ejbPostCreate fine.

  • Garbage collecting threads

    I am doing the following:
    public class MyClass {
         private Thread t = null;
         public class testThread extends Thread{
           public void run(){
                  String logName = this.getClass().getName();
                  Logger.Print( logName );  // Basically prints logName to file
                  for( int i = 1; i<4; i++){
                         try{
                           Thread.sleep(100)
                           [do stuff]
                           Thread.sleep(100);
                         catch(InterruptedException e) { }
           public callThread(){
               if ( t != null ){
                        if( !(t.isAlive()){
                               t = new TestThread();
                               t.start();
               else{
                               t = new TestThread();
                               t.start();
    } What, I want to happen is a thread to finish and after that a new one to start, and once the old thread does not have any variable assoiciated to it anymore, it should get garbage collected as far as my java understnading goes, this is exactly what should happen, in duo time whenever the garabage collecter decides so. This is a very long time running program.
    And the log shows the names of the threads like Thread-1 , Thread-2, Thread-3 , Thread-4, basically this name is increased by one everytime the function callThread is called and the old thread finished running, is there a limit to how many times I can call it like if it is called 10 billion times, will I have Thread-10000000000 in my log? and will the garbage collection work as I think? I am a c++ programmer so I do not trust it 100%, I really feel like adding delete t; so I can feel confident it is really gone before I do a t = new TestThread(); hehe C++ sickness??
    Please give me advice on this!!! and I will be very happy!
    Edited by: dakiar on Mar 19, 2008 8:18 AM

    dakiar wrote:
    What, I want to happen is a thread to finish and after that a new one to start,Use join(), rather than looping and checking isAlive, in order to determine when a thread has died.
    while (true) {
      Runnable r = new MyRunnable(); // You have no reason to extend Thread. It's preferable to implement runnable.
      Thread t = new Thread(r);
      t.start();
      t.join();
    and once the old thread does not have any variable assoiciated to it anymore, it should get garbage collected as far as my java understnading goes,It will become eligible for GC. There's no guarantee when or even if it will actually be GCed, other than that GC will at least happen before OutOfMemoryError.
    And the log shows the names of the threads like Thread-1 , Thread-2, Thread-3 , Thread-4, basically this name is increased by one everytime the function callThread is called and the old thread finished running, is there a limit to how many times I can call it No.
    like if it is called 10 billion times, will I have Thread-10000000000 in my log? Perahps. Or if Thread uses an int then it might wrap around to Integer.MIN_VALUE and give Thread--2147483648.
    You know you can assign your own names to the Threads.
    and will the garbage collection work as I think? It will work fine, and that has nothing to do with thread names.
    I am a c++ programmer so I do not trust it 100%,So, you think that you managing memory ad-hoc in every program you write when you're trying to focus on implementing the business requirements of your app will be better at it than the guys who were specifically focussed on writing memory management that would be handled consisently by the computer, and has been continuously refined, not to mention tested by thousands of Java developers over the last dozen or so years?
    I really feel like adding delete t; You can't and you don't need to.

Maybe you are looking for

  • How do you import pictures from an iPhone to a Mac?

    I know you can import using iPhoto but I do not care for the applications one file approach. Meaning, importing via iPhoto just adds them to the overall library file, not individually where they can be easily moved around. Typically, when I only had

  • [JS CS3] A question about clearing scriptArgs

    Do parameters remain in the app object until they are cleared? I'm invoking scripts from indesign server, supplying parameters which the scripts read using app.scriptArgs.getValue(). Should I call app.scriptArgs.clear() in all scripts, after the "arg

  • Program to create contract in SRM

    Hi All, Iam trying to create contract in SRM using the FM  BBP_PD_CTR_CREATE iam getting the below errors 06.06.2014 11.06.2014 Interface data contains errors Interface data contains errors Enter at least one item Enter exactly one partner of type Re

  • Java.lang.SecurityException when granting java permission

    DB version 11.1.07 We used this command to grant the following permission in development and stage environment with no problems. exec dbms_java.grant_permission( 'SCHEMA', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' ); When the same comma

  • To open a tcode from query output ?

    Hi All, Is it possible to open a tcode if i click on a particular cell ? Regards, Deadlocks