Why a method can not be invoked in JSP ???

I define a method in a JAVA Class file,as this:
public Enumeration getElementsNamed(String name, String parentname) {
Element elem = doc.getDocumentElement();
NodeList nodes = elem.getElementsByTagName(name);
int size = nodes.getLength();
Vector elemVec = new Vector(size);
for (int i = 0; i < size; i++) {
Node node = nodes.item(i);
     if (nodes     .item(i).getParentNode().getLocalName().equals(parentname)) {
          elemVec.addElement(new UddiObject((Element) node));
          return elemVec.elements();
I want to get a Element who's Localname is the name and his parent Element's laocalname is the parentname from a DOM tree.
This can be run well in a normal Java environment just as JDK1.4.
and is a JSP file,I import the Class first.
and invkoed the method in somewhere, the TOMCAT give me an error:
The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException     
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
the JSP file is :
<%@ page import="java.util.*,org.w3c.dom.*, edu.hunnu.uddi.*, java.sql.*,java.io.*,edu.hunnu.uddiserver.util.*,edu.hunnu.uddiserver.inquiry.*" %>
<h1>Get tModel</h1>
<%
     Connection con = SqlConnection.getConnection();
String Description="";
     String detail ="<get_tModelDetail generic=\"2.0\" xmlns=\"urn:uddi-org:api_v2\"><tModelKey>"+tModelKey+"</tModelKey></get_tModelDetail>";
     ByteArrayInputStream bas = new ByteArrayInputStream(detail.getBytes());
     TModelDetails tmodelDetails = new TModelDetails( new Get_TModelDetail(bas), con);
UddiObject obj=tmodelDetails.getData();
     obj=obj.getElement(UddiTags.TMODEL);
     Description=Description+((TModel)obj).getDescription();
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          Error at this
          %>
<%%>
WHY??? and HOW????

oh~It is my mistake.
and the JSP file would be:
<%@ page import="java.util.*,org.w3c.dom.*, edu.hunnu.uddi.*, java.sql.*,java.io.*,edu.hunnu.uddiserver.util.*,edu.hunnu.uddiserver.inquiry.*" %>
<h1>Get tModel</h1>
<%
     Connection con = SqlConnection.getConnection();
String Description="";
     String detail ="<get_tModelDetail generic=\"2.0\" xmlns=\"urn:uddi-org:api_v2\"><tModelKey>"+tModelKey+"</tModelKey></get_tModelDetail>";
     ByteArrayInputStream bas = new ByteArrayInputStream(detail.getBytes());
     TModelDetails tmodelDetails = new TModelDetails( new Get_TModelDetail(bas), con);
UddiObject obj=tmodelDetails.getData();
     obj=obj.getElement(UddiTags.TMODEL);
     Enumeration enum=obj.getElementsNamed("description","tModel");
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          Error at this
          %>
and the variable "obj" :
<tModel operator="www.hunnu.edu.cn"tModelKey="uuid:50C693A0-7AB8-11D5-93A0-CFE2D4CCB519"><name>simple.services</name><description>This is a basic tModel for service providers and consultant</description><overviewDoc><overviewURL>http://www.hunnu.edu.cn</overviewURL><description>Service documentation can be obtainedfrom the URL provided</description></overviewDoc><identifierBag/><categoryBag/></tModel>

Similar Messages

  • Why my method can not receive the string from JNI

    JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack
    (JNIEnv *env, jobject obj, jstring wavfile)
    const char* filename = env->GetStringUTFChars(wavfile,0);
    BeatTrack(filename);
    env->ReleaseStringUTFChars(wavfile,filename);
    return NULL;
    }for my BeatTrack method, I just need the filename, then it can run, if I comment the BeatTrack(filename);, then no problem, for the java calling, of course, my BeatTrack(const *char filename) has no problem, cause I have test it,,
    but I call this method in java, the error is as follows,
    Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86) # Problematic frame: # C [beattrack.dll+0x130b] # # An error report file with more information is saved as: # D:\programs\playAudio\hs_err_pid11684.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. any idea??

    1) What class is "missing?"
    2) Where is it?

  • Why the ejb can not pass the complie?

    I just use the work shop to create a simple ejb(SampleEJB.ejb) like:
    package SampleEJB;
    import javax.ejb.*;
    import weblogic.ejb.*;
    * @ejbgen:session
    * ejb-name = "Sample"
    * @ejbgen:jndi-name
    * remote = "ejb.SampleRemoteHome"
    * @ejbgen:file-generation remote-class = "true" remote-class-name = "Sample"
    remote-home = "true" remote-home-name = "SampleHome" local-class = "false" local-class-name
    = "SampleLocal" local-home = "false" local-home-name = "SampleLocalHome"
    public class SampleEJB
    extends GenericSessionBean
    implements SessionBean
    public void ejbCreate() {
    // Your code here
    * @ejbgen:remote-method
    public void Hello(){
              System.out.println("Hello");
    * @ejbgen:remote-method
    public void Hello2(){
              System.out.println("Hello2");
    but when i build it. The compiler give me error:
    ¾¯¸æ: SampleEJB.java:14: ÕÒ²»µ½ JNDI Ãû³Æ¡£
    [Info:] Creating D:\DOCUME~1\Yong\LOCALS~1\Temp\/wlw_SampleEJB_build\SampleEJB\SampleHome.java
    [Info:] Creating D:\DOCUME~1\Yong\LOCALS~1\Temp\/wlw_SampleEJB_build\SampleEJB\Sample.java
    [Info:] Creating D:\DOCUME~1\Yong\LOCALS~1\Temp\/wlw_SampleEJB_build\META-INF\ejb-jar.xml
    [Info:] null [Bean] MAKE CLASS NAME G:SampleHome P:SampleEJB N:SampleHome
    [Info:] null [Bean] MAKE CLASS NAME G:Sample P:SampleEJB N:Sample
    [Info:] Creating D:\DOCUME~1\Yong\LOCALS~1\Temp\/wlw_SampleEJB_build\META-INF\weblogic-ejb-jar.xml
    [Info:] Creating D:\DOCUME~1\Yong\LOCALS~1\Temp\/wlw_SampleEJB_build\ejbgen-build.xml
    SourceLoader roots: 10
    post-ejbgen:
    ¾¯¸æ: EJBGen ok. Compiling...
    Compiling 3 source files to D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build
    ¾¯¸æ: All files compiled. Running ejbc...
    <2004-5-3 ÏÂÎç16ʱ20·Ö17Ãë CST> <Warning> <EJB> <BEA-010212> <The EJB 'Sample(Jar:
    D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build)' contains at least one method
    without an explicit transaction attribute setting. The default transaction attribute
    of Supports will be used for the following methods: remote[Hello2(), Hello()]
    >
    SourceLoader roots: 60
    D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build\SampleEJB\Sample_vngkt3_HomeImpl.java:13:
    cannot resolve symbol
    symbol : class SampleHome
    location: class SampleEJB.SampleEJB
    implements SampleEJB.SampleHome, weblogic.utils.PlatformConstants
    ^
    D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build\SampleEJB\Sample_vngkt3_HomeImpl.java:69:
    cannot resolve symbol
    symbol : class Sample
    location: class SampleEJB.SampleEJB
    public SampleEJB.Sample create ()
    ^
    D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build\SampleEJB\Sample_vngkt3_EOImpl.java:15:
    cannot resolve symbol
    symbol : class Sample
    location: class SampleEJB.SampleEJB
    implements SampleEJB.Sample, weblogic.utils.PlatformConstants
    ^
    D:\DOCUME~1\Yong\LOCALS~1\Temp\wlw_SampleEJB_build\SampleEJB\Sample_vngkt3_HomeImpl.java:73:
    cannot resolve symbol
    symbol : class Sample
    location: class SampleEJB.SampleEJB
    return (SampleEJB.Sample) super.create(md_ejbCreate);
    ^
    4 errors
    ´íÎó: ERROR: Error from ejbc: Compiler failed executable.exec
    ´íÎó: ERROR: ejbc couldn't invoke compiler
    BUILD FAILED
    ´íÎó: ERROR: Error from ejbc: Compiler failed executable.exec
    ´íÎó: ERROR: ejbc couldn't invoke compiler
    Why? who can give me a hand

    I met the same problem. I am a newbie, but why weblogic even can not build a simple startup ejb project?

  • IOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    iOS Cangjie input method can not be used. Original with Space Bar word selection function is invalid, as soon as possible to solve, it will affect the most users in Taiwan and Hong Kong.

    No PR1.2 Firmware update, No update for Nokia Messaging, No updates for Ovi Maps .... Why is the N900 the forgotten stepchild ?
    "PR1.2 is still being tested - http://twitter.com/luovanto/statuses/13087245356"
    Hong Kong Launch http://www.youtube.com/watch?v=pY8zCBzvQLo

  • Why my computer can not adjust the volume up and down althought i have had repair once time in a near day . i must waitting for 15days now it's continue

    why my computer can not adjust the volume up and down althought i have had repair once time in a near day . i must waitting for 15days now it's continue

    1. Remove the headphone.
        If you see red light in the headphone port, plug the headphone
        in and out of the port 5 or 6 times to flip the microswitch inside.
        Sound output may be stuck in the digital mode.
    2. Reset PRAM.  http://support.apple.com/kb/PH4405
    3. Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:
        "Resetting SMC on portables with a battery you should not remove on your own".

  • HT4623 why my ipphone can not be activated when I updated to IS06? My iphone is 3gs and original locked but now it's offical unlocked before i updated to ISO6

    why my iphone can not be activated when I updated to IS06?
    My iphone is 3gs 8g, and original locked but now it's offical unlocked before i updated to ISO6.
    iphone information:
    iphone 3gs
    Model:MC640LL
    SN:84xxxxEDG
    <Edited By Host>

    That means your phone is now a brick. Congratulations.
    That's a risk you take when you decide to hack the phone.
    You can't get any help here. Discussing hacked and jailbroken devices is forbidden by the terms of service.
    Maybe you can find something on google that will help you.

  • Why my spotlight can not find my personal files ? It can find them before but can not find them now,I want to know why?

    why my spotlight can not find my personal files ? It can find them before but can not find them now,I want to know why?

    From the menu bar, select
     ▹ System Preferences ▹ Spotlight ▹ Privacy
    The list of items excluded from Spotlight indexing is shown (it may be empty.) Click the plus (“+”) icon to add an item to the list. Select your boot volume (under DEVICES) and add it to the list. Then remove it from the list by selecting it and clicking the minus (“-“) icon.
    Spotlight will rebuild the index. If you try to do a Spotlight search now from the magnifying-glass icon in the top right corner of the display, a pulsing dot will appear in the icon. When the dot disappears, the indexing is complete.

  • Why my firmware can not be upgraded?

    Why my firmware can not be upgraded? Do any one encounter the same problem? How can i fix It!!

    Hi BigFatCatMan,
    sorry I missed your earlier response.
    Assuming that you have tried downloading a "fresh" copy of the appropriate firmware update from http://www.apple.com/support/downloads/ and it still doesn't work, you might want to consider the firmware restoration CD process discussed at http://docs.info.apple.com/article.html?artnum=303469 and available through http://www.apple.com/support/downloads/firmwarerestorationcd13.html or http://www.apple.com/support/downloads/firmwarerestorationcd14.html (depending on precisely which MBP you have).
    Messing with firmware is always a tad risky, though, so that visit to a Genius bar might be worth trying, given the repeated anomaly.
    Rod
    Message was edited by: Rod Hagen

  • Why do I can not hear the siri's voice on my iphone speaker anymore, why do I can not hear the siri's voice on my iphone speaker anymore

    why do I can not hear the siri's voice on my iphone speaker anymore, why do I can not hear the siri's voice on my iphone speaker anymore

    All apps - all paid and free apps include DRM protection that is tied to the iTunes that was used to download the apps. This means you have apps on your iPhone that were downloaded with your daughter's iTunes account. Apps cannot be transferred or merged with another iTunes account.
    Delete the apps from your iPhone that were downloaded with your daughter's iTunes account to prevent being prompted for the account's password when there are app updates for the apps downloaded with the account. An iTunes account cannot be deleted.

  • Why my ipad can not update the ios7.1.1

    why my ipad can not update the ios 7.1.1

    Hello there, crivera350.
    The following Knowledge Base article offers up some great steps for if you are unable to update your iOS device:
    If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808
    Recovery mode erases your device and restores it, which should resolve the issue. If you previously synced with iTunes or iCloud, you may be able to restore from your backup after recovery.
    Turn off your device. If you can't turn it off, press and hold the Sleep/Wake and Home buttons at the same time and wait a few seconds for it to turn off.
    Plug the device's USB cable into your computer only.
    Hold down the device's Home button as you connect the USB cable to it.
    When you see the Connect to iTunes screen, release the Home button. If you don't see this screen, try steps 1 through 3 one more time.
    iTunes should open and display a message such as: "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes."
    Use iTunes to restore your device.
    If you don't see your device in iTunes, follow these steps for Mac or these for Windows.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I do not know why, but I can not go to the App Store! before I went there without any problems but now I can not connect with App Store

    I do not know why, but I can not go to the App Store! before I went there without any problems but now I can not connect with App Store

    Open the Finder. From the Finder menu bar click Finder > Go > Go to Folder
    Type or copy/paste:   ~/Library/Cookies
    Click Go then move the com.apple.appstore.plist file from the Cookies folder to the Trash.
    Try the App Store.

  • Why att store can not help for unlocking the phone

    I followed the instructions to unlock our two old iphones after having iPhone 6. I received "unlock" message for one phone and did not receive the message for other phone. I am not sure if the phone has been unlocked. I went to AT&T store at Bridgewater Commons, NJ. and like to know if it Is unlocked. I was told that they can not tell and I need go to T mobile store to find out. I stopped by T mobile and found out the phone is still locked. So I went back to the AT&T store to try getting help. Because I already tried to unlock this phone three times before. There were 10 ATT people in the store and only two or three customers there. I asked one of employees to tell me what I need to do. I was told that they do not have the service to help unlocking and I need to call customer service. I said to her that you have 10 employees here and why can not help, I would like to speak to the store manager. The store manager Dawn was there and she told me the same thing. They can not help and I need to call the customer service. I kept asking but why you can not help. Finally she said that she can help me to call the customer. She called and the phone was not go through. Finally the employee asked me the phone number and I thought that maybe she will help me to unlock. Actually she just made another unlock request online for me and I need to wait the email in 24 hours and redo the unlock process later. I would to know why att store can not help the customers to unlock their old phones after getting the new phones. Why att keeps 10 employees in one store and can not help to solve customer problems.

    Xiyufu wrote:
    ... I would to know why att store can not help the customers to unlock their old phones after getting the new phones. Why att keeps 10 employees in one store and can not help to solve customer problems.
    AT&T keeps 10 employees at a store in case they need them to assist customers with purchasing items, or with items recently purchased.
    The Store representatives can't help you with the unlock portion because it requires access to systems they are not authorized to access. If store employees could access the unlock system (other than the very same portal you can access) then there would be a high risk that there would be inapropriate unlocks by employees for their friends & relatives.  AT&T's solution is to not allow them access to those systems, and have everyone go through the same process so that everyone gets the same treatment.  If you are having problems with your unlock requests through the portal, try contacting customer support or you can send a private message to the escalation team at ATT Customer Care and someone will get in touch with you in two to three business days to help you get a resolution to your problems.
    To check for their reply, click the little blue envelope. in the top bar near your username.

  • Why db mirror can not set db recovery model to simple?

    Hi ,All
    I have a question . 
    DB replication can set db recovery model to simple ,why db mirror can not  db recovery model to simple.
    DB mirror must be set to full recovery model.
    As far as I know, whatever db mirror  and db replication ,there is a log reader to read the log in the ldf file
    DB mirror and DB replication are almost the same principle to replicate the db to another db server
    Thanks a lots
    Love SQL

    Database mirroring involves redoing every
    insert, update, and delete operation that occurs on the principal database onto the mirror database as quickly as possible. Redoing is accomplished by sending a stream of active transaction log records to the mirror server, which applies log records to the
    mirror database, in sequence, as quickly as possible. Unlike replication, which works at the logical level, database mirroring works at the level of the physical log record.
    There is no log reader agent in case of mirroring its more internal. Mirroring
    uses the transaction log to redo everything at the mirror site.  In simple recovery model, the transaction log is effectively transitory and only enough information is kept in the log for undo/redo to keep the database consistent during
    crash recovery. Thats why mirroring does not work in simple recovery model.

  • Why some items can not change issue method in Production Order?

    Hi,
    I have a Production Order which had been released.
    As some reason, I need to change issue method on some items in this Production Order, but I found that some items can be changed with a dropdown list, and some items can not be changed without dropdown list.
    Why they are different?
    What should I do to meet my users' request?
    Thanks.

    Hai wilson,
    sorry i visits forum after long time .. item category means , when create item group there are two option Service / Material if u select service , inventory come under that group only in "Back flush" other wise u can select "Manual / Back flush"
    Regards
    Janeesh

  • Why my function can not get proper varaible value

    Hi.
    I write a MXML file like this.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    invoke="setint()"
    creationComplete="getint()">
    <mx:Script>
    <![CDATA[
    import mx.utils.StringUtil;
    import mx.controls.Alert;
    public var number:int = 100;
    private function setint():void{
    number = 200;
    Alert.show("" + number);
    private function getint():void{
    Alert.show("" + number);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    I define a varaible in ActionScrip. one function is to set
    its value, another is to get its value. why function getint()
    always get value 100. this varaible can not be set. the two
    function are trigger in invoke event and creationComplete.

    "crystalChen" <[email protected]> wrote in
    message
    news:ghska7$31a$[email protected]..
    > Hi.
    > I write a MXML file like this.
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > invoke="setint()"
    > creationComplete="getint()">
    >
    > <mx:Script>
    > <![CDATA[
    > import mx.utils.StringUtil;
    > import mx.controls.Alert;
    >
    > public var number:int = 100;
    > private function setint():void{
    > number = 200;
    > Alert.show("" + number);
    > }
    >
    > private function getint():void{
    > Alert.show("" + number);
    > }
    > ]]>
    > </mx:Script>
    >
    > </mx:WindowedApplication>
    >
    > I define a varaible in ActionScrip. one function is to
    set its value,
    > another
    > is to get its value. why function getint() always get
    value 100. this
    > varaible
    > can not be set. the two function are trigger in invoke
    event and
    > creationComplete.
    Check out "Defining Public properties by using getter and
    setter methods"
    http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_3.html

Maybe you are looking for

  • Error in downloading \ installing Flash Player

    I have tried to install the new version five times this morning - all ending up in the same error. I reach the point where the installer says "Close Internet Explorer". When this is done it continues to give the same message and doesn't progress any

  • IDOC creation from a flat file

    We currently receive a large volume of invoices from freight companies that move our product from point A to B. I will receive a file from the vendor with 10 fields.  The fields are BOL, shipdate, shipfrom_pt, shipto_pt, volume, rate, surcharge, tota

  • Problem with children of HtmlDataTable

    Hi, I'm trying to highlight a row in a HtmlDataTable by clicking on it but ran into a confusing problem. I can access the table and when I fetch the children I get as many as the table has columns, so far so good. But when accessing the children (or

  • Problem in Tabstrip Control

    Hi All, i had created an Custom Infotype. In that infotype i had created Tabstrip control with 2tabs. Each Tab contain 4 fields. When creating( F5) a record in transaction PA30, it allowing me create a record and the record is available in Data base

  • Flash Media Live Encoder won't connect to server

    I am trying to configure Flash Media Live Encoder 3.2. I followed the instructions provided by the chatroom I am working for, and it seems to be working until I press the "Start" button on the bottom. When I do that, I get an error message that says