Using the GetClientInfo JavaBean

How can i get custom system property for example USER.DIR with GetClientInfo javabean, i m working with forms6i and try write this code,
declare
dirname varchar2(2000);
begin
dirname := get_custom_property('CLIENTINFOBEAN',1,'"USER.DIR"');
:ctrl.dirname := dirname;
end;
but this dont work

What do you see in the Java Console when you make the call?

Similar Messages

  • JAVA.LANG.NULLPOINTEREXCEPTION WHILE USING GETCLIENTINFO JAVABEAN IN FORM

    We are using GetClientInfo JavaBean in Oracle 6i Form registered in Oracle Applications. Earlier, when we used Jinitiator, the Form used to open properly. Recently we started using Java Plug-in 1.6.0_12 (JRE version 1.6.0_12 Java HotSpot(TM) Client VM), we get following errors and then entire application closes.
    java.lang.NullPointerException
         at oracle.forms.ui.VBean.isFocusTraversable(Unknown Source)
         at java.awt.Component.isFocusable(Unknown Source)
         at java.awt.Component.isRequestFocusAccepted(Unknown So

    Get Client Information
    http://www.oracle.com/technology/sample_code/products/forms/6idemos.html
    java.lang.NullPointerException
         at oracle.forms.ui.VBean.isFocusTraversable(Unknown Source)
         at java.awt.Component.isFocusable(Unknown Source)
         at java.awt.Component.isRequestFocusAccepted(Unknown Source)
         at java.awt.Component.requestFocusHelper(Unknown Source)
         at java.awt.Component.requestFocusHelper(Unknown Source)
         at java.awt.Component.requestFocus(Unknown Source)
         at oracle.forms.handler.UICommon.updateFocus(Unknown Source)
         at oracle.forms.handler.UICommon.setFVP(Unknown Source)
         at oracle.forms.handler.UICommon.setFVP(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.sendDeferredMessages(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)

  • Using the Javabeans Bridge ActiveX

    Hello! Can anyone explain me how I use the Javabeans bridge in the Java Plugin? I've downloaded the Plugin 1.4.0_1, but when I execute the command:
    java sun.beans.ole.Packager
    It fails and return me a error message saying that it can't found the sun/beans/ole/Packager... Need I do the download of this package? Where?
    Thanks a lot.

    I read an article http://www.reallyusefulcomputing.com/java/tutorial.php that says you have to use between version 1.2 and 1.3.1_04 for the Packager.
    -Jen
    Hello! Can anyone explain me how I use the Javabeans
    bridge in the Java Plugin? I've downloaded the Plugin
    1.4.0_1, but when I execute the command:
    java sun.beans.ole.Packager
    It fails and return me a error message saying that it
    can't found the sun/beans/ole/Packager... Need I do
    the download of this package? Where?
    Thanks a lot.

  • How to use the Javabeans in the servlets

    I want to use the beans in the servlets ..
    Please help me out with some good examples...
    and the resources where I can get the related hints

    For visual beans, check out jsp:plugin
    This will convert you bean to an applet.
    For non-visual beans, check out jsp:useBean

  • The misery of one developer using the ActiveX Bridge

    Hi,
    I'm not sure that anyone will know how to solve my problems, but I can at least complain.
    In our firm we have used the ActiveXBridge to wrap an OrbixWeb (CORBA) client. All was written in VB Java 1.3. Please don't discuss these choices it is not the point and not my choices anyway..
    Now We are migrating to 1.5. And here are the problems I have encountered:
    1. The architecture has changed. Now there are Dll instead of TLD that are generated.
    2. It is not possible to change the name of the ActiveX when generating.
    3. The JRE that is used is always the public JRE!!!.
    4. The security restriction blocks the reading of system properties or files, which was done by the former dll.
    5. The solution found was to sign the jar.
    6. ORB dynamic instantiation does not work well with the class loader used by the plugin. Even if the actual implementation of the ORB is deployed, the JRE complains that the class is not available.
    7. The solution was -> install the orbixWeb jar in the ext folder :-(
    8. Unfortunately even with this and a java.policy that indicates that all the jar in the ext folder are given all permission, the instantiation does not work : System.getProperties is not allowed (even if this jar is signed)..
    9. Solution was to add the global permission to read/write properties :--(
    10. ORB are good at connecting to other servers.. then this also was not allowed
    11. Solution was to remove all global security setting (sigh)
    12. The program was still not working.. because I was using the java.security.debug options and this interfered with the logs of the javaBean.
    If someone has good ideas on how to avoid the solutions used in point
    3. 7. 11.
    3 <- Bug (or feature of the bridge?)
    7. <- Misunderstanding on how the security works by me, or how to change the class loader for the activeX
    11 <- security misunderstanding? bug?
    Anyway the bridge was weak, and 1.5 made it worse.

    Hi,
    As far as I understand your requirement, you want to pass the result of one query to another query as a filter.
    Well you can do this, by Using Replacement Path Variable.
    For e.g. you want to pass Values of Custmomer Account Number to another query. In the second query, create one variable on Customer Account Number with type Replacment Path. Here it will ask you to enter the name of the query from which you would like to take the values of Customer Account Number.
    When you will run the second query , it will execute the first query from which you want to read the customer accoutn number in the back-end. And it willl display the output the second query as per the valeus of customer account number.
    This will help.
    - Jaimin

  • Error -25596 when trying to connect to use the Informix Online Server native data source

    Hi All,
    We currently use a very old version on crystal (v9) and have recently downloaded the current version (14.1.1.1036) in order to investigate the effort involved in upgrading.
    In the past we have always connected to our IBM Informix Server using the native Crystal Reports Informix Online Server data source, but all attempts with the current version of Crystal Reports are failing with error -25596.
    The error is reported by Informix and it has this description:
    -25596  The INFORMIXSERVER value is not listed in the sqlhosts file or the
    Registry.
    The default database server name that the INFORMIXSERVER environment
    variable specifies must be a valid database server name in the file
    $INFORMIXDIR/etc/sqlhosts on UNIX or the registry on Windows. Check
    that the specified server is listed in the sqlhosts file or the
    registry.
    However, I'm of the opinion that the server is known and is configured OK (it's configured using the Informix SetNet32 application and it has resulted in this registry key being populated:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Informix\SqlHosts\prod1_devdb1 (NB: prod1_devdb1 is the name of the server I am trying to connect to).
    I can create ODBC datasources on my PC and they work OK.  I can also run our legacy VB6 application (using the Crystal 9 COM objects) and connect using the native drivers to the Informix database.
    My PC is running 64 bit Windows 7 Enterprise (fully patched).  Our Informix server is version 11.7 running on a SUSE server.
    Any suggestions for where to start looking to solve this?

    TIMESTAMP
    THREAD_ID
    FILENAME
    LINE_NUMBER
    LOGGED_DATA
    LEVEL
    2014-5-1-3-54-31
    10828
    ..\cserrinf.cpp
    523
    Error 14722 (..\csdll.cpp, 117): : C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crw32_res_xx.dll
    1
    2014-5-1-3-54-51
    10828
    .\QESession.cpp
    445
    Set Product View Locale: 1033
    20
    2014-5-1-3-54-51
    10828
    .\QESession.cpp
    479
    Set Preferred View Locale: 3081
    20
    2014-5-1-3-54-51
    10828
    .\QESession.cpp
    501
    Set Process Locale: 3081
    20
    2014-5-1-3-54-51
    10828
    .\qecommon.cpp
    117
    This property is currently in a read-only state and cannot be modified. File Name: ".\QEProperty.cpp". Line: 217
    1
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    211
    Leaving DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    153
    In DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    211
    Leaving DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    385
    In DbFetchDatabaseType()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    399
    Leaving DbFetchDatabaseType()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    4732
    In DbFreeString()
    20
    2014-5-1-3-54-54
    10828
    .\xml.cpp
    4735
    Leaving DbFreeString()
    20
    2014-5-1-3-54-54
    10828
    .\jdbc.cpp
    241
    Leave DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\jdbc.cpp
    185
    Enter DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\jdbc.cpp
    241
    Leave DbInitialize()
    20
    2014-5-1-3-54-54
    10828
    .\jdbc.cpp
    555
    Enter DbFetchDatabaseType()
    20
    2014-5-1-3-54-54
    10828
    .\jdbc.cpp
    564
    Leave DbFetchDatabaseType()
    20
    2014-5-1-3-54-55
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-54-55
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-54-55
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-54-55
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    194
    Leaving DbInitialize()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    148
    In DbInitialize()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    194
    Leaving DbInitialize()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    317
    In DbFetchDatabaseType()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    326
    Leaving DbFetchDatabaseType()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    1858
    In DbFreeString()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    1861
    Leaving DbFreeString()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-54-57
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-54-57
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-54-57
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    182
    Leaving DbInitialize()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    127
    Enter DbInitialize()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    182
    Leaving DbInitialize()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    381
    Enter DbFetchDatabaseType()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    397
    Leave DbFetchDatabaseType()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    404
    In DbFreeString()
    20
    2014-5-1-3-55-2
    10828
    .\crdb_wic.cpp
    407
    Leaving DbFreeString()
    20
    2014-5-1-3-55-9
    10828
    ..\crdb_p2s.cpp
    570
    Entering SQLLogOnSQLServerWithExtendableOptions
    20
    2014-5-1-3-55-45
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-45
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-45
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-45
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-46
    10828
    ..\crdb_p2s.cpp
    577
    Leaving SQLLogOnSQLServerWithExtendableOptions
    20
    2014-5-1-3-55-46
    10828
    ..\serverhandle.cpp
    356
    succeeded: serverName=prod1_devdb1,databaseName=globalstar,userID=scottr
    1
    2014-5-1-3-55-46
    10828
    ..\..\convert.cpp
    864
    Error: message=, DbError=202
    1
    2014-5-1-3-55-46
    10828
    ..\cserrinf.cpp
    523
    Error 31816 (..\..\src\data\queryenghelp.cpp, 549): Logon failed.:
    1
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    173
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    ..\..\src\print\format\imageretriever.cpp
    905
    Destroy API called. Image Retriever was not used. No cleanup necessary.
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    219
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    271
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\jdbc.cpp
    250
    Enter DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    203
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    252
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\crdb_wic.cpp
    190
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\crdb_wic.cpp
    241
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    203
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    252
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\crdb_wic.cpp
    190
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\crdb_wic.cpp
    241
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    219
    In DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    271
    Leaving DbTerminate()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    113
    In DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\javabeans.cpp
    136
    Leaving DllMain()
    20
    2014-5-1-3-55-53
    10828
    .\xml.cpp
    112
    Leaving DllMain()
    20

  • How to use the html:link with a arraylist

    Hi everyone:
    I want to display the data using struts html:link.
    I query the database and place all the data to javabean,later place all the javabean to ArrayList.In Action,I use the "request.setAttribute("lovetable",articlelist) to set request to jsp page.
    I want to pass a parameter "id" use the hyperlink so I can get the parameter when I click the hyperlink.
    But how to use html:link to display it?
    I use <html:link action="viewtopic.do" paramId="id" paramName="lovetable" paramProperty="id"/>,it can't work and Tomcat report error :
    org.apache.jasper.JasperException: No getter method for property id of bean lovetable
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    The lovetable is a ArrayList and it don't have a getter or setter method.
    How to use it pass parameter? :( Thks

    Thank you.
    I use the bean:define successful.And display all the data to jsp.My jsp code is:
    <logic:iterate id="love" name="lovetable">
    <bean:define id="idbean" name="love"/>
    <tr bgcolor="<%=color%>">
    <td><bean:write name="love" property="id"/></td>
    <td><html:link forward="viewtopic" paramId="id" paramName="idbean" paramProperty="id"><bean:write name="love" property="title"/></html:link></td>
    <td><bean:write name="love" property="name"/></td>
    <td><bean:write name="love" property="time"/></td>
    </tr>
    </logic:iterate>
    In Action : request.setAttribute("lovetable",articlelist)
    ResutlSet rs=.............
    List articlelist=new ArrayList();
    while(rs.next()){
    articlebean bean=new articlebean();
    bean.setName(rs.getString("name"));
    bean.setTitle(rs.getString("title"));
    articlelist.add(bean);
    The above code will work property.
    The Tag "html:link" need bean to work other than arraylist so I iterate all the bean out.
    The Tag "logic:iterate" need collection to work so I make Action return a List.
    right?
    Any idea? :)

  • Where to place the class file of the java bean when using the packager

    I am using the activex bridge in j2se 1.5.0_06
    now i have created the jar file for my bean but where do i place the class file?
    i.e the bean..if i keep it in jdk\bin the packager gives me an error..i created a folder in my public jre jre\axbridge\bin and placed the class file there too but even this didnt work
    Kindly tell me what is the fully qualified package bean name if i have placed all my files under jdk\bin..

    D:\Java\jdk1.5.0_06\bin>packager -reg d:\java\jdk1.5.0_06\bin\PersonBean.jar Per
    son
    Processing D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\Person.idl
    Person.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\oaidl.idl
    oaidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\objidl.idl
    objidl.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\unknwn.idl
    unknwn.idl
    Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\wtypes.idl
    wtypes.idl
    Registration failed:
    The packaged JavaBean is not located under the directory <jre_home>\axbridge\bin
    this is the error i get

  • How to use the Client_image package

    I need to use the client_image package (read_image_file, write_image_file) to do the file upload from my client pc.
    we use a digtal camera to take picture and need to use the oracle 9i form webutil to insert into the form and save in 9ias.
    Any samples about how I can use the webutil to upload images will be truly appreciated!
    Thanks for replying!

    Thanks for your reply on Oracle Forums about using webutil to perform image upload in 9i forms.
    I just download the new Webutil Demo but I got the error messages:
    WUC-015: Your Form must contain the following Bean for this function to be available:
    Oracle.forms.webutil.clientinfo.GetClientInfo
    WUC-015: Your Form must contain the following Bean for this function to be available:
    Oracle.forms.webutil.fileTransfer.FileTransfer
    WUC-015: Your Form must contain the following Bean for this function to be available:
    Oracle.forms.webutil.browser.BrowserFunctions
    I have done all the environment config. and things in FAQ
    (Make sure the your environment is set up correctly; including issues such as CLASSPATH and ensure it is no longer that 512 characters.
    Ensure that the WebUtil object group has been dragged onto the form.
    By putting the form into visual view, ensure that you have a window called WEBUTIL_HIDDEN_WINDOW and that it contains a set of WebUtil Java Beans.
    If your forms does already contain the WebUtil object group then the cause is likely to be that the triggers used internally by the bean areas are uncompiled (usually because the OLB was subclassed before the library was attached). To resolve the problem try performing a Compile All on your module (ctrl-shift-k))
    The errors are still coming out and would you please let me know what I should do to solve the problem and thanks a lot!

  • A cmr-field and a cmp-field on the bean are using the same name. The names

    Hi:
    I am using weblogic 8.1 and MyEclipse 5.1.1. I am deploying my ear application through MyEclipse 5.1.1 as an ear file.
    When I ran the following EJB QL:
    SELECT OBJECT(p) FROM Product p.category = ?1
    I get the following error:
    n relation Category-Product, a cmr-field and a cmp-field on the bean are using the same name. The names of cmr and cmp fields must be unique.
    It is basically complaining that I have a field
    <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
    in my ejb-jar.xml and also the same category in the
    <cmp-field><field-name>category</field-name></cmp-field>
    field. The problem is that if I changed the value of the cmr-field, I have to add a get and set in my productLocal.java and when you do that you have to do the same in the ejb-jar.xml.
    Here is my ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CategoryEJB</ejb-name>
    <local-home>com.CategoryHomeLocal</local-home>
    <local>com.CategoryLocal</local>
    <ejb-class>com.CategoryBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Category</abstract-schema-name>
         <cmp-field><field-name>categoryId</field-name></cmp-field>
    <cmp-field><field-name>categoryName</field-name></cmp-field>
    <cmp-field><field-name>picture</field-name></cmp-field>
    <cmp-field><field-name>pictureWidth</field-name></cmp-field>
    <cmp-field><field-name>pictureHeight</field-name></cmp-field>
    <cmp-field><field-name>labelOn</field-name></cmp-field>
         <cmp-field><field-name>labelOff</field-name></cmp-field>
         <cmp-field><field-name>button</field-name></cmp-field>
    <primkey-field>categoryId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findCategory</method-name>
                        <method-params></method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(c) FROM Category c
                   </ejb-ql>
              </query>
         </entity>
         <entity>
    <ejb-name>ProductEJB</ejb-name>
    <local-home>com.ProductHomeLocal</local-home>
    <local>com.ProductLocal</local>
    <ejb-class>com.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Product</abstract-schema-name>
         <cmp-field><field-name>productId</field-name></cmp-field>
    <cmp-field><field-name>brandName</field-name></cmp-field>
    <cmp-field><field-name>productDescription</field-name></cmp-field>
    <cmp-field><field-name>purchasePrice</field-name></cmp-field>
    <cmp-field><field-name>category</field-name></cmp-field>
    <primkey-field>productId</primkey-field>
    <security-identity><use-caller-identity/></security-identity>
              <query>
                   <query-method>
                        <method-name>findProduct</method-name>
                        <method-params>
                        <method-param>com.CategoryLocal</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        SELECT OBJECT(p) FROM Product p.category = ?1
                   </ejb-ql>
              </query>
         </entity>
    </enterprise-beans>
    <relationships>
                   <ejb-relation>
                   <ejb-relation-name>Category-Product</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Category-has-many-Product-numbers
                        </ejb-relationship-role-name>
                        <multiplicity>one</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CategoryEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>productNumbers</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>
                             Product-belongs-to-Category
                        </ejb-relationship-role-name>
                        <multiplicity>many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>ProductEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>category</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    </relationships>
    <assembly-descriptor>
    <security-role>
    <role-name>Employees</role-name>
    </security-role>
    <method-permission>
    <role-name>Employees</role-name>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    <container-transaction>
    <method>
    <ejb-name>CategoryEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>ProductEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>     
    Here is my weblogic-cmp-rdbms-jar.xml:
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
         <ejb-name>CategoryEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>category</table-name>
              <field-map>
              <cmp-field>categoryId</cmp-field>
              <dbms-column>categoryID</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>categoryName</cmp-field>
              <dbms-column>categoryName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>picture</cmp-field>
              <dbms-column>Picture</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureWidth</cmp-field>
              <dbms-column>PictureWidth</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>pictureHeight</cmp-field>
              <dbms-column>PictureHeight</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOn</cmp-field>
              <dbms-column>LabelOn</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>labelOff</cmp-field>
              <dbms-column>LabelOff</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>button</cmp-field>
              <dbms-column>Button</dbms-column>
              </field-map>
    </table-map>
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-bean>
         <ejb-name>ProductEJB</ejb-name>
    <data-source-name>ShoeStore</data-source-name>
         <table-map>
              <table-name>PRODUCT</table-name>
              <field-map>
              <cmp-field>productId</cmp-field>
              <dbms-column>productId</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>brandName</cmp-field>
              <dbms-column>brandName</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>productDescription</cmp-field>
              <dbms-column>productDescription</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>purchasePrice</cmp-field>
              <dbms-column>purchasePrice</dbms-column>
              </field-map>
              <field-map>
              <cmp-field>category</cmp-field>
              <dbms-column>categoryId</dbms-column>
              </field-map>
    </table-map>
         <!-- Automatically generate the value of ID in the database on inserts using sequence table -->
    <automatic-key-generation>
    <generator-type>SQL_SERVER</generator-type>
    </automatic-key-generation>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-relation>
         <relation-name>Category-Product</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Product-belongs-to-Category</relationship-role-name>
              <relationship-role-map>
    <column-map>
    <foreign-key-column>categoryId</foreign-key-column>
    <key-column>categoryID</key-column>
    </column-map>
              </relationship-role-map>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    </weblogic-rdbms-jar>
    Here is my productLocal.java:
    package com;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Vector;
    import java.util.Collection;
    public interface ProductLocal extends javax.ejb.EJBLocalObject
         public Integer getProductId();
         public void setProductId(Integer productId);
         public String getBrandName();
         public void setBrandName(String brandName);
         public String getProductDescription();
         public void setProductDescription(String productDescription);
         public Double getPurchasePrice();
         public void setPurchasePrice(Double purchasePrice);
    public CategoryLocal getCategory();
         public void setCategory(CategoryLocal category);
    Here is my ProductBean.java:
    package com;
    import javax.naming.InitialContext;
    import javax.ejb.EntityContext;
    import javax.ejb.CreateException;
    import javax.naming.NamingException;
    import java.util.Date;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.Vector;
    import java.lang.Integer;
    public abstract class ProductBean implements javax.ejb.EntityBean
         public Integer ejbCreate(Integer id)
              this.setProductId(id);
              return null;
         public void ejbPostCreate(Integer id)
         //public abstract Integer getCategoryId();
    //     public abstract void setCategoryId(Integer categoryId);
         public abstract CategoryLocal getCategory();
         public abstract void setCategory(CategoryLocal category);
         public abstract Integer getProductId();
         public abstract void setProductId(Integer productId);
         public abstract String getBrandName();
         public abstract void setBrandName(String brandName);
         public abstract String getProductDescription();
         public abstract void setProductDescription(String productDescription);
         public abstract Double getPurchasePrice();
         public abstract void setPurchasePrice(Double purchasePrice);
         public void setEntityContext(EntityContext ec)
              System.out.println("ProductBean setEntityContext");
         public void unsetEntityContext()
              System.out.println("ProductBean unsetEntityContext");
         public void ejbLoad()
              System.out.println("ProductBean ejbLoad");
         public void ejbStore()
              System.out.println("ProductBean ejbStore");
         public void ejbActivate()
              System.out.println("ProductBean ejbActivate");
         public void ejbPassivate()
              System.out.println("ProductBean ejbPassivate");
         public void ejbRemove()
              System.out.println("ProductBean ejbRemove");
    What do I needed to do to fix this problem.
    Any hint or help would be greatly appreciated!!!
    Yours,
    Frustrated

    cmr field which is "category" in ur mapping , u can't use as cmp field in abstract schema mapping. just remove category from cmp field . and every thing is fine

  • Using HTML, JSP, JavaBeans and Access database

    I'm trying to create a login page that will allow users to query, insert, modify, and delete information. I have an HTML page that the user chooses which option they want to do. I have 4 JSP's set up for each option. My biggest issue is getting them to talk to the database using a single JavaBean. I can create several beans to pull the information, post, delete, or modify. I'm having trouble pulling information through the JSP's from the HTML page. Please help...

    Hey,
    You get html to communicate with your server using forms. Use the request to retrieve the submitted form data. All you would need to do is tell your bean what it is doing, how and with what.
    Good luck

  • JSP:I changed a class but WHY IT WANTS TO USE THE PREVIOUS ONE? HELP!!!!!!!

    I am using HTMLform+JSP+javabean for executing a query into the database end showing the retrieved values.
    For Building the query end Executing the query SQLQueryBean.class was used and it worked;
    For showing retrieved values SQLResultSetBean.class was used: but the error page displaied cannot instanciate sql.SQLResultSetBean
    After having tried many stuff I changed SQLResultSetBean with SQLQueryResultsBean.java that pratically works in a similar manner but I received error related with SQLResultSetBean.class ...WHY MY CHANGES HAVE NOT BEEN UPDATED?
    This Is the jsp file:
    <%@ page language="java"
    import="java.sql.*, java.io.*, java.util.*, java.lang.*"
    errorPage="errorpage.jsp"
    %>
    <jsp:useBean id="query" scope="page" class="sql.SQLQueryBean" />
    <jsp:setProperty name="query" property="*"/>
    </jsp:useBean>
    <%--I TRIED TO HIDE THIS CODE BUT IT WAS USELESS
    <jsp:useBean id="results" scope="page" class="sql.SQLQueryResultsBean" />
    <jsp:setProperty name="results" property="*"/>
    </jsp:useBean>
    --%>
    <jsp:useBean id="oneRow" scope="page" class="sql.SQLRow" />
    <jsp:setProperty name="oneRow" property="*"/>
    </jsp:useBean>
    <html>
    <body bgcolor="white">
    <%! Integer identifier;%>
    <%! String general; %>
    <%! String[] ingr; %>
    <%! Vector column = new Vector(); %>
    <%! Vector whereCols = new Vector(); %>
    <%! String myQuery = null; %>
    <%-- ***** ACTION 1: Searching pizza names by ingredients! **** --%>
    <%
    String action = request.getParameter("action1");
    if(action.equals("Search pizza")){
    %>
    <%-- ***** SETTING Database, table and columns for SELECT clause **** --%>
    <hr>
    <font size = 5 color ="red">
    <center>
    DEBUG:<br>
    </font>
    <font size = 2 color ="blue">
    database: <%query.setDatabase("testkatia");
    out.println(query.getDatabase());%>
    <br>
    table: <%query.setTable("relation1");
    out.println(query.getTable());
    query.selectColumns("pizza_id");
    query.isDistinct(true);
    column = query.getColumns();
    %>
    <br>
    selected column(s) is(are):
    <ul>
    <%
    if (!column.isEmpty()) {
         for (int i = 0; i < column.size(); i++) {
    %>
    <li>
    <%
              out.println (column.get(i));
         } else out.println ("none selected");
    %>
    </ul>
    </font>
    <hr>
    <%-- ***** SETTING columns value and oper. for the WHERE clause **** --%>
    <%
    ingr = request.getParameterValues("Checkbox1");
    if(ingr!= null){
    for(int i = 1; i <=ingr.length; i++){
    if(i>1 && i<=ingr.length)
    query.selectAnd_OrForWhere("or");
    for(int j=1; j<=24; j++){
    if(ingr[i-1].equals(("ing"+j))){
    general = String.valueOf(j);
    query.selectWhereParameters("pizzaing_id","=",general, "integer");
    %>
    <font size=5 color ="red">
    DEBUG:
    </font>
    <font size = 2 color ="blue">
    <%
    if(query.checkWhereParameters()){
    out.println("Where Clause is Ok");
    %>
    <br>
    <%
    whereCols=query.getColsForWhere();
    out.println("Cols for Where; "+ whereCols.toString());
    else {
    throw new Exception("parameters in the where clause are wrong!n whereClause = "+ query.getWhereClause());
    %>
    </font>
    <hr>
    <font size = 5 color ="red">
    <center>
    DEBUG:<br>
    </font>
    <font size =2 color= "blue">
    The built query is: <%myQuery = query.buildQuery();
    out.println(myQuery);
    %>
    <%--
    <%!Vector rows = new Vector();%>
    <%
    if(myQuery!=null){
    results = myQuery.queryExe(sqlQuery);
    if(results == null) out.print("<br>SQLQueryResultsBean obj is NULL!");
    out.println("<br>---retrieved row num. is--- "+results.getRowNumber());
    out.println("<br>---Number of columns is--- "+results.getColNumber());
    rows = results.getRetrievedRows();
    if(!rows.isEmpty()){
    out.print("col.: ");
    for(int k= 0; k<results.getColNumber(); k++)
         out.print((String)results.getColNames().get(k)+" ");
    out.println("<br>");
    for(int i=0; i < results.getRowNumber(); i++){
         oneRow = (sql.SQLRow)rows.get(i);
         out.print("<br>row"+(i+1)+": ");
         for(int j=0; j<oneRow.rowSize(); j++)
         out.print((String)oneRow.getRowValue(j)+" ");
         out.println("<br>");
    %>
    --%>
    </body>
    </html>
    The error that I got is:
    Error: 500
    Location: /goreme/jspFiles/searchPizzaOrIngr.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: sql/SQLResultSetBean
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java)
    at org.apache.tomcat.core.Handler.service(Handler.java)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java)
    at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
    at java.lang.Thread.run(Thread.java:498)
    Root cause:
    java.lang.NoClassDefFoundError: sql/SQLResultSetBean
    at java.lang.Class.getMethods0(Native Method)
    at java.lang.Class.getDeclaredMethods(Class.java:1071)
    at java.beans.Introspector$1.run(Introspector.java:858)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:856)
    at java.beans.Introspector.getTargetEventInfo(Introspector.java:562)
    at java.beans.Introspector.getBeanInfo(Introspector.java:300)
    at java.beans.Introspector.getBeanInfo(Introspector.java:87)
    at org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java)
    at org.apache.jasper.runtime.JspRuntimeLibrary.introspect(JspRuntimeLibrary.java)
    at jspFiles._0002fjspFiles_0002fsearchPizzaOrIngr_0002ejspsearchPizzaOrIngr_jsp_70._jspService(_0002fjspFiles_0002fsearchPizzaOrIngr_0002ejspsearchPizzaOrIngr_jsp_70.java:111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java)
    at org.apache.tomcat.core.Handler.service(Handler.java)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java)
    at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
    at java.lang.Thread.run(Thread.java:498)
    Does somebody know what happened and why it continues to search SQLResultSetBean.class?...I have also restarted tomcat!!!![b]
    Please drop me some helps! It would be really nice!
    katia

    THANKS A LOT!
    I am going on like a snail but maybe before die I will see this project works!
    Unfortunately now I have got the previous error: that said:
    "Error Page
    Received the exception:
    javax.servlet.ServletException: Cannot create bean of class sql.SQLQueryResultsBean"
    While If I remouve the usebean tag for sql.SQLQueryResultsBean it dislpaied:
    DEBUG:
    database: testkatia
    table: relation1
    selected column(s) is(are):pizza_id
    DEBUG: Where Clause is Ok
    Cols for Where; [pizzaing_id, pizzaing_id, pizzaing_id]
    DEBUG:
    The built query is: SELECT DISTINCT pizza_id FROM relation1 WHERE pizzaing_id = 1 or pizzaing_id = 2 or pizzaing_id = 3
    The built where clause is: WHERE pizzaing_id = 1 or pizzaing_id = 2 or pizzaing_id = 3
    So why Cannot create SQLQueryResultsBean ?
    JSP
    All the code is here:
    <%@ page language="java"
    import="java.sql.*, java.io.*, java.util.*, java.lang.*"
    errorPage="errorpage.jsp"
    %>
    <jsp:useBean id="query" scope="page" class="sql.SQLQueryBean" />
    <jsp:setProperty name="query" property="*"/>
    </jsp:useBean>
    <%--
    <jsp:useBean id="results" scope="page" class="sql.SQLQueryResultsBean" />
    <jsp:setProperty name="results" property="*"/>
    </jsp:useBean>
    --%>
    <jsp:useBean id="oneRow" scope="page" class="sql.SQLRow" />
    <jsp:setProperty name="oneRow" property="*"/>
    </jsp:useBean>
    <html>
    <body bgcolor="white">
    <%! Integer identifier;%>
    <%! String general; %>
    <%! String[] ingr; %>
    <%! Vector column = new Vector(); %>
    <%! Vector whereCols = new Vector(); %>
    <%! String myQuery = null; %>
    <%-- ***** ACTION 1: Searching pizza names by ingredients! **** --%>
    <%
    String action = request.getParameter("action1");
    if(action.equals("Search pizza")){
    %>
    <%-- ***** SETTING Database, table and columns for SELECT clause **** --%>
    <hr>
    <font size = 5 color ="red">
    <center>
    DEBUG:<br>
    </font>
    <font size = 2 color ="blue">
    database: <%query.setDatabase("testkatia");
    out.println(query.getDatabase());%>
    <br>
    table: <%query.setTable("relation1");
    out.println(query.getTable());
    query.selectColumns("pizza_id");
    query.isDistinct(true);
    column = query.getColumns();
    %>
    <br>
    selected column(s) is(are):
    <ul>
    <%
    if (!column.isEmpty()) {
         for (int i = 0; i < column.size(); i++) {
    %>
    <li>
    <%
              out.println (column.get(i));
         } else out.println ("none selected");
    %>
    </ul>
    </font>
    <hr>
    <%-- ***** SETTING columns value and oper. for the WHERE clause **** --%>
    <%
    ingr = request.getParameterValues("Checkbox1");
    if(ingr!= null){
    for(int i = 1; i <=ingr.length; i++){
    if(i>1 && i<=ingr.length)
    query.selectAnd_OrForWhere("or");
    for(int j=1; j<=24; j++){
    if(ingr[i-1].equals(("ing"+j))){
    general = String.valueOf(j);
    query.selectWhereParameters("pizzaing_id","=",general, "integer");
    %>
    <font size=5 color ="red">
    DEBUG:
    </font>
    <font size = 2 color ="blue">
    <%
    if(query.checkWhereParameters()){
    out.println("Where Clause is Ok");
    %>
    <br>
    <%
    whereCols=query.getColsForWhere();
    out.println("Cols for Where; "+ whereCols.toString());
    else {
    throw new Exception("parameters in the where clause are wrong!n whereClause = "+ query.getWhereClause());
    %>
    </font>
    <hr>
    <font size = 5 color ="red">
    <center>
    DEBUG:<br>
    </font>
    <font size =2 color= "blue">
    The built query is: <%myQuery = query.buildQuery();
    out.println(myQuery);
    %>
    <br>
    The built where clause is:
    <%
    out.println(query.getWhereClause());
    %>
    </font>
    </center>
    <hr>
    <%
    %>
    <%--
    <%!Vector rows = new Vector();%>
    <%
    if(myQuery!=null){
    results = myQuery.queryExe(sqlQuery);
    if(results == null) out.print("<br>SQLQueryResultsBean obj is NULL!");
    out.println("<br>---retrieved row num. is--- "+results.getRowNumber());
    out.println("<br>---Number of columns is--- "+results.getColNumber());
    rows = results.getRetrievedRows();
    if(!rows.isEmpty()){
    out.print("col.: ");
    for(int k= 0; k<results.getColNumber(); k++)
         out.print((String)results.getColNames().get(k)+" ");
    out.println("<br>");
    for(int i=0; i < results.getRowNumber(); i++){
         oneRow = (sql.SQLRow)rows.get(i);
         out.print("<br>row"+(i+1)+": ");
         for(int j=0; j<oneRow.rowSize(); j++)
         out.print((String)oneRow.getRowValue(j)+" ");
         out.println("<br>");
    %>
    --%>
    </body>
    </html>
    SQLQueryResultsBean
    package sql;
    import java.sql.*;
    import java.util.*;
    public class SQLQueryResultsBean {
    String _sqlQuery;
    ResultSet resultSet;
    int colNumber;
    int rowNumber;
    Vector colTypes = new Vector();
    Vector colNames = new Vector();
    Vector _retrievedRows = new Vector();   
    //Constructor IS IT THIS THE PROBLEM?
    public SQLQueryResultsBean(ResultSet rs){
         this.setResultSet(rs);
    //Methods for setting and retrieving the ResultSet object
    public void setResultSet(ResultSet rs){
         resultSet = rs;
    public ResultSet getResultSet(){
         return resultSet;
    //Methods for setting and retrieving the Number of the column
    public void setColNumber(int n){
         colNumber = n;
    public int getColNumber(){
         return colNumber;
    //Methods for setting and retrieving a vector containing all the names of the selected columns
    public void setColNames(Vector c){
         colNames = c;
    public Vector getColNames(){
         return colNames;
    //Methods for setting and retrieving a vector containing all the types of the selected columns
    public void setColTypes(Vector t){
         colTypes = t;
    public Vector getColTypes(){
         return colTypes;
    //Methods for setting and retrieving the number of the selected rows
    public void setRowNumber(int n){
         rowNumber = n;
    public int getRowNumber(){
         return rowNumber;
    //Methods for storing and retrieving the rows selected with the query;
    public void setRetrievedRows(Vector retrievedRows){
         _retrievedRows = retrievedRows;
    public Vector getRetrievedRows(){
         return _retrievedRows;
    //-----STORING THE RESULTS IN CLASS VARIABLES-----
    //-----TYPES, NAMES, NUMBERS OF THE COLUMNS OF A GENERIC ROW AND-----
    //-----FOR STORING THE NUMBER OF THE RETRIEVED ROWS-----
    //storing the results before to close the connection
    public void storeValues() throws SQLException {
    ResultSet rs = this.getResultSet();
    Vector rows = new Vector();
    String value;
    this.setRowNumber(this.countRowNumber());//set number of rows
    this.setParameters(); //set number, types and names of the columns
    //We Move the cursor to the given row number in this ResultSet object.
    for(int i = 0; i<this.getRowNumber(); i++){
         rs.absolute(i+1);
         SQLRow newRow = new SQLRow();
         //Then we retrieve values end collect them in a vector
         for (int j=0; j<this.getColNumber(); j++){
         value =rs.getString(j+1);
         newRow.buildRow(value);
         rows.add(newRow.getRow());
    this.setRetrievedRows(rows);
    //Methods for automatically setting this parameters:
    //columnNumber, colNames, coltypes.
    //It is not public but used inside storeValues();
    void setParameters(){
         try{
         ResultSetMetaData meta = this.getResultSet().getMetaData();
         int totColumns = meta.getColumnCount();
         this.setColNumber(totColumns);
         Vector names = new Vector();
         Vector types = new Vector();
         for (int i=1; i<=totColumns; i++){
         names.add(meta.getColumnName(i));
         types.add(meta.getColumnTypeName(i));
         this.setColNames(names);
         this.setColTypes(types);
         }catch(Exception e){e.printStackTrace();}
    //Methods for counting the number of the selected rows.
    //It is not public but used inside storeValue();
    int countRowNumber(){
         int count=0;
         try{
         ResultSet rs = this.getResultSet();
         // Moving the cursor to the front of this
         //ResultSet object, just before the first row.
         rs.beforeFirst();
         while(rs.next())
         count++;
         rs.beforeFirst(); //replacecing cursor before the first row
         }catch(Exception e){e.printStackTrace();}
         return count;
    If you (or someone on this forum) have any ideas for that I will be really grateful!
    katia

  • Using Application Scope Javabean to hold data?

    I have a set of (4000) records I would like to store in a Javabean to be used within mutiple JSPs. I am using JSP and Javabeans, no EJBs. My question is should I use Application scope for the Javabean to be shared for all the JSPs instead of a Sesstion scope to limit stress to the server? Thanks.

    I think use session scope. Application scope may tie up resources u might not need. That is my personal opinio though.

  • Using the WorkList翻译

    翻译前言
    我们在开发公司的电信项目中,使用了WebLogic Integration。从实际开发的经验看,WebLogic Integration是一个相当出色的应用集成解决方案,开发工具和辅助工具尤其令人满意。令人遗憾的是,这样好东西了解和愿意使用的人却相当的少。大部分WebLogic Integration资料是英文,显然是造成这种状况的原因之一。因此,我有了翻译重要WebLogic Integration资料的念头。
    首先翻译Worklist文档的原因如下:
    完整的工作流系统起码有三个组成部分:
    &#61656;     流程绘制工具。
    &#61656;     工作流引擎。
    &#61656;     Worklist系统。
    流程绘制工具辅助使用者定制合适的工作流程,对应于WebLogic Integration,就是workshop的流程定义部分。工作流引擎解释流程定义并实际执行流程,对应于WebLogic Integration Server本身。Worklist系统引导用户与工作流系统交互,提供交互API。对于实现一个工作流系统来说,最重要的当然是工作流引擎。但对于使用一个工作流系统,个人认为,了解流程绘制工具和Worklist系统才是最重要的,缺少对Worklist系统的了解,是很难设计出一个好的流程的,因为流程最终呈现在用户的形态,是通过Worklist系统实现的。非常令人遗憾的是,我参加的培训,包括BEA本身举办的培训,都着重介绍了WebLogic的流程绘制工具―Workshop,对于Worklist系统就基本不做说明。相应的,Worklist系统的中文资料也就少的可怜。因此,我首先翻译了官方文章Using the Worklist的介绍部分。通过这篇文章,读者应该可以对一个实现了的WebLogic Integration 业务流程,能给最终用户带来什么,有一个大概的认识。
    由于翻译者本身经验很少,错误在所难免,希望大家认真的扔砖头。
    使用worklist
    介绍
    BEA WebLogic Integration Worklist致力于解决企业中的工作流的问题。它具有将业务流程中的任务直接引导给职员和管理者的能力,增强了企业的效率和反应能力。
    本章包括以下的主题:
    &#61607;     什么是WebLogic Integration Worklist?
    &#61607;     Worklist任务
    &#61607;     任务的数据
    &#61607;     控件和Worklist的APIs
    &#61607;     系统管理
    什么是WebLogic Integration Worklist?
    WebLogic Integration Worklist用于将人员的实际活动和随时间自动执行的业务流程整合起来。业务流程执行的时间可以很短,也可以持续数日甚至数月。Worklist被设计来指引工作的流程和安排企业员工任务的流转。这些流程具有一些固有的特征,如接受,批准,修改和拥有流程文档,其中,伴随着特定任务的流程文档被用于提供必要的信息,使人们能够执行和完成这些任务。Worklist使人们能协作完成一项工作,包括指派任务,跟踪任务的状态,处理批准,和其它管理工作流需要的动作。
    为了支持Worklist的功能,WebLogic Integration提供了两个内置在WebLogic Workshop的控件,这两个控件是“任务控件”和“任务工作者控件”。这些控件是服务器端的,为Workshop框架所管理的组件。它们预留的JAVA接口,可以被你的“业务流程”(business processes,除了字面意义,还兼指Workshop中一种特定控件,下同)直接调用。“任务控件”使业务流程能够创建一个任务实例,管理它的状态和数据,并提供了回调方法报告它的状态。“任务工作者控件”允许特定的用户获得任务的所有权,操作任务,完成任务。这个控件也提供了任务系统的管理特权,如开始,停止,删除和指派任务。要访问“任务工作者控件”,既可以通过“业务流程”,也可以通过用户介面。
    Worklist用户介面使最终用户--任务创建者,任务操作者,任务管理者―能够与一个正在运行的业务流程交互,包括处理流程的意外情况,批准请求和状态跟踪。为了管理你的应用程序中的Worklist组件,WebLogic Integration提供了一个Worklist用户介面的例子,你可以利用它来帮助你开发你自己的用户介面。
    下面展示了Worklist重要的能力:
    &#61656;     Worklist允许人们在业务流程中扮演一个特定的角色,将注意力集中在他们重视的那部分工作上。
    &#61656;     它允许业务规则指导文档和工作的路由。
    &#61656;     它管理任务相关许可。举例来说,应用程序能够管理谁能按照怎样的顺序看那个文档,和谁由任务的所有权。
    &#61656;     当工作完成或工作最终期限过期时,Worklist提供了通知管理者的机制。
    &#61656;     管理者可以研究工作流的历史记录,并使用这些信息调整业务流程,以增加生产力和减少反应时间。
    Worklist任务
    Worklist允许对任务的创建,操作和管理。一个任务的实例表现了一个必须在确定时间段内完成的工作单元。任务的例子包括:
    一个管理者阅读和批准一个雇员的休假请求。
    打电话给一个顾客并记录顾客的抱怨。
    在运行时的Worklist系统,一个任务实例是一个特殊的object,它代表了在真实世界中被分配了的一个工作。任务实例是WebLogic Integration服务器的一部分,它独立于任何控件和业务流程而存在。在业务流程的整个生命周期中,复数的业务流程都能够同时与一个任务交互。只有在以下两种情况中,任务将不再运行:被明白无误的删除,或被WebLogic Integration清除过程清除。
    在指定工作完成后,你能够使用一个任务实例再现该工作单元的详细记录。
    学习上述控件细节,可以参考WebLogic Workshop 帮助中关于Worklist控件的部分。
    任务的数据
    任务实例拥有内建的数据值,以定义工作是怎样执行的,谁将做它,需要在什么时候完成等等。在任务完成后,你也可以使用这些内建值获得实际发生的情况。
    任务数据的例子包括:
    &#61656;     能够执行任务的用户或用户组的列表(Assignees List)。
    &#61656;     任务必须在此之前完成的日期 (Task Competition Due Date)。
    &#61656;     认领并尝试完成任务的用户 (Claimant)。
    &#61656;     有责任管理工作执行过程的人 (Task owner)。
    &#61656;     描述工作怎样做和工作完成结果的文档(Request and Response documents)。
    &#61656;     定义了任务实例位于它的生命周期的哪个位置的条件(Task State)。
    &#61656;     指出这一任务相对其它相关任务紧迫性的优先级(Task Priority)。
    预定日期
    预定日期描述了任务将被认领或完成的日期和时间。Worklist将预定日期存储为一个java.util.Date objects,跟踪它们,侦听任务的预定日期以能够触发对业务流程的回调。预定日期能够被设置为使用一个明确的日期和时间,或者,能被设置为使用一个营业日历和一个营业期限。
    营业日历表现了营业的工作时间。一个营业日历详细说明了一个时间域和一套时间段规则。时间段规则决定了日期和钟点是能够(空闲的)或不能够(繁忙的)执行业务活动。
    学习更多的关于预定日期和营业日历的知识,请参考任务预定日期。
    任务状态
    任务状态描述任务位于它的生命周期的哪个位置。每个任务实例都处于以下的某个确定状态:ASSIGNED, CLAIMED, STARTED, COMPLETED, SUSPENDED, 或 ABORTED。操作控件或API允许你将一个实例从当前状态转变到另一个状态。
    学习更多的关于任务状态的知识,请参考任务预定日期。
    任务所有者
    为了表示一个用户或用户组扮演了任务的管理者的角色,一个任务实例可以有一个任务所有者。所有者管理任务,并有责任使任务完成,但并不需要所有者实际完成任务。例如,厨房经理是准备最近订菜任务的任务所有者,他把这个任务指派给一个厨师实际执行。如果这个任务没有完成,这个经理还是要承担责任的。
    只有任务所有者或系统管理员,有执行某些任务实例的管理操作的许可。
    学习更多的关于任务所有者的知识,请参考任务用户和用户组和任务与用户许可。
    指派者列表和认领者
    一个任务实例有一个描述那些用户可以认领任务的指派者列表。指派者列表可以包含用户和用户组。当一个指派者列表上的用户认领了任务,该用户就变成了认领者。认领者获得了任务的所有权,并执行完成任务所需的工作。当一个用户认领了任务,该任务的状态就被设置为Claimed。
    学习更多的关于指派者列表和认领者的知识,请参考任务用户和用户组和任务与用户许可。
    请求和答复文档
    通常,任务的请求被用于描述什么工作将被做和怎样做这个工作。请求的内容将可以被执行工作和完成任务的任务操作者阅读。另外,指派列表上的用户可以阅读这些信息,以决定是否认领这个任务。
    任务的答复通常被用于描述用户操作任务后实际发生了什么。它可以描述工作的结果,就是详细描述了为完成这个任务执行的动作。回调(Callbacks)也通过答复传递值给业务流程,此时业务流程应该正在等待一个特定的任务状态。
    例如,一个代理商和一个拖欠债务的顾客完成了一个电话会话后,任务答复将捕获这个协定。业务流程(接受任务答复值后),将创建一个任务,让客户决定下一步怎样执行。
    学习更多的关于请求和答复文档的知识,请参考请求和答复文档。
    任务的操作
    任务的操作常常是建立新任务,改变任务状态和数据的值,删除任务,或者是读取一个现有任务的信息。某些操作允许在一个单一的步骤中联合执行这些操作。任务操作的例子包括:
    &#61618;     建立任务的操作
    当一个新任务实例被建立,Worklist系统将指派一个独一的ID给这个实例。在创建任务时,可以指定任务的状态是Assigned 或是 Claimed,取决于操作本身。某些在任务创建时指定的任务数据值,在创建后不能被改变。
    &#61618;     改变任务属性的操作
    某些任务属性在任务创建后,还可以被指定或修改。
    &#61618;     获得任务属性的操作
    在任务实例生命周期的任何一个位置,你都可以用获得任务属性的操作访问任务的属性。
    &#61618;     修改任务状态的操作
    基于定义好的操作,任务实例能够在状态之间转变。某些修改任务状态的操作能否被合法执行,取决于操作被调用前任务是否处于合适的状态。
    学习更多的关于任务和任务工作者控件的操作的知识,请参考使用Worklist控件。
    任务信息的存档和清除
    WebLogic Integration支持对业务流程实例历史,交易伙伴信息历史和任务实例历史的跟踪数据的存档工作。
    当任务最终在企业流程中完成它们的生命周期时,它们会执行诸如此类的工作:它们的附属物被修改,状态被改变,完成期限过期等。Worklist任务产生的这些事件能被Worklist的历史表记录日志,保存在运行时存储库。这些保存在存档表中的记录被设计用于提供给应用程序。应用程序能够查询这些表,生产关于任务历史处理过程的报表或统计分析。以下类型的事件能够被跟踪:
    &#61618;     任务状态的改变和关联的值
    &#61618;     任务的认领或完成期限超时
    &#61618;     任务的所有者或指派者被改变
    &#61618;     任务的请求或任务的回复
    &#61618;     请求或回复的XML文档
    运行时,这些跟踪数据被存储在一个数据库中。为了优化性能,你可以最小化被存储的跟踪数据。为了达到这个目的,一个系统管理员可以将存档和清除程序配置为定期运行。除了配置时间表之外,系统管理员能使存档器生效或失效,作用如下:
    &#61618;     当存档器生效时,程序拷贝数据到一个离线数据库,然后从运行时数据库中清除这些数据。
    &#61618;     当存档器失效时,程序直接清除运行时数据库中的数据,不做拷贝。
    存档信息能够被用于产生关于任务处理的报表或统计分析,使用在你的WebLogic Integration应用程序中。学习更多的关于存档和清除的知识,请参考管理WebLogic Integration解决方案中的系统配置。
    任务查询
    任务查询功能允许一个应用程序在一个运行时Worklist系统中找到所有符合指定的标准集的任务。这些查询类似于数据库的SQL。查询的结果包含了所有符合指定标准的任务的信息。
    例如,你可以建立这样的一个用户介面:显示所有被指派给当前用户,优先权等于1,在三天内到期的任务。
    控件和Worklist APIs
    Worklist API提供的操作手段,使我们能够调用所有在Worklist中创建和操作任务的功能。WebLogic Integration提供了两个控件支持Worklist系统:任务控件和任务工作者控件。虽然这两个控件只提供的功能只是Worklist API功能的子集,但它们包含于WebLogic Workshop控件构架中所提供的便利性,使你能够在业务流程中轻易的使用它们。
    任务控件
    在一个办公环境中,管理者常常建立,描述工作和监视工作进展情况。任务控件就是被设计来提供给管理者必要的,通用的操作方式完成这些工作,如建立工作,指派工作,在工作完成时或工作过期时得到通知。任务控件最常见的用法是使用在业务流程中。
    任务工作者控件
    任务工作者控件被设计来满足被分配任务和执行任务的人们的需求,提供给他们最常见的操作。例如,工作者能够查询分配给他们的,本星期到期的任务。任务工作者控件允许工作者将任务标记为所有(就是claim任务),和标记任务为完成。除此之外,任务工作者控件还有一个管理类的权限,就是代理其他用户认领一个任务。任务工作者控件最常被用于在实现一个定制的用户介面中。
    回调(Callbacks)
    当它的状态改变时,任务控件能够通知一个流程。通常的回调包括完成日期超时,任务被终止,或任务完成。回调允许流程停止执行它的逻辑,直到事件发生。
    控件方法
    控件方法提供了一套机制,业务流程或用户介面使用它们建立一个新任务,读取或修改任务数据的值,读去当前状态,引发一个状态的转变,或删除一个任务实例。
    可扩展的控件
    任务和任务工作者控件都有一套内建的方法和回调。控件还可以通过Java annotations扩展。例如,你可以在你的控件中定义定制的操作,使用定制的参数和回调。通过在那些方法中的annotations,你可以配置一个控件的数据值,建立新任务,更新存在的任务等等。你也能够通过以下方式扩控件:
    &#61618;     你能够改变方法的参数,使用XML Bean的类型,使之与任务相关的,你定制的XML文档的schemas相适应。
    &#61618;     你能够加入一个新方法,一次执行多个操作。如,你可以写一个新方法,执行建立一个新任务,设置它的优先级和注释,并将它指派给名字被传入这个方法的用户。
    &#61618;     你能够增加能察觉其它状态改变的回调。例如,你可以增加一个检察任务被claimed的回调。
    (关于annotations,BEA官方是译为“批注”,直接使用Java批注似乎容易误解,此处保留英文。总之是一套利用JAVA注释,改变方法的BEA独门招数就是了。)
    系统管理
    使用WebLogic Integration系统管理控制台的Worklist管理模块,你能够管理Worklist中的任务,业务日历,任务属性和其它要素。使用Worklist控件和Worklist API,你能够建立一个定制的Worklist客户端。Worklist API以EJB和MBeans的形式被使用。下面的章节将更充分的讨论这些主题。
    &#61618;     WebLogic Integration系统管理控制台
    &#61618;     Worklist用户介面
    &#61618;     EJB API
    WebLogic Integration系统管理控制台
    WebLogic Integration系统管理控制台的Worklist管理模块允许应用程序管理者管理和监视你的WebLogic Integration应用程序的任务实例。你能够执行的Worklist指定的管理功能包括:
    &#61618;     查看任务的摘要或细节,监视在完成期限内的任务的执行情况。
    &#61618;     执行查询显示个体的工作量。
    &#61618;     为了加快进度,重新指派任务。
    &#61618;     改变任务属性,如状态或期限。
    &#61618;     通过建立或改变替代路由规则,控制任务路由。
    学习更多的关于Worklist任务的知识,请参考管理WebLogic Integration解决方案中的 Worklist 系统管理部分。
    Worklist用户介面
    Worklist用户介面使最终用户--任务创建者,任务操作者,任务管理者―能够与一个正在运行的业务流程交互,包括处理流程的意外情况,批准请求和状态跟踪。典型地,在真实世界的应用程序中,人们需要一个定制的用户介面和任务交互。例如,你可能会在公司内部网中已有的定单处理用户介面增加一个页面,来允许一个管理者批准特别大的定单。
    WebLogic Integration包含了一个Worklist用户介面的例子。研究Worklist用户介面的例子并使用它的设计策略,可以帮助你设计你的用户介面。
    学习更多的关于Worklist用户介面的知识,请参考Worklist用户介面和EJB API 。
    Enterprise JavaBeans API
    使用这些EJB API,你能够无须借助在WebLogic Workshop中创建的业务流程(JPD),使用Worklist EJB直接创建和管理任务。
    代码样本被包括在Worklist 用户介面 和EJB API中。

    我读了部分英文原文,你翻译得很好啊,我后面部分还没看完,希望能看到你的整篇翻译,谢谢。

  • How to delete the members in one dimension use the maxl script

    i have question that i want to delete the members in one dimension useing the maxl script, but i do not know how to do it. can the maxl delete the members in one dimension? if can, please provide an sample script, thank you so mcuh.

    MaxL does not have commands to alter an outline directly, except the reset command which can delete all dimensions but not members selectively. The best you could do would be to run a rules file (import dimensions) using a file that contains the members you want to keepload rule for the dimension. As typical the warning is to test this first before you do it on a production database

Maybe you are looking for

  • Getting an error when importing data from legacy to temptables

    SQL*Loader: Release 10.1.0.2.0 - Production on Mon Feb 18 00:27:53 2008 Copyright (c) 1982, 2004, Oracle. All rights reserved. Control File: C:\Documents and Settings\rocky\Desktop\tempctrl2..CTL Data File: C:\Documents and Settings\rocky\Desktop\EMP

  • Values of data  in a linked-list

    hello. i declare a small linked list of elemets (about 10), everything is fine and dandy but i need to assign an int value to every one of those elements as a counter whenever a certain action is performed on the element in the list. LinkedList mylis

  • "The file destination provided is not valid. Enter a valid location."

    I'm running Acrobat 9, with all updates installed, on Win XP. I have used shared review before, and it worked. I click Comments, Send for Shared Review. When I try to initiate a shared review, I browse to select my pdf, click on the filename, and I i

  • DVR to Macbook

    I'm looking to take a recording off my DirecTV DVR Model HR20 into my Macbook. What stuff do I need to transfer say a football game onto my Macbook to edit the game? Thanks in advance!

  • Phone Audio on Jabra SP700 Hands Free

    I have a Palm Centro and a JabraSP700. I am able to setup the Palm Centro to communicate with the Jabra. But, I am unable to get the phone audio to play on the Jabra. When I make a phone call, the Jabra says that it is connected. When I quit the phon