MessageTransform Bean problem

Hi Friends,
                  I had a problem while using "AF_Modules/MessageTransformBean" , actually my requirement is i have to pick a .zip file which is a collection of tab delimitted text files i.e it has 6 .txt files in it with different name but prefix is same.
For acheving this i used PayloadZip bean and MessageTransformBean.When i test my scenario end to end all the six files got picked up and at target side i have deliver them as .xml files.At target side i got 1 file but first file was converted to .xml from source directory and the rest are picked as it is with out any conversion to .xml files??
Question is in a single zip file i we have multiple .txt files then only one file will be converted to .xml??
If not wat would be the problem here????
Any suggestions ??
Regards,
VKG.

Hi VKG,
Please go through the thread below , specially the answer given by praveen gujetti. There you will get a fair amount of idea to your problem.
Re: UnZip Paylaod....
Regards
joel
Edited by: joel trinidade on Apr 13, 2009 10:30 AM

Similar Messages

  • Bean problem with creating Adapter Module in NW developer studio

    Hi Gurus!
    I started to develop an adapter module like described in
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    Unfortunatelly, I'm getting error described on page 9 of the document:
    Bean problem: no interface classes found
    I cannot resolve this problem. I've tried it also like described in the document, but no success.
    Any ideas of what could be wrong?
    Thank you!
    Marthy

    Marthy.,.
    Close and open project..standard problem ONLY with nwdi..
    Regards
    Ravi Raman

  • Bean problem: No interface classes found

    Hi ;
    I try to create a adapter . according to tutorial "How To Create Modules for the J2EE Adapter Engine"
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e&overridelayout=true
    Although I did all steps in it , I copied sda files and extract them  then I imported them to the project but I get this error in Netweaver Studio "Bean problem: No interface classes found" while creating ejb file.
    the document says you must close and reopen project when you come accross this error but it doesnt work?
    Is there any one solve this error?
    ps: I use NWDS 7.0.19 , I copied aii_af_lib.sda, aii_af_svc.sda and aii_af_cpa_svc.sda files from PI 7.01

    Hi Tuncer!
    Did you download and "import" these JAR files into your NWDS Build Path  - classpath variables:
    com.sap.aii.af.lib.mod.jar     <bin>/ext/com.sap.aii.af.lib/lib
    sap.comtcloggingjavaimpl.jar     <bin>/system
    com.sap.aii.af.svc_api.jar     <bin>/services/com.sap.aii.af.svc/lib
    com.sap.aii.af.cpa.svc_api.jar     <bin>/services/com.sap.aii.af.cpa.svc/lib
    com.sap.aii.af.ms.ifc_api.jar     <bin>/interfaces/com.sap.aii.af.ms.ifc/lib
    <bin> stands for: /usr/sap/<SID>/<instance-id>/j2ee/cluster/bin in a PI 7.1 system.
    Windows -> Preferences -> Build Path -> Classpath Variables -> New ...
    Choose a name of your choice and then select the JAR files mentioned above.
    This should resolve your problem.
    Regards,
    Volker

  • Message Driven Bean: problem with @RunAs annotation

    I am having a problem using the @RunAs annotation in a message driven bean.
    I would like the code in my onMessage() method to be executed with a specific role/user, so I want to use the @RunAs annotation to achieve this.
    I am running weblogic 10.0.
    I have created the following in weblogic console:
    - Group "TestGroup"
    - User "TestUser", member of "TestGroup"
    - Global Role "TestRole", role condition: "Group : TestGroup"
    The MDB:
    package be.cegeka.test.mdb;
    import javax.annotation.Resource;
    import javax.annotation.security.RunAs;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    @MessageDriven(
              mappedName = "testQueue",
              name = "TestMDB",
              activationConfig = {
                        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    @RunAs("TestRole")
    public class TestMDB implements MessageListener {
         @Resource
         private MessageDrivenContext mdContext;
          * {@inheritDoc}}
         public void onMessage(Message msg) {
              System.out.println("Handling message for user "
                        + mdContext.getCallerPrincipal().getName());
    }[u]The ejb-jar.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
    version="3.0">
         <assembly-descriptor>
              <security-role>
                   <description>
                        Test Role.
                   </description>
                   <role-name>TestRole</role-name>
              </security-role>
         </assembly-descriptor>
    </ejb-jar>
    The weblogic-ejb-jar.xml file:
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
         <security-role-assignment>
              <role-name>TestRole</role-name>
              <principal-name>TestUser</principal-name>
         </security-role-assignment>
    </weblogic-ejb-jar>I would have thought that the onMessage of the MDB would print "Handling message for user TestUser", but instead it prints "Handling message for user <anonymous>".
    It seems as though the @RunAs annotation has no effect. Although I specified the role TestRole (mapped to the user TestUser), the code still seems to be executed by user anonymous.
    Am I missing something?
    Any help would be much appreciated! I've been looking at this poblem for quite a while now.

    Both beans (the MDB on WLS 10 and the session bean on WLS 8.1) use container managed transactions.
    For the MDB I do not explicitly set the transaction attributes, so it should default to container managed transactions.
    For the stateless session bean I have specified the following in the ejb-jar.xml file:
    <ejb-jar>
      <display-name>Weblogic8Service</display-name>
      <enterprise-beans>
        <session>
          <ejb-name>Weblogic8Service</ejb-name>
          <home>be.cegeka.rszv.test.session.Weblogic8ServiceRemoteHome</home>
          <remote>be.cegeka.rszv.test.session.Weblogic8ServiceRemote</remote>
          <ejb-class>be.cegeka.rszv.test.session.Weblogic8ServiceBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
        </session>
      </enterprise-beans>
      <assembly-descriptor>
        <container-transaction>
          <method>
            <ejb-name>Weblogic8Service</ejb-name>
            <method-name>*</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
        </container-transaction>
      </assembly-descriptor>
    </ejb-jar>So as far as I understand it the transaction starts at the MDB (upon receival of a message). The transaction for the remote call to the stateless session bean (in the onMessage() of the MDB) is included in the transaction of the MDB and gets committed when the onMessage() method finishes and the transaction of the MDB itself gets committed.
    Correct me if I'm wrong here.

  • MessageDriven Bean problem.Working but the queues r not getting cleared

    I have written a simple message driven bean.It just sends a message to an another queue myadapterqueue
    on getting a message .
    It is working. But the problem is if I restart my application server then it again reads the messages which had been sent to it earlier.Also the queue size is
    not getting to 0 bytes after it has consumed messages.
    My application server is JBOSS2.4.3
    I think I have to specify some attributes in the
    descriptor files.But how??????????????
    Here is my code
    import java.util.*;
    import javax.ejb.*;
    import javax.jms.*;
    import javax.naming.*;
    public class MyMessageBean implements javax.ejb.MessageDrivenBean,javax.jms.MessageListener
         private QueueConnection connect=null;
         private QueueSession session=null;
         private QueueSender sender =null;
    private Queue sendQueue=null;
    private MessageDrivenContext ctx = null;
         public void setMessageDrivenContext(MessageDrivenContext mdc){
              System.out.println ("In setMessageDrivenContext--------------");
              this.ctx=mdc;
         public void ejbCreate(){
              try{
                   System.out.println ("Message bean Created--------------");
                   InitialContext jndi=new InitialContext();
                   QueueConnectionFactory queueFactory=(QueueConnectionFactory) jndi.lookup("ConnectionFactory");
                   connect=queueFactory.createQueueConnection();
                   session=connect.createQueueSession (true,Session.AUTO_ACKNOWLEDGE);
                   System.out.println ("After session creation--------------");
                   sendQueue=(Queue)jndi.lookup("queue/myadapterqueue");
                   System.out.println("************ queue/myadapterqueue");
              sender=session.createSender (sendQueue);
              System.out.println ("Before Connection start--------------");
              connect.start();
              }catch(javax.jms.JMSException jmse){
                   System.out.println ("In ejbcreate exception-------------------");
                   throw new javax.ejb.EJBException();
              }catch(javax.naming.NamingException jne){
                   System.out.println ("In ejbcreate exception-------------------");
                   throw new javax.ejb.EJBException();
         public void ejbRemove(){
              try{
              System.out.println("ejbRemove done");
              connect.close ();
                   this.ctx=null;
              }catch (javax.jms.JMSException jmse){
                   System.out.println ("In ejbremove exception-------------------");
                   System.out.println("ejbRemove excetion");
                   throw new javax.ejb.EJBException();
         public void onMessage(Message msg){
              try{
              this.sender.send (msg);
              this.session.commit();
              System.out.println(" Message");
         }catch(javax.jms.JMSException jmse ){
              jmse.printStackTrace();
    here are my descriptors
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <ejb-name>MyMessageBean</ejb-name>
    <ejb-class>MyMessageBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    and the correspong xml file for the application server here is jboss.xml
    ?xml version="1.0" encoding="UTF-8"?>
    <jboss>
    <enterprise-beans>
         <message-driven>
              <ejb-name>MyMessageBean</ejb-name>
              <configuration-name>Standard Message Driven Bean</configuration-name>
              <destination-jndi-name>queue/MyMessageBeanQ</destination-jndi-name>
         </message-driven>
    </enterprise-beans>
    </jboss>

    it is unclear whether you are commiting on the first queue or second one.
    but it appears like you have created a transactional problem across the two queues. although you commit on the first queue, this commit is not extended to the second queue.
    things will be fine unless you get an exception of shutdown.
    if you shut your message provider down first then you cannot send the message to the second queue. (assuming that queue 2 is also on the same server)
    if you shut your MB app server down then you may be in the middle of accepting a onMessage callback from the first queue.
    do you have another MB that registers this one as a listener, or are you infact sending a message back onto the same queue...
    public void onMessage(Message msg){
    try{
         this.sender.send (msg);
         //your server may shutdown here and leave messages on the first queue. and send extra messages on the second.
            this.session.commit();
            System.out.println(" Message");
    } catch(javax.jms.JMSException jmse ){
            jmse.printStackTrace();
    }

  • Double click on menu = exception : managed bean problem ?

    Hello,
    I am a beginner with JSF and I have to work on an existing project.
    In my Web application, my problem is that if the user doubles click on some navigation links, then an exception is raised.
    Technically, I think that 2 consecutive HTTP requests sent to the server enter in competition and thus the state of certain variables becomes inconsistent. This problem appears when the 2nd click is sent to the server before the server answered the treatment of the 1st click.
    My current assumption is directed towards the managed beans used in the application (I am not (yet ;) ) a master on the subject). In fact, the main menu is �attached� to managed bean which are all of type �session�. At the time of the creation of the bean, a certain quantity of treatment is done to prepare information to be posted on the page. Other treatments are obviously done during the treatment of page JSF (Java code called by JSF of the).
    I think that at the time of the first call, the managed bean is possibly initialized. At the time of the 2nd click on the page, this bean re-initialized or is simply removed if the user has clicked on another menu (which refers to another bean).
    Would you have an idea of the veracity of my assumption?
    Would you have an idea how to solve the problem?
    I am currently looking for a JavaScript which allows me to disable all buttons on the page before the complete response of the server (that in order to prevent the user from clicking on an action before its preceding action is not treated).
    Thank you in advance for your help and all your ideas !

    mharelick wrote:
    the trash can icon is still having crashes.
    Launch the Terminal utility and type this command, each followed by the "return" key:
    ls -lad .Trash
    ls -la .Trash
    The "l" in those commands is the lower-case letter "L".
    The first command shows you the ownership and permissions of the .Trash folder. On my system my user "short name" is listed as the owner and group. The permissions are "drwx------".
    The second command shows you any files within the .Trashes folder. (Ignore the entries ending in one and two periods.) You should be the owner of anything in it. The permissions on anything there should start with "-rw" or "drw".
    If you see anything different, describe what you see and someone will be able to give you instructions for repairing it.

  • Message-driven bean problem (re-delivering of JMS msg)

    Sorry for crossposting this (already posted in JMS forum), but perhaps someone here (who doesn't read JMS forum) knows the answer to this problem - it's basically a JMS problem, but closely related to EJB:
    I browsed through all available docs but found no answer to this question: How can I force the re-delivery of a JMS message to happen in a few minutes instead of immediately?
    I use JMS in an EJB container (SonicQ in Borland Enterprise Server 5.0.1) and messages are consumed by a message-driven bean. The problem arises when the bean sets the transaction in which the onMessage() function is called to rollback-only: Then, the message is redelivered immediately again causing an infinte processing loop and 100% CPU load on the machine until the message is finally consumed.
    Is it possible to set a timeout for such a "temporarily rejected" message so that it is retries in a few minutes? Would that be a programming issue, or a configuration issue of the container and/or JMS?

    Hi Chranq,
    What you are talkin about is a container configuration thing as far as I can figure out. I may be that your JMS implementation doesn't support it.
    /Stig

  • Enterprise Session Bean Problem

    Dear Experts,
    I have just installed Netweaver Developer Studio 7.1 Composition Environment and is doing some development on it from the tutorial in the following link
    [http://help.sap.com/saphelp_nw04/helpdata/en/c3/679564e11d482f8a706b423f67e56c/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/c3/679564e11d482f8a706b423f67e56c/content.htm]
    I have created a new EJB Project using the Configuration SAP EJB J2EE 1.4 Project and created a new stateless session bean Calculator. 
    I finished creating the session bean with all the BUSINESS METHODS, but when I expand the project node Calculator in the J2EE Explorer, I CANNOT see the Calculator.java class.  All other classes such as CalculatorBean.java, CalculatorHome.java, etc are present. 
    This is where the problem comes, when I create the JavaBean in the Web Module I will need to access the Calculator.java class and now I cannot access it since it is missing.
    Can you please guide me on how to generate the Calculator.java class in the session bean.
    Points will be rewarded for correct answers.
    Thanks in advance
    Edited by: jamison2004 jordan2004 on May 7, 2008 11:16 AM
    Edited by: jamison2004 jordan2004 on May 7, 2008 11:25 AM

    Hi jamison jordan,
    Maybe you check the CE version of the documentation:
    [Creating Your First J2EE Application|http://help.sap.com/saphelp_nwce10/helpdata/en/c3/679564e11d482f8a706b423f67e56c/frameset.htm]
    kind regards
    Stefanie

  • Servlet Beans problem

    Hi all,
    i am new to servlet and Beans.I am facing a problem currently i have designed a JSP page for adding user information after submitting the information i am calling a servlet from that JSP page to submitt data to the data base which is MYsql,i have made a bean namely DatabaseConnection to connect to the database.,the submission of data is working fine.
    the problem i am facing is in displaying the data from the database.again we have made a servlet to fetch data from the database we are using a Bean to set the data in to beans ,currently we are passing the RecordSet as an argument to the SetData function in the bean which is setting the data in the bean variables. At the end of the servlet i,e after setting the data in the beans we are forwarind the controll to the Display.JSP form using request dispatcher method .In the Display form we are using <use:Jsp beans> tage and <get property tag> but unable to show any data it's showing null there.
    i need help if some body guide me to the right track...
    Thanks in advance
    umesh

    awasss..
    Y dont u send ur jsp which used jsp:use bean tag? Hope u are setting the bean correctly in the request or seesion scope from the servlet before commin to jsp.. :)
    regards
    Shanu

  • Jsp-servlet-bean problem

    Please help!
    I have a servlet controller, a javabean for the data and a jsp for the view.
    I cannot get the jsp using
    <jsp:useBean id="pList" class="bbs.PostListCommand" scope="request" />
    to access the bean data
    However, when I access the bean in this way
    <%@ page import="bbs.PostListCommand" %>
    // html
    <% bbs.PostListCommand postList = null;
    synchronized(session){
         postList = (bbs.PostListCommand) session.getAttribute("PostListCommand");
         if (postList == null){ %>
              <H1>Nothing in request scope to retrieve ....</H1>
              <P>
    <%     }
         else{  %>
              <TABLE border="1">
    // etc
    � it works
    Does anyone know why the <jsp:useBean> tag does not find the bean
    I have installed tomcat 4.18 and set the environmental variables etc.
    Directory structure is
    E:\Tomcat41\webapps\examples\WEB-INF\jsp          for jsp�s
    E:\Tomcat41\webapps\examples\WEB-INF\classes\bbs     for bean and servlets
    Thanks in advance for any help.
    Chris

    GrayMan - Thanks for your help.
    Let me explain my problem in more detail ...
    Background:
    I have some servlet experience, but I am new to jsp - so sorry if this seems trivial to you ...
    I have a book called bitter java by bruce tate from manning.com . I am trying to get the chapter 3 examples to work
    There are three files
    PostListCommand          the bean
    PostListController     the servlet
    PostListResults          jsp
    And a new test file � PostListResults version 2 with scriptlet code to access the bean.
    There are a couple of typos in the downloaded source files, but nothing that causes the main problem of not being able to access the bean data.
    Program flow
    Servlet instantiates new bean
    Bean � gets data from db
    Servlet passes bean to jsp with a forward
    Jsp outputs data
    I have put the files in the directories �
    E:\Tomcat41\webapps\examples\WEB-INF\jsp          for jsp�s
    E:\Tomcat41\webapps\examples\WEB-INF\classes\bbs     for bean and servlets
    The complete source code for each file is given below.
    1 I have checked the db access � that�s ok
    2 I have also checked reading the bean data back in from the request scope and printing out the results from within the servlet.- ok
    3 I can access the data through a scriptlet (PostListResults version 2), but not with the original PostListResults which uses <jsp:useBean>
    thanks in advance, chris
    PostListController.java
    package bbs;
    // Imports
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    // Import for commands used by this class
    import bbs.PostListCommand;
    public class PostListController
    extends javax.servlet.http.HttpServlet
    implements Serializable {
    * DoGet
    * Pass get requests through to PerformTask
    public void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
    throws javax.servlet.ServletException, java.io.IOException {
    performTask(request, response);
    public void performTask(
    HttpServletRequest request,
    HttpServletResponse response) {
    try {
    PostListCommand postList = (bbs.PostListCommand) java.beans.Beans.instantiate(getClass().getClassLoader(),"bbs.PostListCommand");
    postList.initialize();
    postList.execute();
    request.setAttribute("PostListCommand", postList);
    ServletContext sc = this.getServletContext();
    RequestDispatcher rd =
    sc.getRequestDispatcher("/jsp/PostListResults.jsp");
    rd.forward(request, response);
    } catch (Throwable theException) {
    theException.printStackTrace();
    PostListCommand.java
    package bbs;
    import java.io.*;
    import java.sql.*;
    //import COM.ibm.db2.jdbc.*;
    import java.util.*;
    * Insert the type's description here.
    * Creation date: (07/17/2001 5:07:55 PM)
    * @author: Administrator
    public class PostListCommand {
    // Field indexes for command properties     
    private static final int SUBJECT_COLUMN = 1;
    private static final int AUTHOR_COLUMN = 2;
    private static final int BOARD_COLUMN = 3;
    protected Vector author = new Vector();
    protected Vector subject = new Vector();
    protected Vector board = new Vector();
    // SQL result set
    protected ResultSet result;
    protected Connection connection = null;
    * execute
    * This is the work horse method for the command.
    * It will execute the query and get the result set.
    public void execute()
    throws
    java.lang.Exception,
    java.io.IOException {
    try {
    // retrieve data from the database
    Statement statement = connection.createStatement();
    result =
    statement.executeQuery("SELECT subject, author, board from posts");
    while (result.next()) {
    subject.addElement(result.getString(SUBJECT_COLUMN));
    author.addElement(result.getString(AUTHOR_COLUMN));
    board.addElement(result.getString(BOARD_COLUMN));
    result.close();
    statement.close();
    } catch (Throwable theException) {
    theException.printStackTrace();
    * getAuthor
    * This method will get the author property.
    * Since the SQL statement returns a result set,
    * we will index the result.
    public String getAuthor(int index)
    throws
    java.lang.IndexOutOfBoundsException,
    java.lang.ArrayIndexOutOfBoundsException {
    return (String) author.elementAt(index);
    * getBoard
    * This method will get the board property.
    * Since the SQL statement returns a result set,
    * we will index the result.
    public String getBoard(int index)
    throws
    java.lang.IndexOutOfBoundsException,
    java.lang.ArrayIndexOutOfBoundsException {
    return (String) board.elementAt(index);
    * getSubject
    * This method will get the subject property.
    * Since the SQL statement returns a result set,
    * we will index the result.
    public String getSubject(int index)
    throws
    java.lang.IndexOutOfBoundsException,
    java.lang.ArrayIndexOutOfBoundsException {
    return (String) subject.elementAt(index);
    * initialize
    * This method will connect to the database.
    public void initialize()
    throws java.io.IOException {
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    // URL is jdbc:db2:dbname
    String url = "jdbc:db2:board";
    // URL is jdbc:odbc:bitter3board
    String url = "jdbc:odbc:bitter3board";
    // connect with default id/password
    connection = DriverManager.getConnection(url);
    } catch (Throwable theException) {
    theException.printStackTrace();
    * Insert the method's description here.
    * Creation date: (07/17/2001 11:38:44 PM)
    * @return int
    * @exception java.lang.IndexOutOfBoundsException The exception description.
    public int getSize() {
    return author.size();
    PostListResults.jsp
    <HTML>
    <HEAD>
    <TITLE>Message Board Posts</TITLE>
    </HEAD>
    <BODY BGCOLOR=#C0C0C0>
    <H1>All Messages</H1>
    <P>
    <jsp:useBean id="postList" class="bbs.PostListCommand" scope="request"></jsp:useBean>
    <TABLE border="1">
    <TR>
    <TD>Subject</TD>
    <TD>Author</TD>
    <TD>Board</TD>
    </TR>
    <% for (int i=0; i < postList.getSize(); _i++) { %>
    <TR> <TD><%=postList.getSubject(_i) %></TD>
    <TD><%=postList.getAuthor(_i) %></TD>
    <TD><%=postList.getBoard(_i) %></TD>
    </TR>
    <% } %>
    </TABLE>
    <P>
    </BODY>
    </HTML>
    PostListResults.jsp version 2 � with scriplet code instead of useBean
    <HTML>
    <%@ page import="bbs.PostListCommand" %>
    <!-- This file was generated by the chris -->
    <HEAD>
    <TITLE>Message Board Posts</TITLE>
    </HEAD>
    <BODY BGCOLOR=#C0C0C0>
    <% bbs.PostListCommand postList = null;
    synchronized(request){
         postList = (bbs.PostListCommand) request.getAttribute("PostListCommand");
         if (postList == null){ %>
              <H1>Nothing in request scope to retrieve ....</H1>
              <P>
    <%     }
         else{  %>
              <TABLE border="1">
              <TR>
              <TD>Subject</TD>
              <TD>Author</TD>
              <TD>Board</TD>
              </TR>
         <% for (int i=0; i < postList.getSize(); _i++) { %>
                   <TR> <TD><%=postList.getSubject(_i) %></TD>
              <TD><%=postList.getAuthor(_i) %></TD>
              <TD><%=postList.getBoard(_i) %></TD>
              </TR>
         <% } %>
              </TABLE>
    <%     }
    }%>
    <P>
    goodnight
    </BODY>
    </HTML>

  • Java Bean Problem

    Hi,
              I have encountered a Java bean/JSP problem. I have developed a simple test
              case as follows:
              Paramtest.jsp:
              <html>
              <head>
              <title>Param Test</title>
              <body>
              <p>
              <form name="form1" method=post action="formtest.jsp">
              <input name="check1" type="checkbox">Check1
              <br>
              <input type="submit" value="OK" type="submit">
              </form>
              </body>
              </html>
              Formtest.jsp:
              <jsp:useBean id="cbtest" class="com.ebiffa.cbtest"
              scope="request" />
              <jsp:setProperty name="cbtest" property="*" />
              <html>
              <body>
              check1= <%= cbtest.getCheck1() %>
              </body>
              </html>
              cbtest.java:
              package com.ebiffa;
              public class cbtest {
              boolean check1;
              public void setcheck1 (boolean check1) {
              this.check1=check1;
              public boolean getCheck1() {
              return check1;
              When I run the program check1 always shows 'false' regardless of whether the
              checkbox is checked.
              I am running Weblogic 5.1.0 SP8
              The program works OK on Tomcat
              Any ideas ???
              Thanks in anticipation
              

    I had already pick that typo up I posted the wrong source code for the bean.
              "Nils Winkler" <[email protected]> wrote in message
              news:[email protected]...
              > The problem is in your bean class: The set-method's name should be
              > "setCheck1", not "setcheck1". Capitalization matters in this case (no
              > pun intended).
              >
              > Hope this helps,
              >
              > Nils
              >
              > Ian McDermid wrote:
              > >
              > > Hi,
              > >
              > > I have encountered a Java bean/JSP problem. I have developed a simple
              test
              > > case as follows:
              > >
              > > Paramtest.jsp:
              > >
              > > <html>
              > > <head>
              > > <title>Param Test</title>
              > > <body>
              > > <p>
              > > <form name="form1" method=post action="formtest.jsp">
              > > <input name="check1" type="checkbox">Check1
              > > <br>
              > > <input type="submit" value="OK" type="submit">
              > > </form>
              > > </body>
              > > </html>
              > >
              > > Formtest.jsp:
              > >
              > > <jsp:useBean id="cbtest" class="com.ebiffa.cbtest"
              > > scope="request" />
              > > <jsp:setProperty name="cbtest" property="*" />
              > > <html>
              > > <body>
              > > check1= <%= cbtest.getCheck1() %>
              > > </body>
              > > </html>
              > >
              > > cbtest.java:
              > >
              > > package com.ebiffa;
              > > public class cbtest {
              > >
              > > boolean check1;
              > >
              > > public void setcheck1 (boolean check1) {
              > > this.check1=check1;
              > > }
              > > public boolean getCheck1() {
              > > return check1;
              > > }
              > >
              > > }
              > >
              > > When I run the program check1 always shows 'false' regardless of whether
              the
              > > checkbox is checked.
              > >
              > > I am running Weblogic 5.1.0 SP8
              > >
              > > The program works OK on Tomcat
              > >
              > > Any ideas ???
              > >
              > > Thanks in anticipation
              >
              > --
              > ============================
              > [email protected]
              

  • Named query in Entity Bean - Problem with embedded class

    Hello Forum,
    I'm trying to set up a named query in my Entity Bean and I'm unable to get
    it up and running for an embedded class object.
    The class hierarchy is as follows:
             @MappedSuperclass
             AbstractSapResultData (contains dayOfAggregation field)
                     ^
                     |
            @MappedSuperclass
            AbstractSapUserData (contains the timeSlice field)
                     ^
                     |
              @Entity
              SapUserDataThe named query is as follows:
    @NamedQuery(name = SapUserDataContext.NAMED_QUERY_NAME_COUNT_QUERY,
                                query = "SELECT COUNT(obj) FROM SapUserData AS obj WHERE "
                                         + "obj.sapCustomerId"
                                         + "= :"
                                         + SapResultDataContext.COLUMN_NAME_SAP_CUSTOMER_ID
                                         + " AND "
                                         + "obj.sapSystemId"
                                         + "= :"
                                         + SapResultDataContext.COLUMN_NAME_SAP_SYSTEM_ID
                                         + " AND "
                                         + "obj.sapServerId"
                                         + "= :"
                                         + SapResultDataContext.COLUMN_NAME_SAP_SERVER_ID
                                         + " AND "
                                         + "obj.dayOfAggregation.calendar"
                                         + "= :"
                                         + DayContext.COLUMN_NAME_DAY_OF_AGGREGATION
                                         + " AND "
                                         + "obj.timeSlice.startTime"
                                         + "= :"
                                         + "timeSliceStartTime"
                                         + " AND "
                                         + "obj.timeSlice.endTime"
                                         + "= :"
                                         + "timeSliceEndTime")The query deploys and runs except that part:
                                         + "obj.dayOfAggregation.calendar"
                                         + "= :"
                                         + DayContext.COLUMN_NAME_DAY_OF_AGGREGATIONI don't see any difference to the part of the query accessing the timeSlice
    field which is also an embedded class object - I access it in exactly the same way:
                                         + "obj.timeSlice.startTime"
                                         + "= :"
                                         + "timeSliceStartTime"
                                         + " AND "
                                         + "obj.timeSlice.endTime"
                                         + "= :"
                                         + "timeSliceEndTime"The problem is that the complete query runs on JBoss application server
    but on the SAP NetWeaver application server it only rund without the
                                         + "obj.dayOfAggregation.calendar"
                                         + "= :"
                                         + DayContext.COLUMN_NAME_DAY_OF_AGGREGATIONpart - If I enable that part on SAP NetWeaver the server complains:
    [EXCEPTION]
    {0}#1#java.lang.IllegalArgumentException: line 1: Comparison '=' not defined for dependent objects
    SELECT COUNT(obj) FROM SapUserData AS obj WHERE obj.sapCustomerId= :sap_customer_id AND obj.sapSystemId= :sap_system_id AND obj.sapServerId= :sap_server_id AND obj.dayOfAggregation.calendar= :day_of_aggregation AND obj.timeSlice.startTime= :timeSliceStartTime AND obj.timeSlice.endTime= :timeSliceEndTime
                                                                                                                                                                                                 ^I know that this isn't an application server specific forum but the SAP NetWeaver server is the most strict EJB 3.0 and JPA 1.0 implementation I've seen so far so I think I'm doing something wrong there.
    Someone in the SAp forum mentioned:
    The problem here is that you compare an input-parameter with an embeddable field of your entity.
    Regarding to the JPQL-grammer (spec 4.14) you are not allowed to compare
    with the non-terminal embeddable field but with the terminal fields of your
    embeddable. Stating that your embedded class might have the fields
    startTime and endTime your JPQL query might look like this:
    Query q = em.createQuery("SELECT count(obj.databaseId) FROM SapUserData obj WHERE obj.timeSlice.startTime = :startTime AND obj.timeSlice.endTime = :endTime");
    q.setParameter("startTime", foo.getStartTime());
    q.setParameter("endTime", foo.getEndTime());
    q.getResultList();
    This limitation in the JPQL grammar is rather uncomfortable.
    An automatic mapping of the parameter's fields to the terminal fields of your
    embedded field would be more convenient. The same can be said for lists
    as parameter-values which is possible in HQL, too. I think we have to wait
    patiently for JPA 2.0 and hope for improvements there. :-)
    With that help I was able to get it up and running for the timeSlice field but
    I don't see the difference to the dayOfAggregation field which is also just
    another embedded class using an object of a class annotated with
    @Embeddable.
    The get method of the dayOfAggregation field is as follows:
         * Get method for the member "<code>dayOfAggregation</code>".
         * @return Returns the dayOfAggregation.
        @Embedded
        @AttributeOverrides({@AttributeOverride(name = "calendar", /* Not possible to use interface constant here - field name must be used for reference */
                                                column = @Column(name = DayContext.COLUMN_NAME_DAY_OF_AGGREGATION,
                                                                 nullable = false)),
                             @AttributeOverride(name = "weekday",
                                                column = @Column(name = DayContext.COLUMN_NAME_WEEKDAY,
                                                                 nullable = false)),
        public Day getDayOfAggregation() {
            return this.dayOfAggregation;
        }The link to my question in the SAP forum for reference:
    https://www.sdn.sap.com/irj/sdn/thread?messageID=3651350
    Any help or ideas would be greatly appreciated.
    Thanks in advance.
    Henning Malzahn

    Hello Forum,
    got a response in the SAP forum - Issue is a bug in the SAP NetWeaver
    app. server.
    Henning Malzahn

  • JSP Bean problem

    Hi
    I'm having a problem with a very simple bean, I'm using NetBeans 4.1 and I have the following files:
    project/index.jsp
    project/myBeans/Characters.java
    in the index.jsp file I call the bean using the following code
    <jsp:useBean id="charac" class="myBeans.Characters" />but I am getting the following error
    org.apache.jasper.JasperException: /character.jsp(16,8) The value for the useBean class attribute myBeans.Characters is invalid.the code works perfectly if i call it in the jsp file as follows:
    <%@page import="myBeans.*"%>
    Characters charac = new Characters();so I assume the problem lies some where in the useBean call???
    any help appreciated

    Most common cause of this problem
    1 - class file is not up to date.
    2 - bean does not have a public no-args constructor.
    From the example you have it looks like you have a public no-args constructor.
    Check that the class file is in the correct place, and is up to date.
    Try restarting Tomcat/server to see if that helps.

  • Static methods in Session Beans problem

    Can a Stateful Session Bean have a static method?
    public static String foo();
    I tried to add a static method to a Stateful Session bean but had two problems:
    When I tried to add the static modifier to the Remote interface:
    static String foo();
    I got the following error message:
    Error(12,17): modifier static not allowed here
    When I tried to compile code calling this function :
    MyClass.foo();
    I got this message:
    Error(795,42): non-static method getNewSuffix(java.lang.String) cannot be referenced from a static context
    Even though a static method was compiled in this class. I assume it can't find the static modifier in the Remote interface which wasn't allowed. Are static methods allowed in EJB's at all?

    dear friend,
    1) Interfaces may not contain static functions!
    2) EJBs doesnt support static methods !
    Maybe you should go and learn more about Java and EJB's ?

  • Forms 9i FRM-40738 Hyperlink Bean problem

    Hello,
    I've this error coming please help me.
    I needed to see, how a bean is integerated in Forms 9i. I was
    searching through the example at metalink and it gave me a
    paper
    "How to Integerate HyplerLink Bean in forms 9i", what steps
    i followed are given in that paper.
    Now when i run the form, it gaves me the error
    FRM-40738 Argument to Built in SET_CUSTOM_PROPERTY CANNOT BE NULL.
    the steps i followed are
    1- I created a form called hyperlink.fmb
    2- Then i created a ON LOGON trigger at this form
    3- I opened the canvas and draw a Bean Area on it
    4- Then i renamed that Item to Hyperlink by Property Plattelete
    5- I named the canvas CONTROL
    6- Then at module level i created a TRIGGER WHEN_NEW_FORM_INSTANCE and put following PL.SQL code in it
    DECLARE
    hHyperlink ITEM := FIND_ITEM('CONTROL.HYPERLINK');
    BEGIN
    FBEAN.Register_Bean( hHyperlink, 1, 'oracle.forms.demos.beans.Hyperlink');
    FBean.Invoke( hHyperlink, 1, 'setURL', 'http://otn.oracle.com/products/forms');
    FBean.Invoke( hHyperlink, 1, 'setLabel', 'Forms on OTN');
    FBean.Enable_Event( hHyperlink, 1, 'actionListener', true );
    END;
    7-Then i created a Trigger at CONTROL.HYPERLINK, that was
    WHEN_CUSTOM_ITEM_EVENT and put the following code in it
    DECLARE
    vcEventData varchar2(256);
    BEGIN
    vcEventData := Fbean.Invoke_Char('CONTROL.HYPERLINK', 1, 'getURL');
    WEB.SHOW_DOCUMENT(vcEventData, '_blank');
    END;
    Then did the following steps of the locating the bean by the
    JAR method.
    Method 1 - The JAR Method:
    a. Locate the hyperlink.jar file located in D:\9iDS\forms90\demos\hyperlink\classes.
    b. Move the hyperlink.jar file to 9iDS_HOME\forms90\java.
    c. Find the formsweb.cfg file in 9iDS_HOME\forms90\server.
    d. Add the following configuration section to the file:
    [hyperlink]
    archive_jini=f90all_jinit.jar,hyperlink.jar
    width=675
    height=480
    separateFrame=false
    splashScreen=no
    lookAndFeel=oracle
    colorScheme=blue
    The archive_jini parameter pointing to hyperlink.jar is the most important part
    of this configuration.
    e. Now go into Form Builder and accomplish the following:
    Edit->Preferences->Runtime Tab
    Add the config parameter to your "Application Server URL". It should look
    something like this:
    http://machine.domain:port/forms90/f90servlet?config=hyperlink
    Then i compiled it and ran it, Now it gives this error
    FRM-40738 Argument 1 to built in SET_CUSTOM_PROPERTY cannot
    be null.
    P.S I have set the implementation class property but, still i don't know
    whats the problem, and where i am making mistake, please help me.
    Please any help will be appreaciated.
    Sincerely
    Tensed Beginner

    Hello Frank,
    Thanks for your reply back to me. Frank, i am
    currently
    new to Forms 9i even the Oracle world. In my compan
    basically i was hired a J2EE resource, but they put
    me
    on oracle, and i feel like, i am not performing to
    the level i should.
    Can you please tell me, how should i verify that, it
    is not returning
    a Null? Can you tell me the statement Syntax, yea my
    BLock
    name is CONTROL and Item name is HYPLERLINk, please
    do
    tell me how to verfiy it, i will be highly obliged.
    Sincerely,
    Ben ( Tensed Beginner )
    Hello Frank,
    Thanks for your reply back to me. Frank, i am
    currently
    new to Forms 9i even the Oracle world. In my compan
    basically i was hired a J2EE resource, but they put
    me
    on oracle, and i feel like, i am not performing to
    the level i should.
    Can you please tell me, how should i verify that, it
    is not returning
    a Null? Can you tell me the statement Syntax, yea my
    BLock
    name is CONTROL and Item name is HYPLERLINk, please
    do
    tell me how to verfiy it, i will be highly obliged.
    Sincerely,
    Ben ( Tensed Beginner )Hi Ben
    Please check the path that u have given. Think the mistake is in the path.
    FBEAN.Register_Bean( hHyperlink, 1, 'oracle.forms.demos.beans.Hyperlink');
    If the problem still persist will let u know how to resoleve it.
    feel free to get in touch....
    Regards
    Aravind

Maybe you are looking for