10 Replies Latest reply on Oct 24, 2002 11:12 AM by T. C. Link

    Class-Path in manifest

    T. C. Link Newbie

      Is the Class-Path attribute in the ejb-jar manifest file supported on JBoss 3.0.3?

      When I deploy, the log shows something like:

      "[DEBUG] No META-INF or WEB-INF found in this"

      I trying to give my ejbs access to library jars that are packaged in the same EAR. Anyone else ran into this problem?

        • 1. Re: Class-Path in manifest
          Joel Vogt Master

          yes, just check the syntax and make sure there are carriage returns after your classpath entry

          • 2. Re: Class-Path in manifest
            T. C. Link Newbie

            Thanks for the quick reply but I need more info:

            I have two JARs in the EAR archive and a deployment descriptor:

            SecurityEJB.jar
            Framework.jar
            META-INF/application.xml

            From my understanding of the syntax on the manifest, the manifest that we should edit is in SecurityEJB.jar and not the one in the ear (I have tried both though). It would appear as follows:

            Manifest Version: 1.0

            Name: META-INF/ejb-jar.xml

            Name: security/Login.class

            Name: META-INF/jboss.xml

            Name: security/LoginBean.class

            Name: security/LoginHome.class

            Class-Path: Framework.jar

            There is a carriage return at the end but I still get the error. Is this correct?

            • 3. Re: Class-Path in manifest
              T. C. Link Newbie

              Thanks for the quick reply but I need more info:

              I have two JARs in the EAR archive and a deployment descriptor:

              SecurityEJB.jar
              Framework.jar
              META-INF/application.xml

              From my understanding of the syntax on the manifest, the manifest that we should edit is in SecurityEJB.jar and not the one in the ear (I have tried both though). It would appear as follows:

              Manifest Version: 1.0

              Name: META-INF/ejb-jar.xml

              Name: security/Login.class

              Name: META-INF/jboss.xml

              Name: security/LoginBean.class

              Name: security/LoginHome.class

              Class-Path: Framework.jar

              There is a carriage return at the end but I still get the error. Is this correct?

              • 4. Re: Class-Path in manifest
                T. C. Link Newbie

                Thanks for the quick reply but I need more info:

                I have two JARs in the EAR archive and a deployment descriptor:

                SecurityEJB.jar
                Framework.jar
                META-INF/application.xml

                From my understanding of the syntax on the manifest, the manifest that we should edit is in SecurityEJB.jar and not the one in the ear (I have tried both though). It would appear as follows:

                Manifest Version: 1.0

                Name: META-INF/ejb-jar.xml

                Name: security/Login.class

                Name: META-INF/jboss.xml

                Name: security/LoginBean.class

                Name: security/LoginHome.class

                Class-Path: Framework.jar

                There is a carriage return at the end but I still get the error. Is this correct?

                • 5. Re: Class-Path in manifest
                  T. C. Link Newbie

                  Thanks for the quick reply but I need more info:

                  I have two JARs in the EAR archive and a deployment descriptor:

                  SecurityEJB.jar
                  Framework.jar
                  META-INF/application.xml

                  From my understanding of the syntax on the manifest, the manifest that we should edit is in SecurityEJB.jar and not the one in the ear (I have tried both though). It would appear as follows:

                  Manifest Version: 1.0

                  Name: META-INF/ejb-jar.xml

                  Name: security/Login.class

                  Name: META-INF/jboss.xml

                  Name: security/LoginBean.class

                  Name: security/LoginHome.class

                  Class-Path: Framework.jar

                  There is a carriage return at the end but I still get the error. Is this correct?

                  • 6. Re: Class-Path in manifest
                    Joel Vogt Master

                    hmm, how about
                    Class-Path: ./Framework.jar
                    ?

                    • 7. Re: Class-Path in manifest
                      T. C. Link Newbie

                      Once again, thanks for your attempt to help.

                      Unfortunately, that didn't work either. I tried on both JBoss 3.0.0_Tomcat-4.0.3 and JBoss-3.0.3. This has been irritating me for the last two weeks. I'll give more info:

                      application.xml for my EAR contains:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

                      <display-name>Common</display-name>

                      SecurityEJB.jar



                      SecurityEJB contains the following ejb-jar.xml:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
                      <ejb-jar>
                      <enterprise-beans>

                      <display-name>Login</display-name>
                      <ejb-name>Login</ejb-name>
                      security.LoginHome
                      security.Login
                      <ejb-class>security.LoginBean</ejb-class>
                      <session-type>Stateless</session-type>
                      <transaction-type>Container</transaction-type>
                      <resource-ref>
                      jdbc datasource
                      <res-ref-name>jdbc/Oracle</res-ref-name>
                      <res-type>javax.sql.DataSource</res-type>
                      <res-auth>Container</res-auth>
                      </resource-ref>

                      </enterprise-beans>
                      <assembly-descriptor>
                      <container-transaction>


                      <ejb-name>Login</ejb-name>
                      <method-name>*</method-name>

                      <trans-attribute>Required</trans-attribute>
                      </container-transaction>
                      </assembly-descriptor>
                      </ejb-jar>

                      Here's the jboss.xml:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <!DOCTYPE jboss PUBLIC '-//JBoss//DTD JBOSS 3.0//EN' 'http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd'>

                      <enterprise-beans>

                      <ejb-name>Login</ejb-name>
                      <jndi-name>ejb/Login</jndi-name>
                      <resource-ref>
                      <res-ref-name>jdbc/Oracle</res-ref-name>
                      <jndi-name>java:/OracleDS</jndi-name>
                      </resource-ref>

                      </enterprise-beans>


                      Framework.jar only contains some java classes that I need in SecurityEJB.jar. The EAR does indeed contain SecurityEJB.jar, Framework.jar, META-INF/application.xml, and META-INF/MANIFEST.MF. The problem is when I deploy, JBoss doesn't find my deployment descriptors. I can't find anything wrong - checked spelling, read through the J2EE spec and several articles/forums on the web on deployment. Just can't figure it out.

                      • 8. Re: Class-Path in manifest
                        T. C. Link Newbie

                        I don't know if this helps, but here's the log message when I deploy on JBoss-3.0.0, I've marked the key line in bold:

                        2002-10-23 10:01:50,250 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,250 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,280 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear
                        2002-10-23 10:01:50,280 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository] UnifiedLoaderRepository adding org.jboss.mx.loading.UnifiedClassLoader@d4f27{ url=file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear }
                        2002-10-23 10:01:50,280 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.EARDeployer@2ae86e
                        2002-10-23 10:01:50,280 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,340 DEBUG [org.jboss.deployment.EARDeployer] Deployment Info: org.jboss.deployment.DeploymentInfo@8e473865{ url=njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar }, isDirectory: false
                        2002-10-23 10:01:50,470 DEBUG [org.jboss.management.j2ee.J2EEDeployedObject] File: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear, descriptor: META-INF/application.xml
                        2002-10-23 10:01:50,480 DEBUG [org.jboss.management.j2ee.J2EEApplication] Create J2EE Application, name: Common.ear, server: jboss.management.single:j2eeType=J2EEServer,name=Single
                        2002-10-23 10:01:50,480 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] getObjectName(), name: jboss.management.single:J2EEServer=Single,j2eeType=J2EEApplication,name=Common.ear
                        2002-10-23 10:01:50,480 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] postRegister(), parent: jboss.management.single:j2eeType=J2EEServer,name=Single
                        2002-10-23 10:01:50,480 DEBUG [org.jboss.deployment.MainDeployer] found 1 subpackages of file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,480 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar
                        2002-10-23 10:01:50,490 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar
                        2002-10-23 10:01:50,490 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository] UnifiedLoaderRepository adding org.jboss.mx.loading.UnifiedClassLoader@276eff{ url=njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar }
                        2002-10-23 10:01:50,530 DEBUG [org.jboss.deployment.JARDeployer] no META-INF or WEB-INF found, this is for us
                        2002-10-23 10:01:50,530 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.JARDeployer@35282
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying SecurityEJB.jar
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying Common.ear
                        2002-10-23 10:01:50,561 DEBUG [org.jboss.deployment.MainDeployer] start step for deployment file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,571 DEBUG [org.jboss.deployment.MainDeployer] start step for deployment njar:file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/Common.ear/79.Common.ear^/SecurityEJB.jar
                        2002-10-23 10:01:50,571 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: SecurityEJB.jar
                        2002-10-23 10:01:50,571 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: Common.ear
                        2002-10-23 10:01:50,571 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear
                        2002-10-23 10:01:50,571 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear -> file:/G:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/Common.ear

                        Can anyone help?

                        • 9. Re: Class-Path in manifest
                          T. C. Link Newbie

                          I'm starting to come to the conclusion that the Class-Path setting is not supported by both JBoss-3.0.3 and JBoss-3.0.0. I've built my JARs and EARs using the JDK jar utility and it still came back with the same error. For those of you that claim it did work, were you deploying your EAR with an EJB-JAR (with deployment descriptors) and a dependent library JAR (no deployment descriptors)? Did you do anything different than what I've done?

                          • 10. Re: Class-Path in manifest
                            T. C. Link Newbie

                            I FOUND THE PROBLEM!!

                            I cannot believe its something so stupid. Once I removed all empty lines from the MANIFEST.MF and left the carriage return at the end - IT WORKED!!!!