My CommandButton calls PostContructs from other Managed Beans. Why?

Hi,
i have a big problem that i can't understand.
I use a command Button who should call only one Managed Bean. But however it calls other Managed Beans too.
How is it possible?
my properties:
Primfaces 2.1
Glassfish v3
jsf 2.0
Ejb 3.1
JPA - Toplink
Facelets
Netbeans
mainTemplate.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <ui:insert name="head">
        <h:head>
            <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />
            <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/style.css" />
            <title></title>
        </h:head>
    </ui:insert>
    <h:body>
        <div class="main">
            <div class="main-bg">
                <div class="main-width">
                    <div class="indent">
                        <h:form id="urlForm" prependId="false">
                            <div class="posturlbox">
                                <h:inputText value="#{addUrlBean.userUrl}" styleClass="posturlinput" id="url" onclick="this.value = ''" />
                            </div>
                            <p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />
                            <div class="addUrlMessage">
                                <p:message for="url" showSummary="true" showDetail="false" />
                            </div>
                        </h:form>
                        <div class="clear"></div>
                    </div>
                    <div class="content">
                        <div class="content-indent">
                            <ui:insert name="content">
                            </ui:insert>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </h:body>
</html>
test.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <meta http-equiv="content-type"
              content="application/xhtml+xml;charset=utf-8" />
    </h:head>
    <h:body>
        <ui:composition template="/WEB-INF/template/mainTemplate.xhtml">
        </ui:composition>
    </h:body>
