ClassCastException - want using JXPATH

Hi there,
i've libraries i want to use which are using jxpath; the default oracle xml parser doesn't recognize the
InputStream is =
ServiceLocator.instance().getResourceLoader().getResourceAsStream(
configFile);
Reader reader = new InputStreamReader(is);
Document doc = DOMHelpers.instance().newDocument(reader);
Node root = doc.getFirstChild();
--> For unknown reasons i get NULL! for following:
final String jcdAlias =
DOMHelpers.instance().selectSingleValue(
root, "param[@name='jcdAlias']/@value");
--> DOMHelpers:
public Node selectSingleNode(Node aNode, String aXPathExpression) {
Object obj = this.selectSingleObject(aNode, aXPathExpression);
if ((obj != null) && !(obj instanceof Node)) {
LOGGER.warn(
MessageFormat.format(
"Keine Node Instanz {0}, {1}",
new Object[] {obj.getClass(), obj}));
return null;
return (Node)obj;
public String selectSingleValue(Node aNode, String aXPathExpression) {
Object val = this.selectSingleObject(aNode, aXPathExpression);
if (val == null) {
return null;
return extractText(val);
In TOMCAT 5.0x this works fine with JXPATH.
I've configurated the orion-web.xml with following values:
<classpath
path="../../../applications/isgsn/my_Server/WEB-INF/classes"
/>
<classpath
path="../../../applications/isgsn/my_Server/WEB-INF/lib"
/>
in /classes i've the commons-jxpath.jar...
or
<web-app-class-loader search-local-classes-first="true" />
both results in:
Caused by: java.lang.ClassCastException
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at de.x.helpers.DOMHelpers.<init>(Unknown Source)
-->
* standard constructor (private; Singleton)
private DOMHelpers() {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
does anyone has suggestions? i'm very tired searching for classpath settings :(
thanks.

thanx mate for the reply,
i am sure that i am storing the same object in the vector.
first of all I tried the same code by writing small class same as yours & it worked fine so i implemented in my real implementation class. But it still gives me classCastException i am not able to understand it why???? Actually my Product class is a stateless session bean(hope u know EJB)
so actually i am storing a remote reference i.e(product)in my vector.But i dont think this should be a problem...
please help....
regards,
ashish

Similar Messages

  • How to get rid of port number when you want use SJSAS as your production we

    Hi my question is rather simple. If I want use my computer as the web server backed by Sun Java System Application Server suite installed on the same machine, how can other internet users access my set domain without knowing my host port # (not typing :8080 after IP address)?
    thanks

    Tomcat is a webserver/servlet container combination. In that case, you make me wonder what you need the app server for.
    Anyway, the answer remains the same: read the manual or ask the support. There's a Sun App Server forum here.
    http://forum.sun.com/jive/category.jspa?categoryID=10 - but you''ll have to configure Tomcat.

  • Who knows how to output some text once labview detects something I want using pattern matching(V​ision assistant)​?

    who knows how to output some text once labview detects something I want using pattern matching(Vision assistant)?
    The text is something like"Yes, this is a coin"
    Thanks!

    I attached a SubVI which I used to place an overlay next to a Pattern, found by a Pattern Match before:
    As you can see, you simply pass the image reference and the Array of Matches to the VI along with the String you want to have as an overlay next to the Match.
    I also modified your VI a bit, but didn't test it. I created an Array of clusters, each elment containing the template path along with the respective text.
    Please note that this is just a hint!
    Christian
    Attachments:
    suggestion.vi ‏146 KB
    Overlay_Txt.vi ‏24 KB

  • I want use 0SEM_BCS_10  info cube for our BCS in BI.

    Hi ,
    I want use 0SEM_BCS_10  info cube for our BCS in BI. We have an R/3 ECC 6.0 with Appl Support Patch 15.
    We have not implemented the NEW GL functionality in OUR R/3 system. We have done only Technicahal Upgradation fron 4.7 to ECC 6.0 last year.
    My question is, that can i Use this '0SEM_BCS_10'  infocube . If yes that, please povide some details
    Regards,
    Nilesh Labde

    Hi Nitesh,
    Before using Cubes for BCS, Please go through this url
    http://help.sap.com/saphelp_sem60/helpdata/en/a8/b3d63bc4a69574e10000000a11402f/frameset.htm

  • I want use tally accounting software in mac book pro

    i want use tally accounting software in mac book pro

    What is your Mac OS X version in Apple menu -> About This Mac?
    If it is 10.7 or later, search http://www.roaringapps.com/ for solutions that match your operating system.
    If it is 10.6 to 10.6.8, see this http://snowleopard.wikidot.com/
    Earlier versions of Mac OS X are harder to find software for:
    If you aren't running at least 10.6.8, you pretty much have the same compatibility as any 10.4.4 through 10.6.7 system, and can upgrade for limited cost if any:
    https://discussions.apple.com/docs/DOC-2455
    Beyond 10.7 it gets complicated:
    https://discussions.apple.com/docs/DOC-6271

  • I want use I_callback_pf_status_set parameter in REUSE_ALV_LIST_DISPLAY.

    i want use I_callback_pf_status_set parameter in REUSE_ALV_LIST_DISPLAY. how can i use it? can any one can give me one simple example.

    Hi,
    Have a look on the following
    TYPE-POOLS: SLIS.
    TYPES: BEGIN OF I_MARA,
           MATNR LIKE MARA-MATNR,
           MTART LIKE MARA-MTART,
           MEINS LIKE MARA-MEINS,
           GROES LIKE MARA-GROES,
           VOLUM LIKE MARA-VOLUM,
           END OF I_MARA.
    DATA: IT_MARA TYPE STANDARD TABLE OF I_MARA INITIAL SIZE 0.
    DATA: FLDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REPID TYPE SY-REPID,
          GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
    START-OF-SELECTION.
    PERFORM DATA_RETRIEVAL.
    PERFORM BLD_FLDCAT.
    PERFORM BLD_LAYOUT.
    PERFORM DISPLAY_ALV_REPORT.
    FORM BLD_FLDCAT.
    FLDCAT-FIELDNAME = 'MATNR'.
    FLDCAT-SELTEXT_M = 'MATERIAL NUMBER'.
    FLDCAT-COL_POS = 0.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'MTART'.
    FLDCAT-SELTEXT_M = 'MATERIAL TYPE'.
    FLDCAT-COL_POS = 1.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'MEINS'.
    FLDCAT-SELTEXT_M = 'UNIT OF MEASURE'.
    FLDCAT-COL_POS = 2.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'GROES'.
    FLDCAT-SELTEXT_M = 'SIZE'.
    FLDCAT-COL_POS = 3.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'VOLUM'.
    FLDCAT-SELTEXT_M = 'VOLUME'.
    FLDCAT-COL_POS = 4.
    APPEND FLDCAT TO FLDCAT.
    CLEAR FLDCAT.
    ENDFORM.
    FORM BLD_LAYOUT.
    GD_LAYOUT-NO_INPUT = 'X'.
    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    GD_LAYOUT-ZEBRA = 'X'.
    GD_LAYOUT-WINDOW_TITLEBAR = 'GRID DISPLAY'.
    ENDFORM.
    FORM DISPLAY_ALV_REPORT.
    REPID = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = REPID
       I_CALLBACK_PF_STATUS_SET          = 'STANDARD'
       I_CALLBACK_USER_COMMAND           = 'USER-COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       IS_LAYOUT                         = GD_LAYOUT
       IT_FIELDCAT                       = FLDCAT[]
       I_SAVE                            = 'X'
      TABLES
        T_OUTTAB                          = IT_MARA
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    FORM DATA_RETRIEVAL.
    SELECT MATNR MTART MEINS GROES VOLUM
    INTO TABLE IT_MARA FROM MARA
    UP TO 40 ROWS.
    ENDFORM.
    FORM TOP_OF_PAGE.
    DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
          WA_HEADER TYPE SLIS_LISTHEADER.
    WA_HEADER-TYP = 'H'.
    WA_HEADER-INFO = 'THIS IS MY FIRST ALV'.
    APPEND WA_HEADER TO T_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-INFO = 'THIS IS SECOND'.
    APPEND WA_HEADER TO T_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = T_HEADER
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    FORM STANDARD USING EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'STANDA02' EXCLUDING EXTAB.
    ENDFORM.
    FORM USER-COMMAND USING R_COMM TYPE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_COMM.
      WHEN 'F3'.
        LEAVE PROGRAM.
    ENDCASE.
    ENDFORM.
    Double click on “STANDA02”, it opens new screen(menu painter),there u can add menu bars, application tool bars etc.
    Reward,if useful.
    Thanks,
    Chandu

  • I buy my iphone 5 in uae but i live in other country i want use a facetime how can add this feature to my iphone 5 please help me

    i buy my iphone 5 in uae but i live in other country i want use a facetime how can add this feature to my iphone 5 please help me

    If you wanted FaceTime, you should not have purchased your phone in the UAE. There is no way to add it back to your phone, as it has been permanently removed.

  • I want use my iphone4s in india

    i want use my iphone4s in india
    <Personal Information Edited by Host>

    Nobody here can help you on a user to user forum and don't post personal information either.
    You need to contact your phone compnay/carrier with regard to this - they and only they can help you.

  • HT1476 hi.i have a iphone 4s.but i dont want use from my iphone a long time.if my phone off a long time,battry's phone will damege or not damege??give me solotion please! sorry for mistake in my english language thank you for support good luck

    hi.i have a iphone 4s.but i dont want use from my iphone a long time.if my phone off a long time,battry's phone will damege or not damege??give me solotion please!
    sorry for mistake in my english language
    thank you for support good luck

    Turn it off or leave it on... just do not use it.
    Sorry, I do not understand the question.  Seems pretty obvious, if you do not want to use it, do not use it.
    In the future, ask your questions in your native language.

  • HT1918 I want use only free applications, and I have not credit card, how I can install free apps?

    I want use only free applications, and I have not credit card, how I can install free apps?

    Hello Azim5s,
    Indeed, this can be done by setting your account up and choosing 'None' when prompted for billing information.
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/HT2534
    Cheers,
    Allen

  • I want to change the cantry because I used us voucher and now the remanding only 0.05 and now I want use my Saudi credit card but give massage I have to finish the balance and nothing I can by by this amount I need to remove the balance to change the city

    I want to change the cantry because I used us voucher and now the remanding only 0.05 and now I want use my Saudi credit card but give massage I have to finish the balance and nothing I can by by this amount I need to remove the balance to change the city

    Click here and ask the iTunes Store staff to zero your account balance.
    (105215)

  • Touch ID : i want use Touch ID lock screen ?

    Touch ID : i want use Touch ID ,lock screen , APP STORE < NO NEED ENTRY PASSWORD !

    Anas76 wrote:
    Touch ID : i want use Touch ID ,lock screen , APP STORE < NO NEED ENTRY PASSWORD !
    What problems are you having when you try?

  • I gave an iphone 4S to my wife and i want use her old iphone 4, but her iphone 4 has her ID Aplle. How do I change it?

    I gave an iphone 4S to my wife and i want use her old iphone 4, but her iphone 4 has her ID Aplle. How do I change it?

    Setting | Store
    Scroll down and you will see her id.  Tap her id and sign out.  Then sign in with our id.

  • I have appele iphone 4s wid 3 sweden contract i want use in uk with uk sim card

    hi
    hi coming from sweden in uk i bought iphone 4s wid sweden 3 provider and want use with uk sim

    Contact 3 in Sweden and ask if they offer unlocking

  • ีืdelete Apple ID old on i-phone IMEI ************* I don't know old ID I want use iphone, ีืdelete Apple ID old on i-phone IMEI ********** I don't know old ID I want use iphone

    ีืdelete Apple ID old on i-phone IMEI **********  .  I don't know old ID I want use iphone, ีื
    <Edited by Host>

    You won't be able to use it unless you can get the old owner to remove the device from his account. This is Activation Lock and there is no way around it. Apple will not help.
    Activation Lock

Maybe you are looking for

  • IMessage problem. Help

    I have an issue with the iMessage application on my MacBook Air. Since few weeks ago I have been able to receive few messages but I'am unable to respond or send messages. Everytime I try an exclamation mark appears I've tried to initialize the operat

  • Show Thumbnail of all files in a folder and its subfolders

    Hi Guys, I want to set the Filter Panel (Adobe Bridge CS3) to "show all items in this folder and all its subfolders" through Java script on windows. From UI it is possible by clicking on icon buton present in the filter panel and content panel shows

  • Photoshop CS6 Help Required -  Whites are slightly cream

    This is the first time I have posted a question on this forum.  If I am in the wrong place please accept my apoligies. Thanks. I have a problem which I have spent days and days trying to solve but without success, I sincerely hope someone can help me

  • Help getting XBox 360 working with X

    Alright, you'll have to excuse me, I'm a computer pro, but a complete newbie when it comes to consoles. I had a really crummy TV when I got my 360, so I decided to instead hook it up to my monitor (24" widescreen LCD) and figured I'd use my X-Fi Fata

  • Insert records into an Access

    I am trying to insert records into an Access document but when trying to execute the action page I get the following: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few pa