Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Same package between two jars

Thread view: 
aaronfude@gmail.com - 13 Apr 2007 18:50 GMT
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
Tom Hawtin - 13 Apr 2007 19:25 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.