Bean not remain in my session?

i made this code for 2 pages, wanting to use a bean in both sites...the problem is it is created on the index page, but when i try to recall it on the 2nd, it creates it again...any tips on this? here's the code of the pages:
index.jsp
<jsp:useBean id="bean" scope="session" class="bean.initiate" />
                    <% int c =bean.start(10,3); %>
<HTML>
<HEAD>
<TITLE>Construct Ballots</TITLE>
</HEAD>
<BODY>
<H1>Construct Ballots</H1>
<FORM NAME="form1" ACTION="ShowBallot.jsp" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="buttonName">
<label>
<input type="text" name="amount">
</label>
<INPUT TYPE="BUTTON" VALUE="Make Ballots" ONCLICK="button1()">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
function button1()
document.form1.buttonName.value = "Constructing Ballots..."
form1.submit()
               -->
</SCRIPT>
</BODY>
</HTML>
ShowBallot.jsp
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="bean" scope="session" class="bean.initiate" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Determining Which Button Was Clicked</TITLE>
</HEAD>
<BODY>
<p><%= request.getParameter("buttonName") %>
<% String a= request.getParameter("amount"); %>
<%int input= Integer.parseInt(a); %></p>
<p><%int g=bean.confirm();%> </p>
<p>This is one example of a ballot constructed:</p>
<p><%=g %> </p>
<p>  </p>
</BODY>
</html>

How do you know it creates the bean again?
The code looks ok to me.
What does the bean.initiate class do?
One way of confirming if it is the same session is to use
Session id = <%= session.getId() %>
It should be the same on both pages

