JAX-WS mapping one servlet to multiple URLs

Hi. I have a JAX WS web service define like this:
package yohoo;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class Foo
  @WebMethod
  public String doSomething()
    return "done";
}And I attempted to map the web service multiple time on web.xml:
<servlet>
  <servlet-name>FooWS</servlet-name>
  <servlet-class>yohoo.Foo</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>FooWS</servlet-name>
  <url-pattern>/one/FooWS</url-pattern>
</servlet-mapping>
<servlet-mapping>
  <servlet-name>FooWS</servlet-name>
  <url-pattern>/two/FooWS</url-pattern>
</servlet-mapping>However when I tried to request the WSDL via the second mapping I got an exception (JBoss 7). Is this a feature that should be supported or am I doing something totally wrong?
javax.servlet.ServletException: Cannot obtain destination for: /TestWS/two/FooWS
     org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:164)
     org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:81)
     org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
     org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
     org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
     org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:113)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
     org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
     org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

Just to close the loop on this (and for the next person trying to figure out how to do it), I was able to [extend X509KeyManager as described in Alexandre Saudate's blog|http://alesaudate.com/2010/08/09/how-to-dynamically-select-a-certificate-alias-when-invoking-web-services/] . I was then able to set the com.sun.xml.ws.developer.JAXWSProperties.SSL_SOCKET_FACTORY on my JAX-WS request context to use my custom SSLSocketFactory, and it works like a charm!
Thanks,
Bill

Similar Messages

  • How to use one PSE with multiple URLs?

    I need to hit my DMZ SAP Web Dispatcher with multiple unique URLs.  I am starting off using webdisp1.abc.com and webdisp2.vde.com.  DNS will resolve both the Web Dispatcher Host.  Following Tobias Winterhalter's Blog: Name-based virtual hosts and one SAP Web Dispatcher to access multiple SAP systems.
    My question is how do I go about generating the pse so I can store both webdisp1.abc.com and webdisp2.vde.com?  Do I just import the first request and initiate another certificate request using the same pse?
    Example
    sapgenpse gen_pse -s 2048 -p D:\<file path>\SAPSSLS.pse -r D:\<file path>\webdisp1.req CN=webdisp1.abc.com, OU=IT, O=XYZ Inc., C=US
    Cheers,
    Dan Mead

    Hi Daniel,
    what you are looking for are so called SAN certificates. As Martin said, with sapgenpse you are pretty out of luck. However you can create the certificates using openssl and then use sapgenpse to import them into a pse. There are a number of guides on how to create SAN certificates on the web, like the one mentioned by Martin from CAcert (which is one of the best imho) or this one. And there are also guides on the internet on how to convert OpenSSL keys to PSE.
    You should however keep in mind, that SAN certificates are more expensive than standard certificates. Therefor they only pay if the hostnames in there are stable for the lifetime of the certificate. If the hostnames need to change once a year, you already will be better off (from a cost perspective) by creating one pse per hostname an let the webdispatcher listen to different addresses, as each hostname requires a new certificate signed by the CA.
    Please also make sure, the systems and browsers connecting to your webservers are able to understand SAN certificates. For SAP systems this requires at least pl24 of the sapcryptolib.
    Kind regards,
    Patrick

  • How to Map one key to multiple values

    Hello Everyone
    Let's say I have a System. to access this system, one needs a username and a password. Now i have a Hashtable that maps passwords to their usernames. Now what if i want to store the Firstname and lastname of the person, in case he/she forgets the password or username? Is there a way to associate a key (Password) to multiple values(username, password, lastname)? if so, can you show me how to go about it?
    Edited by: Tonata on Apr 27, 2009 8:09 AM

    M.Murat wrote:
    Hello
    My suggestion is that you can create a map in which value is a list(for example Arraylist).
    You can store the items in that list and match that list to proper key.
    M.MuratCode smell: Object Denial+_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • One portal instance - multiple URLs & Pages

    I have created multiple portal_home pages on one portal instance and would
    like to redirect calls from two different URLs to specific Portal_home
    pages. For example, when the user types in http://foo.us.oracle.com they
    are redirected to http://foo2.us.oracle.com/pls/portal30/url/page/page1
    and those who type http://foo2.us.oracle.com are redirected to
    http://foo2.us.oracle.com/pls/portal30/url/page/page2. How can this be
    done?
    Thank You,
    Justin
    null

    There are procedures on the configuration guide under virtual
    hosts Chapter 5 in manual a90096-01. The manual is on the
    document site.

  • How to map one element to multiple target nodes? Kindly help!

    Hi Experts,
       I have a source XML:
       <Inventory>
             <MaterialNo>Z001</MaterialNo>
             <InventoryLineItem>
               <BatchNo>B001</BatchNo>
               <Quantity>100</Quantity>
             </InventoryLineItem>
             <InventoryLineItem>
               <BatchNo>B002</BatchNo>
               <Quantity>120</Quantity>
             </InventoryLineItem>
             <InventoryLineItem>
               <BatchNo>B003</BatchNo>
               <Quantity>50</Quantity>
             </InventoryLineItem>
       </Inventory>
    I want the target output as: This is a RFC function module which has an internal table ITAB_STOCK as the input parameter.
       YGET_STOCK
           ITAB_STOCK
             Item
                 MM - Z001
                 Batch - B001
                 Qty - 100
             Item
                 MM - Z001
                 Batch - B002
                 Qty - 120
             Item
                 MM - Z001
                 Batch - B003
                 Qty - 50
       What I am getting is:
            YGET_STOCK
           ITAB_STOCK
             Item
                 MM - Z001
                 Batch - B001
                 Qty - 100
             Item
                 Batch - B002
                 Qty - 120
             Item
                 Batch - B003
                 Qty - 50
          The MaterialNo (MM) is not coming in all the items. What could be the problem in my graphical mapping? How to achieve the expected target uisng graphical mapping?
          Kindly help!
    Thanks
    Gopal

    Hello,
      Just do the below mapping you will get it...
    Map InventoryLineItem to Item in your table.
    Then MaterialNo--->CopyValue---->MM
                                       [0]
    You will get it let me know if not.
    Regards,

  • How to map every  request url to one servlet

    HI experts,
    I have a requirement like below,
    i want to map every request to a uinque servlet.
    http://localhost/krish/images/kk,gif
    http://localhost/krish/images/rao,gif
    http://localhost/krish/images/hh,jpg
    http://localhost/krish/images/srn.txt
    http://localhost/krish/images/hel.wav
    etc.............the no requests unlimited.
    So if i write mapping in web.xml its hard to write hundreds of urls.
    so i need some other process to map all these urls to one servlet ( processrequest.java)
    which will process all those requests.
    How do i do it?
    thanks in advance

    use url-pattern as /images/* then it will call the same servlet for all URL like you mentioned

  • Repeating the servlet name in URL?

    Does anyone know why it is possible to call the servlet name multiple times in the url.
    example:
    mysite.com/servlet_dir/servlet_name/
    mysite.com/servlet_dir/servlet_name/servlet_name
    mysite.com/servlet_dir/servlet_name/servlet_name/servlet_name
    all of these go to the servlet_name. I don't want this to be able to occur. I only want the first one to to go to servlet_name. Could it be a web server issue? I am using the latest version of iplanet/sun ONE web server.

    To clarify anything and everything I might have posted:
    For the servlet and mapping defined below (jemcalil's servlet correctly defined) with no other servlets or servlet-mappings
    <servlet>    
        <servlet-name>myservlet</servlet-name>    
        <servlet-class>myservlet</servlet-class>
    </servlet>
    <servlet-mapping>    
        <servlet-name>myservlet</servlet-name>    
        <url-pattern>/myservlet</url-pattern>
    </servlet-mapping>/myservlet is mapped to the myservlet servlet
    /myservlet/ is directed to the default page in a directory on the root named myservlet
    /myservlet/anything_here is directed to the anything_here page/directory inside of the myservlet directory.
    aaj - everything you stated in your last post is correct, just not what jemcalil says is going on in his particular instance.
    jemcalil - if this is not what you experience in practice with your servlet engine either contact iplanet or wait for a post from someone with iplanet experience.
    JDB

  • How can I pass more than one parameters in PDK-URL services?

    Hi all,
    How can I pass more than one parameters in PDK-URL service? All samples on Portal Center shows just one parameter passing.
    <inputParameter class="oracle.portal.provider.v1.URLPortletParameter">
    <name>csz</name>
    <isMandatory>false</isMandatory>
    <displayName>What location do you want a map for (City, State or Zip)?</displayName>
    </inputParameter>
    How can I write the privider.xml file for passing multiple parameters?

    I answer to my question. I've got the answer.
    I repeatly write down the <inputParameter> tags, and it works.

  • ACE-Single VIP-Multiple URL-Multiple ServerFarm

    Hi Everyone,
    I am trying to put together a configuration that has multiple requirements that are all dependant so I wanted to post in a single discussion.  Please see the parameters below:
    1. ACE 4710 placed in DMZ in one-armed mode
    2. Use only 2 VIPS (1 for HTTP traffic and 1 HTTPS traffic)
    3. Multiple URLs for each VIP. Each URL makes use of sub-domains (ex. "subdomain1.domain.com" , "subdomain2.domain.com")
    4. Match on the hostheader and send to a corresponding serverfarm. (each URL has seperate serverfarm).
    5. SSL off-load. All Secure URL's share a single wild-card certificate.
    6. Any connections to Secure URL's that connect using HTTP need to be redirected to HTTPS and then load-balanced. I would like to have a single redirect serverfarm that will take the path and url that is sent,whichever that may be, and redirect it to HTTPS.
    So here are my questions:
    1. One of the URL's being matched is for Exchange 2010 (OWA and ActiveSync).  Since all services will be directed at the same serverfarm I believe that matching on the sub-domain (host header) will be sufficient for both services but I would like some confirmation.
    2. I would like to confirm that the composition of my class-maps and subsequent policy-maps will meet the requirements listed above.
    3. I would like any suggestions on how I may make this configuration more efficient.
    I have attached a scrubbed copy of my configuration, any suggestions would be greatly appreciated!!!

    Hi Michael,
    One of the URL's being matched is for Exchange 2010 (OWA and ActiveSync).  Since all services will be directed at the same serverfarm I believe that matching on the sub-domain (host header) will be sufficient for both services but I would like some confirmation
    The ACE performs regular expression matching against the received packet data and hence you can use a single expression like \.mvnu\.edu and that should match msmail\.mvnu\.edu", ihelp\.mvnu\.edu and ishare\.mvnu\.edu and since all of them need to go to same serverfarm there is no need to define three different server farms under policy map.
    2. I would like to confirm that the composition of my class-maps and subsequent policy-maps will meet the requirements listed above.
    The config looks fine but you can make it more stream line by using one regex which will match all host header information and since it needs to go one serverfarm only, it is not required to have three different server farms unless needed of course. Pardon if i haven't  understood your requirment correctly.
    3. I would like any suggestions on how I may make this configuration more efficient.
    It should be there in answer 1:)
    Please feel free to discuss if there is something which is not what you were looking for.
    Regards,
    Kanwal

  • Select One Choice-select multiple attributes into mutiple columns

    Select One Choice-select multiple attributes into mutiple columns does not work.
    read-only view object view1 - columns a, b, c
    updatable view object view2 - also columns a, b, c
    Select One choice has the capability to bind multiple columns to multiple columns. I understand how this wizard is to be used for these multiple mappings, i.e., view2.a mapped to view1.a, view2.b mapped to view1.b, etc., and using 'select multiple...' for the display attribute. When I complete the 'List Binding Editor" correctly, in this example, only column a will be updated. Columns b,c, etc. will not be effected.
    Has anyone solved this? Please do not reply telling me how to use the editor, I know how, it just is not working.
    Here is my jspx segment,
    <af:selectOneChoice value="#{bindings.Eis000tv1SlOffice.inputValue}"
    label="#{bindings.Eis000tv1SlOffice.label}">
    <f:selectItems value="#{bindings.Eis000tv1SlOffice.items}"/>
    Here is pageDef segment:
    <list id="Eis000tv1SlOffice" IterBinding="Eis000tv1Iterator"
    StaticList="false" ListOperMode="0" ListIter="OfficeSpaceV1Iterator"
    NullValueFlag="1" NullValueId="Eis000tv1SlOffice_null">
    <AttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="FloorArea"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListDisplayAttrNames>
    </list>
    Here is the iterator:

    can u set as specified here
    -Djps.app.credential.overwrite.allowed=true http://radalcove.com/blog/?p=34

  • File Mapping from Servlet to client

    Hi,
    I want help in Servlets....
    My problem is, i am having one servlet and one client(Html) and one imageFile. My servlet knows the filePath, now it has to process the filePath so that the imageFile is displayed in Html. Now, the issue is in servlet is there any other procedure other than streaming the file in to ServletoutputStream??? I know that the following code solves my problem,
    File f = new File("F:\\Images\\2\\3\\2004\\12282004\\08\\1.jpg");
    byte[] imageData = new byte[(int) f.length()];
    FileInputStream fis = new FileInputStream(f);
    fis.read(imageData);
    response.setContentType("image/jpeg");
    ServletOutputStream out = response.getOutputStream();
    out.write(imageData);
    But what I want to know is, instead of Streaming the file into byteArray and set into ServletOutputStream, is there any other alternative???
    Thanks in advance
    Regards,
    Rama Sarma Vemuri L S K
    Mobile: +91-9885584568

    Hi,
    If we stream and send, it ll be taking much time in case of bigger images. So, I am trying like this. What I do os, in my Img tag, i ll call servlet which fetches me the URL of image and I ll the display the same. This is what I want to achieve. Can you help me out???

  • Calling multiple URL in call browser

    hi
    i am having internal table having a multiple Url . each row consists of different URl.
    i am calling the call browser functional  module in Inside the Loop .
    what i am geting is , when the first record ( URL)  gets generated . it will call the Browser . sms sent and its not calling the second record even though its in loop.
    what has to do. any parallel processing / asynchronous processing posible

    I was browsing forums and your problem seem to be stuck in my brain. It keeps coming back again and again :-).
    Anyways, I find out that instead of using CALL_BROWSER, if you can use the execute method of cl_gui_frontend_services, it will work. Just pass internet explorer exe file path in 'APPLICATION' parameter and you url in 'PARAMETER' parameter.
    However there is one problem and that is how to get the filepath for internet explorer exe file. On most PCs it will be like C:\Program files\Internet Explorer\iexplore.exe' , so you can hare code this. OR you can read it from registry as per the following
    DATA: kstr TYPE string, vstr TYPE string,
          convstr TYPE string.
    kstr = 'SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command'.
    CALL METHOD cl_gui_frontend_services=>registry_get_value
      EXPORTING
        root                 = cl_gui_frontend_services=>hkey_local_machine
        key                  = kstr
      IMPORTING
        reg_value            = vstr
      EXCEPTIONS
        get_regvalue_failed  = 1
        cntl_error           = 2
        error_no_gui         = 3
        not_supported_by_gui = 4
        OTHERS               = 5 .
    IF sy-subrc <> 0.
      WRITE:/ 'registry read error subrc=', sy-subrc.
      EXIT.
    ELSE.
      TRANSLATE vstr USING '% 1 '.
      CONDENSE vstr.
    ENDIF.
    Once you have explorer file path in VSTR, can can call the execute method as following.
    Assumption: ITAB-STR is of type string and contains url like 'http://www'google.com' etc.
    LOOP AT itab.
      CALL METHOD cl_gui_frontend_services=>execute
        EXPORTING
           application            = vstr
           parameter              = itab-str
        EXCEPTIONS
          cntl_error             = 1
          error_no_gui           = 2
          bad_parameter          = 3
          file_not_found         = 4
          path_not_found         = 5
          file_extension_unknown = 6
          error_execute_failed   = 7
          synchronous_failed     = 8
          not_supported_by_gui   = 9
          OTHERS                 = 10 .
      IF sy-subrc <> 0.
        WRITE:/ 'Error in EXECUTE, subrc =', sy-subrc.
      ENDIF.
    ENDLOOP.

  • OR mapping one-to-many with the movie EJB application

    Hi,
    I have downloaded from Orion the Movie EJB application with
    OR mapping one-to-many.
    When I ran it, it's fine. But I have spurious messages on
    my OC4J LOG:
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    java.lang.Exception
    at MovieHome_EntityHomeWrapper53.getLazyInstance(MovieHome_EntityHomeWrapper53.java:219)
    at Movie_ORCollection29.getObjects(Movie_ORCollection29.java:43)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at java.util.ArrayList.<init>(ArrayList.java:125)
    at com.evermind.server.ejb.ORCollection.getReplacement(ORCollection.java:22)
    at Director_EntityBeanWrapper1.getMovies(Director_EntityBeanWrapper1.java:1318)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper53.getLazyInstance(MovieHome_EntityHomeWrapper53.java:219)
    at Movie_ORCollection29.getObjects(Movie_ORCollection29.java:43)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at java.util.ArrayList.<init>(ArrayList.java:125)
    at com.evermind.server.ejb.ORCollection.getReplacement(ORCollection.java:22)
    at Director_EntityBeanWrapper1.getMovies(Director_EntityBeanWrapper1.java:1318)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper28.getLazyInstance(DirectorHome_EntityHomeWrapper28.java:207)
    at Movie_EntityBeanWrapper3.loadState(Movie_EntityBeanWrapper3.java:1575)
    at Movie_EntityBeanWrapper3.getTitle(Movie_EntityBeanWrapper3.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper28.getLazyInstance(DirectorHome_EntityHomeWrapper28.java:207)
    at Movie_EntityBeanWrapper3.loadState(Movie_EntityBeanWrapper3.java:1575)
    at Movie_EntityBeanWrapper3.getTitle(Movie_EntityBeanWrapper3.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase.ear... done.
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase/MovieDatabaseWebClient.war... done.
    Auto-deploying MovieDatabaseBeans.jar (Class 'moviebeans.Actor' had been updated)... done.
    java.lang.Exception
    at ActorHome_EntityHomeWrapper9.getLazyInstance(ActorHome_EntityHomeWrapper9.java:207)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:49)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper57.getLazyInstance(MovieHome_EntityHomeWrapper57.java:219)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:69)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieActorJunctureHome_EntityHomeWrapper39.getLazyInstance(MovieActorJunctureHome_EntityHomeWrapper39.java:216)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:86)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at MovieHome_EntityHomeWrapper57.findExistingEntity(MovieHome_EntityHomeWrapper57.java:108)
    at MovieHome_EntityHomeWrapper57.activateEntity(MovieHome_EntityHomeWrapper57.java:157)
    at MovieHome_EntityHomeWrapper57.findByPrimaryKey(MovieHome_EntityHomeWrapper57.java:359)
    at MovieHome_EntityHomeWrapper57.getEJBObject(MovieHome_EntityHomeWrapper57.java:213)
    at com.evermind.server.ejb.EntityHandle.getEJBObject(EntityHandle.java:53)
    at com.evermind.server.ejb.EJBInputStream.resolveObject(EJBInputStream.java:41)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:405)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1148)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:380)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2268)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:525)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1417)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
    at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:346)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:1075)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at Movie_EntityBeanWrapper7.getTitle(Movie_EntityBeanWrapper7.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase.ear... done.
    java.lang.Exception
    at ActorHome_EntityHomeWrapper9.getLazyInstance(ActorHome_EntityHomeWrapper9.java:207)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:49)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper57.getLazyInstance(MovieHome_EntityHomeWrapper57.java:219)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:69)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieActorJunctureHome_EntityHomeWrapper39.getLazyInstance(MovieActorJunctureHome_EntityHomeWrapper39.java:216)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:86)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at MovieHome_EntityHomeWrapper57.findExistingEntity(MovieHome_EntityHomeWrapper57.java:108)
    at MovieHome_EntityHomeWrapper57.activateEntity(MovieHome_EntityHomeWrapper57.java:157)
    at MovieHome_EntityHomeWrapper57.findByPrimaryKey(MovieHome_EntityHomeWrapper57.java:359)
    at MovieHome_EntityHomeWrapper57.getEJBObject(MovieHome_EntityHomeWrapper57.java:213)
    at com.evermind.server.ejb.EntityHandle.getEJBObject(EntityHandle.java:53)
    at com.evermind.server.ejb.EJBInputStream.resolveObject(EJBInputStream.java:41)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:405)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1148)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:380)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2268)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:525)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1417)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
    at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:346)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:1075)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at Movie_EntityBeanWrapper7.getTitle(Movie_EntityBeanWrapper7.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)

    For EntityOne and EntityTwo you can just define a normal OneToMany mapping using the foreign key.
    Are you using JPA, or the TopLink API? JPA requires a mappedBy for the OneToMany, so this may be more difficult. You should be able to just add a JoinColumn on the OneToMany and make the column insertable/updateable=false.
    For the attachment, you could either map the foreign key as a Basic (DirectToFieldMapping) and maintain it in your model, or use a VariableOneToOne mapping in TopLink (this will require the entities share a common interface).
    James : http://www.eclipselink.org : http://en.wikibooks.org/wiki/Java_Persistence

  • Servlets handle multiple, concurrent requests

    Hi, folks. Could someone give me a basic idea of how Servlets handle multiple, concurrent requests which are sent from user's web browser, or possibly, point me some useful web links, tutorials. Let me take a example to make sure that i have explained the question clearly: let's say there is a website that does air ticket booking service. Suppose there is a spare seat exists for a particular flight. There are two users logon to the website and they are both looking for this particular seat. So, once these user's HTML form requests are sent to server, how do i implement my servlet to handle these requests properly, in another words, make sure this seat is only allowed booked by a single user. thanks in advance.

    This acturally raises me a another question which i
    still have some uncertainties. In another assignment i
    did last semester, that was we had multiple users
    using our database and accessing, retirving and
    updating database by using jdbc. And what i did was
    let every user call a particular method within a
    javabean for setting up database connection, then goes
    for the specific that needs to be dealt with. So, what
    i am wondering now is that can i possibly having a
    different approach, like setting up only a single
    connection(ie. a public Connection objec) which being
    exist all the time so that all request can get
    connection by calling this object's relevant method.
    Hope i explained it clearly.
    If I understand you correctly, then you would have to make the methods of this Connecting Object synchronized so that there was only ever one connection to the database at any one time.
    If a database is transactional, that means it has attempted to deal with the problem of multiple connections and statements being executed at the same time on the same data. If you have one single Connecting Object then you don't have to worry about transactions, but you do need to make sure that there aren't multiple threads running, each trying to use your Connecting Object.
    The synchronized keyword makes sure only one thread can use the synchronized method at any one time.

  • Removing "servlet" in the url

    Hi all
    I am developing a website using JSP/Servlet (Tomcat 4.0 + Oracle 8). I found whenever I need to access a servlet, I need to append "servlet" in the url. for example (my context in Tomcat is app/)
    http://localhost/app/servlet/Test
    So far I am using "servlet-mapping" for each servlet in web.xml.
         <servlet>
              <servlet-name>Test</servlet-name>
              <servlet-class>Test</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>Test</servlet-name>
              <url-pattern>/Test</url-pattern>
         </servlet-mapping>
    But this idea cannot generalize since I have many classes.
    Please advise. Thank you.

    Hi,
    in your case it might be sensible to use Struts actions?

Maybe you are looking for

  • Help - upgrade from OS 8.6 to OS 10.3.9

    I am trying to breathe life into our slot loading G3iMac. It currently runs OS 8.6 I know I need to update the firmware but it says it needs OS 9.1 to upgrade firmware. Do I need to purchase and install OS 9 or can I simply upgrade the firmware and i

  • CRVS2010 Beta - Unable to Install CR  Beta 2 for Visual Studio 2010.

    I am unable to install Crystal Reports for VS2010.  "Failed to update cache for execution." There is a similar thread (locked) with this problem.  (CRVS2010 beta 2 - error during install) I have tried everything from this tread, and everything else I

  • IE10 Previewing issue when creating a 240x320px prototype

    I am creating a prototype for a screen that is 240x320px in size and since updating to the latest IE 10 release today it now blows the live BC live preview out to full screen. Has anyone else had a similar issue? If so is there a fix for it, either w

  • Passing array of parameters to constructor

    I'm writing a script which facilitates interaction between javascript and an already existing flash library. One of the things I need to do is create an instance of class x, where class x can be one of a large number of classes. The constructors for

  • How would I do this Urgent

    Im storing information in a talble (Invoice), and at the end; the table is generating a number(Invoice #). ie im trying to generate an invoice # which is unique. I know how to save the info, but my problem is how to retrieve this number. Is there a w