[JS][CS5]Determine if Object is Subclass or Instance of

Hi,
I am trying to loop over all Layeritems and want to take an action, depending on the type of the item.
While I learned about several ways to determin the exact type, I would like to determin weather the Item might be either an Instance of the class or be a subclass. For example:
Graphic
EPS | Image | ImportedPage | PDF | PICT | WMF
I know have the following:
layer = app.activeDocument.layers[layerIndex];
for (i = 0; i < layer.allPageItems.length; i++) {
    x = layer.allPageItems[i]
    if(x instanceof Graphic) {
       alert('I wont tell you if a subtype (like Image) has been selected');
       //I actually want this to trigger for graphic and all its subtypes (eps,image,pdf,...)
I tryed to figure out the syntax of isPrototypeOf but I cant get it to work
Graphic.isPrototypeOf (x)
how do I go about to do this ( I know there is allGraphics but I want to be able to do this for other types too)  Greetings ted

Hi Ted,
What the DOM claims to be a "base class" or a subclass does not exactly meet the JS rules regarding instanceof or isPrototypeOf, due to the specific nature of object specifiers and the way they are resolved. To my mind, PageItem or Graphic may be regarded as _virtual classes_ (interfaces?) for temporary specifiers that are not resolved yet. Once a specifier is resolved—which is automatically done through arrays like allPageItems or allGraphics—it simply takes its own type (see x.__class__) and there is no more connection with the _virtual_ base class. Therefore, to find whether a resolved object is a kind of Graphic, I usually check if it addresses a specific property only shared by graphics, e.g.:
if( x.properties.hasOwnProperty('imageTypeName') ){...}
Then, of course, you can use switch(x.__class__){...} or switch(x.constructor){...} to refine treatments.
Hope that helps.
@+
M

Similar Messages

  • Determine all objects that a group has been assigned to

    I am trying to determine all objects that a group has been assigned to. For example, I would like to know what communities and portletes a group has been assigned to.
    I can retrieve the information directly from the plumtree database, however, I have not been able to determine how to accomplish this via the api.
    I have tried the following
    IPTObjectManager ptObjMng = ptSession.GetCommunities();
    for(inti = 0; i<3;i++)
    filter[i] = newObject[1];
    filter[0][0] = PT_PROPIDS.PT_PROPID_USERGROUP_GROUPID;
    filter[1][0] = PT_FILTEROPS.PT_FILTEROP_EQ;
    filter[2][0] = 1634; //group id for my group
    IPTQueryResult ptResult = ptObjMng.Query(PT_PROPIDS.PT_PROPID_ALL,-1,PT_PROPIDS.PT_PROPID_NAME,0,-1,filter);
    I have verified that the group has been assigned to the community, however, this query returns no records.
    How can I retrieve all communities or group that a specific group has been assigned too?
    thanks in advance

    This sure would be a handy feature! iTunes has it so that you can easily tell which playlists a song is in. It would be convenient for iPhoto as well.

  • How to determine the object in the tablespace

    Hi
    I have a problem with my database, How can i determine the object in the tablespace
    and how do move old tablespace into new tablespace and how to drop existing tablespace.
    Thanks

    Hi,
    If you want to find for all objects information, you can use dba_segments and filter this against the tablespace name. Once done you can create another tablespace and move the objects from old tablespace to new tablespace. Later you can drop the old tablepspace. You can use the below mention commands also:
    SELECT 'ALTER TABLE '|| table_name ||' MOVE TABLESPACE USERS;'
    FROM user_tables WHERE tablespace_name='MY_TableSpace';
    SELECT 'ALTER INDEX '|| index_name ||' REBUILD TABLESPACE USERS;'
    FROM user_indexes WHERE tablespace_name='MY_TableSpace';
    SELECT 'ALTER TABLE '|| table_name ||' MOVE LOB ('
    || column_name ||') STORE AS (TABLESPACE USERS);'
    FROM user_lobs WHERE tablespace_name='MY_TableSpace';
    On the other hand,
    You can also export a backup of the source tablespace and import into the target tablespace.
    Regards,
    XIC

  • [svn:fx-trunk] 7073: When looking around a tab group to determine which object to focus on, not only should the object be selected, but it should also be enabled and visible.

    Revision: 7073
    Author:   [email protected]
    Date:     2009-05-19 08:27:59 -0700 (Tue, 19 May 2009)
    Log Message:
    When looking around a tab group to determine which object to focus on, not only should the object be selected, but it should also be enabled and visible.
    QA Notes:
    Doc Notes:
    Bugs: SDK-19717
    Reviewers: Alex
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-19717
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as

    Revision: 7073
    Author:   [email protected]
    Date:     2009-05-19 08:27:59 -0700 (Tue, 19 May 2009)
    Log Message:
    When looking around a tab group to determine which object to focus on, not only should the object be selected, but it should also be enabled and visible.
    QA Notes:
    Doc Notes:
    Bugs: SDK-19717
    Reviewers: Alex
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-19717
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as

  • BAdI: Determine Target Object in BE System

    Hi all
    We have recently done an upgrade to SRM 5.0 and I realised that the BAdI for determining target object is different.
    In the EBP 3.5 system in the SPRO, the BAdI name was BBP_TARGET_OBJECT. It seems that the BAdI name is now BBP_TARGET_OBJTYPE.
    Can anyone confirm that I can no longer use BBP_TARGET_OBJECT and must switch to BBP_TARGET_OBJTYPE?
    Thanks.
    Nicholas

    Hi all/Christophe
    I have found the BAdI but it seems that it is very different from the old one. Furthermore the documentation also seems to be old.
    In my implementation, I want to be able to change a Purchase <b>Order</b> to a Purchase <b>Requisition</b> depending on some checks.
    I used to do it by setting <i>ITEM_DATA-OBJ_TO_GEN</i> = '2' and clearing <i>ITEM_DATA-AGREEMENT</i>, <i>ITEM_DATA-AGMT_ITEM</i> and <i>ITEM_DATA-FIXED_VEND</i>.
    To perform my check I used to need <i>ITEM_DATA-MAT_GRP</i> and <i>ITEM_DATA-QUANTITY</i>.
    So far I can only find <i>FIXED_VEND</i> and <i>QUANTITY</i> in the new BAdI.
    Anyone with any ideas how to handle this?
    Many thanks
    Nicholas

  • Copying form objects with subclass info

    In Forms 6i, is there any way to copy form objects (blocks, items, canvases, etc.) from one form to another with original subcalss information.
    When tried copying, it copies all form objects but subclass information is lost. If we try to do referencing, then it changes subclass references to the source form (i.e., references to original template object library are lost).
    Regards,
    Sanjiv

    I'm sorry, but i don't have any forms 6i-installation and its a long time since i last user it. So i don't know if its possible or not.
    There is one way to make it faster than using the property-palette. You can make an object in your object-library as "Smartclass". Then you can apply the object-class using the right mouse in the layout editor and simply apply that smartclass frm the context menu.

  • Reference object/element on an instance

    Is it possible to control an object/element on a instance? If so, how is it done through actionscript? There is an instance "instance140" off of the root, that has an element named img4 that i need to reference... does anyone know how I would go about that? 
    using root.instance.object form returns undefined. Please help.

    you can use the following (but you should type your object correctly):
    var yourobject:* = MovieClip(root).instance140.getChildByName("img4");

  • Java.lang.IllegalArgumentException: object is not an instance of declaring

    Hi,
    I have deployed my web project(Jdev 11g) on JBoss 5GA and successful. My project use JDBC connection to Oracle Database 10g and run OK.
    But I have 1 issue. My issue: While i click pages(all page used databinding get data from DB10g), JBoss log will appearance ERROR message:
    14:49:20,361 ERROR [STDERR] Jun 13, 2011 2:49:20 PM oracle.adf.share.ADFContext getNativeJdbcConnection
    INFO:
    java.lang.IllegalArgumentException: object is not an instance of declaring class
    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:597)
    at oracle.adf.share.ADFContext.getNativeJdbcConnection(ADFContext.java:1701)
    at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:990)
    at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1165)
    at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6728)
    at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:300)
    at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:331)
    at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
    at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:576)
    at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:419)
    at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8933)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4496)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2458)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2270)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3168)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
    at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:516)
    at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:862)
    at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:483)
    at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
    at oracle.adf.model.BindingContext.put(BindingContext.java:1300)
    at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:174)
    at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1024)
    at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1282)
    at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1186)
    at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1146)
    at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1149)
    at oracle.adf.model.BindingContext.get(BindingContext.java:1102)
    at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
    at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
    at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2708)
    at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2756)
    at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
    at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:328)
    at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1460)
    at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1590)
    at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2470)
    at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2414)
    at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4313)
    at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.isAttributeUpdateable(JUCtrlValueBinding.java:1638)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.isAttributeUpdateable(JUCtrlValueBinding.java:1745)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.isUpdateable(JUCtrlValueBinding.java:2600)
    at oracle.adfinternal.view.faces.model.AdfELResolver._isReadOnly(AdfELResolver.java:96)
    at oracle.adfinternal.view.faces.model.AdfELResolver.isReadOnly(AdfELResolver.java:112)
    at javax.el.CompositeELResolver.isReadOnly(CompositeELResolver.java:81)
    at com.sun.faces.el.FacesCompositeELResolver.isReadOnly(FacesCompositeELResolver.java:113)
    at org.apache.el.parser.AstValue.isReadOnly(AstValue.java:128)
    at org.apache.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:224)
    at org.apache.jasper.el.JspValueExpression.isReadOnly(JspValueExpression.java:71)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:117)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:334)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1015)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:46)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1491)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1410)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:352)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:187)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:405)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:654)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:573)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
    at o
    14:49:20,364 ERROR [STDERR] rg.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:330)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1181)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:273)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:204)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:777)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:293)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:213)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:680)
    I don't know why this Error message appearance? Although my project run OK!
    I don't want ERROR message appearance in JBoss log. Please help me?

    You need to pass the Human object on which you intend to call that method on to invoke().
    Trying to call an instance method without an instance won't work even with reflection.

  • Clustered timers object is not an instance of declaring class

    WLS 12.1.3 installation, one cluster of two managed servers.
    An enterprise application contains 3 EJB timers. Timers are clustered and persisted to DB (table WEBLOGIC_TIMERS).
    The application is written for JEE version 5 and timers are coded according rto EJB3.0 spec.
    Each time ejbTimeout() triggers for one of the timers, the following exception is logged
    <Error> <EJB> <SRVAW00> <clusterServer_1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-002F16F44C0F7F98CBA5> <> <1426609941352> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB MyBean(Application: MyClusteredApp, EJBComponent: LucyStarEJB.jar).
    javax.ejb.EJBTransactionRolledbackException: EJB Exception:
         at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:452)
         at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:251)
         at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:431)
         at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:44)
         at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:131)
         at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
         at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
         at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Caused By: java.lang.IllegalArgumentException: object is not an instance of declaring class
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:118)
         at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
         at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
         at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
         at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Alternatively, the stack trace is slightly different:
    <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-012838E30163E6919A1F> <> <1426809856301> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB MyServicesBean(Application: MyAppClustered, EJBComponent: MyEJB.jar).
    javax.ejb.EJBTransactionRolledbackException: EJB Exception:
        at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:452)
        at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:251)
        at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:431)
        at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:44)
        at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:131)
        at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
        at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
        at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Caused By: java.lang.IllegalArgumentException: java.lang.ClassCastException@402f37c8
        at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.ejb.container.timer.TimerHandlerImpl$TimerObject.execute(TimerHandlerImpl.java:118)
        at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:45)
        at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:95)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)
        at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)
        at weblogic.scheduler.TimerState$1$2.run(TimerState.java:200)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.scheduler.TimerState$1.run(TimerState.java:197)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    It seems that this exception is not enough to stop timer schedulation, because it goes on and on. In some way, therefore, WLS keeps track of the timer recurring expirations. On the other hand, my code in ejbTimeout() is never executed.
    What is causing these exceptions ? The stack trace is fully in WLS internal code.
    Thanks

    Indeed, the AbstractPageBean is a JSF managed bean. What does it mean to me?
    I want to add some Information:
    If I build a 'helper' class, with the following body, the same error is thrown:
    public class EJBTestHelper {
        private EJBTestRemote lookupEJBTestBean() {
                try {
                    Context c = new InitialContext();
                    return (EJBTestRemote) c.lookup("java:comp/env/ejb/EJBTestBean");
                } catch (NamingException ne) {
                    throw new RuntimeException(ne);
    }What can I do?

  • IllegalArgumentException: object is not an instance of declaring class

    Hi all,
    I know that this is the not exact forum to post this issue.
    I'm working on a clustered environment and my server details are given below
    a) jboss-4.0.2
    b) J2SDK-1.4.2_09
    In my jboss.xml file, I have defined
           <session>
                <ejb-name>ExampleSLBean</ejb-name>
                <jndi-name>ExampleSLHome</jndi-name>
                <cache-invalidation>true</cache-invalidation>
                <clustered>true</clustered>
           </session>And in my servlet i have written below code to lookup up a Stateless Session bean
    Hashtable hashtable = new Hashtable();
    hashtable.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    hashtable.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
    hashtable.put(Context.PROVIDER_URL, "localhost:1100");
    Context context = new InitialContext(hashtable);            
    Object objectRef = context.lookup("ExampleSLHome");
    System.out.println("objectRef ::: "+objectRef)
    ExampleSLHome home = (ExampleSLHome) PortableRemoteObject.narrow(objectRef, ExampleSLHome.class);after the context.lookup("ExampleSLHome") statement, I'm getting the error as
    java.lang.IllegalArgumentException: object is not an instance of declaring class.
    I'm not able to find the possible cause of the problem.
    Please help me
    thanks
    arvind

    Try this:
    Class objCls = Class.forName ("ClassName");
    Object obj = objCls.newInstance();
    method.invoke(objCls , null);
    This will throw an exception. However, following will work:
    method.invoke(obj , null);
    OR
    method.invoke(new ClassName(), null);
    Refer to the following thread for detailed discussion:
    http://forum.java.sun.com/thread.jspa?threadID=439811&messageID=1980996

  • How to determine which object was change within a snapshot

    Dear All,
    We are using OWB 9.2.0.4 with Oracle database 9.2.0.7.
    I have taken a full snapshot of an OWB project that includes several modules(cascade). I one of the modules I have created a new table, and added it to an existing mapping in that module.
    When I compare the module with the snapshot I took before, I get that all modules have changed and all thier mappings. When drilling down I can see that for the objects I did not change only an internal property was changed.
    How can I determine what has changed? Do I have to drill down on all objects?
    Regards
    Galit

    Hi,
    We are using 10.2.0.4.36 for the client and 10.2.0.4.0 enterprise edition for the database.(info from the session props window)
    rgrds Mike

  • How to determine an object is in an OU based on its DistinguishedName attribute

    Hello,
    Im trying to ensure all group objects are in a particular OU and if they are, then I will remove them.  All I have is a CSV input file of group names by SamAccountName, so I then do a Get-ADGroup to get the DistinguishedName attribute, but
    want to make sure they are in a specific OU, called OU=Test Training Groups, before I remove them.  Any help is appreciated.  Below is what I have so far:
    $TrainGroups = Import-Csv C:\Users\Admin\TriningGroups.Csv
    Foreach ($Group in $TrainGroups) {
    Get-ADGroup $Group | Select DistinguishedName
    So what would be the best way to read the results of the Get-ADGroup query and determine the group is in the OU=Test Training Groups?
    Thanks for your help! SdeDot

    Hi,
    Assuming the header of your CSV file is SamAccountName, this is how I'd do something like that:
    Import-Csv .\groups.csv | ForEach {
    $groupName = $_.SamAccountName
    try {
    $group = Get-ADGroup -Identity $groupName
    If ($group.DistinguishedName -like '*,OU=Test Training Groups,*') {
    Write-Output "$groupName is in the correct OU"
    } Else {
    Write-Output "$groupName is NOT in the correct OU"
    } catch {
    Write-Warning "Group not found: $groupName"
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Best way to determine what objects has been selected in a Collection?

    Hi all
    I´m currently developing an application where a user can create a PDF based on the choices made from multiple collections.
    Each collection contatins 10-50 items, and there are about 8 different collections with objects.
    Checkboxes are used to select items from these collections.
    I´m wondering how I would best determine what choices have been made, and if would be good to remove all objects from
    a collection that has NOT been chosen?
    Currently, it looks like this (exemple for one collection, but same solution is used for all collections)
    private Collection<Texture> textureList = new ArrayList<Texture>();
    private ArrayList<Texture> textureResult = new ArrayList<Texture>();
              for (Texture t : textureList) {
                   if (t.isSelected()) {
                        textureResult.add(t);
              }After this iteration, textureResult is used to create the PDF.
    This PDF contains lists with dynamic frames, so I need to now how many
    items was selected before creating the PDF.
    Wondering if this is the best/most efficient way to do this though?
    Maybe it doesn´t matter all that much with lists this small, but I´m still curios :-)
    I guess you could do something like this aswell
              while (textureList.iterator().hasNext()) {
                   Texture t = (Texture) textureList.iterator().next();
                   if (!t.isSelected()) {
                        textureList.iterator().remove();
              }Any suggetions?

    Dallastower wrote:
    I´m wondering how I would best determine what choices have been made,Are you asking how to determine which boxes have been checked? Or do you know how to do that and you're asking how to associate those boxes with items in your Collections? Or do you know how to do that and you're asking how to keep track of those selected items in the Collection?
    I don't do GUIs, so I can't help with the first two, but for the third, you could create a new collection holding just the selected ones, or remove the unselected ones from the original Collection.
    and if would be good to remove all objects from
    a collection that has NOT been chosen?That's entirely up to you. If you create the original Collection when the user makes his selection, and only need it to survive one round of selection, that may be fine. But if you need to get back to the original collection later, and it's expensive to create, then you might want to just create a second collection and add items from the original to it if they're selected.

  • Creating object of subclass.

    Hello All,
    I have a query. In ServletFilter's doFilter method I got the object of ServletRequest. Now I have to get the header. How do I get the header since getHeader method is in HttpServletRequest class which is the subclass of ServletRequest. Any one having any idea ?.
    Thanks and regards,
    Sachin

    In a webapp, the ServletRequest passed in will be an HttpServletRequest. Cast it to HttpServletRequest and you will be able to get the header.

  • How to determine the object type?

    Hi,
    I got a method that is of the following signature:
    Object result = method.invoke(object,args);The result can be any type from primitive types like double to class type.
    How can I determine whether the result object is of what type?
    I am thinking of using
    (if result instanceof Double)
          //do something
    }However, the method call invoke can return a primitive type double, so will the above method
    (if result instanceodf Double) be called?
    Thanks.

    However, the method call invoke can return a primitive
    type double, so will the above method
    (if result instanceodf Double) be called?(result instanceof Double) will be true because quoting the javadocs for Method.invoke(): "if the value has a primitive type, it is first appropriately wrapped in an object."
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method.html#invoke(java.lang.Object,%20java.lang.Object[])

Maybe you are looking for

  • My iTunes will not open, error message 13014, help!

    My itunes will not open on my Macbook Pro, everytime I try it says error message 13014, what does this mean? Thank you!

  • WHERE DID MY SCAN GO?

    Hi All -  I scanned a TON of documents to my mac today and I can't find any of them. They were scanned from the HP Officejet 4632 through Preview. I watched as all documents came up as they were being scanned. Before each scan, I placed them into a d

  • 26 inch display

    ive got a 26inch widescreen display which im trying to plug into my mew macbook. however, the screen recamends a resolution of 1920 X 1600. my macbook wont let me select this resolution for some reason. i'm sure there must be a way however as apple o

  • Missing photos/previews following system crash

    Following a system freeze-up (happened while browsing with Safari) with Aperture 3.5.1 open and a forced shut-down, my Aperture library got messed up. Aperture suggested to rebuild the database and I did. After two or three rebuilds (all by Aperture'

  • Challenge for TuringPest

    TuringPest, are you out there? I'd like to challenge you to creating a simple app that uses absolute positioning (your app) vs. layout managers (my app). You game? /Pete