Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Same package between two jars

Reply
Thread Tools

Same package between two jars

 
 
aaronfude@gmail.com
Guest
Posts: n/a
 
      04-13-2007
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.apach e.jsp.ErrorPage_jsp:
11
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:
332)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:
314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

org.apache.jasper.runtime.PageContextImpl.doForwar d(PageContextImpl.java:
703)

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

org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:
81

org.apache.jasper.runtime.PageContextImpl.handlePf ageException(PageContextImpl.java:
791)
org.apache.jsp.index_jsp._jspService(org.apache.js p.index_jsp:149)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:
332)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:
314)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

Thank you very much in advance!

AF

 
Reply With Quote
 
 
 
 
Tom Hawtin
Guest
Posts: n/a
 
      04-13-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting package among different jars Sam Takoy Java 4 06-19-2010 01:51 AM
Add *.jars to *.jars possible/recommendend? Eclipse setup for this? Ulf Meinhardt Java 2 02-03-2010 04:11 PM
Loading image from jars from other jars etc JavaEnquirer Java 2 02-22-2006 03:42 PM
JARs containing JARs alan@engrm.com Java 5 05-19-2005 04:55 PM
exec jars w/dependent jars Ike Java 6 09-24-2004 06:03 PM



Advertisments