Struts 2.0 validations

Hi , all
I have a problem with struts validations, I am using struts2.0, in the button action of jsp if I won't pass any parameters valitions are happening with struts validators , if I pass any parameters in the button action it's ignoring the validations , so please give the solution how to do the validations while passing the parameters in the action of button click in the jsp & I am passing the parameters in struts.xml also like "myaction/*"
Thanks

updationThere is no such friggin' word. If you own a dictionary that has it, then burn it, NOW!

Similar Messages

  • STRUTS: client-side validation in jsp using  DynaValidatorForm

    I am supposed to work on struts on as project and it is like learning a crash course and work the next day.
    In Struts 1.1 enviroment, I am using DynaValidatorForm to create a bean form and then perform validation.
    1. I write a DynaValidatorForm definition in struts-config.xml
    2. I write xml for action so that when /getQuotes.do in invoked by a jsp form, the form data is put into the QuoteDetailsBean.
    3. add the plugin script for ValidatorPlugIn
    xml fragment from struts-config:
    //form bean
    <form-beans>
    <form-bean name="QuoteDetailsBean" type="org.apache.struts.validator.DynaValidatorForm">
        <form-property name="forename" type="java.lang.String"/>
       <form-property name="surname" type="java.lang.String"/>
    <form-bean>
    </form-beans>
    <action
            path="/getQuotes"
            type="com.kainos.quickquotes.struts.QQGetQuotesAction"
            validate="true"
            name="QuoteDetailsBean"
            input="/userform1.do"
            parameter="save"
            scope="session">
            <forward name="success" path="/pages/jsp/result.jsp"/>
            <forward name="back" path="/userform1.do"/>
    </action>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property
             property="pathnames"
             value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
      </plug-in>Now I write a validation code for getQuotes.do. note that I can write the validation code with
    <form name="QuoteDetailsBean"> but this form bean is shared by many jsp, so i am using the name of the action
    (getQuotes) as the name of the form in the validation.xml.
    So far this looks okay, as I am going by some example.
    xml fragment from validation.xml:
    <formset>
              <form name="/getQuotes">
                 <field property="forename" depends="required,minlength">
                    <arg0 key="QuoteDetailsBean.forename" />
                    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                    <var>
                       <var-name>minlength</var-name>
                       <var-value>2</var-value>
                    </var>
                 </field>
                 <field property="surname" depends="required,minlength">
                <arg0 key="QuoteDetailsBean.surname" />
                <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                <var>
                   <var-name>minlength</var-name>
                   <var-value>2</var-value>
                </var>
                 </field>
    </formset>Now I write the JSP. I use the <html:javascript> tag to allow front-end validation based on the xml in validation.xml.
    The jsp code:
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <html:html locale="true">
    <head>
    <title><bean:message key="welcome.title"/></title>
    <html:base/>
    <html:javascript formName="/getQuotes"
                method="validateForm"
                dynamicJavascript="true"
                staticJavascript="false"
                cdata="false" />
    </head>
    <body bgcolor="#FFCC9F">
    <html:errors />
    <html:form action="getQuotes.do" onsubmit="return validateForm(this);" >
    Forename:</td> <td>���<html:text property="forename"/></td></tr>
    <tr> <td>Surname:</td> <td>���<html:text property="surname"/></td></tr>
    <html:submit value="Quotes" /></td></tr>
    </html:form>
    </body>
    </html:html>Does this looks okay. I wrote so far based on some tutorials n help online.
    Now when I open the JSP and then do a submit, there is no validation (I tried by submitting with empty forename and surname. I mean i could invoke the action class and the invoke class
    redirects(forwards) to the appropriate path. so the code works fine except validation is not done
    Q1. So what should i do more to get client-side validation?
    What actually happens in client-side validation? does a pop up alert appears?
    nothing happens so far in my case.
    Q2. What should I do more for server side validation. Since the form is incomplete, what happens?
    I thought the same form returns and the error messages are printed in the jsp page since i have the <html:errors />
    tag just below the <body> tag.
    The action class is pretty simple so far:
    public class QQGetQuotesAction extends Action {
        public QQGetQuotesAction(){
    public ActionForward execute(ActionMapping mapping,
                 ActionForm form,
                 HttpServletRequest request,
                 HttpServletResponse response)
        throws Exception {
            DynaValidatorForm dynaform = (DynaValidatorForm)form;
            System.out.println("forename:"+dynaform.get("forename");
            System.out.println("surname:"+dynaform.get("surname");
            return forward=mapping.findForward("back");
    }Please help me out. I think I am missing something which i need to do
    thanks
    Tanveer

    I think the validations are to be declared on the form
    name and not the action path.
    Your formName is QuoteDetailsBean but your are using
    the action path(/getQuotes) both in the validation
    rules and the jsp tags. Use the formName on both the
    places.
    Also your html:javascript tag will not generate the
    static javascript to validate the fields. For this you
    will have to add code like below.
    <html:javascript dynamicJavascript="false"
    staticJavascript="true"/>
    Other options is to set the attribute
    staticJavascript="true" in your html:javascript tag.
    Hope it helps.hi
    staticJavascript="true" did the trick. :)
    I think the validations are to be declared on the form name and not the action path.It is not necessary. You can declare the validation on the action class. This is essential if a form bean is shared by several JSPs having its own action class. This is as per as I read in a tutorial and it works.

  • Struts client side validation....

    Hello all,
    I am using struts client and server validation but only the server validation works. I tired looking around the forum but wouldnt find any similar problem.
    I am getting value from the previous action class and i am able to successfully retrieve and display the value. I inserted the value in a object and pass over to my jsp. When i try inserting the validation, the server side works fine but i get nth on the client side. I viewed the source code of my jsp and the JAVASCRIPT is successfully inserted but no pop up when i leave the fill blank. Please advise mi..
    1)update.jsp will retrieve data from a object and display them in text box
    struts config file**
    <form-bean name="UpdateMarks" type="fypms.form.UpdateMarksForm" />
    <action name="UpdateMarks"
    path="/updateMarks"
    type="fypms.action.UpdateStudentMarks"
    scope="request"
    validate="true"
    input="/pages/UpdateStudentMarks.jsp" >
    <forward name="successfulUpdate" path="/pages/successfulUpdate.jsp" />
    <forward name="wrongHelloId" path="/pages/wrongHelloWorld.jsp" />
    </action>
    <message-resources parameter="MessageResources"/>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
    property="pathnames"
    value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    validation.xml**
    <!-- javascript validation for Update Presentation marks page -->
    <form name="UpdateMarks">
    <field property="first_Present"
    depends="creditCard">
    <arg key="prompt.firstPresent" />
    </field>
    <field property="final_Present"
    depends="creditCard">
    <arg key="prompt.finalPresent" />
    </field>
    </form>
    updatemarksform.java**
    private String adminNo[];
         private String first_Present[];
         private String final_Present[];
         private String batchNumber;
         //private String batchNumber;
         public ActionErrors validate( ActionMapping mapping, HttpServletRequest request)
              ActionErrors errors = new ActionErrors();
              List testing = new ArrayList();
              System.out.println("out");
              for(int x=0; x < first_Present.length;x++)
                   System.out.println("firsT" + first_Present[x].length());
                   if (first_Present[x].length()<1)
                        System.out.println("a");
                        //userId not entered
                        errors.add("marks.firstPresentation", new ActionMessage("marks.firstPresentation"));
                   if (final_Present[x].length()<1)
                        //password not entered
                        errors.add("marks.finalPresentation", new ActionMessage("marks.finalPresentation"));
              request.setAttribute("StudentList", testing);
              return errors;
    update.jsp**
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page import="fypms.model.*" %>
    <link href="/FYPMS/css/style.css" rel="stylesheet" type="text/css">
    <!--Can contains: JSP -->
    <html:html locale="true">
    <html:form action="/updateMarks" method="post" onsubmit="return validateUpdateMarks(this);">
    <html:errors/>
         <table>
    <tr>
    <td>Name</td>
    <td>Admin Number</td>
    <td>First Presentation</td>
    <td>Final Presentation</td>
    </tr>
    <logic:iterate id="myCollectionElement" name="StudentList">
    <tr>
    <td> <bean:write name="myCollectionElement" property="name"/><html:hidden name="hiddenBatch" property="batchNumber"/></td>
    <td> <bean:write name="myCollectionElement" property="adminNo"/><html:hidden name="myCollectionElement" property="adminNo"/></td>
    <td> <html:text name="myCollectionElement" property="first_Present" /></td>
    <td> <html:text name="myCollectionElement" property="final_Present" /> </td>
    </tr>
    </logic:iterate>
    >
    <tr><td colspan="4"><html:submit value="enter"/></td></tr>
         </table>
    <!-- Begin Validator Javascript Function-->
    <html:javascript formName="UpdateMarks" staticJavascript="true" />
    <!-- End of Validator Javascript Function-->
    </html:form>
    </html:html>
    thank in advance

    # -- validation text(display text) for login page --
    valid.title=Simple Validation Test Form
    prompt.username=Username
    prompt.password=Password
    prompt.phone=Phone Number
    prompt.email=E-Mail Address
    prompt.url=URL (Website Address)
    login.userid = Username is required
    login.password = Password is required
    #-- validation text(display text) for Update presentation marks page --
    prompt.firstPresent=first_Present
    prompt.finalPresent=final_Present
    marks.firstPresentation=First Presentation marks is required
    marks.finalPresentation=Final Presentation marks is required
    thx for ur help ^^
    Message was edited by:
    fatmond

  • Problem in struts validator

    hai
    I have a problem while using the struts validator in my program.
    It gives the error as:
    HTTP Status 404 - Servlet action is not available
    type Status report
    message Servlet action is not available
    description The requested resource (Servlet action is not available) is not available.
    The program is given below
    File : one.jsp
    <html:form action="/test" method="post">
    <table width="309">
    <tr>
    <td width="149"><div align="right">User Name: </div></td>
    <td width="148"><html:text property="username" value=""/></td>
    </tr>
    <tr>
    <td><div align="right">PassWord: </div></td>
    <td><html:password property="password" value="" /> </td>
    </tr>
         <tr>
    <td><div align="right">Number: </div></td>
    <td><html:password property="number" value="" /> </td>
    </tr>
    <tr>
    <td><div align="right"></div></td>
    <td><html:submit /> </td>
    </tr>
    </table>
    </html:form>
    web.xml file is ordineary file which contains the tag which is necessary for the struts.
    File : struts-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <global-forwards>
    <forward name="database" path="/database"/>
    </global-forwards>
    <form-beans>
    <form-bean name="form1" type="struts1.bean1">
    </form-bean>      
    </form-beans>
    <action-mappings>
    <action path="/test" name="form1" type="struts1.one" input="one.jsp" validate="true" scope="request" >
         <forward name="success" path="/two.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="ApplicationResources" />
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
    </plug-in>
    </struts-config>
    File validator.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <form-validation>
    <formset>
    <!-- Form for Validation example -->
    <form name="form1">
    <field property="username" depends="required">
    <arg0 key="test.string"/>
    </field>
    <field property="password" depends="required">
    <arg0 key="test.password"/>
    </field>
    <field property="number" depends="required">
    <arg0 key="test.number"/>
    </field>
    </form>
    </formset>
    </form-validation>
    File validator-rules.xml
    The validator-rules.xml file is default validator-rules.xml file.
    Iam using the two java file for ActionForm and Action
    ActionForm file
    package struts1;
    import org.apache.struts.validator.ValidatorForm;
    public class bean1 extends ValidatorForm
    private String username=null;
    private String password=null;
    private int number=0;
    public void setUsername(String username)
    this.username=username;
    public String getUsername()
    return username;
    public void setPassword(String password)
    this.password=password;
    public String getPassword()
    return password;
    public void setNumber(int number)
    this.number=number;
    public int getNumber()
    return number;
    Action class:
    package struts1;
    import struts1.bean1;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.DynaActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.validator.ValidatorActionForm;
    import org.apache.struts.validator.ValidatorForm;
    import java.io.IOException;
    import javax.servlet.ServletException;
    public class one extends Action
    public ActionForward execute(ActionMapping mapping,ActionForm form1,HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
    String uname=null;
    String pword=null;
    String target=new String("success");
    int num=0;
    HttpSession session=request.getSession(true);
    try
    if(form1 !=null)
    bean1 form=(bean1) form1;
    uname=form.getUsername();
    pword=form.getPassword();
    num=form.getNumber();
    session.setAttribute("uname",uname);
    session.setAttribute("word",pword);
    session.setAttribute("num",""+num);
    catch(Exception e)
    return mapping.findForward(target);
    In two.jsp file Iam just getting the session value and displaying the result.
    The Action and ActionForm are used inside the struts1 file which is placed inside the classes folder.
    The Two file is also compiled successful.
    When executing the one.jsp file is displayed but when clicking the submit button it giving the error as servlet action is not available.
    So Iam try to change some coding in the Action Class
    In the execute method I changed ValidatorForm instead of ActionForm.
    but it giving the same error.
    The same error is displayed when Iam trying the DynaValidatorForm
    instead of struts bean class i.e ActionForm.
    If any one knows what is the problem in the program please give some instrutction to correct the error or give some simple example program for practice.
    Regards
    A.K. Raj

    Add the Validator as the 6th argument and it should work fine.
    Amy
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionMessages,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required"/>

  • Struts 2 Client side validation getting skipped.

    I am doing a simple program using struts 2. Usually in struts2 bean class will be combined with action class unlike in struts 1.2. But for enhancing readability I made a seperate bean class and I reference it in my action class. But after seperating bean from action class Client side validation using xml is not happening. It is getting skipped. But server side validation inside execute() is happening. Will anyone please help me to find a solution to make client side validation run.
    here are the different files.
    1) JSP File - SEmail.jsp
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <html>
    <s:head theme="ajax" />
    <title>SEmail </title>
    <body>
    <center><font color="blue" size="5" face="bold">
    <s:label     value="Secure Email - Non Registered User" /> </font></center>
    <br>
    <font color="red" size="3"> <s:label
         value="Want to contact us?."></s:label>
    </font>
    <center><s:form action="/Semail.action" method="POST"
         validate="true">
         <s:actionerror />
         <s:select label="Topic" name="user.topic" headerKey="-1" required="true"
              list="#{'Plan Coverage':'Plan Coverage','Sales':'Sales','Others':'Others'}">
         </s:select>
         <s:textarea name="user.message" label="Message" rows="4" cols="50"
              required="true" />
         <br>
         <s:label value="Contact Information" />
         <br>
         <table align="center" width="500">
              <tr align="left">
                   <td align="left"><s:select label="Title" name="user.title"
                        headerKey="-1" required="true"
                        list="#{'-- Select One --':'-- Select One --','Mr.':'Mr.','Ms.':'Ms.','Mrs.':'Mrs.'}">
                   </s:select></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="First Name"
                        name="user.firstname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Family Name"
                        name="user.familyname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Profession"
                        name="user.profession" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Address" name="user.address"
                        size="20" maxlength="100" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Telephone Number"
                        name="user.telnumber" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="P.O. Box" name="user.pobox"
                        size="20" maxlength="8" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="City"
                        name="user.emirate" size="20" maxlength="35" required="true" /></td>
              </tr align="left">
              <tr>
                   <td align="left"><s:textfield label="Region and Country"
                        name="user.country" size="20" maxlength="35" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="E-mail Address"
                        name="user.email" size="20" maxlength="70" required="true" /></td>
              </tr>
         </table>
         <br>
         <s:file name="user.uploadFile" label="Upload Document" />
         <br>
         <br>
         <s:submit value="Submit" align="center"></s:submit>
    </s:form></center>
    <font color="red" size="3"> <s:label
         value="All fields marked (*) are mandatory."></s:label>
    </body>
    </html>
    2) struts.xml
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
         <package name="semail" extends="struts-default">
              <action name="Semail" class="semail.NonregUser">
                   <result name="input">/SEmail.jsp</result>
                   <result name="error">/SEmail.jsp</result>
                   <result>/SEmail.jsp</result>
              </action>          
         </package>     
    </struts>
    3) Bean Class - User.java
    package semail;
    public class User {
         private String topic;
         private String message;
         private String title;
         private String firstname;
         private String familyname;
         private String profession;
         private String address;
         private int telnumber;
         private String pobox;
         private String city;
         private String country;
         private String email;
         private String uploadFile;
         private String testing;
         public String getTopic() {
              return topic;
         public void setTopic(String topic) {
              this.topic = topic;
         public String getMessage() {
              return message;
         public void setMessage(String message) {
              this.message = message;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
         public String getFirstname() {
              return firstname;
         public void setFirstname(String firstname) {
              this.firstname = firstname;
         public String getFamilyname() {
              return familyname;
         public void setFamilyname(String familyname) {
              this.familyname = familyname;
         public String getProfession() {
              return profession;
         public void setProfession(String profession) {
              this.profession = profession;
         public String getAddress() {
              return address;
         public void setAddress(String address) {
              this.address = address;
         public int getTelnumber() {
              return telnumber;
         public void setTelnumber(int telnumber) {
              this.telnumber = telnumber;
         public String getPobox() {
              return pobox;
         public void setPobox(String pobox) {
              this.pobox = pobox;
         public String getCity() {
              return city;
         public void setCity(String city) {
              this.city= city;
         public String getCountry() {
              return country;
         public void setCountry(String country) {
              this.country = country;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public String getUploadFile() {
              return uploadFile;
         public void setUploadFile(String uploadFile) {
              this.uploadFile = uploadFile;
         public String getTesting() {
              return testing;
         public void setTesting(String testing) {
              this.testing = testing;
    This is my bean class. Instead of putting it with action class NonregUser.java , I have seperated it out for readability. And I am referencing it in the action class.
    4) Action Class - NonregUser.java
    package semail;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts2.interceptor.ServletRequestAware;
    import org.apache.struts2.interceptor.ServletResponseAware;
    import com.opensymphony.xwork2.ActionSupport;
    public class NonregUser extends ActionSupport implements ServletRequestAware,
              ServletResponseAware {
         private static final long serialVersionUID = 2451855813074437309L;
         HttpServletRequest request = null;
         HttpServletResponse response = null;
         private User user = null;
    /* I am referencing my bean class here instead of writing all the getters and setters here.*/
         public User getUser() {
              return user;
         public void setUser(User user) {
              this.user = user;
         public String execute() throws Exception {
              System.out.println("Validating login");
              if(user!=null){
                   System.out.println(user.getFirstname());
                   System.out.println(user.getEmail());
                   System.out.println(user.getTopic());
                   System.out.println(user.getTitle());
    // this server side validation is happening
                   if (user.getTitle().trim().equals("-- Select One --")) {
                        addActionError("Please select Title");
                        return ERROR;
                   } else {
                        return SUCCESS;
              }else{
                   return SUCCESS;
         public void setServletRequest(HttpServletRequest arg0) {
              System.out
                        .println("HttpServletRequest : " + NonregUser.this.getClass());
              request = arg0;
         public void setServletResponse(HttpServletResponse arg0) {
              System.out.println("HttpServletResponse : "
                        + NonregUser.this.getClass());
              response = arg0;
    This is my acation class. Here I am referencing my bean class User.java.
    5) xml validation file - NonregUser-validation.xml
    /*This client validatin is not working*/
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE validators PUBLIC
              "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
              "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
    <validators>
         <field name="topic">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Topic</message>
              </field-validator>
         </field>
         <field name="message">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Message</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">8000</param>
    <message>Message cannot contain more than 8000 characters</message>
              </field-validator>
         </field>
         <field name="title">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Title</message>
              </field-validator>
         </field>
         <field name="firstname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter First name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>First Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="familyname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Family name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>Family Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="emirate">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Emirate/City</message>
              </field-validator>
         </field>
         <field name="email">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Email address</message>
              </field-validator>
              <field-validator type="email">               
                   <message>Please enter a valid Email address</message>
              </field-validator>
         </field>
    </validators>
    6) web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
         <filter>
         <filter-name>struts2</filter-name>
         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
         <filter-mapping>
         <filter-name>struts2</filter-name>
         <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>          
              <welcome-file>/SEmail.jsp</welcome-file>
         </welcome-file-list>     
         <error-page>
    <error-code>404</error-code>
    <location>/pagenotfound.jsp</location>
    </error-page>
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.jsp</location>
    </error-page>
    </web-app>
    Edited by: L-J-K on Jul 22, 2008 5:22 AM

    I was trying to do it through creating a new validators.xml where I would redefine all struts built in validations and add de definition for my custom Validation (<validator name="checkUser" class="com.custom.CustomUserValidator"/>). Then I define the ActionClassName-action-validation.xml refering to my custom validator (checkUser). The com.custom.CustomUserValidator Class has to extend FieldValidatorSupport or ValidatorSupoort (depending on what kind of validation).
    Ok that's it, this is the theory, now the custom validator (checkUser) is executed before my action but I don't know how to do it so that if the validation fails i return to the same page showing the error message to the user without having to execute the target action. Does anyone know how to do this????

  • Error in validation (Using struts)

    Hi,
    struts-config.xml
    <action-mappings>       
            <action path="/userRegistration"          
                   forward ="/displayAddProdutForm.jsp"/>             
              <action path="/saveProduct"
                      name="productForm"
                         input="/displayAddProductForm.jsp"
                         scope="request"
                       type="tutorial.SaveProductAction">
                <forward name="success" path="/displaySavedProduct.jsp"/>     
              </action>
        </action-mappings> 
    ProductForm.java
    private String productName;
    private String description;
    private String price;
    public ActionErrors validate(ActionMapping mapping,
                HttpServletRequest request) {     
             ActionErrors actionErrors = new ActionErrors();
             if (productName.equals("")) {
               actionErrors.add("no.productName", new
                ActionMessage("no.productName"));
             if (description.equals("")) {
               actionErrors.add("no.description", new
                ActionMessage("no.description"));
             return actionErrors;
       As per struts-config.xml & Validation method, if productName & description equals to empty space, it has to come to "displayAddProductForm.jsp" file as per Input attribute. But for me its saying as
    Message: /displayAddProductForm.jsp
    description:The requestd resource(/displayAddProductForm.jsp) is not available.
    Can anyone clear me.
    Thanks,
    Hari

    Just check and make sure you have declared the message resources file correctly in your struts-config.xml file. Also check for duplicate entries in other properties files.
    Hope that helps.
    Regards
    Hari

  • Action listener for struts html tag

    hi i am doing a project using sturts. I have used struts HTML Select tag with a collection of values in select box. now i want to write an actionlistner for that select...ie if i select any value from the select list it should do some action like take me to different page...can anyone tell me how can i do that...
    Thanks

    Soultech, I think you're being a bit harsh. Struts is a valid topic on this forum as it is a java framework related to JSP.
    However having said that, the question does show a basic misunderstanding of JSP technology.
    JSP = Java SERVER Pages. Java code only runs on the server.
    All that gets sent to the client (browser) is an HTML file.
    You can not write java action listeners to run and respond to events on the client.
    For any client side interaction you will have to use javascript (which is NOT java) - probably an onclick/onchange event - the same as any other web page.
    However you can only run javascript code from such events.
    To run java again you have to submit a request to a server - normally done by submitting a form.

  • Problem with validating text field

    Hi All
    i want to validate the text fields present in jsp page for a sturts application..
    i have a jsp page for input then struts form for validation as struts machinism provides and if error occurs it add error to error object.
    i want to display error message in text field when it occurs..
    plz help me to do it
    thanx in advacne

    I'm not getting your requirement clearly, by my understanding ... you need to retrieve database whenever a <select> field trigger "onchange" - am I right?
    If that is your requirement, it depends on what kind of solution you are looking into?
    1. AJAX+Servlet (dojo/jMaki/write your own)
    2. Java Server Faces (MyFaces/JSF)
    3. write yourself a custom TAG (JSTL) to do the purpose (AJAX+Servlet/purely Servlet)
    4. purely JSTL
    5 purely Servlet
    (please "Google" them by appending "<select> <option>"/ "populate combobox")
    Personally I would recommend 1st or 3rd approach, even 2nd approach (MyFaces/JSF) is cool, but if your whole application is not written in JSF, no point to mixed the solutions.
    If you want to try Ajax+TAG approach, refer following:
    http://ajaxtags.sourceforge.net/
    If you wish to use MyFaces approach, please refer following:
    http://avatar21.superihost.com/index.php?entry=entry051020-163838
    A forth/fifth approach will be much browser-portable, but the amount of coding will be more.
    Regards,
    Avatar Ng
    Message was edited by:
    Avatar_Ng
    Message was edited by:
    Avatar_Ng

  • DynaValidatorForm Validation Problem

    Hi ,
    I am developing a struts1.1 webapplication where i am using the struts DynaValidatorForm to validate the form post.I have configured the struts-config.xml and validation.xml files. But still it seems the dynamic validation is not working. I don't know where is the problem.
    Here is my portion of the xml files,
    struts-config.xml
    <struts-config>
    <form-beans>
         <form-bean name="projectform"
              type="org.apache.struts.validator.DynaValidatorForm"
              dynamic="true">
         <!-- specify the dynamic properties of the form -->     
              <form-property name="name" type="java.lang.String"/>
              <form-property name="department" type="java.lang.String"/>
              <form-property name="businessAreaManager" type="java.lang.String"/>
              <form-property name="referenceNumber" type="java.lang.Long"/>
              <form-property name="budget" type="java.lang.Float"/>
              <form-property name="sponsor" type="java.lang.String"/>
              <form-property name="startDate" type="java.lang.String"/>
              <form-property name="endDate" type="java.lang.String"/>
              <form-property name="manager" type="java.lang.String"/>
              <form-property name="taskName" type="java.lang.String"/>
              <form-property name="description" type="java.lang.String"/>
              <form-property name="plannedHours" type="java.lang.Float"/>
              <form-property name="actualHours" type="java.lang.Float"/>
              <form-property name="taskStartDate" type="java.lang.String"/>
              <form-property name="taskEndDate" type="java.lang.String"/>
         </form-bean>
         <form-bean name="resourceform" type="com.heb.pmtool.bean.ResourceForm"/>
    </form-beans>     
    <action path="/createProject" name="projectform" input="/createproject.jsp" parameter="method" scope="request" type="com.heb.pmtool.action.ProjectActions" validate="true">
         <forward name="success" path="/viewProject.do" redirect="false"/>
    </action>
    </struts-config>
    <!--------------------End of struts-config.xml ------------------>
    validation.xml
    <form-validation>
    <form-set>
    <form name="projectform">
    <field property="name"     
         depends="required,mask">
    <var>
         <var-name>mask</var-name>
         <var-value>^[a-zA-Z]*$</var-value>
    </var>      
    </field>
    </form>
    </form-set>     
    </form-validation>     
    <!--------------------End of validation.xml ------------------>
    The xml files are not the complete one. I have clipped and pasted the neccessary info.
    When i submit the form with no values in the field name, it is not reporting any errors.
    I am not sure whether validation is taking place.
    Please help me in fixing this problem.
    Thanks,
    Mohideen.

    Hi,
    I still couldn't find a solution for this problem. Could anyone can give a priority to solve this?
    Thanks,
    Mohideen.

  • Validating framework

    HI
    can we we use server side validation framework in struts and validate() method in form.
    I used both but only server side validate framework works.
    can u suggest how to use vaildate method also.
    here is the code what i have done
    register.jsp
         <body>
              <html:form action="regs.do" method="post">          
              <bean:message key="user" />
                   <html:text property="userid" />
                   <html:errors property="userid" />
                   <br>
                   <bean:message key="pass" />
                   <html:password property="password" />
                   <html:errors property="password" />
                   <br>
                   <html:submit value="Submit" />
              </html:form>
         </body>
    </html>
    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <data-sources />
    <form-beans>
         <form-bean name="regForm" type="com.forms.RegistrationForm" />
    </form-beans>
    <global-exceptions />
    <global-forwards>
         <forward name="start" path="/register.jsp" />
    </global-forwards>
    <action-mappings>
         <action path="/regs" type="com.actions.RegistrationAction" name="regForm" scope="request" validate="true" input="/register.jsp">
              <forward name="success" path="/success.jsp" />
              <forward name="failure" path="/failure.jsp" />
         </action>
    </action-mappings>
    <message-resources parameter="com.yourcompany.struts.ApplicationResources" />
    <!-- validator framework plugin -->
         <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
         </plug-in>     
    </struts-config>
    ApplicationResources.properties
    errors.required={0} is required as said rama.
    RegistrationForm .java
    package com.forms;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.validator.ValidatorForm;
    public class RegistrationForm extends ValidatorForm {     
         protected String userid;
         protected String password;
         public String getPassword() {
              return password;
         public void setPassword(String password) {
              this.password = password;
         public String getUserid() {
              return userid;
         public void setUserid(String userid) {
              this.userid = userid;
         public ActionErrors validate(ActionMapping map,HttpServletRequest req){
              ActionErrors errors=new ActionErrors();
              if(this.password==null ||this.password == "" ||this.userid==null ||this.userid== ""){
                   errors.add("userid",new ActionError("this is rama"));
              return errors;
    validation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <form-validation>
         <formset>
              <form name="regForm">
                   <field property="userid" depends="required">
                        <arg0 key="some.userid"/>
                   </field>
                   <field property="password" depends="required">
                        <arg0 key="some.password"/>
                   </field>          
              </form>
         </formset>
    </form-validation>

    I think you could still use the validator form.
    You say you have 10 fields on your form, up to 3 of which are visible?
    Its a bit of a hack, but what it would require is 10 hidden fields on the page. One for each of the controls. The hidden field value would be set if the control was meant to be present, and empty if not.
    That way the validWhen syntax only has to deal with two fields
    1 - a hidden field indicating whether or not to validate
    2 - the field to validate itself.
    You just have to set the values of the hidden fields according to which controls you are showing/hiding.
    An alternative:
    Use ValidatorActionForm rather than just ValidatorForm.
    ValidatorActionForm fires on a specific "action" rather than a specific "form"
    ie it uses the name of the action to choose which validation to run rather than the name of the form
    You would then have to define seperate ACTIONS in struts-config for each of the variations of the page, and validation for each action, but you would still only have one jsp page and one Action class as they could all be the same.
    Cheers,
    evnafets

  • Entity validation strange behaviour

    I have a number of method validators against an entity.
    The validators fire for incorrect data entered on the associated screen and once the data is fixed the user is presented with a second screen. All is fine so far ...
    Until the user hits the back button to go back to the first screen. For some reason even though the user enters invalid data the method validators don't fire !!!. Very confusing.
    Does anyone know of any reasons why this should occur ?
    Many Thanks,
    Richard

    Hi,
    I added a page-link to my second page as suggested. Using this method(instead of back button) causes the validation in the first screen to re-fire.
    The previously entered values in the first screen are gone as its a new request.
    I use code from your toystore to pre-create a record in the initializeModelForPage step. This fires when the link is clicked, and part of that code deletes the last entry from the entity cache. Therefore I'm not too surprised this works. As part of this project it has been stated that the users should be able to navigate through the browsers buttons, so I'm still abit stuck. Any suggestions ?
    What i've done for now is to remove my validation from BC4J to my struts actions.
    But because new values aren't recorded in the entity after a back button I also have to manually set the bindings for each screen field in my struts action.
    I'm not an expert in the adf / struts frame work so I could just be missing something.
    On a related point(assuming that i use entity validation) the following happens.
    On my first screen I enter valid data , and then move to my second. I leave the screen in an invalid date before pressing the browsers back button. I then can't get past the first screen as it is still validating the errors in the second screen. Shay mention that I should be using a cancel button in the second screen to navigate back to the first. This is a public user application and I know that the back button will be pressed(its not good web design to remove/disable it anyway).
    Any suggestions.
    It seems that I can't get the ADF framework to work well with wizards and perhaps its best to just use struts for the validation and at the end of the wizard just call a database package to do the DML ?
    Sorry but one last point - to do with the refresh button.
    All my wizards use page forwards to move between screens and I know this can cause oddities with a refresh. What I have noticed is that when even refreshing the first page of my wizard(after leaving it in an invalid state) the screen doesn't change the errors are still there. I would have though the refresh would request a new refreshed page without the struts action errors. I even noticed that a refresh can cause a struts action related to a submit button to re-fire ? Why does this happen as it can cause a big mess.
    Even re-entering the url in the same browser window doesn't cause the screen to properly refresh. The initializeModelForPage steps also do not fire when a refresh happens. I did notice that if I went to a different website and then re-entered the url that the page displayed more as expected and I think the initializeModelForPage step ran.
    I'm sure alot of this is due to the fact that I don't really understand the framework, and thus would be grateful if you could explain why all the above happens. Is it what you would expect to happen ?
    Many Thanks for your time and assistance.
    Richard

  • Page flow exception

    I have one serious problem when handling exception in page flow. ie.
    my code looks like,
    // Generated by WebLogic Workshop
    // Created on: Mon Dec 01 15:31:45 GMT+05:30 2003
    // By: kshashishekar
    package portlets.validation.validation;
    import com.bea.wlw.netui.pageflow.FormData;
    import com.bea.wlw.netui.pageflow.Forward;
    import com.bea.wlw.netui.pageflow.PageFlowController;
    import com.bea.wlw.netui.tags.html.TreeNode;
    import javax.security.auth.login.FailedLoginException;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.*;
    import com.login.CustomLogin;
    import com.bea.p13n.controls.login.UserLoginControl;
    * @jpf:controller struts-merge="struts-config-portlets-validation-validation2.xml"
    * @jpf:message-resources resources="validation.validator.Message"
    * @jpf:view-properties view-properties::
    * <!-- This data is auto-generated. Hand-editing this section is not recommended.
    -->
    * <view-properties>
    * <pageflow-object id="pageflow:/portlets/validation/validation/validationController.jpf"/>
    * <pageflow-object id="action:begin.do">
    * <property value="280" name="x"/>
    * <property value="60" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:validate1.do#portlets.validation.validation.validationController.ValidateForm">
    * <property value="220" name="x"/>
    * <property value="200" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:logout.do#portlets.validation.validation.validationController.ValidateForm">
    * <property value="120" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:validate1Page1.jsp@#@action:validate1.do#portlets.validation.validation.validationController.ValidateForm@">
    * <property value="384,320,320,256" name="elbowsX"/>
    * <property value="172,172,192,192" name="elbowsY"/>
    * <property value="West_1" name="fromPort"/>
    * <property value="East_1" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:validate1Page1.jsp">
    * <property value="420" name="x"/>
    * <property value="180" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:Result.jsp@#@action:validate1.do#portlets.validation.validation.validationController.ValidateForm@">
    * <property value="156,170,170,184" name="elbowsX"/>
    * <property value="332,332,203,203" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_2" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:Result.jsp">
    * <property value="120" name="x"/>
    * <property value="340" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="page:/error.jsp">
    * <property value="40" name="x"/>
    * <property value="180" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#validate1Page1.jsp#@action:begin.do@">
    * <property value="316,350,350,384" name="elbowsX"/>
    * <property value="52,52,172,172" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#Result.jsp#@action:validate1.do#portlets.validation.validation.validationController.ValidateForm@">
    * <property value="184,170,170,156" name="elbowsX"/>
    * <property value="192,192,332,332" name="elbowsY"/>
    * <property value="West_1" name="fromPort"/>
    * <property value="East_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#validate1Page1.jsp#@action:logout.do#portlets.validation.validation.validationController.ValidateForm@">
    * <property value="156,270,270,384" name="elbowsX"/>
    * <property value="92,92,172,172" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.login.UserLoginControl#myControl">
    * <property value="28" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="formbeanprop:portlets.validation.validation.validationController.ValidateForm#username#java.lang.String"/>
    * <pageflow-object id="formbeanprop:portlets.validation.validation.validationController.ValidateForm#password#java.lang.String"/>
    * <pageflow-object id="formbean:portlets.validation.validation.validationController.ValidateForm"/>
    * </view-properties>
    public class validationController extends PageFlowController
    * This is the control used to generate this pageflow
    * @common:control
    private UserLoginControl myControl;
    // Uncomment this declaration to access Global.app.
    // protected global.Global globalApp;
    // For an example of page flow exception handling see the example "catch"
    and "exception-handler"
    // annotations in {project}/WEB-INF/src/global/Global.app
    * This method represents the point of entry into the pageflow
    * @jpf:action
    * @jpf:forward name="success" path="validate1Page1.jsp"
    protected Forward begin()
    return new Forward( "success" );
    * @jpf:action validation-error-page="validate1Page1.jsp"
    * @jpf:forward name="success" path="Result.jsp"
    * @jpf:catch method="exceptionHandler" type="Exception"
    protected Forward validate1(ValidateForm aForm) throws Exception
    com.bea.p13n.usermgmt.profile.ProfileWrapper var = myControl.login( aForm.username,
    aForm.password, getRequest());
    getRequest().setAttribute( "results", var );
    return new Forward("success",aForm);
    * Action encapsulating the control method :logout
    * @jpf:action
    * @jpf:forward name="success" path="validate1Page1.jsp"
    * @jpf:catch message="not authenticated" path="/error.jsp" type="Exception"
    public Forward logout( ValidateForm aForm )
    throws Exception
    myControl.logout( getRequest() );
    return new Forward( "success" );
    * @jpf:exception-handler
    * @jpf:forward name="errorPage" path="/error.jsp"
    protected Forward exceptionHandler( Exception ex, String actionName, String
    message, FormData form )
    String displayMessage = "An exception occurred in the action " + actionName;
    System.out.println ("display message "+displayMessage);
    getRequest().setAttribute( "errorMessage", displayMessage );
    return new Forward( "errorPage" );
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class ValidateForm extends org.apache.struts.validator.ValidatorForm
    private String password;
    private String username;
    public void setUsername(String username)
    this.username = username;
    public String getUsername()
    return this.username;
    public void setPassword(String password)
    this.password = password;
    public String getPassword()
    return this.password;
    * added just to test validate (override) method.
    public ActionErrors validate(ActionMapping map, HttpServletRequest req)
    ActionErrors errors = null;
    try {
    errors = super.validate(map,req);
    }catch (Exception e)
    e.printStackTrace();
    if (errors ==null) {
    System.out.println ("errors = "+errors);
    } else
    System.out.println ("errors= "+errors);
    return errors;
    in the above code when we call "validate1" action, it will authenticate successfully
    when we enter valid username and passowrd.
    But when i enter invalid credentials page flow controller should execute "handleException"
    method but at this time i am getting an error
    Page Flow Unhandled Exception
    Exception: java.lang.IllegalArgumentException
    Message: argument type mismatch
    A java.lang.IllegalArgumentException exception was thrown and not handled by any
    Page Flow. See the console for the exception stack trace.
    please help us on how to rectify this error.
    thanks,
    shashi
    [validationController.jpf]

    Hi-
    That may be on the right track, but the /index.jsp page gets displayed in the
    portlet...I am still within the portal framework, so I don't think I am loosing
    the context...
    -Howie
    "Khurram Zafar" <[email protected]> wrote:
    >
    you are most likely redirecting to the /error.jsp page and losing the
    context for
    your portal app. The index.jsp page may be defined as your <welcome-file>
    in your
    web.xml file. The best thing to do is to save the context before visiting
    error.jsp
    and then provide a link in error.jsp to go back. Look at javadoc for
    PageURL for
    obtaining the URL to a portal page, you can then save it in session of
    pass it
    to your error page.
    "Howie Oakes" <[email protected]> wrote:
    Hello-
    I have a page flow portlet that I am testing some exception handling
    on. Right
    now when I catch an exception, I display the global /error.jsp page,
    using the
    @jpf:catch tag. The problem is when I refresh the page after viewing
    the error
    page, the pageflow always pulls up the /index.jsp page at the root of
    the webapp.
    I have to get a new session to see the original page flow.
    This only happens when I am running the Jpf as a portlet...I don't see
    this behavior
    with it stand-alone.
    I am not sure why the index.jsp page is being called...there are noreferences
    to it in my jpf code...
    thanks,
    Howie

  • Invoking a BPEL Process from Java Class

    Hi All,
    I am new to BPEL. I am trying to invoke a BPEL Process using Java.
    This following is the Oracle AS Home : D:\product\10.1.3.1\OracleAS_1
    Credentials to access the default BPEL domain :
    username - oc4jadmin
    password - oc4jadmin
    RMI Port in Oracle AS - 12401
    (code)
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.dispatch.IDeliveryService;
    import com.oracle.bpel.client.NormalizedMessage;
    import java.util.Hashtable;
    import java.util.Map;
    import javax.naming.Context;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    public class Class1 {
         public static void main(String[] args) {
              try {
              Hashtable jndi = new Hashtable();
              jndi.put(Context.PROVIDER_URL, "ormi://localhost:12401/orabpel");
              jndi.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
              jndi.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
              jndi.put(Context.SECURITY_CREDENTIALS, "oc4jadmin");
              jndi.put("dedicated.connection", "true");
              Locator locator = new Locator("default", "oc4jadmin", jndi);
              System.out.println( "check 1" );
              IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
              System.out.println( "check 2" );
              String xml = "&ltssn xmlns=\"http://services.otn.com\" &gt111222333</ssn>";
              NormalizedMessage nm = new NormalizedMessage( );
              nm.addPart("payload", xml );
              System.out.println( "check 3" );
              NormalizedMessage res = deliveryService.request("CreditRatingService","process",nm);
              System.out.println( "check 4" );
              System.out.println( "BPELProcess CreditRatingService executed!" );
              Map payload = res.getPayload();
              Element part = (Element)payload.get("payload");
              Node outputElement = part.getFirstChild();
              System.out.println("Rating: " + outputElement.getNodeValue());
              catch (Exception ex) {
              ex.printStackTrace();
    (code)
    When I run this, I get the following exception :
    D:\JDeveloper\jdk\bin\javaw.exe -client -classpath D:\JDeveloper\jdev\mywork\mywork\test_bpel_java\ViewController\classes;D:\JDeveloper\jakarta-struts\lib\struts.jar;D:\JDeveloper\jakarta-struts\lib\commons-beanutils.jar;D:\JDeveloper\jakarta-struts\lib\commons-collections.jar;D:\JDeveloper\jakarta-struts\lib\commons-fileupload.jar;D:\JDeveloper\jakarta-struts\lib\commons-digester.jar;D:\JDeveloper\jakarta-struts\lib\commons-lang.jar;D:\JDeveloper\jakarta-struts\lib\commons-logging.jar;D:\JDeveloper\jakarta-struts\lib\commons-validator.jar;D:\JDeveloper\jakarta-struts\lib\jakarta-oro.jar;D:\JDeveloper\j2ee\home\lib\ojsp.jar;D:\JDeveloper\j2ee\home\jsp\lib\taglib\ojsputil.jar;D:\JDeveloper\j2ee\home\oc4j.jar;D:\JDeveloper\j2ee\home\lib\oc4j-internal.jar;D:\JDeveloper\j2ee\home\lib\servlet.jar;D:\JDeveloper\jdev\lib\ojc.jar;D:\product\10.1.3.1\OracleAS_1\bpel\lib\orabpel.jar view.Class1
    check 1
    check 2
    check 3
    Mar 22, 2011 11:04:07 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    java.lang.NoClassDefFoundError: javax/ejb/EJBHome
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98)
         at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85)
         at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33)
         at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:981)
         at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26)
         at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:825)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:283)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/ejb/EJBException
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at view.Class1.main(Class1.java:40)
    Process exited with exit code 1.
    I have used checkpoints in between the code. It works fine till the third one. After that, it raises an exception.
    Can anyone help me out with this?
    Edited by: 846458 on Mar 22, 2011 11:04 AM

    Hi
    Can you try with below code
    package com.otn.samples;
    import java.util.Properties;
    import java.util.Map;
    import javax.naming.InitialContext;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import com.collaxa.xml.XMLHelper;
    import com.oracle.bpel.client.ClientDefs;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    public class CallBPEL
        public static void main(String[] args) throws Exception {
            if (args.length != 1) {
                System.out.println(
                    "I am here");
                return;
            try{
                String ssn = args[0];
                System.out.println("ssn is " + ssn);
                // properties in the classpath
                Properties props = new java.util.Properties();
                java.net.URL url = ClassLoader.getSystemResource("context.properties");
                props.load(url.openStream());
                System.out.println(props);
                String xml = "<ssn  xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
                Locator locator = new Locator("default","bpel",props);
                IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
                // construct the normalized message and send to collaxa server
                NormalizedMessage nm = new NormalizedMessage( );
                nm.addPart("payload", xml );
                NormalizedMessage res = deliveryService.request("CreditRatingService", "process", nm);
                Map payload = res.getPayload();
                System.out.println( "BPELProcess  CreditRatingService executed!" );
                Element partEl = (Element) payload.get("payload");
                System.out.println( "Credit Rating is " + XMLHelper.toXML(partEl) );
            }catch(Exception e)
                e.printStackTrace();
    }Thanks
    AJ

  • Error when deploying JDeveloper 11.1.1.3.0 to WebLogic 10.3

    Hi All,
    Trying to migrate an existing web application which was running on the old Oracle App Server to WebLogic 10.3. In the process upgraded Hibernate, Spring etc. other libraries. Left the existing Strut 1.1 alone. Getting the following error during deployment -
    <Aug 19, 2011 12:05:18 PM EDT> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\Documents and Settings\tariq.ahsan\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\AppServerConversion\MaintenanceWebWebApp.war. Please make sure that the annotations are valid. The error is org.apache.struts.action.ActionServlet>
    <Aug 19, 2011 12:05:18 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1313769914734' for task '0'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'CFMSWeb''
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:404)
    Caused By: java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
    I checked if C:\Documents and Settings\tariq.ahsan\Application Data\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\AppServerConversion\MaintenanceWebWebApp.war\WEB-INF\lib contains the 'Struts.jar'. It doesn't. Could this be the problem?
    Thanks

    You need to add a library which contains all the classes used by struts. I have build a library containing these jars
    <jdev_install>\jdeveloper\jakarta-struts\lib\antlr.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-beanutils.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-collections.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-digester.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-fileupload.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-lang-2.1.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-logging.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\commons-validator.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\jakarta-oro.jar
    <jdev_install>\jdeveloper\jakarta-struts\lib\struts.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\adfmweb.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\adftransactionsdt.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\bc4jhtml.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\datatags.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\db-ca.jar
    <jdev_install>\oracle_common\modules\oracle.adf.model_11.1.1\jdev-cm.jar
    <jdev_install>\jdeveloper\modules\jakarta.jstl_1.1\lib\jstl.jar
    <jdev_install>\jdeveloper\modules\jakarta.jstl_1.1\lib\standard.jarYou need to change jdev_install with the path where you have installed jdev.
    Next you need to remove the content of the weblogic-application.xml. Here jdev has made some entries which later prevent the struts servlet to wort. My weblogic-application.xml looks like
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
    </weblogic-application>Then you need to check the web.xml file as jdev tends to make addition here too.
    Timo

  • Problem whith JDeveloper 11g to startup EJB Client

    When i Run the EJBBean display this error message:
    1/02/2008 10:03:54 AM oracle.j2ee.xml.XMLMessages warningException
    ADVERTENCIA: Exception Encountered
    1/02/2008 10:03:55 AM oracle.oc4j.util.SystemLog log
    GRAVE: Server start failed processing configuration
    java.security.AccessControlException: access denied ( CredentialAccessPermission credstoressp.credstore.default.systemuser read)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:256)
    at oracle.security.jps.util.JpsAuth$Diagnostic.checkPermission(JpsAuth.java:180)
    at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$6.checkPermission(JpsAuth.java:280)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:315)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:338)
    at oracle.security.jps.internal.credstore.util.CsfUtil.checkPermission(CsfUtil.java:527)
    at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.getCredential(SspCredentialStore.java:412)
    at oracle.security.jps.fmw.util.JpsFmwUtil.findSystemUser(JpsFmwUtil.java:218)
    at oracle.security.jps.fmw.JpsUserManager.init(JpsUserManager.java:235)
    at oracle.security.jps.fmw.JpsUserManager.<init>(JpsUserManager.java:247)
    at oracle.security.jps.fmw.JpsUserManagerFactory$JpsUserManagerFactoryI.create(JpsUserManagerFactory.java:252)
    at com.evermind.server.deployment.UserManagerConfig$JAZN.construct(UserManagerConfig.java:635)
    at com.evermind.server.deployment.UserManagerConfig.delegatee(UserManagerConfig.java:253)
    at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
    at com.evermind.security.IndirectUserManager.getAdminUser(IndirectUserManager.java:126)
    at com.evermind.server.XMLApplicationServerConfig.setPassword(XMLApplicationServerConfig.java:3157)
    at com.evermind.server.XMLApplicationServerConfig.<init>(XMLApplicationServerConfig.java:244)
    at com.evermind.server.ApplicationServer.createConfig(ApplicationServer.java:648)
    at oracle.oc4j.server.ServerFactory$Worker.prepareConfig(ApplicationServerFactory.java:201)
    at oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:220)
    at oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:235)
    at java.lang.Thread.run(Thread.java:595)
    1/02/2008 10:03:55 AM oracle.oc4j.util.SystemLog logNoStack
    GRAVE: Server exiting: ApplicationServer entered state FAILED_IN_CONFIG
    Process exited with exit code 1.
    when i Run the EJBClient:
    "C:\Archivos de programa\JDeveloper 11g\jdk\bin\javaw.exe" -client -classpath "C:\HR_EJB_JPA_App\.adf;C:\HR_EJB_JPA_App\EJBModel\classes;C:\Archivos de programa\JDeveloper 11g\lib\java\shared\oracle.toplink\11.1.1.0.0\toplink-core.jar;C:\Archivos de programa\JDeveloper 11g\lib\java\shared\oracle.toplink.ojdbc\11.1.1.0.0\toplink-ojdbc.jar;C:\Archivos de programa\JDeveloper 11g\lib\java\internal\toplink-oc4j.jar;C:\Archivos de programa\JDeveloper 11g\lib\java\internal\toplink-agent.jar;C:\Archivos de programa\JDeveloper 11g\lib\java\shared\oracle.toplink\11.1.1.0.0\antlr.jar;C:\Archivos de programa\JDeveloper 11g\j2ee\home\lib\persistence.jar;C:\Archivos de programa\JDeveloper 11g\lib\xmlparserv2.jar;C:\Archivos de programa\JDeveloper 11g\lib\xml.jar;C:\Archivos de programa\JDeveloper 11g\j2ee\home\lib\ejb.jar;C:\Documents and Settings\damacelo\Datos de programa\JDeveloper\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\.client;C:\Archivos de programa\JDeveloper 11g\j2ee\home\oc4j.jar;C:\Archivos de programa\JDeveloper 11g\j2ee\home\oc4jclient.jar;C:\Archivos de programa\JDeveloper 11g\j2ee\home\lib\oc4j-internal.jar;C:\Archivos de programa\JDeveloper 11g\opmn\lib\optic.jar" -Dhttp.proxyHost=10.2.0.1 -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts=10.2.2.117|127.0.0.1|*.10.2.*|*.dinamotos.com|www.etesa.com|*.intranet|*.dinamo|*.etesa -Dhttps.proxyHost=10.2.0.1 -Dhttps.proxyPort=3128 -Dhttps.nonProxyHosts=10.2.2.117|127.0.0.1|*.10.2.*|*.dinamotos.com|www.etesa.com|*.intranet|*.dinamo|*.etesa oracle.SessionEJBClient
    javax.naming.CommunicationException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
    at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:313)
    at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:64)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at oracle.SessionEJBClient.main(SessionEJBClient.java:13)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:208)
    at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:756)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:60)
    at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:95)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:70)
    at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:720)
    at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:252)
    at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:235)
    at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302)
    ... 3 more
    Process exited with exit code 0.
    Anybody can help Me???
    Thanks.

    I JCRuiz
    the error now is:
    [TopLink/JPA Client] Adding Java options: -javaagent:C:\JDeveloper11g\lib\java\internal\toplink-agent.jar
    C:\JDeveloper11g\jdk\bin\javaw.exe -client -classpath "C:\MiPrimeraAplicacion\.adf;C:\MiPrimeraAplicacion\ModeloEJB\classes;C:\JDeveloper11g\lib\java\shared\oracle.toplink\11.1.1.0.0\toplink-core.jar;C:\JDeveloper11g\lib\java\shared\oracle.toplink.ojdbc\11.1.1.0.0\toplink-ojdbc.jar;C:\JDeveloper11g\lib\java\internal\toplink-oc4j.jar;C:\JDeveloper11g\lib\java\internal\toplink-agent.jar;C:\JDeveloper11g\lib\java\shared\oracle.toplink\11.1.1.0.0\antlr.jar;C:\JDeveloper11g\j2ee\home\lib\persistence.jar;C:\JDeveloper11g\lib\xmlparserv2.jar;C:\JDeveloper11g\lib\xml.jar;C:\JDeveloper11g\j2ee\home\lib\ejb.jar;C:\Documents and Settings\damacelo\Datos de programa\JDeveloper\system11.1.1.0.22.47.96\o.j2ee\embedded-oc4j\.client;C:\JDeveloper11g\j2ee\home\oc4j.jar;C:\JDeveloper11g\j2ee\home\oc4jclient.jar;C:\JDeveloper11g\j2ee\home\lib\oc4j-internal.jar;C:\JDeveloper11g\opmn\lib\optic.jar;C:\JDeveloper11g\jlib\trinidad-api.jar;C:\JDeveloper11g\jlib\trinidad-impl.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\jsf-api.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\jsf-ri.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\sun-commons-beanutils.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\sun-commons-collections.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\sun-commons-digester.jar;C:\JDeveloper11g\lib\java\shared\oracle.jsf\1.2\sun-commons-logging.jar;C:\JDeveloper11g\lib\java\shared\oracle.jstl\1.2\jstl-api-1_2.jar;C:\JDeveloper11g\jlib\adf-richclient-api-11.jar;C:\JDeveloper11g\jlib\adf-richclient-impl-11.jar;C:\JDeveloper11g\BC4J\lib\adf-share-support.jar;C:\JDeveloper11g\BC4J\lib\adf-share-ca.jar;C:\JDeveloper11g\BC4J\lib\adf-share-base.jar;C:\JDeveloper11g\jlib\identitystore.jar;C:\JDeveloper11g\lib\java\api\jaxb-api.jar;C:\JDeveloper11g\lib\java\api\jsr173_api.jar;C:\JDeveloper11g\j2ee\home\lib\activation.jar;C:\JDeveloper11g\lib\java\shared\sun.jaxb\2.0\jaxb-xjc.jar;C:\JDeveloper11g\lib\java\shared\sun.jaxb\2.0\jaxb-impl.jar;C:\JDeveloper11g\lib\java\shared\sun.jaxb\2.0\jaxb1-impl.jar;C:\JDeveloper11g\webcenter\jlib\relationship-service-taglib.jar;C:\JDeveloper11g\adfp\lib\pageeditor.jar;C:\JDeveloper11g\adfp\lib\pageeditor-ext-taskflow.jar;C:\JDeveloper11g\adfp\lib\pageeditor-ext-portlet.jar;C:\JDeveloper11g\adfdt\lib\adf-transactions-dt.jar;C:\JDeveloper11g\adfdt\lib\adf-dt-at-rt.jar;C:\JDeveloper11g\adfc\lib\adf-pageflow-dtrt.jar;C:\JDeveloper11g\adfdt\lib\adf-faces-databinding-dt-core.jar;C:\JDeveloper11g\adfdt\lib\adf-view-databinding-dt-core.jar;C:\JDeveloper11g\jdev\lib\velocity-dep-1.3.jar;C:\JDeveloper11g\jlib\adf-faces-databinding-rt.jar;C:\JDeveloper11g\BC4J\lib\adfm.jar;C:\JDeveloper11g\BC4J\jlib\adfui.jar;C:\JDeveloper11g\BC4J\lib\groovy-all-1.0.jar;C:\JDeveloper11g\jlib\ojmisc.jar;C:\JDeveloper11g\jlib\commons-el.jar;C:\JDeveloper11g\jlib\jsp-el-api.jar;C:\JDeveloper11g\jlib\oracle-el.jar;C:\JDeveloper11g\BC4J\lib\adfshare.jar;C:\JDeveloper11g\adfdt\lib\adfdt_common.jar;C:\JDeveloper11g\BC4J\lib\db-ca.jar;C:\JDeveloper11g\jlib\jdev-cm.jar;C:\JDeveloper11g\j2ee\home\lib\ojsp.jar;C:\JDeveloper11g\j2ee\home\lib\servlet.jar;C:\JDeveloper11g\j2ee\home\lib\el-ri.jar;C:\JDeveloper11g\jdev\lib\ojc.jar;C:\JDeveloper11g\mds\lib\mdsrt.jar;C:\JDeveloper11g\adfrc\lib\rcsrt.jar;C:\JDeveloper11g\adfrc\lib\jr_dav.jar;C:\JDeveloper11g\adfrc\lib\rcv.jar;C:\JDeveloper11g\adfp\lib\custComps.jar;C:\JDeveloper11g\adfp\lib\portlet-client-adf.jar;C:\JDeveloper11g\adfp\lib\portlet-client-rc.jar;C:\JDeveloper11g\adfp\lib\adfp-portletdt-share.jar;C:\JDeveloper11g\adfp\lib\portlet-client-core.jar;C:\JDeveloper11g\adfp\lib\portlet-client-mds.jar;C:\JDeveloper11g\adfp\lib\portlet-client-web.jar;C:\JDeveloper11g\adfp\lib\portlet-client-wsrp.jar;C:\JDeveloper11g\adfp\lib\tidy.jar;C:\JDeveloper11g\adfp\lib\wce.jar;C:\JDeveloper11g\adfp\lib\wsrp-types.jar;C:\JDeveloper11g\adfp\lib\wsrp-jaxb.jar;C:\JDeveloper11g\adfp\lib\namespace.jar;C:\JDeveloper11g\jlib\adf-faces-changemanager-rt.jar;C:\JDeveloper11g\jlib\facesconfigmodel.jar;C:\JDeveloper11g\jlib\taglib.jar;C:\JDeveloper11g\jlib\jdev-el.jar;C:\JDeveloper11g\jlib\xmlef.jar;C:\JDeveloper11g\jdbc\lib\ojdbc5dms.jar;C:\JDeveloper11g\jlib\commons-cli-1.0.jar;C:\JDeveloper11g\jlib\share.jar;C:\JDeveloper11g\jlib\dms.jar;C:\JDeveloper11g\j2ee\home\lib\oc4j-unsupported-api.jar;C:\JDeveloper11g\rdbms\jlib\xdb.jar;C:\JDeveloper11g\lib\java\api\cache.jar;C:\JDeveloper11g\jlib\ojdl.jar;C:\JDeveloper11g\j2ee\home\lib\pcl.jar;C:\JDeveloper11g\ucp\lib\ucp.jar;C:\JDeveloper11g\lib\java\shared\oracle.javatools\11.1.1.0.0\dafrt.jar;C:\JDeveloper11g\lib\java\shared\oracle.javatools\11.1.1.0.0\javatools-nodeps.jar;C:\JDeveloper11g\adfp\lib\custComps-skin.jar;C:\JDeveloper11g\j2ee\home\lib\jms.jar;C:\JDeveloper11g\rdbms\jlib\aqapi.jar;C:\JDeveloper11g\j2ee\home\lib\jta.jar;C:\JDeveloper11g\webcenter\jlib\tagging-taglib.jar;C:\JDeveloper11g\BC4J\lib\adfmweb.jar;C:\JDeveloper11g\jakarta-taglibs\commons-beanutils-1.6.1\commons-beanutils.jar;C:\JDeveloper11g\jakarta-taglibs\commons-logging-1.0.3\commons-logging.jar;C:\JDeveloper11g\jakarta-taglibs\commons-collections-2.1\commons-collections.jar;C:\JDeveloper11g\jakarta-struts\lib\antlr.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-beanutils.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-collections.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-digester.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-fileupload.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-logging.jar;C:\JDeveloper11g\jakarta-struts\lib\commons-validator.jar;C:\JDeveloper11g\jakarta-struts\lib\jakarta-oro.jar;C:\JDeveloper11g\jakarta-struts\lib\struts.jar;C:\JDeveloper11g\webcenter\jlib\command-api.jar;C:\JDeveloper11g\webcenter\jlib\command-spi.jar;C:\JDeveloper11g\webcenter\jlib\generalsettings-model.jar;C:\JDeveloper11g\webcenter\jlib\lifecycle-asctl.jar;C:\JDeveloper11g\webcenter\jlib\lifecycle-client.jar;C:\JDeveloper11g\webcenter\jlib\lifecycle-model.jar;C:\JDeveloper11g\webcenter\jlib\lifecycle-service.jar;C:\JDeveloper11g\webcenter\jlib\lock-service-model.jar;C:\JDeveloper11g\webcenter\jlib\search-api.jar;C:\JDeveloper11g\webcenter\jlib\search-adapter.jar;C:\JDeveloper11g\webcenter\jlib\search-model.jar;C:\JDeveloper11g\webcenter\jlib\search_client.jar;C:\JDeveloper11g\webcenter\jlib\scope-service-model.jar;C:\JDeveloper11g\webcenter\jlib\security-extension.jar;C:\JDeveloper11g\webcenter\jlib\serviceframework.jar;C:\JDeveloper11g\webcenter\jlib\wc-concurrent.jar;C:\JDeveloper11g\BC4J\lib\adfsharembean.jar;C:\JDeveloper11g\j2ee\home\lib\xmlparserv2.jar;C:\JDeveloper11g\webservices\lib\saaj-api.jar;C:\JDeveloper11g\webservices\lib\orasaaj.jar;C:\JDeveloper11g\j2ee\home\lib\http_client.jar;C:\JDeveloper11g\webcenter\jlib\service-framework-taglib.jar;C:\JDeveloper11g\webcenter\jlib\serviceframework-view.jar;C:\JDeveloper11g\webcenter\jlib\rtc-api.jar;C:\JDeveloper11g\webcenter\jlib\rtc-model.jar;C:\JDeveloper11g\webcenter\jlib\rtc-skin.jar;C:\JDeveloper11g\webcenter\jlib\rtc-adapters-lcs.jar;C:\JDeveloper11g\webcenter\jlib\rtc-lcs-wsclient.jar;C:\JDeveloper11g\webcenter\jlib\log4j-1.2.8.jar;C:\JDeveloper11g\webcenter\jlib\rtc-taglib.jar;C:\JDeveloper11g\webcenter\jlib\rtc-view.jar;C:\JDeveloper11g\webcenter\jlib\rtc-adapters-ocms.jar;C:\JDeveloper11g\webcenter\jlib\buddylistmanager-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\buddylistmanagerimpl-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\presencerules-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\parlayxcommon-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\parlayxwsstubs-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\resourcelist-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\xdmc-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\xdmcimpl-4.2.0-393.jar;C:\JDeveloper11g\webcenter\jlib\commons-httpclient.jar;C:\JDeveloper11g\webcenter\jlib\commons-codec-1.3.jar;C:\JDeveloper11g\webcenter\jlib\collab-share.jar;C:\JDeveloper11g\adfdi\lib\adf-desktop-integration.jar;C:\JDeveloper11g\webservices\lib\wsclient.jar" -javaagent:C:\JDeveloper11g\lib\java\internal\toplink-agent.jar -Dhttp.proxyHost=10.2.0.1 -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts=10.2.2.117|127.0.0.1|*.10.2.*|*.dinamotos.com|www.etesa.com|*.intranet|*.dinamo|*.etesa -Dhttps.proxyHost=10.2.0.1 -Dhttps.proxyPort=3128 -Dhttps.nonProxyHosts=10.2.2.117|127.0.0.1|*.10.2.*|*.dinamotos.com|www.etesa.com|*.intranet|*.dinamo|*.etesa oracle.HRFacadeClient
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:141)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:34)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:27)
         ... 5 more
    Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [ModeloEJB] failed.
    Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while loading class: modeloejb.Departments to check whether it implements @Entity, @Embeddable, or @MappedSuperclass.
    Internal Exception: java.lang.ClassNotFoundException: modeloejb.Departments
         at oracle.toplink.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:790)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:119)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:187)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:202)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:219)
         ... 11 more
    Caused by: Exception [TOPLINK-28018] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [ModeloEJB] failed.
    Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while loading class: modeloejb.Departments to check whether it implements @Entity, @Embeddable, or @MappedSuperclass.
    Internal Exception: java.lang.ClassNotFoundException: modeloejb.Departments
         at oracle.toplink.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:196)
         ... 16 more
    Caused by: Exception [TOPLINK-30007] (Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071207)): oracle.toplink.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while loading class: modeloejb.Departments to check whether it implements @Entity, @Embeddable, or @MappedSuperclass.
    Internal Exception: java.lang.ClassNotFoundException: modeloejb.Departments
         at oracle.toplink.exceptions.PersistenceUnitLoadingException.exceptionLoadingClassWhileLookingForAnnotations(PersistenceUnitLoadingException.java:126)
         at oracle.toplink.internal.ejb.cmp3.persistence.PersistenceUnitProcessor.loadClass(PersistenceUnitProcessor.java:231)
         at oracle.toplink.internal.ejb.cmp3.metadata.MetadataProcessor.processPersistenceUnitClasses(MetadataProcessor.java:423)
         at oracle.toplink.internal.ejb.cmp3.metadata.MetadataProcessor.processPersistenceUnitClasses(MetadataProcessor.java:376)
         at oracle.toplink.internal.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:258)
         at oracle.toplink.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:747)
         ... 15 more
    FATAL ERROR in native method: processing of -javaagent failed
    Caused by: java.lang.ClassNotFoundException: modeloejb.Departments
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at oracle.toplink.internal.ejb.cmp3.JavaSECMPInitializer$TempEntityLoader.loadClass(JavaSECMPInitializer.java:355)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at oracle.toplink.internal.ejb.cmp3.persistence.PersistenceUnitProcessor.loadClass(PersistenceUnitProcessor.java:228)
         ... 19 more
    Exception in thread "main" Process exited with exit code 1.

Maybe you are looking for

  • I can't click on preferences for facetime

    I am trying to click FaceTime>Preferences    but when I click on Facetime it won't allow me to click on preferences. Do I need an update?

  • It wont install the update

    I transfered some of my music from my old computer to my new one, when i try to listen to it, it asks for my password, which i give, then it tells me i need to update to the new version of iTunes to log in. I download the update, but when i get to th

  • Web DynPro Adaptive RFC proxies configuration

    Hi, When using Adaptive RFC proxies to call BAPIs in my Web DynPro application I need to go to the content management web interface (localhost:50000/webdynpro/welcome) to set them up. How can I automate this configuration for, say, quick deployment o

  • Invoice Functionality in SRM 4.0 Vs SRM 5.0

    We are evaluating the Invoice functionality in SRM 4.0. I know SAP has released Invoice Management System for SRM 5.0 but this can also be used for SRM 4.0. I wanted to know if there are any shortcomings in SRM 4.0 invoice functionality. Has anyone u

  • Field deactivation in MIGO

    Hi,   I have a requirement to deactivate a field 'Ext. amount LOC'(EXBWR) in transaction MIGO, from the Quantity tab based on the Movement type and Material entered. Now the field EXBWR is activated from config to all the materials but i need to deac