But before, in the previous mail, I pointed that the same problem apears when I define the class inline, on the fly, so it has no name, and I definetly don't try elsewhere to access it with, let's say, CRLFactory$1 as the class name.
The error is the same as with the inner class, only that now the class has no name, so it is identified in the stackTrace error message as 'IllegalAcessError form CRLFactory for CRLFactory$1 class' . This makes no sense, being defines inline, only CRLFactory accesses and uses it.
Here's the result of the ListJar program :
ca.ear
+- META-INF/MANIFEST.MF
+- eupki-ca.jar (archive)
| +- META-INF/MANIFEST.MF
| +- org/eupki/ca/csp/X509CertSigner.class
| +- org/eupki/ca/csp/NullPasswordException.class
| +- org/eupki/ca/csp/CSPCryptoEngine.class
| +- org/eupki/ca/csp/NullFileNameException.class
| +- org/eupki/ca/csp/CSPFactory.class
| +- org/eupki/ca/csp/CSPConstants.class
| +- org/eupki/ca/csp/X509CRLSigner.class
| +- org/eupki/ca/csp/CSPBCProvider.class
| +- org/eupki/ca/csp/CSP.class
| +- org/eupki/ca/csp/NullAliasNameException.class
| +- org/eupki/ca/ejb/interfaces/ProfileHome.class
| +- org/eupki/ca/ejb/interfaces/Request.class
| +- org/eupki/ca/ejb/interfaces/CAStatusConstants.class
| +- org/eupki/ca/ejb/interfaces/OTPData.class
| +- org/eupki/ca/ejb/interfaces/Profile.class
| +- org/eupki/ca/ejb/interfaces/RoleData.class
| +- org/eupki/ca/ejb/interfaces/BatchStatusConstants.class
| +- org/eupki/ca/ejb/interfaces/WriteMail.class
| +- org/eupki/ca/ejb/interfaces/BatchHome.class
| +- org/eupki/ca/ejb/interfaces/Extension.class
| +- org/eupki/ca/ejb/interfaces/HolderData.class
| +- org/eupki/ca/ejb/interfaces/OTPStatusConstants.class
| +- org/eupki/ca/ejb/interfaces/OTP.class
| +- org/eupki/ca/ejb/interfaces/OTPHome.class
| +- org/eupki/ca/ejb/interfaces/RequestData.class
| +- org/eupki/ca/ejb/interfaces/SafeDelete.class
| +- org/eupki/ca/ejb/interfaces/RoleHome.class
| +- org/eupki/ca/ejb/interfaces/SafeDeleteHome.class
| +- org/eupki/ca/ejb/interfaces/BatchTypeConstants.class
| +- org/eupki/ca/ejb/interfaces/LdapAccessHome.class
| +- org/eupki/ca/ejb/interfaces/HolderHome.class
| +- org/eupki/ca/ejb/interfaces/LdapAccess.class
| +- org/eupki/ca/ejb/interfaces/CAData.class
| +- org/eupki/ca/ejb/interfaces/OperatorData.class
| +- org/eupki/ca/ejb/interfaces/CSPSessionHomeLocal.class
| +- org/eupki/ca/ejb/interfaces/CSPSession.class
| +- org/eupki/ca/ejb/interfaces/Operator.class
| +- org/eupki/ca/ejb/interfaces/CertificateData.class
| +- org/eupki/ca/ejb/interfaces/CA.class
| +- org/eupki/ca/ejb/interfaces/RequestHome.class
| +- org/eupki/ca/ejb/interfaces/ExtensionData.class
| +- org/eupki/ca/ejb/interfaces/RequestStatusConstants.class
| +- org/eupki/ca/ejb/interfaces/CertificateDistributionConstants.class
| +- org/eupki/ca/ejb/interfaces/LdapAccessHomeLocal.class
| +- org/eupki/ca/ejb/interfaces/RA.class
| +- org/eupki/ca/ejb/interfaces/RAData.class
| +- org/eupki/ca/ejb/interfaces/CSPSessionHome.class
| +- org/eupki/ca/ejb/interfaces/AbstractData.class
| +- org/eupki/ca/ejb/interfaces/LdapAccessLocal.class
| +- org/eupki/ca/ejb/interfaces/Certificate.class
| +- org/eupki/ca/ejb/interfaces/ProfileData.class
| +- org/eupki/ca/ejb/interfaces/CAHome.class
| +- org/eupki/ca/ejb/interfaces/OperatorHome.class
| +- org/eupki/ca/ejb/interfaces/WriteMailHome.class
| +- org/eupki/ca/ejb/interfaces/CSPSessionLocal.class
| +- org/eupki/ca/ejb/interfaces/CertificateHome.class
| +- org/eupki/ca/ejb/interfaces/ExtensionHome.class
| +- org/eupki/ca/ejb/interfaces/Batch.class
| +- org/eupki/ca/ejb/interfaces/RAHome.class
| +- org/eupki/ca/ejb/interfaces/BooleanConstants.class
| +- org/eupki/ca/ejb/interfaces/Holder.class
| +- org/eupki/ca/ejb/interfaces/Role.class
| +- org/eupki/ca/ejb/interfaces/BatchData.class
| +- org/eupki/ca/ejb/interfaces/CertificateStatusConstants.class
| +- org/eupki/ca/ejb/interfaces/OTPDistributionModeConstants.class
| +- org/eupki/ca/ejb/domain/BatchBean.class
| +- org/eupki/ca/ejb/domain/OTPBean.class
| +- org/eupki/ca/ejb/domain/RoleBean.class
| +- org/eupki/ca/ejb/domain/HolderBean.class
| +- org/eupki/ca/ejb/domain/RequestBean.class
| +- org/eupki/ca/ejb/domain/CABean.class
| +- org/eupki/ca/ejb/domain/OperatorBean.class
| +- org/eupki/ca/ejb/domain/CertificateBean.class
| +- org/eupki/ca/ejb/domain/ExtensionBean.class
| +- org/eupki/ca/ejb/domain/RABean.class
| +- org/eupki/ca/ejb/domain/ProfileBean.class
| +- org/eupki/ca/ejb/services/CRLFactory$CertScanner.class
| +- org/eupki/ca/ejb/services/CertUpdateAgentMBean.class
| +- org/eupki/ca/ejb/services/RequestProcessorMDB.class
| +- org/eupki/ca/ejb/services/SafeDeleteBean.class
| +- org/eupki/ca/ejb/services/LdapAccessBean.class
| +- org/eupki/ca/ejb/services/CertUpdateAgent.class
| +- org/eupki/ca/ejb/services/CSPSessionBean.class
| +- org/eupki/ca/ejb/services/MailSendException.class
| +- org/eupki/ca/ejb/services/WriteMailBean.class
| +- org/eupki/ca/comm/BadRequestException.class
| +- org/eupki/ca/comm/KGSResponseProcessorMDB.class
| +- org/eupki/ca/comm/MsgProcessingException.class
| +- org/eupki/ca/comm/RARequestProcessorMDB.class
| +- org/eupki/ca/comm/InvalidRequestException.class
| +- org/eupki/ca/comm/RARequestValidator.class
| +- org/eupki/ca/comm/RequestReceiverMDB.class
| +- org/eupki/ca/comm/InvalidRAException.class
| +- org/eupki/ca/test/CATest.class
| +- org/eupki/ca/test/CommKGSTest.class
| +- org/eupki/ca/test/CommTest$1.class
| +- org/eupki/ca/test/LdapTest.class
| +- org/eupki/ca/test/LdapTest$SetupWrapper.class
| +- org/eupki/ca/test/CATearDown.class
| +- org/eupki/ca/test/CSPTest.class
| +- org/eupki/ca/test/MailTest.class
| +- org/eupki/ca/test/CSPTest$SetupWrapper.class
| +- org/eupki/ca/test/CommSetup.class
| +- org/eupki/ca/test/CASetup.class
| +- org/eupki/ca/test/CommTest.class
| +- org/eupki/ca/test/CSPTestPerf.class
| +- org/eupki/ca/test/CommTearDown.class
| +- org/eupki/ca/test/CSPTestPerf$SetupWrapper.class
| +- org/eupki/ca/test/AllTests.class
| +- org/eupki/ca/test/AllTestsPerf.class
| +- org/eupki/ca/NoCertificateFoundException.class
| +- org/eupki/ca/CertificateRevocationReason.class
| +- org/eupki/ca/NullCommonNameException.class
| +- org/eupki/ca/OTP.class
| +- org/eupki/ca/logging/CALoggerFactory.class
| +- org/eupki/ca/logging/ErrorConstants.class
| +- org/eupki/ca/logging/CALogger.class
| +- org/eupki/ca/logging/ActionConstants.class
| +- org/eupki/ca/EuPKICertificateFactory.class
| +- org/eupki/ca/OTPGenerator.class
| +- org/eupki/ca/NullOTPIdException.class
| +- org/eupki/ca/NullOTPPassException.class
| +- org/eupki/ca/NoValidCaException.class
| +- jndi.properties
| +- META-INF/jbosscmp-jdbc.xml
| +- META-INF/ejb-jar.xml
| +- META-INF/jboss.xml
+- +- eupki-ca.sar (archive)
| | +- META-INF/MANIFEST.MF
| | +- META-INF/jboss-service.xml
| | +- org/eupki/ca/ejb/services/CRLFactoryMBean.class
| | +- org/eupki/ca/ejb/services/CRLFactory.class
| | +- org/eupki/ca/ldap/LdapPublisherModel.class
| | +- org/eupki/ca/ldap/NullArgumentForDeleteException.class
| | +- org/eupki/ca/ldap/LdapSettings.class
| | +- org/eupki/ca/ldap/LdapPublisher.class
| | +- org/eupki/ca/ldap/LdapConnector.class
| | +- org/eupki/ca/ldap/LdapConstants.class
| | +- org/eupki/ca/ldap/LdapConnectorMBean.class
+- eupki-ca.war (archive)
| +- META-INF/MANIFEST.MF
| +- index.html
| +- WEB-INF/web.xml
+- META-INF/application.xml
+- META-INF/jboss-app.xml
+- ca.properties
Done
Scott M Stark wrote:
I need to see the packaging as illustrated by the attached ListJar class as indicated previously. The only way I know of to involved 2 class loaders in a deployment is for an ear to include a war that is accessing the common class in question. If you post the output of the ListJar program I can better comment on why this is occurring.------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
import java.io.FileInputStream; import java.util.Enumeration; import java.util.Iterator; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream;/** A little utility that displays the contents of composite jars * * @author [EMAIL PROTECTED] * @version $Revision: 1.2 $ */ public class ListJar { static String[] jarSuffixes = { ".jar", ".zip", ".ear", ".war", ".sar" }; static String jarPrefix = "+- "; static String entryPrefix = "| "; static byte[] buffer = new byte[65535]; static boolean showOnlyArchives = false; static { for(int i = 0; i < 10; i ++) { jarPrefix += "+- "; entryPrefix += "| "; } } static boolean isJar(String name) { boolean isJar = false; for(int s = 0; isJar == false && s < jarSuffixes.length; s ++) { String suffix = jarSuffixes[s]; isJar |= name.endsWith(suffix); } return isJar; } static void processEntry(ZipInputStream zis, ZipEntry entry, int level) throws Exception { String name = entry.getName(); boolean isDirectory = entry.isDirectory(); if( isDirectory == true ) return; // See if this is a jar archive if( isJar(name) ) { System.out.print(jarPrefix.substring(0, 3*level)); System.out.println(name+" (archive)"); try { ZipInputStream entryZIS = new ZipInputStream(zis); processJar(entryZIS, ++ level); } catch(Exception e) { e.printStackTrace(); } } else if( name.endsWith("MANIFEST.MF") ) { System.out.print(entryPrefix.substring(0, 3*(level-1))); System.out.print("+- "); System.out.print(name); Manifest mf = new Manifest(zis); Attributes main = mf.getMainAttributes(); String cp = main.getValue(Attributes.Name.CLASS_PATH); if( cp != null ) { System.out.print(" Class-Path: "); System.out.print(cp); System.out.print(' '); } System.out.println(); } else if( showOnlyArchives == false ) { System.out.print(entryPrefix.substring(0, 3*(level-1))); System.out.print("+- "); System.out.println(name); } } static void processJar(ZipInputStream zis, int level) throws Exception { ZipEntry entry; while( (entry = zis.getNextEntry()) != null ) { processEntry(zis, entry, level); } } /** List the jar contents * @param args the command line arguments */ public static void main(String[] args) throws Exception { String name = args[0]; JarFile jarFile = new JarFile(name); Manifest mf = jarFile.getManifest(); FileInputStream fis = new FileInputStream(name); ZipInputStream zis = new ZipInputStream(fis); System.out.println(name); processJar(zis, 1); System.out.println("Done"); } }
