Same package between two jars

Discussion in 'Java' started by aaronfude@gmail.com, Apr 13, 2007.

  1. Guest

    Hello,

    I always thought that it was possible for two diffirent jars to
    contribute classes to the same package.

    I have been doing that successfully, but now, on one of our machines
    running tomcat, we are getting the following error for a class in a
    "split" package.

    (Does it make any difference if the jars are signed?)

    root cause

    java.lang.SecurityException: html/Feel$Head
    org.apache.jsp.ErrorPage_jsp._jspService(org.apache.jsp.ErrorPage_jsp:
    118)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
    332)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
    314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:
    703)

    org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:
    670)

    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:
    818)

    org.apache.jasper.runtime.PageContextImpl.handlePfageException(PageContextImpl.java:
    791)
    org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:149)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
    332)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
    314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Thank you very much in advance!

    AF
     
    , Apr 13, 2007
    #1
    1. Advertising

  2. Tom Hawtin Guest

    wrote:
    >
    > I always thought that it was possible for two diffirent jars to
    > contribute classes to the same package.
    >
    > I have been doing that successfully, but now, on one of our machines
    > running tomcat, we are getting the following error for a class in a
    > "split" package.


    What did you change? Can you reproduce that change with a minimal
    example? Are you sure you have an up to date, consistent copy of everything.

    > (Does it make any difference if the jars are signed?)


    There are a few rules.

    Classes loaded by different class loaders are effectively in different
    packages for access purposes, even though they can share the same
    'namespace'.

    The signers of all class in a package loaded by one class loader must be
    the same.

    Packages may be sealed, so that all classes must come that one JAR.

    Random other restrictions that the container might wish to impose. For
    instance Java WebStart requires that all jars loaded by the same jnlp
    file have the same signer.

    Tom Hawtin
     
    Tom Hawtin, Apr 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ike
    Replies:
    6
    Views:
    1,065
    Andrew Thompson
    Sep 24, 2004
  2. Replies:
    5
    Views:
    9,062
  3. JavaEnquirer
    Replies:
    2
    Views:
    531
    JavaEnquirer
    Feb 22, 2006
  4. Ulf Meinhardt
    Replies:
    2
    Views:
    1,412
  5. Sam Takoy
    Replies:
    4
    Views:
    945
    Roedy Green
    Jun 19, 2010
Loading...

Share This Page