</html>
addUrlManagedBean.java
package managedBeans;
import entities.UserEntity;
import infoBeans.VideoValidationInfo;
import javax.ejb.EJB;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import sessionBeans.VideoSessionBean;
@ManagedBean(name = "addUrlBean")
@ViewScoped
public class AddUrlManagedBean extends GeneralManagedBean {
    @EJB
    VideoSessionBean videoSessionBean;
    private String userUrl = "URL";
    @ManagedProperty("#{loginBean}")
    LoginManagedBean loginMB;
    /** Creates a new instance of AddUrlManagedBean */
    public AddUrlManagedBean() {
    public void addVideo() {
        UserEntity sessionUser = loginMB.getSessionUser();
        if (sessionUser == null) {
            informUser(FacesMessage.SEVERITY_WARN,
                    "log_in_or_crate_new_account",
                    "log_in_or_crate_new_account_detail", "url");
        } else {
            int validationId = videoSessionBean.validateVideo(userUrl);
            if (validationId == VideoValidationInfo.VIDEO_IS_OK) {
                videoSessionBean.addVideo(sessionUser, userUrl);
                informUser(FacesMessage.SEVERITY_INFO,
                        "video_create_success",
                        "video_create_success_detail", "url");
            } else if (validationId == VideoValidationInfo.URL_IS_EMPTY) {
                informUser(FacesMessage.SEVERITY_ERROR,
                        "url_is_empty",
                        "url_is_empty_detail", "url");
            } else if (validationId == VideoValidationInfo.URL_SYNTAX_WRONG) {
                informUser(FacesMessage.SEVERITY_ERROR,
                        "url_syntax_wrong",
                        "url_syntax_wrong_detail", "url");
            } else if (validationId == VideoValidationInfo.VIDEO_NOT_EXIST) {
                informUser(FacesMessage.SEVERITY_ERROR,
                        "video_not_exist",
                        "video_not_exist_detail", "url");
            } else if (validationId == VideoValidationInfo.VIDEO_ALREADY_EXIST) {
                informUser(FacesMessage.SEVERITY_ERROR,
                        "video_already_exist",
                        "video_already_exist_detail", "url");
            } else if (validationId == VideoValidationInfo.VIDEO_ID_LENGTH_WRONG) {
                informUser(FacesMessage.SEVERITY_ERROR,
                        "video_id_length_wrong",
                        "video_id_length_wrongdetail", "url");
        userUrl = "";
    public String getUserUrl() {
        return userUrl;
    public void setUserUrl(String userUrl) {
        this.userUrl = userUrl;
    public LoginManagedBean getLoginMB() {
        return loginMB;
    public void setLoginMB(LoginManagedBean loginMB) {
        this.loginMB = loginMB;
}Now. if i click the Button
*<p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />*
*<div class="addUrlMessage">*
it should only use the AddUrlManagedBean right (i tried it with h:commandButton too.. same result)? But i make a System.out in my other ManagedBeans (PostConstructs) and i see this logfile.
LogFile
INFO: PostConstruct: VideoDetailMB - ViewScoped
INFO: PostConstruct: VideoMB - RequestScoped
INFO: PostConstruct: UserVideosMB - ViewScopedHow is that possible? Why it activate the Lifecycle of other ManagedBeans?

it should only use the AddUrlManagedBean rightWrong. It should also use this bean:
@EJB
    VideoSessionBean videoSessionBean;with whatever consequences that has.

Similar Messages

  • Programmatically closing a popup from a managed bean

    Hi,
    in the following blog [http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/|http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/]
    the following statement is being made at the end ...
    The JavaScript call is issued as "window.exitPopup()" because the script is called from the page root. You can easily see how the JavaScript can be modified to have "exitPopup" becoming a generic function avoiding hard coded popup ID's as in my example.
    I don't understand how to avoid hardcoded popup ID's. Could someone please explain this to me.
    Thank you
    Bodhy

    Hi,
    thank you. It is working.
    @Timo
    The closePopup function in your comment has the variable popupId. That made me wonder, if it is possible to set this variable in my jspx page.
    I made a workaround by defining a new variable called popupId with getter and setter methods and using the setActionListener to set that popupId. After that I was calling the closePopup() function. Do you know a better way doing this?
    @Frank
    I was also reading through Frank's blog about JavaScript [http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/|http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/] , trying to find a solution to call JavaScript functions with variables (defining these variables in my jsp page). Is this possible?
    Thank you
    Bodhy

  • How to get iterator values from a managed bean ?

    Due to a bug in selectOneChoice i'm not able to get the label list i want to display directly from an iterator when the value binding is a managed bean.
    To solve the problem i would like to create a managed bean that contains that list and use it as the selectItems to display.
    I would like that the values in that managed bean loaded from the a data control iterator.
    My question is :
    1) is it possible to access the iterator values from a managed bean, i mean without any reference to a page definition
    2) how to do ? is it documented somewhere ? any example ?
    Thank you

    I got it also with this code:
    package view.managedBeans;
    import classification.bean.ClassificationDocument;
    import classification.castor.ClassificationLanguage;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.List;
    import java.util.Locale;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.generic.DCGenericDataControl;
    import org.exolab.castor.xml.MarshalException;
    import org.exolab.castor.xml.ValidationException;
    public class ClassificationLanguageList {
    private java.util.List<SelectItem> supportedLanguages = new ArrayList();
    public ClassificationLanguageList() throws FileNotFoundException,
    MarshalException,
    ValidationException {
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding("#{data.ClassificationDocumentDataControl}");
    DCGenericDataControl classificationDocumentDataControl = (DCGenericDataControl)vb.getValue(ctx);
    ClassificationDocument classificationDocument = (ClassificationDocument)classificationDocumentDataControl.getDataProvider();
    ClassificationLanguage[] classificationLanguage = classificationDocument.getClassification().getClassificationLanguageList().getClassificationLanguage();
    for (int counter = 1; counter < classificationLanguage.length; counter++) {
    SelectItem language = new SelectItem();
    language.setValue(classificationLanguage[counter].getClassificationLanguageCode());
    language.setLabel(classificationLanguage[counter].getClassificationLanguageLabel());
    supportedLanguages.add(language);
    public void setSupportedLanguages(java.util.List<SelectItem> supportedLanguages) {
    this.supportedLanguages = supportedLanguages;
    public java.util.List<SelectItem> getSupportedLanguages() {
    return supportedLanguages;
    }

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

  • Howto: Iterate ADF BC from a managed bean from the View?

    Hi Everyone,
    I've been trying to iterate a BC ADF object from a managed bean from the view layer. Here is what I have done so far, but I don't seem to get any records:
    In faces-config.xml, I am passing in the BindingContext to the managed bean. (This is a session scoped bean).
    <managed-property>
          <property-name>bindings</property-name>
          <property-class>oracle.adf.model.BindingContext</property-class>
          <value>#{data}</value>
        </managed-property>In the testPageDef.xml I have the executables and bindings setup:
      <executables>
        <iterator id="TestRO1Iterator" RangeSize="-1" Binds="TestRO1"
                  DataControl="ApplicationControlDataControl"/>
      </executables>
      <bindings>
        <table id="TestRO1" IterBinding="TestRO1Iterator">
          <AttrNames>
            <Item Value="C1"/>
            <Item Value="C2"/>
          </AttrNames>
        </table>
    </bindings>In my managed bean, in addition to the accessors for the bindingContext of bindings, I have:
                 BindingContainer bc = getBindings().findBindingContainer("testPageDef");
                 ControlBinding cb = bc.getControlBinding("TestRO1");
                 RangeBinding rb = (RangeBinding)cb;
                 List testList = rb.getRangeSet();
                 Iterator testIter = testList.iterator();
                 int testCount = testList.size();
                 while (testIter.hasNext()) {
                   Map attrs = (Map)testIter.next();
                   System.out.println(attrs.get("C1")+","+attrs.get("C2"));     
                   //Do some fancy stuff here with the values.
                 }However, my testList.size() always returns 0.
    Is this the right method to programatically access the data from the view layer from a managed bean, or have I missed something completely? Are there any working samples that I could take a look at?
    Jdev: 10.1.3.1
    Thanks!
    Kenton

    Hi,
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    private BindingContainer bindings= null;
    public void setBindings(BindingContainer bc){
    bindings = bc;
    public BindingContainer getBindingContainer(){
    return bindings;
    DCIteratorBinding dciter = (DCIteratorBinding ) bc.get("TestRO1Iterator");
    RowSetIterator rsi = dciter.getRowSetIterator();
    while (rsi.hasNext()){
    Row rw = (Row) rsi.next();
    //Do some fancy stuff here with the values.
    You find several examples in the developer guide and on the Internet
    Frank

  • Calling EJB from other EJB on other J2EE Server

    Can I call EJB from other EJB on other J2EE Server
    Servers - Websphere 5.0
    Do i require home & remote interface of that ejb on client side also
    Help me, please

    the problem is actually i require that is specific to websphere
    for example i want to call a method ion that ejb
    say my ejb name is myejb
    so the normal way i should call is
    InitialContext initialContext = new InitialContext();     
    Object homeObject = initialContext.lookup("ejb/MyEjbHome");
    MyEJBHome myEJBHome =(MYEjbHome )javax.rmi.PortableRemoteObject.narrow(homeObjectMYEjbHome.class);
              myEJB = lSHome.create();
    myEJB.someMethod();
    but here i am having class for home and remote available
    now if other app server i am not having this classes then what to do

  • How to call partial trigger on JSFF component from separate managed bean?

    Guys and Gals,
    Using JDev 11.1.1.2.0. Looked on the forums and google. Initial results aren't so great.
    Is it possible to call a PPR on a JSFF component from a separate managed bean? It seems calling the FacesContext in this instance calls the root JSPX, which only contains one child: the RichDocument.
          UIComponent component =
             FacesContext.getCurrentInstance().getViewRoot().findComponent("pc1:table1");
          if (component != null)
             AdfFacesContext context = AdfFacesContext.getCurrentInstance();
             context.addPartialTarget(component);
          System.out.println(FacesContext.getCurrentInstance().getViewRoot().getChildCount());Returns 1 :(
    Ideas for a workaround?
    Edited by: LovettWB on Nov 17, 2010 3:39 AM
    Edited by: LovettWB on Nov 17, 2010 4:11 AM
    Edited by: LovettWB on Nov 17, 2010 4:12 AM

    Thanks! Joonas, you've been a great help.
    The code on the page you referenced was close, but the code on a page referenced in the user comments was even better:
    http://www.jroller.com/mert/entry/how_to_find_a_uicomponent
    My region is located in a facet, which the page you posted doesn't quite cover, but the page above fixed that. Here's the fix below:
    In Managed Bean
          // search for the region ID (or task flow) in the base page
          UIComponent base = jsfUtils.findComponentInRoot("dynamicRegion");
          // now find component ID from within that region
          UIComponent partTable = jsfUtils.findComponent(base, "partTable");
          // call PPR on your found component
          AdfFacesContext.getCurrentInstance().addPartialTarget(partTable);In JSFUtils utility class
       // used to locate region.  Could also find any component
       // located in the base ViewRoot()
       public static UIComponent findComponentInRoot(String id) {
        UIComponent component = null;
        FacesContext facesContext = FacesContext.getCurrentInstance();
        if (facesContext != null) {
          UIComponent root = facesContext.getViewRoot();
          component = findComponent(root, id);
        return component;
        // Recursive method which finds your component within JSFF
        // regardless of facet or other UIComponents which may have children
    public static UIComponent findComponent(UIComponent base, String id) {
        if (id.equals(base.getId()))
          return base;
        UIComponent kid = null;
        UIComponent result = null;
        Iterator kids = base.getFacetsAndChildren();
        while (kids.hasNext() && (result == null)) {
          kid = (UIComponent) kids.next();
          if (id.equals(kid.getId())) {
            result = kid;
            break;
          result = findComponent(kid, id);
          if (result != null) {
            break;
        return result;
    }Good stuff to know!

  • Error calling Method on Managed Bean from another Managed Bean

    Hi
    (Jdev 11.1.1.2.0)
    Help please:
    I have a managed bean (page flow scope) which is used by my main page for dynamic region flow navigation:
    *public class RegionNavigationBean implements Serializable{*+
    private String dynamicTaskFlowId = "/WEB-INF/home-task-flow-definition.xml#home-task-flow-definition";+
    *public RegionNavigationBean() {*+
    *public TaskFlowId getDynamicTaskFlowId() {*+
    return TaskFlowId.parse(dynamicTaskFlowId);+
    *public void setDynamicTaskFlowId(String taskFlowId) {*+
    this.dynamicTaskFlowId = taskFlowId;+
    taskFlowId property on main page def is set to +*${pageFlowScope.regionNavigationBean.dynamicTaskFlowId}*+
    In a DB table (i.e. View Object on my model layer) I store a menu ID and a corresponding task_flow_id.
    Then I have created an action listener class (RegionNavigationListener - page flow scope) which I link to my menu items on my main page (action listener property on menu item = +*#{pageFlowScope.regionNavigationAction.processAction}*+ )
    In this action listener (processAction method), I retrieve the row set from the menu VO and find the record which matches my menu ID which caused the action event, thereby retrieving the task_flow_id which must be navigated to.
    I then try to retrieve the instance of the RegionNavigationBean with the following statement: RegionNavigationBean regNav = (RegionNavigationBean)JSFUtils.getManagedBeanValue("regionNavigationBean");+
    This seems to work fine, but as soon as I try and use this I get NullPointerException error, e.g.:
    regNav.setDynamicTaskFlowId(menusRow.gettaskFlowId());+
    or even:
    System.out.println("%%% " + regNav.toString());+
    This is all quite new to me... any help would be appreciated!
    Thanks
    Mario

    Hi Mario,
    I think JSFUtils.getManagedBeanValue(String) has difficult to evaluate the "regionNavigationBean" managed bean.
    What JSFUtils.getManagedBeanValue(String) do is important. I remember that "JSF scoped" bean can be found by JSF style find method, such as requestScope, sessionScope, applicationScope. For a managed bean put in these scope, scope prefix is not needed, for example: using #{beanName} to locate a requestScope bean. The #{requestScope} prefix is not needed.
    But pageFlowScope is different. If a bean is put in the pageFlowScope, you must use #{pageFlowScope.beanName} to locate it.
    Say, ManagedBean is the java class of your manged bean.
    FacesContext ctx = FacesContext.getCurrentInstance();
    Application app = ctx.getApplication();
    ManagedBean mb = (ManagedBean)app.evaluateExpressionGet(ctx, "#{pageFlowScope.managedBeanName}", ManagedBean.class);
    Hope it helps.
    Todd
    Edited by: Todd Bao on Nov 26, 2009 9:58 PM

  • How to pop up a browser window from a managed bean?

    I have a user case like this:
    User login our home website. He/she clicks a button. Control flow goes to a managed bean (MB here after) to check some conditions. If conditions are met, instead of sending the user back to the home page, the user will be presented a new web site (e.g. forums.oracle.com) in a popup window on top of our home site.
    Can we invoke a website in a adf popup? If so, how to do that? If not, any idea on how to develop this use case?
    Any idea is appreciated.

    Sorry, I have updated the previous reply with the required inputs.
    For convenience, putting it again;
    if you need to check for some condition and then invoke the browser, you could use the following code in your managed bean for af:commandButton for Action.
    import javax.faces.context.FacesContext;
    import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    import org.apache.myfaces.trinidad.util.Service;
    public class TestURLPageBean {
    public TestURLPageBean() {
    super();
    public String onClick() {
    *// Check for the condition here and invoke the browser only if it is true*
    if (true) {
    ExtendedRenderKitService erks =
    (ExtendedRenderKitService)Service.getRenderKitService(FacesContext.getCurrentInstance(),
    ExtendedRenderKitService.class);
    StringBuilder script = new StringBuilder();
    script.append("window.open('http://www.google.com');");
    erks.addScript(FacesContext.getCurrentInstance(),
    script.toString());
    return null;
    Thanks,
    Navaneeth

  • Invoking Web Service from JSF Managed Bean

    Hi all,
    I am trying to invoke a webservice from Managed Bean and getting an exception.
    Server : WAS 6.1.0.2
    Version :JSF 1.2
    Type of WS Invocation : JAX-WS web services
    IDE : RAD 7.0.0
    I have set up the class path correctly and added relevant WS Client in EAR ....
    Following is the exception am receiving :
    [8/31/11 7:59:25:335 EDT] 0000002d WebApp E [Servlet Error]-[Faces Servlet]: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:170)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:123)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:84)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:204)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:171)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:754)
    at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:627)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:550)
    at com.sun.faces.taglib.html_basic.InputTextareaTag.doEndTag(InputTextareaTag.java:651)
    at com.ibm._jsp._sample._jspx_meth_h_inputTextarea_0(_sample.java:107)
    at com.ibm._jsp._sample._jspx_meth_h_form_0(_sample.java:149)
    at com.ibm._jsp._sample._jspx_meth_f_view_0(_sample.java:180)
    at com.ibm._jsp._sample._jspService(_sample.java:77)
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
    at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1263)
    at java.beans.Beans.instantiate(Beans.java:219)
    at java.beans.Beans.instantiate(Beans.java:63)
    at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:226)
    at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:291)
    at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:81)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:249)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:140)
    Thanks in advance ..
    Steve Bob

    No you haven't, because
    Caused by: java.lang.NoClassDefFoundError: org.example.www.Sample_PortType a relevant class can still not be found and Java really is not going to lie to you; this class is not on your application's classpath so it is either missing or put in the wrong place. Note that missing classes can be caused by you forgetting to properly redeploying your application - its usually something silly like that. Figure out what you did wrong and correct your mistake.
    The fact that you have to mention that you "setup the classpath" is questionable; in web applications you don't touch the classpath at all. So what exactly did you do?

  • Calling servlet from a backing bean

    hi guys i need to call a servlet from a backing bean in JSF. how do i do that ?
    The scenario is i have to call servlet on a different machine from my backing bean . I also need to pass an object to the servlet .
    This object contains data which must be manipulated and inserted in the database by the calling servlet.
    I also want that after insertion in the db the control must be passed to the backing bean .
    Is this all possible???
    Please help

    You may want to investigate the built in java.net.URL class. For advanced needs, Apache has a Java HTTP client library.

  • Calling IP from a Session Bean

    I am looking to put some security on our EJBs based on the callers IP address. I can't seem to figure out how to get the calling IP from within the session bean. Does security need to be enabled to get this information? Is there something that I am missing?

    believe the functions that you mentioned are only available within the HttpRequestObject. What I am >>actually looking for is a way to get the IP from within the SessionContext of the Session EJB or simply >>thin any part of the EJB. if you REALLY want to access IP from EJB you have to pass it as parameters to your EJB functions. Request/Response objects are not available from EJBs because you don't want to tie any other architecture(Request/Response based clients) with EJB... EJBs are designed to be accessible from any type of clients(which might not be IP based).
    Because of this we are forced to implement our own. Is there a way to enable GROUPS/ROLES without >>having the EJB security enable in WebSphere?YES....you can define your groups and roles using JAAS and then in your application code...you have to to write some code to do checks before calling any Entity Beans. I am not aware of any methods to tie up the JAAS to EJB either in the deployment descriptor or any other method.
    Another thing that I want to emphasize is that using IP you might not be able to accomplish what you are doing..because lets say you are assigning some rights to people with a specific IP but if u r using DHCP they might not have the same IP next time..so u will end up in more trouble. :-)
    all the best....
    sanjay.

  • How to programmatically Identify the Phase from a managed bean

    How can we identify the Phase from a normal managed bean method ?
    This managed bean method is a method activity in a task-flow. How can we identify the phase..?
    If there is an event then, we can identify the phase using event.getPhaseId() but here there is no event. Can I get the phase programmatically ?
    Thanks

    Hi,
    You won't need that with a PhaseListener. You could use something like the following:
    public class CurrentPhaseListener implements PhaseListener
        private static ThreadLocal<PhaseId> currentPhaseId = new ThreadLocal<PhaseId>();
        public static PhaseId getCurrentPhaseId()
            return currentPhaseId.get();
        public void afterPhase(PhaseEvent ev)
            currentPhaseId.remove();
        public void beforePhase(PhaseEvent ev)
            currentPhaseId.set(ev.getPhaseId());
        public PhaseId getPhaseId()
            return PhaseId.ANY_PHASE;
    }Regards,
    ~ Simon

  • Calling EJBs from other EJBs in other J2EE Server?

    How can I call one EJB on one J2EE Server from other
    EJB on other J2EE Server?
    Help me, please.
    Dmitry Tumanov

    Basically call the beans as if you were calling them in the same server through their remote interfaces. Get a InitialContext into the other appserver and then get the home object, narrow it and create a remote reference. You can follow the standard implementation just make sure that the InitialContext you create has the right properties, ie. context factory, urls, etc to the OTHER appserver.

  • Getting the last action from a managed bean

    Is it possible to get the last action that was submitted from within a backing bean.
    I have an application that has a context specific menu at the top of the page. The context menu is generated using a backing bean which is called from a tiled jsp, called contextmenu.jsp.
    The context menu backing bean needs to know what page it is on so that it can generate the correct menu, so is it possible to get hold of the last action submitted, or the current page from within the backing bean?
    Any help would be much apprecieated.
    Jamie Cash

    Thanks for your help,
    but ...
    We will be developing over 200 jsps and don't want to load the development effort with a backing bean for each jsp.
    The solution that I finally arrived at is using the following code in the menubean to get the view id, and make the decision based on that.
    public NavigationMenuItem[] getContextMenu()
         //Get view id
              String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
              logger.debug("view id: " + viewId);
              //Menu
              NavigationMenuItem[] contextMenu = null;
              if(viewId.equals("/home.jsp"))
                   .... Code to get context menu from Stateless Session bean     
              //Return menu
              return contextMenu;
    Regards
    Jamie

Maybe you are looking for

  • How can i delete synced photos on my ipad, when i cant view the photos on my pc

    i cant view my photos on my pc, but it already synced my photos from my library and i want to remove them.

  • Nasty Buzzing Noise when using external charger

    I've got a travel charger made by iWantit (iPod & Nano compatible) that I've always used to charge my nano when out and about. When I connected my Touch to it the screen showed a flashing charging icon in the top right and the Touch started buzzing e

  • Export to Flickr

    I use the new version of iPhoto. When I want to export a picture I invariably get the export option trying to open my Flickr account. This option which I have not selected will continue indefinitely until I use Force Quit to get out of iPhoto. Clearl

  • Usage of Effective Old Space

    Hello everybody In a EWA of one of our ABAP+JAVA system we get this alert: Usage of Effective Old Space The resource utilization is critical and leaves no room to cope with sudden high-load situations. The higher the value, the harder it is to cope w

  • I can't open my mail unless I use the Enter/Return key or go to the File -Open Message

    Up until yesterday I could open an email just by double clicking the message. Now if I want to open a message I have to use the Enter/Return key or go into FILE and press Open Message. The only thing different since yesterday morning is that I decide