Similar Messages

  • How to instantiate App Mod in bean not tied to a specific page or session

    I have come to the conclusion that I can't initialize the BC4J framework (e.g. initialize properties for the connection pool) until I create an instance of an App Mod. How can I do this in a static initializer block of a bean that is not tied to any particular page or user session or pageeContext?
    I am trying to share the database connection pool across not only app modules but some of our pages that need to connect to the db but do not have app modules on them. But when I try to get the ConnectionPoolManager instance, it fails (UNLESS a page with an App Module on it was loaded first). If I try to get the instance first I get a nullpointer exception. Important note: I am in my own connection wrapper class so I do not have a session or pageContext.
    I do this in my static initializer block of my class:
    poolManager = ConnectionPoolManagerFactory.getConnectionPoolManager();
    (this throws a null pointer exception)
    and I've traced the error to this line in the ConnectionPoolManagerFactory getting null back:
    String s = PropertyMetadata.PN_POOL_MANAGER.getProperty();
    I suspect it is because the oracle.jbo.PropertyManager.loadProperties has not been run yet. The javadocs says: "This class is used at
    framework initialization time to choose values for the various properties".
    So, my questions are:
    1) If I have to invoke an app mod instance to make this work....What's the simplest way to create an app mod instance from a bean that is
    not tied to a session?
    or 2)
    1) Is there a way that I initialize the framework from my bean without instantiating an app module?

    John,
    First of all, thanks for the response. You provided workable answers for both possible approaches and I appreciate that. However, I am having a problem with both due to my unique situation....1) we are using JDeveloper 3.2 which doesn't have the SessionCookie class so while I can get an instance of an App Module, I can't do the next part which apparently is necessary to initialize the framework...2) I tried your other recommendation about calling the System.SetProperty method for the connection pool manager class and it worked!.....however, it instantiates the connection pool with default settings and not with my pool properties in my jboserver.properties file which I need.
    Norm
    Hi,
    Please see the discussion thread at:
    Re: Maintaining the state between http requests
    for more information about using the BC4J connection pool from an external Object.
    So, my questions are:
    1) If I have to invoke an app mod instance to make this work....What's the simplest way to create
    an app mod instance from a bean that is not tied to a session?.
    You can use the oracle.jbo.common.ampool.PoolMgr directly to find/create a pool. For instance:
    ApplicationPool pool = PoolMgr.getInstance().findPool(
    "Mypackage1ModuleLocal" // pool name
    , "mypackage1" // config package name
    , "Mypackage1ModuleLocal" // config name
    , null); // additional properties
    SessionCookie cookie = pool.createSessionCookie(
    DUMMY_APPLICATION_ID // application id
    , DUMMY_SESSION_ID // session id
    , null); // additional properties
    cookie.useApplicationModule();
    cookie.releaseApplicationModule(
    true // checkin
    , false); // manageState
    pool.removeSessionCookie(cookie);
    or 2)
    1) Is there a way that I initialize the framework from my bean without instantiating an app module?.
    Please see the original post referenced above.
    Hope this helps.
    JR

  • Bean not working in jsp

    OK, maybe I'm oversharing, but I want to be thorough. Note I asked this question a different way using very different code.
    Here's my jsp file - myq.jsp
    <%@ page language="java" import="java.util.*,com.serco.inquire.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="inq" tagdir="/WEB-INF/tags" %>
    <inq:displayCollection>
    <jsp:attribute name="mgr">Chris Novish</jsp:attribute>
    </inq:displayCollection>Here's displayCollection.tag used by that jsp:
    <%@ tag body-content="scriptless" import="com.serco.inquire.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ attribute name="mgr" required="true" %>
    <jsp:useBean id="irc" scope="session" class="com.serco.inquire.IrCollection">
      <jsp:setProperty name="irc" property="mgrid" value="${mgr}" />
    </jsp:useBean>
    ${irc.size} | ${irc.mgrid}Here's the java class IrCollection (used as a bean in the tag):
    package com.serco.inquire;
    import java.sql.*;
    import java.util.*;
    public class IrCollection {
         public ArrayList iRecords = new ArrayList<InquireRecord>();
         public int size;
         public String mgrid;
         public irCollection() {
              super();
         public void populateCollection() {
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   String filename = "inquire.mdb";
                   String database = "jdbc:odbc:Driver={Microsof Access Driver (*.mdb)};DBQ=";
                   database+= filename.trim() + ";DriverID=22;READONLY=true}";
                   Connection con = DriverManager.getConnection( database ,"","");
                   Statement s = con.createStatement();
                   s.execute ("SELECT * FROM inquiries WHERE manager = '" + this.mgrid + "'");
                   ResultSet rs = s.getResultSet();
                   int cur;
                   while (rs.next()) {
                        cur = rs.getRow()-1;
                        InquireRecord localIR = new InquireRecord();
                        int curID = rs.getInt("ID");
                        localIR.setID(curID);
                        String cursub = rs.getString("submitter");
                        localIR.setSubmitter(cursub);
                        this.iRecords.add(cur, localIR);
                   con.close();
                   this.size = iRecords.size();
              catch (Throwable e) {
                   System.out.println(e);
         public int getSize () {
              return this.size;
         public void setMgrid(String datum) {
              this.mgrid = datum;
              this.populateCollection();
         public String getMgrid() {
              return this.mgrid;
    }and here's the InquireRecord java class used by IrCollection:
    package com.serco.inquire;
    public class InquireRecord {
         private int ID;
         private String submitter;
         public InquireRecord() {
              super();
         public InquireRecord(String asubmitter) {
              this.submitter = asubmitter;
         public int getID(){
              return this.ID;
         public void setID(int datum) {
              this.ID = datum;
         public String getSubmitter() {
              return this.submitter;
         public void setSubmitter(String datum) {
              this.submitter = datum;
    }The JSP does this: set the mgr variable, which is passes to the tag, the tag then creates an instance of IrCollection using that mgr variable. (Yes, putting that populateCollection() method call in the setMgrid() method is probably Bad Practice, but it works, usually). The IrCollection objects builds an ArrayList of InquireCollection objects from an Access database. It then sets it's size property based on how many InquireCollection instances it put into the ArrayList. Once that's all done, the tag spits out 2 things: The size property and the mgrid property.
    When I view the JSP, it gives me 0 for the size and Chris Novish for the mgrid.
    I think this could be one of the following:
    *Not finding any matching records of the database
    *Not actually executing the populateCollection() method
    *some how forgetting the information it put into that ArrayList?
    I"m sure there's another possibility, but I don't know.
    Here's what gets me. Here's a test class I made called TestCollection:
    {code}package com.serco.inquire;
    import java.util.*;
    import java.text.*;
    public class TestCollection {
         public static void main(String[] args) {
              IrCollection myCollection = new IrCollection();
              myCollection.setMgrid("Chris Novish");
              System.out.println(myCollection.getSize());
              System.out.println(myCollection.getMgrid());
    }{code}
    if I run that I get a size of 4 and a mgrid of Chris Novish.
    Same data in, and it works as expected.
    So... why won't JSP do it?

    You have defined a session scope for that bean. You have to make sure that the bean is instantiated by this jsp and not earlier. If the bean is located in the session because it was set earlier, then the body tags within useBean are not evaluated.
    Look here - http://java.sun.com/products/jsp/tags/syntaxref.fm14.html#8865
    An easy way to test it would be to change the scope of the bean to request.
    ram.

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • WebUtil:  oracle.forms.webutil.host.Host bean not found

    Hi. This is my first attempt using WebUtil. The following code is in my When-New-Form-Instance trigger:
    client_host('N:\TTMS\ITS\vbasic\compiled\MenuUpdate.exe');
    This is the error I receive:
    oracle.forms.webutil.host.Host bean not found
    I've included my formsweb.cfg below for your reference. Note that the application is using the [ttmsmenu] configuration.
    Thanks in advance for your help with this problem.
    ***FORMSWEB.CFG***
    # $Id: formsweb.cfg 15-apr-2005.13:17:30 pkuhn Exp $
    # formsweb.cfg defines parameter values used by the FormsServlet (frmservlet)
    # This section defines the Default settings. Any of them may be overridden in the
    # following Named Configuration sections. If they are not overridden, then the
    # values here will be used.
    # The default settings comprise two types of parameters: System parameters,
    # which cannot be overridden in the URL, and User Parameters, which can.
    # Parameters which are not marked as System parameters are User parameters.
    # SYSTEM PARAMETERS
    # These have fixed names and give information required by the Forms
    # Servlet in order to function. They cannot be specified in the URL query
    # string. But they can be overridden in a named configuration (see below).
    # Some parameters specify file names: if the full path is not given,
    # they are assumed to be in the same directory as this file. If a path
    # is given, then it should be a physical path, not a URL.
    # USER PARAMETERS
    # These match variables (e.g. %form%) in the baseHTML file. Their values
    # may be overridden by specifying them in the URL query string
    # (e.g. "http://myhost.mydomain.com/forms/frmservlet?form=myform&width=700")
    # or by overriding them in a specific, named configuration (see below)
    [default]
    #WebUtilArchive=frmwebutil.jar,jacob.jar
    #WebUtilLogging=off
    #WebUtilLoggingDetail=normal
    #WebUtilErrorMode=Alert
    #WebUtilDispatchMonitorInterval=5
    #WebUtilTrustInternal=true
    #WebUtilMaxTransferSize=16384
    # System parameter: default base HTML file
    baseHTML=base.htm
    # baseHTML=webutilbase.htm
    # System parameter: base HTML file for use with JInitiator client
    baseHTMLjinitiator=basejini.htm
    # baseHTMLjinitiator=webutiljini.htm
    # System parameter: base HTML file for use with Sun's Java Plug-In
    baseHTMLjpi=basejpi.htm
    # baseHTMLjpi=webutiljpi.htm
    # System parameter: delimiter for parameters in the base HTML files
    HTMLdelimiter=%
    # System parameter: working directory for Forms runtime processes
    # WorkingDirectory defaults to <oracle_home>/forms if unset.
    workingDirectory=
    # System parameter: file setting environment variables for the Forms runtime processes
    envFile=default.env
    # Forms runtime argument: whether to escape certain special characters
    # in values extracted from the URL for other runtime arguments
    escapeparams=true
    # Forms runtime argument: which form module to run
    form=test.fmx
    # Forms runtime argument: database connection details
    userid=
    # Forms runtime argument: whether to run in debug mode
    debug=no
    # Forms runtime argument: host for debugging
    host=
    # Forms runtime argument: port for debugging
    port=
    # Other Forms runtime arguments: grouped together as one parameter.
    # These settings support running and debugging a form from the Builder:
    otherparams=buffer_records=%buffer% debug_messages=%debug_messages% array=%array% obr=%obr% query_only=%query_only% quiet=%quiet% render=%render% record=%record% tracegroup=%tracegroup% log=%log% term=%term%
    # Sub argument for otherparams
    buffer=no
    # Sub argument for otherparams
    debug_messages=no
    # Sub argument for otherparams
    array=no
    # Sub argument for otherparams
    obr=no
    # Sub argument for otherparams
    query_only=no
    # Sub argument for otherparams
    quiet=yes
    # Sub argument for otherparams
    render=no
    # Sub argument for otherparams
    record=
    # Sub argument for otherparams
    tracegroup=
    # Sub argument for otherparams
    log=
    # Sub argument for otherparams
    term=
    # HTML page title
    pageTitle=Oracle Application Server Forms Services
    # HTML attributes for the BODY tag
    HTMLbodyAttrs=
    # HTML to add before the form
    # HTMLbeforeForm=
    HTMLbeforeForm=<SCRIPT LANGUAGE="JavaScript">window.opener = top;</SCRIPT>
    # HTML to add after the form
    HTMLafterForm=
    # Forms applet parameter: URL path to Forms ListenerServlet
    serverURL=/forms/lservlet
    # Forms applet parameter
    codebase=/forms/java
    # Forms applet parameter
    #imageBase=DocumentBase
    imageBase=codeBase
    # Forms applet parameter default 750
    # width=1000
    # width=100%
    width=500
    # Forms applet parameter default 600
    # height=700
    # height=100%
    height=500
    # Forms applet parameter default false
    separateFrame=true
    # Forms applet parameter
    # splashScreen=
    splashScreen=no
    #splashScreen=ttmslogo_new.gif
    # Forms applet parameter
    background=ttmslogo_new.gif
    # Forms applet parameter
    lookAndFeel=Oracle
    # Forms applet parameter
    colorScheme=teal
    # Forms applet parameter
    logo=ttms_banner.gif
    # Forms applet parameter
    restrictedURLparams=HTMLbodyAttrs,HTMLbeforeForm,pageTitle,HTMLafterForm,log,allow_debug,allowNewConnections
    # Forms applet parameter
    formsMessageListener=
    # Forms applet parameter
    recordFileName=
    # Forms applet parameter
    serverApp=default
    # Forms applet archive setting for JInitiator
    archive_jini=frmall_jinit.jar
    # Forms applet archive setting for other clients (Sun Java Plugin, Appletviewer, etc)
    archive=frmall.jar
    # Number of times client should retry if a network failure occurs. You should
    # only change this after reading the documentation.
    networkRetries=0
    # Page displayed to Netscape users to allow them to download Oracle JInitiator.
    # Oracle JInitiator is used with Windows clients.
    # If you create your own page, you should set this parameter to point to it.
    jinit_download_page=/forms/jinitiator/us/jinit_download.htm
    # Parameter related to the version of JInitiator
    jinit_classid=clsid:CAFECAFE-0013-0001-0022-ABCDEFABCDEF
    # Parameter related to the version of JInitiator
    jinit_exename=jinit.exe#Version=1,3,1,22
    # Parameter related to the version of JInitiator
    jinit_mimetype=application/x-jinit-applet;version=1.3.1.22
    # Page displayed to users to allow them to download Sun's Java Plugin.
    # Sun's Java Plugin is typically used for non-Windows clients.
    # (NOTE: you should check this page and possibly change the settings)
    jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_06/index.html
    # Parameter related to the version of the Java Plugin
    jpi_classid=clsid:CAFEEFAC-0014-0002-0006-ABCDEFFEDCBA
    # Parameter related to the version of the Java Plugin
    jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,06
    # Parameter related to the version of the Java Plugin
    jpi_mimetype=application/x-java-applet;jpi-version=1.4.2_06
    # EM config parameter
    # Set this to "1" to enable Enterprise Manager to track Forms processes
    em_mode=0
    # Single Sign-On OID configuration parameter
    oid_formsid=%OID_FORMSID%
    # Single Sign-On OID configuration parameter
    oracle_home=C:\DevSuiteHome_1
    # Single Sign-On OID configuration parameter
    formsid_group_dn=%GROUP_DN%
    # Single Sign-On OID configuration parameter: indicates whether we allow
    # dynamic resource creation if the resource is not yet created in the OID.
    ssoDynamicResourceCreate=true
    # Single Sign-On parameter: URL to redirect to if ssoDynamicResourceCreate=false
    ssoErrorUrl=
    # Single Sign-On parameter: Cancel URL for the dynamic resource creation DAS page.
    ssoCancelUrl=
    # Single Sign-On parameter: indicates whether the url is protected in which
    # case mod_osso will be given control for authentication or continue in
    # the FormsServlet if not. It is false by default. Set it to true in an
    # application-specific section to enable Single Sign-On for that application.
    ssoMode=false
    # The parameter allow_debug determines whether debugging is permitted.
    # Administrators should set allow_debug to "true" if servlet
    # debugging is required, or to provide access to the Forms Trace Xlate utility.
    # Otherwise these activities will not be allowed (for security reasons).
    allow_debug=false
    # Parameter which determines whether new Forms sessions are allowed.
    # This is also read by the Forms EM Overview page to show the
    # current Forms status.
    allowNewConnections=true
    # EndUserMonitoring
    # EndUserMonitoringEnabled parameter
    # Indicates whether EUM/Chronos integration is enabled
    EndUserMonitoringEnabled=
    # EndUserMonitoringURL
    # indicates where to record EUM/Chronos data
    EndUserMonitoringURL=
    # Example Named Configuration Section
    # Example 1: configuration to run forms in a separate browser window with
    # "generic" look and feel (include "config=sepwin" in the URL)
    # You may define your own specific, named configurations (sets of parameters)
    # by adding special sections as illustrated in the following examples.
    # Note that you need only specify the parameters you want to change. The
    # default values (defined above) will be used for all other parameters.
    # Use of a specific configuration can be requested by including the text
    # "config=<your_config_name>" in the query string of the URL used to run
    # a form. For example, to use the sepwin configuration, your could issue
    # a URL like "http://myhost.mydomain.com/forms/frmservlet?config=sepwin".
    [sepwin]
    separateFrame=True
    lookandfeel=Generic
    # Example Named Configuration Section
    # Example 2: configuration forcing use of the Java Plugin in all cases (even if
    # the client browser is on Windows)
    [jpi]
    baseHTMLJInitiator=basejpi.htm
    # Example Named Configuration Section
    # Example 3: configuration running the Forms ListenerServlet in debug mode
    # (debug messages will be written to the servlet engine's log file).
    [debug]
    serverURL=/forms/lservlet/debug
    # Sample configuration for deploying WebUtil. Note that WebUtil is shipped with
    # DS but not AS and is also available for download from OTN.
    [webutil]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar
    archive=frmall.jar
    lookAndFeel=oracle
    [ttmsmenu]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=frmall_jinit.jar
    archive=frmall.jar
    lookAndFeel=oracle
    width=500
    height=500
    background=no
    form=ttmsmenu.fmx

    Dumb dumb dumb.
    I was running this form out of Form Builder 10g. At some point I changed the Application Server URL (Edit => Preferences => Runtime menus) from:
    http://ssbuechl2.div16.ibm.com:8889/forms/frmservlet?config=ttmsmenu
    to:
    http://ssbuechl2.div16.ibm.com:8889/forms/frmservlet?
    So my customized configuration with all the WebUtil references was not being referenced and I was getting the error.
    Dumb dumb dumb.

  • Ejb3 bean not bound

    Hi I am new to EJB . Now in our project we are using ejb3 and persistance. So tried
    a simple program which I found out from net. But when I am trying to run I am getting
    bean not bound. And in JBoss console it is showing error like
    ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS State: NOTYETINSTALLED
    These are all my files.
    Book.java
    package de.laliluna.library;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @Table(name="book")
    @SequenceGenerator(name = "book_sequence", sequenceName = "book_id_seq")
    public class Book implements Serializable {
         private static final long serialVersionUID = 7422574264557894633L;
         private Integer id;
         private String title;
         private String author;
         public Book() {
              super();
         public Book(Integer id, String title, String author) {
              super();
              this.id = id;
              this.title = title;
              this.author = author;
         @Override
         public String toString() {
              return "Book: " + getId() + " Title " + getTitle() + " Author "
                        + getAuthor();
         public String getAuthor() {
              return author;
         public void setAuthor(String author) {
              this.author = author;
         @Id
         @GeneratedValue(strategy = GenerationType.TABLE, generator = "book_id")
         public Integer getId() {
              return id;
         public void setId(Integer id) {
              this.id = id;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
    }BookTestBean.java
    package de.laliluna.library;
    import java.util.Iterator;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless
    public class BookTestBean implements BookTestBeanLocal, BookTestBeanRemote {
         @PersistenceContext(name="FirstEjb3Tutorial")
         EntityManager em;
         public static final String RemoteJNDIName =  BookTestBean.class.getSimpleName() + "/remote";
         public static final String LocalJNDIName =  BookTestBean.class.getSimpleName() + "/local";
         public void test() {
              Book book = new Book(null, "My first bean book", "Sebastian");
              em.persist(book);
              Book book2 = new Book(null, "another book", "Paul");
              em.persist(book2);
              Book book3 = new Book(null, "EJB 3 developer guide, comes soon",
                        "Sebastian");
              em.persist(book3);
              System.out.println("list some books");
              List someBooks = em.createQuery("from Book b where b.author=:name")
                        .setParameter("name", "Sebastian").getResultList();
              for (Iterator iter = someBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
              System.out.println("List all books");
              List allBooks = em.createQuery("from Book").getResultList();
              for (Iterator iter = allBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
              System.out.println("delete a book");
              em.remove(book2);
              System.out.println("List all books");
               allBooks = em.createQuery("from Book").getResultList();
              for (Iterator iter = allBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
    }BookTestBeanLocal.java
    package de.laliluna.library;
    import javax.ejb.Local;
    @Local
    public interface BookTestBeanLocal {
         public void test();     
    }BookTestBeanRemote.java
    package de.laliluna.library;
    import javax.ejb.Remote;
    @Remote
    public interface BookTestBeanRemote {
         public void test();
    }client part--> FirstEJB3TutorialClient.java
    package de.laliluna.library;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import de.laliluna.library.BookTestBean;
    import de.laliluna.library.BookTestBeanRemote;
    * @author hennebrueder
    public class FirstEJB3TutorialClient {
          * @param args
         public static void main(String[] args) {
               * get a initial context. By default the settings in the file
               * jndi.properties are used. You can explicitly set up properties
               * instead of using the file.
                Properties properties = new Properties();
                properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
                properties.put("java.naming.provider.url","localhost:1099");
              Context context;
              try {
                   context = new InitialContext(properties);
                   BookTestBeanRemote beanRemote = (BookTestBeanRemote) context
                             .lookup(BookTestBean.RemoteJNDIName);
                   beanRemote.test();
              } catch (NamingException e) {
                   e.printStackTrace();
                    * I rethrow it as runtimeexception as there is really no need to
                    * continue if an exception happens and I do not want to catch it
                    * everywhere.
                   throw new RuntimeException(e);
    }I have created persistance.xml and application.xml under META-INF folder.
    persistance.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="FirstEjb3Tutorial">
    <jta-data-source>hsqldb-db</jta-data-source>
    <properties>
    <property name="hibernate.hbm2ddl.auto"
    value="create-drop"/>
    </properties>
    </persistence-unit>
    </persistence>application.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
         <display-name>Stateless Session Bean Example</display-name>
         <module>
              <ejb>FirstEjb3Tutorial.jar</ejb>
         </module>
    </application>and in hsqldb-ds i have configured the driver and connection
    <datasources>
       <local-tx-datasource>
          <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
          <!-- Datasources are not available outside the virtual machine -->
          <jndi-name>ejb3ProjectDS</jndi-name>
          <!-- For server mode db, allowing other processes to use hsqldb over tcp.
          This requires the org.jboss.jdbc.HypersonicDatabase mbean.
          <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
          -->
          <!-- For totally in-memory db, not saved when jboss stops.
          The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
          <connection-url>jdbc:hsqldb:.</connection-url>
          -->
          <!-- For in-process persistent db, saved when jboss stops.
          The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
          -->
         <!-- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url-->
         <connection-url>jdbc:hsqldb:data/tutorial</connection-url>
          <!-- The driver class -->
          <driver-class>org.hsqldb.jdbcDriver</driver-class>
          <!-- The login and password -->
          <user-name>sa</user-name>
          <password></password>
          <!--example of how to specify class that determines if exception means connection should be destroyed-->
          <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
          <!-- this will be run before a managed connection is removed from the pool for use by a client-->
          <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
          <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
          <min-pool-size>5</min-pool-size>
          <!-- The maximum connections in a pool/sub-pool -->
          <max-pool-size>20</max-pool-size>
          <!-- The time before an unused connection is destroyed -->
          <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
          <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
          <idle-timeout-minutes>0</idle-timeout-minutes>
          <!-- 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
             <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
          -->
          <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
             <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
          -->
          <!-- Whether to check all statements are closed when the connection is returned to the pool,
               this is a debugging feature that should be turned off in production -->
          <track-statements/>
          <!-- Use the getConnection(user, pw) for logins
            <application-managed-security/>
          -->
          <!-- Use the security domain defined in conf/login-config.xml -->
          <security-domain>HsqlDbRealm</security-domain>
          <!-- Use the security domain defined in conf/login-config.xml or the
               getConnection(user, pw) for logins. The security domain takes precedence.
            <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
          -->
          <!-- HSQL DB benefits from prepared statement caching -->
          <prepared-statement-cache-size>32</prepared-statement-cache-size>
          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
          <metadata>
             <type-mapping>Hypersonic SQL</type-mapping>
          </metadata>
          <!-- When using in-process (standalone) mode -->
          <depends>jboss:service=Hypersonic,database=localDB</depends>
          <!-- Uncomment when using hsqldb in server mode
          <depends>jboss:service=Hypersonic</depends>
          -->
       </local-tx-datasource>
       <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
       <mbean code="org.jboss.jdbc.HypersonicDatabase"
         name="jboss:service=Hypersonic">
         <attribute name="Port">1701</attribute>
         <attribute name="BindAddress">${jboss.bind.address}</attribute>    
         <attribute name="Silent">true</attribute>
         <attribute name="Database">default</attribute>
         <attribute name="Trace">false</attribute>
         <attribute name="No_system_exit">true</attribute>
       </mbean>
       -->
       <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
       <mbean code="org.jboss.jdbc.HypersonicDatabase"
         name="jboss:service=Hypersonic,database=localDB">
         <attribute name="Database">localDB</attribute>
         <attribute name="InProcessMode">true</attribute>
       </mbean>
    </datasources>.
    Edited by: bhanu on Dec 2, 2008 9:45 AM

    Hi jadespirit ,
    I have the same problem in the same Book example ,my ejb3 project name "BaseHotele" so i follow what u said and this is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="FirstEjb3Tutorial">
    *<jta-data-source>java:BaseHoteleDS</jta-data-source>*
    <properties>
    <property name="hibernate.hbm2ddl.auto"
    value="create-drop"/>
    </properties>
    </persistence-unit>
    </persistence>
    But it didn't work i have always HotelTestBean not bound!!
    Help PLEASE i think that i had a mistake in the persistence.xml:i have 2 days searching for solutions without a good result!!!!!!!!!!!!!

  • Oracle.forms.webutil.file.FileFunctions bean not found. WEBUTIL_FILE.FILE_D

    Hi guys,
    I have updated my AS and DS to 10.1.2.3 and downloaded Wbutil 1.6 update 10.
    I configured all the .cfg files as mentioned in the documentation when I launch a test form with config=webutil and a webutil functionality in it then i am getting following error -
    oracle.forms.webutil.file.FileFunctions bean not found.
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    Java console shows following -
    java.lang.ClassNotFoundException: oracle.forms.webutil.clientInfo.GetClientInfo
    Caused by: java.io.IOException: open HTTP connection failed:http://abhamare-2k.cybage.com:7778/forms/java/oracle/forms/webutil/clientInfo/GetClientInfo.class
    java.lang.ClassNotFoundException: oracle.forms.webutil.file.FileFunctions
    Caused by: java.io.IOException: open HTTP connection failed:http://abhamare-2k.cybage.com:7778/forms/java/oracle/forms/webutil/file/FileFunctions.class
    java.lang.ClassNotFoundException: oracle.forms.webutil.host.Host
    Caused by: java.io.IOException: open HTTP connection failed:http://abhamare-2k.cybage.com:7778/forms/java/oracle/forms/webutil/host/Host.class
    java.lang.ClassNotFoundException: oracle.forms.webutil.session.SessionFunctions
    Caused by: java.io.IOException: open HTTP connection failed:http://abhamare-2k.cybage.com:7778/forms/java/oracle/forms/webutil/session/SessionFunctions.class
    and so on..
    Some how my java console too has stopped showing up after mistakingly clicked Hide Console.
    So can any one help me to get out of this error.
    Its sort of driving me crazy.
    Thanks in advance.
    Av.

    Hi Av, Can you let me know what you did to fix this issue? We are facing a serious issue with the same error and we can't get around it.
    Thanks
    Sam.

  • WebUtil 1.0.6 - GetClientInfo bean not found.

    I'm using Developer 10g Version 10.1.2.0.2 and the latest available Webutil-package 1.0.6.
    I installed all components and followed all the steps.
    When I execute the form test of webutil: WU_TEST_106 open a window with:
    oracle.forms.webutil.clientinfo.GetClientInfo bean not found.
    WEBUTIL_CLIENTINFO.GET_JAVA_VERSION will not work.
    I did all the recommendations of metalink, but nothing.
    Please, I need your help.

    By Edit - Preferences
    ?config=webutil , I did that, but the problem continue.
    The configuration of files formsweb.cfg, default.env and webutil.cfg is:
    FORMSWEB.CFG
    # $Id: formsweb.cfg 15-apr-2005.13:17:30 pkuhn Exp $
    # formsweb.cfg defines parameter values used by the FormsServlet (frmservlet)
    # This section defines the Default settings. Any of them may be overridden in the
    # following Named Configuration sections. If they are not overridden, then the
    # values here will be used.
    # The default settings comprise two types of parameters: System parameters,
    # which cannot be overridden in the URL, and User Parameters, which can.
    # Parameters which are not marked as System parameters are User parameters.
    # SYSTEM PARAMETERS
    # These have fixed names and give information required by the Forms
    # Servlet in order to function. They cannot be specified in the URL query
    # string. But they can be overridden in a named configuration (see below).
    # Some parameters specify file names: if the full path is not given,
    # they are assumed to be in the same directory as this file. If a path
    # is given, then it should be a physical path, not a URL.
    # USER PARAMETERS
    # These match variables (e.g. %form%) in the baseHTML file. Their values
    # may be overridden by specifying them in the URL query string
    # (e.g. "http://myhost.mydomain.com/forms/frmservlet?form=myform&width=700")
    # or by overriding them in a specific, named configuration (see below)
    [default]
    # System parameter: default base HTML file
    baseHTML=base.htm
    # System parameter: base HTML file for use with JInitiator client
    baseHTMLjinitiator=basejini.htm
    # System parameter: base HTML file for use with Sun's Java Plug-In
    baseHTMLjpi=basejpi.htm
    # System parameter: delimiter for parameters in the base HTML files
    HTMLdelimiter=%
    # System parameter: working directory for Forms runtime processes
    # WorkingDirectory defaults to <oracle_home>/forms if unset.
    workingDirectory=
    # System parameter: file setting environment variables for the Forms runtime processes
    envFile=default.env
    # Forms runtime argument: whether to escape certain special characters
    # in values extracted from the URL for other runtime arguments
    escapeparams=true
    # Forms runtime argument: which form module to run
    form=test.fmx
    # Forms runtime argument: database connection details
    userid=
    # Forms runtime argument: whether to run in debug mode
    debug=no
    # Forms runtime argument: host for debugging
    host=
    # Forms runtime argument: port for debugging
    port=
    # Other Forms runtime arguments: grouped together as one parameter.
    # These settings support running and debugging a form from the Builder:
    otherparams=buffer_records=%buffer% debug_messages=%debug_messages% array=%array% obr=%obr% query_only=%query_only% quiet=%quiet% render=%render% record=%record% tracegroup=%tracegroup% log=%log% term=%term%
    # Sub argument for otherparams
    buffer=no
    # Sub argument for otherparams
    debug_messages=no
    # Sub argument for otherparams
    array=no
    # Sub argument for otherparams
    obr=no
    # Sub argument for otherparams
    query_only=no
    # Sub argument for otherparams
    quiet=yes
    # Sub argument for otherparams
    render=no
    # Sub argument for otherparams
    record=
    # Sub argument for otherparams
    tracegroup=
    # Sub argument for otherparams
    log=
    # Sub argument for otherparams
    term=
    # HTML page title
    pageTitle=Oracle Application Server Forms Services
    # HTML attributes for the BODY tag
    HTMLbodyAttrs=
    # HTML to add before the form
    HTMLbeforeForm=
    # HTML to add after the form
    HTMLafterForm=
    # Forms applet parameter: URL path to Forms ListenerServlet
    serverURL=/forms/lservlet
    # Forms applet parameter
    codebase=/forms/java
    # Forms applet parameter
    imageBase=DocumentBase
    # Forms applet parameter
    width=750
    # Forms applet parameter
    height=600
    # Forms applet parameter
    separateFrame=false
    # Forms applet parameter
    splashScreen=
    # Forms applet parameter
    background=
    # Forms applet parameter
    lookAndFeel=Oracle
    # Forms applet parameter
    colorScheme=teal
    # Forms applet parameter
    logo=
    # Forms applet parameter
    restrictedURLparams=HTMLbodyAttrs,HTMLbeforeForm,pageTitle,HTMLafterForm,log,allow_debug,allowNewConnections
    # Forms applet parameter
    formsMessageListener=
    # Forms applet parameter
    recordFileName=
    # Forms applet parameter
    serverApp=default
    # Forms applet archive setting for JInitiator
    archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
    # Forms applet archive setting for other clients (Sun Java Plugin, Appletviewer, etc)
    archive=frmall.jar
    # Number of times client should retry if a network failure occurs. You should
    # only change this after reading the documentation.
    networkRetries=0
    # Page displayed to Netscape users to allow them to download Oracle JInitiator.
    # Oracle JInitiator is used with Windows clients.
    # If you create your own page, you should set this parameter to point to it.
    jinit_download_page=/forms/jinitiator/us/jinit_download.htm
    # Parameter related to the version of JInitiator
    jinit_classid=clsid:CAFECAFE-0013-0001-0022-ABCDEFABCDEF
    # Parameter related to the version of JInitiator
    jinit_exename=jinit.exe#Version=1,3,1,22
    # Parameter related to the version of JInitiator
    jinit_mimetype=application/x-jinit-applet;version=1.3.1.22
    # Page displayed to users to allow them to download Sun's Java Plugin.
    # Sun's Java Plugin is typically used for non-Windows clients.
    # (NOTE: you should check this page and possibly change the settings)
    jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_06/index.html
    # Parameter related to the version of the Java Plugin
    jpi_classid=clsid:CAFEEFAC-0014-0002-0006-ABCDEFFEDCBA
    # Parameter related to the version of the Java Plugin
    jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,06
    # Parameter related to the version of the Java Plugin
    jpi_mimetype=application/x-java-applet;jpi-version=1.4.2_06
    # EM config parameter
    # Set this to "1" to enable Enterprise Manager to track Forms processes
    em_mode=0
    # Single Sign-On OID configuration parameter
    oid_formsid=%OID_FORMSID%
    # Single Sign-On OID configuration parameter
    oracle_home=C:\Oracle\Dev10g
    # Single Sign-On OID configuration parameter
    formsid_group_dn=%GROUP_DN%
    # Single Sign-On OID configuration parameter: indicates whether we allow
    # dynamic resource creation if the resource is not yet created in the OID.
    ssoDynamicResourceCreate=true
    # Single Sign-On parameter: URL to redirect to if ssoDynamicResourceCreate=false
    ssoErrorUrl=
    # Single Sign-On parameter: Cancel URL for the dynamic resource creation DAS page.
    ssoCancelUrl=
    # Single Sign-On parameter: indicates whether the url is protected in which
    # case mod_osso will be given control for authentication or continue in
    # the FormsServlet if not. It is false by default. Set it to true in an
    # application-specific section to enable Single Sign-On for that application.
    ssoMode=false
    # The parameter allow_debug determines whether debugging is permitted.
    # Administrators should set allow_debug to "true" if servlet
    # debugging is required, or to provide access to the Forms Trace Xlate utility.
    # Otherwise these activities will not be allowed (for security reasons).
    allow_debug=false
    # Parameter which determines whether new Forms sessions are allowed.
    # This is also read by the Forms EM Overview page to show the
    # current Forms status.
    allowNewConnections=true
    # EndUserMonitoring
    # EndUserMonitoringEnabled parameter
    # Indicates whether EUM/Chronos integration is enabled
    EndUserMonitoringEnabled=
    # EndUserMonitoringURL
    # indicates where to record EUM/Chronos data
    EndUserMonitoringURL=
    # Example Named Configuration Section
    # Example 1: configuration to run forms in a separate browser window with
    # "generic" look and feel (include "config=sepwin" in the URL)
    # You may define your own specific, named configurations (sets of parameters)
    # by adding special sections as illustrated in the following examples.
    # Note that you need only specify the parameters you want to change. The
    # default values (defined above) will be used for all other parameters.
    # Use of a specific configuration can be requested by including the text
    # "config=<your_config_name>" in the query string of the URL used to run
    # a form. For example, to use the sepwin configuration, your could issue
    # a URL like "http://myhost.mydomain.com/forms/frmservlet?config=sepwin".
    [sepwin]
    separateFrame=True
    lookandfeel=Generic
    # Example Named Configuration Section
    # Example 2: configuration forcing use of the Java Plugin in all cases (even if
    # the client browser is on Windows)
    [jpi]
    baseHTMLJInitiator=basejpi.htm
    # Example Named Configuration Section
    # Example 3: configuration running the Forms ListenerServlet in debug mode
    # (debug messages will be written to the servlet engine's log file).
    [debug]
    serverURL=/forms/lservlet/debug
    # Sample configuration for deploying WebUtil. Note that WebUtil is shipped with
    # DS but not AS and is also available for download from OTN.
    [webutil]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
    archive=frmall.jar
    lookAndFeel=oracle
    # webutil.cfg - WebUtil default configuration file
    # This file provides all of the configuration settings for webutil. These are
    # divided into the following sections:
    # 1. Logging Options
    # 2. Installation Options
    # 3. FileUpload and Download Options
    # 1. Server Side Logging Options for logging errors and log messages
    # You must set logging.enabled to true to allow mid-tier logging. Without this
    # mid-tier logging will not take place no matter what PL/SQL or URL options
    # are supplied to switch it on. Once logging is enabled the other settings come
    # into play.
    # Details
    # logging.file : Defines the file name and location of the log file.
    # Note that WebUtil does no log file management. You may
    # need to manually clean this file up from time to time.
    # logging.enabled : Can be TRUE or FALSE
    # logging.errorsonly : Can be TRUE or FALSE. Setting to true will ensure that
    # only errors and not normal informational log messages
    # are written to the log file. For product use this would
    # normally be set to TRUE
    # logging.connections: Can be TRUE or FALSE. Setting to true will cause each
    # connection from a client using WebUtil to write into
    # the log as it sets up.
    logging.file=
    logging.enabled=FALSE
    logging.errorsonly=FALSE
    logging.connections=FALSE
    # 2. Installation Options
    # WebUtil needs to download some files to the client in order to perform
    # certain integration operations such as OLE or Registry Access. These files
    # are downloaded the first time that you access one of the functions that need
    # them. You have to define the location of these files on the server
    # Details
    # install syslib.location : The virtual path to the directory holding the
    # webutil library files on the server side. This
    # must either be an absolute URL or a URL that is
    # relative to the documentbase
    # install.syslib.<os>.<package>.<n> :
    # The name(s) of the libraries required for
    # particular webutil beans. The format of this is
    # name|size|version|showDownloadDialog. Multiple
    # libraries can be downloaded per package. But
    # ensure that the <n> values are consecutive and
    # start at 1
    install.syslib.location=/webutil
    # Change size and version if necessary, like when upgrading the library.
    # Normally this would not be required since most of these libraries come with
    # install itself.
    install.syslib.0.7.1=jacob.dll|94208|1.2|true
    install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
    install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true
    # You can also add your own libraries in here, e.g.
    #install.syslib.0.user.1=testwebutil.dll|204872|1.0|true
    install.syslib.0.user.1=ffisamp.dll|40960|1.0|true
    # 3. Upload / Download options
    # For the file upload and download options you can define the default locations
    # on the server that webutil can use as a work area. Optionally you can switch
    # upload and download off
    # Details
    # transfer.database.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the database server.
    # transfer.appsrv.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the application
    # server.
    # transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
    # store temporary files uploaded from the client.
    # If no location is specified, Application Server
    # user_home/temp will be assumed.
    # This location is always readable and writable
    # no matter what the settings in
    # transfer.appsrv.* are. This setting is
    # required if you need the Client side
    # READ/WRITE_IMAGE_FILE procedures.
    # transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
    # that uploads and downloads can only occur from
    # the directories named in the
    # transfer.appsrv.read.n and
    # transfer.appsrv.write.n entries and their
    # subdirectories. If this setting is FALSE,
    # transfers can happen anywhere.
    # transfer.appsrv.read.<n>: List of directory names that downloads can read
    # from.
    # transfer.appsrv.write.<n>: List of directory names that uploads can write
    # to.
    #NOTE: By default the file transfer is disabled as a security measure
    transfer.database.enabled=FALSE
    transfer.appsrv.enabled=FALSE
    transfer.appsrv.workAreaRoot=
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp
    default.env
    # $Id: default.env 14-apr-2005.13:22:43 pkuhn Exp $
    # default.env - default Forms environment file, Windows version
    # This file is used to set the Forms runtime environment parameters.
    # If a parameter is not defined here, the value in the Windows registry
    # will be used. If no value is found in the registry, the value used will
    # be that defined in the environment in which the servlet engine (OC4J
    # or JServ) was started.
    # NOTES
    # 1/ The Forms installation process should replace all occurrences of
    # <percent>FORMS_ORACLE_HOME<percent> with the correct ORACLE_HOME
    # setting, and all occurrences of <percent>O_JDK_HOME<percent> with
    # the location of the JDK (usually $ORACLE_HOME/jdk).
    # Please make these changes manually if not.
    # 2/ Some of the variables below may need to be changed to suite your needs.
    # Please refer to the Forms documentation for details.
    ORACLE_HOME=C:\Oracle\Dev10g
    # Search path for Forms applications (.fmx files, PL/SQL libraries)
    # If you need to include more than one directory, they should be semi-colon
    # separated (e.g. c:\test\dir1;c:\test\dir2)
    FORMS_PATH=C:\Oracle\Dev10g\forms
    # webutil config file path
    WEBUTIL_CONFIG=C:\Oracle\Dev10g\forms\server\webutil.cfg
    # Disable/remove this variable if end-users need access to the query-where
    # functionality which potentially allows them to enter arbitrary SQL
    # statements when in enter-query mode.
    FORMS_RESTRICT_ENTER_QUERY=TRUE
    # The PATH setting is required in order to pick up the JVM (jvm.dll).
    # The Forms runtime executable and dll's are assumed to be in
    # C:\Oracle\Dev10g\bin if they are not in the PATH.
    # In addition, if you are running Graphics applications, you will need
    # to append the following to the path (where <Graphics Oracle Home> should
    # be replaced with the actual location of your Graphics 6i oracle_home):
    # ;<Graphics Oracle Home>\bin;<Graphics Oracle Home>\jdk\bin
    PATH=C:\Oracle\Dev10g\bin;C:\Oracle\Dev10g\jdk\jre\bin\client
    # Settings for Graphics
    # NOTE: These settings are only needed if Graphics applications
    # are called from Forms applications. In addition, you will need to
    # modify the PATH variable above as described above.
    # Please uncomment the following and put the correct 6i
    # oracle_home value to use Graphics applications.
    #ORACLE_GRAPHICS6I_HOME=<your Graphics 6i oracle_home here>
    # Search path for Graphics applications
    #GRAPHICS60_PATH=
    # Settings for Forms tracing and logging
    # Note: This entry has to be uncommented to enable tracing and
    # logging.
    #FORMS_TRACE_PATH=<FORMS_ORACLE_HOME>\forms\server
    # System settings
    # You should not normally need to modify these settings
    FORMS=C:\Oracle\Dev10g\forms
    # Java class path
    # This is required for the Forms debugger
    # You can append your own Java code here)
    # frmsrv.jar, repository.jar and ldapjclnt10.jar are required for
    # the password expiry feature to work(#2213140).
    CLASSPATH=C:\Oracle\Dev10g\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;C:\Oracle\Dev10g\jlib\repository.jar;C:\Oracle\Dev10g\jlib\ldapjclnt10.jar;C:\Oracle\Dev10g\jlib\debugger.jar;C:\Oracle\Dev10g\jlib\ewt3.jar;C:\Oracle\Dev10g\jlib\share.jar;C:\Oracle\Dev10g\jlib\utj.jar;C:\Oracle\Dev10g\jlib\zrclient.jar;C:\Oracle\Dev10g\reports\jlib\rwrun.jar;C:\Oracle\Dev10g\forms\java\frmwebutil.jar;C:\Oracle\Dev10g\jdk\jre\lib\rt.jar
    The files is in c:\Oracle\Dev10g\forms\server
    Please, i can your help

  • SOS : Bean not found in 'findByName'

    Blank
    Hi Rob,
    thankx for the fast reply and the detailed explanations.
    it's gettings things cleared for me..
    let me explain the way I have understood your explanation.
    I have an EJB (entity bean) called T_Exception. Suppose, this uses few classes in the jar file frwUtil.jar
    So, do you mean to say that I should have a manifest file with the EJB Jar of T_Exception saying "Class-Path: frwUtil.jar" ?
    And this frwUtil.jar should be a part of the .ear where I have T_Exception?
    I have another EJB (session bean) T_ASM which uses T_Exception and also the classes in frwUtil.jar
    So, do you mean to say that I should have a manifest file with the EJB Jar of T_ASM saying something like
    "Class-Path: T_Exception.jar frwUtil.jar" or it just have to be "Class-Path: T_Exception.jar" ?
    And this T_Exception.jar or frwUtil.jar doesn't have to be a part of this .ear file it the previous .ear file is already deployed, right?
    Please correct me if am wrong.
    In short, you are telling me that a support class or jar file which is deployed as part of an .ear file into an application server will be available for another EJB / class file in another .ear file which is also deployed after that. Am I right? I am getting confused in these areas.
    Another doubt is about the significance of manifest files.
    Is it something like one manifest file per a package / folder or something?
    Can I have more than one manifest file for the same package? doesn't sounds logical but just to know
    where and all manifest file comes into play? am not sure abt this..
    Is there some good tutorial available to learn more about this? if yes, please let me know!
    Like you said, setting the $CLASSPATH is definitely a bad practice. We are going to aviod that once this starts working. Thanks for your suggestion.
    regarding dOubt 3 -
    For your reference, below is the erorr that I got -
    javax.ejb.ObjectNotFoundException: Bean not found in 'findByName'.
    at com.tech.framework.propertyEJB.PropertyEJB_kzue3c__WebLogic_CMP_RDBMS.ejbFindByName(PropertyEJB_kzue3c__WebLogic_CMP_RDBMS.java:2001)
    at java.lang.reflect.Method.invoke(Native Method)
    the deployment of the bean goes without an error.
    and it doesn't look like a Finder exception also, right?
    and that's where am confused.
    the same bean is working without any problems like this in 2 - 3 application server instances.
    For the same reason, I don't think that there's a prob with the EJB QL used.
    But now we are trying to remotely deploy the EJBs and deployment doesnt give an error too.
    But the very first call to this bean is giving this error only in this set up.
    and we are struggling with this since the past few days.. trying out all possibilities..
    no luck so far.. .:(
    Thankx again.. in advance..
    "Rob Woollen" <[email protected]> wrote in message news:[email protected]...
    ibmMQ wrote:
    Hi Folks..
    sorry but these doubts are probably cause am a new bie..
    dOubt No 2:
    can I put all the support classes / jar files into the server the way I
    deploy a bean?Yes, make a Jar (or jars) that have the support classes. Package them within
    the EAR file and include a Class-Path entry in the manifest of any component
    that uses these classes.
    Here's an example: http://learnweblogic.com/updates/webauction.zip
    Do not put the classes in the $CLASSPATH. You will not be able to redeploy
    them if they are there.
    mean to ask, can I make a .war or .ear file with all these support jar files
    and ca I uplaod to the application server so that when I deploy a bean, it
    will have these necessary dependency classes ready in the server? As of now,
    I set the classpath in the startweblogic.cmd file which requires a server
    restart every now and then I add something to the server classpath.
    dOubt No 3:
    when do I get Bean not found in 'findByName'?
    I am rather confused with this error!
    We'd need some more info here. Are you sure that your EJB-QL is correct?
    -- Rob
    thankx in advance
    mNs
    [att1.html]
    [Blank Bkgrd.gif]

    BlankIs it possible that a corresponding object is not found for this findByName call and hence it throws this?
    because we tried accessing the same bean from an ordinary java client and it works!!!
    but I thought if it's not finding an Object to return for a given key, it throws FinderException!
    am more confused now, I guess..
    mNs
    "ibmMQ" <[email protected]> wrote in message news:[email protected]...
    Hi Rob,
    thankx for the fast reply and the detailed explanations.
    it's gettings things cleared for me..
    let me explain the way I have understood your explanation.
    I have an EJB (entity bean) called T_Exception. Suppose, this uses few classes in the jar file frwUtil.jar
    So, do you mean to say that I should have a manifest file with the EJB Jar of T_Exception saying "Class-Path: frwUtil.jar" ?
    And this frwUtil.jar should be a part of the .ear where I have T_Exception?
    I have another EJB (session bean) T_ASM which uses T_Exception and also the classes in frwUtil.jar
    So, do you mean to say that I should have a manifest file with the EJB Jar of T_ASM saying something like
    "Class-Path: T_Exception.jar frwUtil.jar" or it just have to be "Class-Path: T_Exception.jar" ?
    And this T_Exception.jar or frwUtil.jar doesn't have to be a part of this .ear file it the previous .ear file is already deployed, right?
    Please correct me if am wrong.
    In short, you are telling me that a support class or jar file which is deployed as part of an .ear file into an application server will be available for another EJB / class file in another .ear file which is also deployed after that. Am I right? I am getting confused in these areas.
    Another doubt is about the significance of manifest files.
    Is it something like one manifest file per a package / folder or something?
    Can I have more than one manifest file for the same package? doesn't sounds logical but just to know
    where and all manifest file comes into play? am not sure abt this..
    Is there some good tutorial available to learn more about this? if yes, please let me know!
    Like you said, setting the $CLASSPATH is definitely a bad practice. We are going to aviod that once this starts working. Thanks for your suggestion.
    regarding dOubt 3 -
    For your reference, below is the erorr that I got -
    javax.ejb.ObjectNotFoundException: Bean not found in 'findByName'.
    at com.tech.framework.propertyEJB.PropertyEJB_kzue3c__WebLogic_CMP_RDBMS.ejbFindByName(PropertyEJB_kzue3c__WebLogic_CMP_RDBMS.java:2001)
    at java.lang.reflect.Method.invoke(Native Method)
    the deployment of the bean goes without an error.
    and it doesn't look like a Finder exception also, right?
    and that's where am confused.
    the same bean is working without any problems like this in 2 - 3 application server instances.
    For the same reason, I don't think that there's a prob with the EJB QL used.
    But now we are trying to remotely deploy the EJBs and deployment doesnt give an error too.
    But the very first call to this bean is giving this error only in this set up.
    and we are struggling with this since the past few days.. trying out all possibilities..
    no luck so far.. .:(
    Thankx again.. in advance..
    "Rob Woollen" <[email protected]> wrote in message news:[email protected]...
    > ibmMQ wrote:
    >
    > > Hi Folks..
    > >
    > > sorry but these doubts are probably cause am a new bie..
    > >
    > > dOubt No 2:
    > > can I put all the support classes / jar files into the server the way I
    > > deploy a bean?
    >
    > Yes, make a Jar (or jars) that have the support classes. Package them within
    > the EAR file and include a Class-Path entry in the manifest of any component
    > that uses these classes.
    >
    > Here's an example: http://learnweblogic.com/updates/webauction.zip
    >
    > Do not put the classes in the $CLASSPATH. You will not be able to redeploy
    > them if they are there.
    >
    > >
    > > mean to ask, can I make a .war or .ear file with all these support jar files
    > > and ca I uplaod to the application server so that when I deploy a bean, it
    > > will have these necessary dependency classes ready in the server? As of now,
    > > I set the classpath in the startweblogic.cmd file which requires a server
    > > restart every now and then I add something to the server classpath.
    > >
    > > dOubt No 3:
    > > when do I get Bean not found in 'findByName'?
    > > I am rather confused with this error!
    > >
    >
    > We'd need some more info here. Are you sure that your EJB-QL is correct?
    >
    > -- Rob
    >
    >
    >
    > >
    > > thankx in advance
    > > mNs
    >
    [att1.html]
    [Blank Bkgrd.gif]

  • Bean not found within scope

    I have a login bean that verify's the user and on successful login, sets the bean in a session variable. Each page will then access the bean to verify the user. When there is no activity in the browser, the session expires, and the user has to log in again. I am getting the following error in my logs (java.lang.InstantiationException: bean not found within scope).
    Is this ok? or would this be a memory leak?
    Thanks

    As long as the error is in the block that checks for the session then there is no problem as long you're catching the exception. Maybe its the way you check for the session that causes the error. Either way you shouldn't need to worry about it. The only problem would be if you were trying to set any variables/objects inside the block which you relied upon later in the page.
    Rob.

  • Failed to lazily initialize a collection -, could not initialize proxy - no Session

    I have an application that i am extending to provide a REST API.  Everything works fine in the main site, but I am getting the following in the exception log when I try to hit the REST API:
        "Error","ajp-bio-8014-exec-3","12/02/14","12:54:06","table","failed to lazily initialize a collection of role: field, could not initialize proxy - no Session The specific sequence of files included or processed is: service.cfc'' "
        org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: field, could not initialize proxy - no Session
            at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationExc eption(AbstractPersistentCollection.java:566)
            at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeed ed(AbstractPersistentCollection.java:186)
            at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersisten tCollection.java:137)
            at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:242)
            at coldfusion.runtime.xml.ListIndexAccessor.getSize(ListIndexAccessor.java:44)
            at coldfusion.runtime.xml.ArrayHandler.serialize(ArrayHandler.java:69)
            at coldfusion.runtime.xml.CFComponentHandler.serialize(CFComponentHandler.java:106)
            at coldfusion.runtime.XMLizerUtils.serializeXML(XMLizerUtils.java:83)
            at coldfusion.rest.provider.CFObjectProvider.writeTo(CFObjectProvider.java:378)
            at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
            at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationIm pl.java:1479)
            at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImp l.java:1391)
            at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImp l.java:1381)
            at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
            at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
            at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:141)
            at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:86)
            at coldfusion.rest.servlet.CFRestServlet.serviceUsingAlreadyInitializedContainers(CFRestServ let.java:556)
            at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:434)
            at coldfusion.rest.servlet.RestFilter.invoke(RestFilter.java:58)
            at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
            at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
            at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
            at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
            at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:409)
            at coldfusion.rest.servlet.CFRestServlet.service(CFRestServlet.java:400)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
            at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
            at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:198)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607)
            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Disabling lazy loading will fix this, but results in unacceptable performance (load times go from 200ms to 22s).  I'm not sure how else to handle this.
    I am new to REST in ColdFusion, and it seems to me that the CFC's are being handled in an unusual way.  They do not appear to be initialized (init method does not seem to run) and now it seems that ORM is not handled the same either.  Am I missing something?
    Here is the excerpt of my code producing this error:
        component rest="true" restpath="item"
            import model.beans.*;
            remote item function getitem( numeric id restargsource="Path" ) restpath="{id}" httpmethod="GET"
                var item = entityLoad("item",{ id = id },true);
                return item;
    And the bean:
        component persistent="true" table="item" output="false" extends="timestampedBean" batchsize="10" cacheuse="read-only"
            /* properties */
            property name="id" column="id" type="numeric" ormtype="int" fieldtype="id" generator="identity";
            property name="title" column="title" type="string" ormtype="string";
            property name="description" column="description" type="string" ormtype="string";
            property name="status" column="status" type="numeric" ormtype="byte" default="0" ;
            property name="user" fieldtype="many-to-one" cfc="user" fkcolumn="userid" inversejoincolum="userid" lazy="true" cacheuse="read-only";
            property name="field" type="array" fieldtype="many-to-many" cfc="field" fkcolumn="id" linktable="items_fields" inversejoincolumn="fieldid" lazy="extra" batchsize="10" cacheuse="read-only";
    I also noticed in the stdout log that Hibernate is logging the query, but then it logs the "No session" error:
        Hibernate:
            select
                item0_.id as id0_0_,
                item0_.dtcreated as dtcreated0_0_,
                item0_.dtmodified as dtmodified0_0_,
                item0_.title as title0_0_,
                item0_.description as descript6_0_0_,
                item0_.status as status0_0_,
                item0_.userid as userid0_0_
            from
                item item0_
            where
                item0_.id=?
        Dec 2, 2014 15:23:00 PM Error [ajp-bio-8014-exec-3] - failed to lazily initialize a collection of role: field, could not initialize proxy - no Session The specific sequence of files included or processed is: service.cfc''
    I should probably also add that this "item" table is part of a many-to-many relationship, so "collection of role: field" is referencing the foreign table.

    I have an application that i am extending to provide a REST API.  Everything works fine in the main site, but I am getting the following in the exception log when I try to hit the REST API:
        "Error","ajp-bio-8014-exec-3","12/02/14","12:54:06","table","failed to lazily initialize a collection of role: field, could not initialize proxy - no Session The specific sequence of files included or processed is: service.cfc'' "
        org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: field, could not initialize proxy - no Session
            at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationExc eption(AbstractPersistentCollection.java:566)
            at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeed ed(AbstractPersistentCollection.java:186)
            at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersisten tCollection.java:137)
            at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:242)
            at coldfusion.runtime.xml.ListIndexAccessor.getSize(ListIndexAccessor.java:44)
            at coldfusion.runtime.xml.ArrayHandler.serialize(ArrayHandler.java:69)
            at coldfusion.runtime.xml.CFComponentHandler.serialize(CFComponentHandler.java:106)
            at coldfusion.runtime.XMLizerUtils.serializeXML(XMLizerUtils.java:83)
            at coldfusion.rest.provider.CFObjectProvider.writeTo(CFObjectProvider.java:378)
            at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
            at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationIm pl.java:1479)
            at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImp l.java:1391)
            at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImp l.java:1381)
            at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
            at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
            at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:141)
            at coldfusion.rest.servlet.CFRestServletContainer.service(CFRestServletContainer.java:86)
            at coldfusion.rest.servlet.CFRestServlet.serviceUsingAlreadyInitializedContainers(CFRestServ let.java:556)
            at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:434)
            at coldfusion.rest.servlet.RestFilter.invoke(RestFilter.java:58)
            at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
            at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
            at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
            at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
            at coldfusion.rest.servlet.CFRestServlet.invoke(CFRestServlet.java:409)
            at coldfusion.rest.servlet.CFRestServlet.service(CFRestServlet.java:400)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
            at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
            at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:198)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607)
            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Disabling lazy loading will fix this, but results in unacceptable performance (load times go from 200ms to 22s).  I'm not sure how else to handle this.
    I am new to REST in ColdFusion, and it seems to me that the CFC's are being handled in an unusual way.  They do not appear to be initialized (init method does not seem to run) and now it seems that ORM is not handled the same either.  Am I missing something?
    Here is the excerpt of my code producing this error:
        component rest="true" restpath="item"
            import model.beans.*;
            remote item function getitem( numeric id restargsource="Path" ) restpath="{id}" httpmethod="GET"
                var item = entityLoad("item",{ id = id },true);
                return item;
    And the bean:
        component persistent="true" table="item" output="false" extends="timestampedBean" batchsize="10" cacheuse="read-only"
            /* properties */
            property name="id" column="id" type="numeric" ormtype="int" fieldtype="id" generator="identity";
            property name="title" column="title" type="string" ormtype="string";
            property name="description" column="description" type="string" ormtype="string";
            property name="status" column="status" type="numeric" ormtype="byte" default="0" ;
            property name="user" fieldtype="many-to-one" cfc="user" fkcolumn="userid" inversejoincolum="userid" lazy="true" cacheuse="read-only";
            property name="field" type="array" fieldtype="many-to-many" cfc="field" fkcolumn="id" linktable="items_fields" inversejoincolumn="fieldid" lazy="extra" batchsize="10" cacheuse="read-only";
    I also noticed in the stdout log that Hibernate is logging the query, but then it logs the "No session" error:
        Hibernate:
            select
                item0_.id as id0_0_,
                item0_.dtcreated as dtcreated0_0_,
                item0_.dtmodified as dtmodified0_0_,
                item0_.title as title0_0_,
                item0_.description as descript6_0_0_,
                item0_.status as status0_0_,
                item0_.userid as userid0_0_
            from
                item item0_
            where
                item0_.id=?
        Dec 2, 2014 15:23:00 PM Error [ajp-bio-8014-exec-3] - failed to lazily initialize a collection of role: field, could not initialize proxy - no Session The specific sequence of files included or processed is: service.cfc''
    I should probably also add that this "item" table is part of a many-to-many relationship, so "collection of role: field" is referencing the foreign table.

  • Firefox will not open my previous session

    Firefox 4 will not open any previous session once I shut down. I can have say 5 tabs open, close firefox, and reopen it and the session was saved. If I have those same 5 tabs open and shut down, then turn on my computer the next day, I can click on firefox, it will highlight the icon, and the highlight will disappear after about 5 seconds, and then I have to click it again, and it will open a totally new session. How do I fix this?

    Make sure that you do not use [[Clear Recent History]] to clear the "Browsing History" if Firefox is closed.

  • Error in running a query in XSJS - column store error: [2950] user is not authorized :  at ptime/session/dist/RemoteQueryExecution.cc:1354]

    Hi All,
    I get the below error when i load my xsjs file in browser,
    Error while executing query: [dberror(PreparedStatement.executeQuery): 2048 - column store error: column store error: [2950] user is not authorized : at ptime/session/dist/RemoteQueryExecution.cc:1354]
    I am able to execute the same query in  HANA SQL editor
    Please note that ,No Analytical privileges are applied to the view.
    Could you please help solving this issue.
    Regards,
    Logesh Kumar.

    Hay,
    are you using the same Database user for both SQL Editor and XSJS ?
    try the following.
    Before executing the query , display it and copy the same from browser and execute in SQL editor.
    Put the statement in  a try catch block and analyse the exception .
    Sreehari

  • Is not defined in this session

    SELECT cycle_flag, sequence_name FROM ALL_SEQUENCES
    I picked 'record_SEQ' sequence from the listing.
    select record_SEQ.Currval from dual; ==> ORA-08002: sequence record_SEQ.Currval is not defined in this session.
    where is the problem ?

    As per the link you posted it says , this error comes up when there is no value >...but I can see the last value in the sequence is 20632 (using TOAD's sequence tab and highlight the particular sequence).
    So, This error is confusing
    Total Questions: 3 (3 unresolved) ?????one answered and Marked as answered.
    Edited by: user575089 on Dec 23, 2009 12:47 AM

  • I am using a Canon 640 printer and my MPNavigator will not remain open.  It pops open then quickly closes.  I've used it for several years but it just started doing this.  What can I do to fix this problem?

    I am using a Canon 640 printer and my MPNavigator will not remain open.  It pops open then quickly closes.  I've used it for several years but it just started doing this.  What can I do to fix this problem?

    I had a similar problem with a Canon MP800R under Mac OS X 10.9.2 Mavericks.
    In my case, the MP Navigator app in the dock was linking to the wrong file.
    It linked to Applications > MP Navigator 2.1.app > Contents > Resources > MP Navigator.app, but it should link to the "main" app, probably under Applications > MP Navigator 2.1.app.
    After pulling the correct MP Navigator app file to the dock, I can start MP Navigator again by clicking on it in the dock. However, when clicking on it, a second MP Navigator icon will show up in the dock and stay there until the app is closed. By the way, the MP800R scanner also works (although officially not supported by Canon).

Maybe you are looking for

  • Apple tv from two different apple-id`s?

    Hi:) We`ve just bought apple tv, and the home sharing to our iMac works just fine!:-) But in our house we have several apple users (me,my husbond and our oldest kid). Using iPhone, iPad, and Macbook Air. So now i wonder if its possible two connect se

  • Creative Zen (Software Download) Recovery Tool Confus

    <From the locked sticky above? "*** MP3 Player Recovery Tool ***" by Catherina-CL> It lists all the MP3 players supported by this software tool and the Creative Zen 2/4/8/6/32 GB is NOT LISTED - SEE BELOW? but if you go to the following link,and on t

  • How to forward old emails in icloud

    I have a bunch of old emails that I want to forward to a gmail account of download to a flash drive, how do i do that in Icloud? Thanks, John

  • Problems with iPhone 6 camera and snapchat

    So I got an iPhone 6 with 16 GB of storage for christmas. Overall, I'm very pleased with it, but the one thing that has been bothering me is the camera; both the regular one and on snapchat. Nothing is wrong with the front camera, but it is the camer

  • Menu does not show on my account

     I stream spotify through Roku on my TV.   I can't find the menu button in order to create playlists. Where is it?  When I open my account on my desktop the menu button is not there. Where the heck is the menu button!!?