I got this problem running jBoss on a 1.2.2 JDK, because the jars that ship with jBoss 
were all generated with 1.3.  JDK
1.3 rocks!!!

-Charles

Aaron Mulder wrote:

>         This is not a jBoss problem.  "Bad Magic Number" means your Class
> file starts with the wrong bytes.  This means the JAR is invalid, or the
> disk is broken, or something else outside jBoss.  Have you been FTPing
> classes or JARs in ASCII mode or something?
>
> Aaron
>
> On Tue, 19 Sep 2000, James Brannan wrote:
> > I can not get a single bean I compile to work, including the Interest
> > example...
> >
> > Because of JBoss errors, I got rid of all vestiges of JDK1.2.2 and
> > installed JDK1.3, and also installed the newest JBoss binary.  I
> > followed the Interest example very closely.
> >
> > The initial TestBeans deploy fine when I start up JBoss.  However,
> > Even the basic Interest example fails to deploy.  Also, I cannot get
> > my simple session bean to work.  Hopefully this is something small in
> > the deployment of JBoss that the "Getting Started" information doesnt
> > cover?
> >
> > It seems that not having JBoss work with even the simple Interest
> > example is a common thread in this newsgroup.
> >
> > Thanks,
> > James
> >
> > error, ejb-jar, and java code follows
> >
> > �--------------------------------------------------
> >
> > The error:
> >
> > [Auto deployer] Starting
> > [Auto deploy] Auto deploy of file:/C:/jboss/deploy/ProductSet.jar
> > [Container factory] Deploying:file:/C:/jboss/deploy/ProductSet.jar
> > [Container factory] C:\jboss\tmp\deploy
> > [Container factory] Loading ejb-jar.xml : 
>jar:file:/C:/jboss/tmp/deploy/tmpejbjar54669.jar!/META-INF/ejb-jar.xml
> > [Container factory] Loading standardjboss.xml : 
>jar:file:/C:/jboss/lib/ext/jboss.jar!/org/jboss/metadata/standardjb
> > l
> > [Verifier] Verifying file:/C:/jboss/tmp/deploy/tmpejbjar54669.jar
> > [Verifier] java.lang.ClassFormatError: ProductSetPack/ProductSet (Bad magic number)
> > [Verifier]      at java.lang.ClassLoader.defineClass0(Native Method)
> > [Verifier]      at java.lang.ClassLoader.defineClass(Unknown Source)
> > [Verifier]      at java.security.SecureClassLoader.defineClass(Unknown Source)
> > [Verifier]      at java.net.URLClassLoader.defineClass(Unknown Source)
> > [Verifier]      at java.net.URLClassLoader.access$100(Unknown Source)
> > [Verifier]      at java.net.URLClassLoader$1.run(Unknown Source)
> > [Verifier]      at java.security.AccessController.doPrivileged(Native Method)
> > [Verifier]      at java.net.URLClassLoader.findClass(Unknown Source)
> > [Verifier]      at java.lang.ClassLoader.loadClass(Unknown Source)
> > [Verifier]      at java.lang.ClassLoader.loadClass(Unknown Source)
> > [Verifier]      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> > [Verifier]      at java.lang.Class.getMethods0(Native Method)
> > [Verifier]      at java.lang.Class.getMethods(Unknown Source)
> > [Verifier]      at 
>org.jboss.verifier.strategy.AbstractVerifier.hasDefaultCreateMethod(AbstractVerifier.java:397)
> > [Verifier]      at 
>org.jboss.verifier.strategy.EJBVerifier11.verifySessionHome(EJBVerifier11.java:191)
> > [Verifier]      at 
>org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVerifier11.java:110)
> > [Verifier]      at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:117)
> > [Verifier]      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:385)
> > [Verifier]      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:227)
> > [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
> > [Verifier]      at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Verifier]      at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Verifier]      at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:286)
> > [Verifier]      at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:222)
> > [Verifier]      at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:265)
> > [Verifier]      at 
>org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:90)
> > [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
> > [Verifier]      at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Verifier]      at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Verifier]      at 
>org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:211)
> > [Verifier]      at 
>org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:191)
> > [Verifier]      at 
>org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:176)
> > [Verifier]      at 
>org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:113)
> > [Verifier]      at org.jboss.Main.<init>(Main.java:162)
> > [Verifier]      at org.jboss.Main.<init>(Main.java:94)
> > [Verifier]      at org.jboss.Main$1.run(Main.java:84)
> > [Verifier]      at java.security.AccessController.doPrivileged(Native Method)
> > [Verifier]      at org.jboss.Main.main(Main.java:75)
> > [Container factory] Deploying ProductSet
> > [Container factory] Container Invoker Optimize='false'
> > [Container factory] java.lang.ClassFormatError: ProductSetPack/ProductSet (Bad 
>magic number)
> > [Container factory]     at java.lang.ClassLoader.defineClass0(Native Method)
> > [Container factory]     at java.lang.ClassLoader.defineClass(Unknown Source)
> > [Container factory]     at java.security.SecureClassLoader.defineClass(Unknown 
>Source)
> > [Container factory]     at java.net.URLClassLoader.defineClass(Unknown Source)
> > [Container factory]     at java.net.URLClassLoader.access$100(Unknown Source)
> > [Container factory]     at java.net.URLClassLoader$1.run(Unknown Source)
> > [Container factory]     at java.security.AccessController.doPrivileged(Native 
>Method)
> > [Container factory]     at java.net.URLClassLoader.findClass(Unknown Source)
> > [Container factory]     at java.lang.ClassLoader.loadClass(Unknown Source)
> > [Container factory]     at java.lang.ClassLoader.loadClass(Unknown Source)
> > [Container factory]     at java.lang.ClassLoader.loadClass(Unknown Source)
> > [Container factory]     at 
>org.jboss.ejb.StatelessSessionContainer.init(StatelessSessionContainer.java:131)
> > [Container factory]     at org.jboss.ejb.Application.init(Application.java:158)
> > [Container factory]     at 
>org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:592)
> > [Container factory]     at 
>org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:227)
> > [Container factory]     at java.lang.reflect.Method.invoke(Native Method)
> > [Container factory]     at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Container factory]     at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Container factory]     at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:286)
> > [Container factory]     at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:222)
> > [Container factory]     at 
>org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:265)
> > [Container factory]     at 
>org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:90)
> > [Container factory]     at java.lang.reflect.Method.invoke(Native Method)
> > [Container factory]     at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Container factory]     at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Container factory]     at 
>org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:211)
> > [Container factory]     at 
>org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:191)
> > [Container factory]     at 
>org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:176)
> > [Container factory]     at 
>org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:113)
> > [Container factory]     at org.jboss.Main.<init>(Main.java:162)
> > [Container factory]     at org.jboss.Main.<init>(Main.java:94)
> > [Container factory]     at org.jboss.Main$1.run(Main.java:84)
> > [Container factory]     at java.security.AccessController.doPrivileged(Native 
>Method)
> > [Container factory]     at org.jboss.Main.main(Main.java:75)
> > [Auto deploy] Deployment failed:file:/C:/jboss/deploy/ProductSet.jar
> > [Auto deploy] org.jboss.ejb.DeploymentException: Could not deploy 
>file:/C:/jboss/tmp/deploy/tmpejbjar54669.jar
> > [Auto deploy]   at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:622)
> > [Auto deploy]   at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:227)
> > [Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
> > [Auto deploy]   at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Auto deploy]   at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Auto deploy]   at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:286)
> > [Auto deploy]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:222)
> > [Auto deploy]   at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:265)
> > [Auto deploy]   at 
>org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:90)
> > [Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
> > [Auto deploy]   at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > [Auto deploy]   at 
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > [Auto deploy]   at 
>org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:211)
> > [Auto deploy]   at 
>org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:191)
> > [Auto deploy]   at 
>org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:176)
> > [Auto deploy]   at 
>org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:113)
> > [Auto deploy]   at org.jboss.Main.<init>(Main.java:162)
> > [Auto deploy]   at org.jboss.Main.<init>(Main.java:94)
> > [Auto deploy]   at org.jboss.Main$1.run(Main.java:84)
> > [Auto deploy]   at java.security.AccessController.doPrivileged(Native Method)
> > [Auto deploy]   at org.jboss.Main.main(Main.java:75)
> > [Auto deploy] Auto deploy of file:/C:/jboss/deploy/TestBeans.jar
> > [Container factory] Deploying:file:/C:/jboss/deploy/TestBeans.jar
> >
> >
> > My ejb-jar.xml file:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <ejb-jar>
> > <description>MSC Map Data Entry DataSet Bean</description>
> > <display-name>MSC Data Entry DataSet</display-name>
> > <enterprise-beans>
> > <session>
> > <ejb-name>ProductSet</ejb-name>
> > <home>ProductSetPack.ProductSetHome</home>
> > <remote>ProductSetPack.ProductSet</remote>
> > <ejb-class>ProductSetPack.ProductSetBean</ejb-class>
> > <session-type>Stateless</session-type>
> > <transaction-type>Bean</transaction-type>
> > </session>
> > </enterprise-beans>
> > </ejb-jar>
> >
> > My files:
> >
> >
> >
> > package ProductSetPack;
> >
> > import java.rmi.RemoteException;
> > import javax.ejb.SessionBean;
> > import javax.ejb.SessionContext;
> >
> > public class ProductSetBean implements javax.ejb.SessionBean {
> >
> >
> >     public double returnTestNumber(){
> >         System.out.println("Return Test Number Called!");
> >         return 1.0;
> >     }
> >
> >     public void ejbCreate(){}
> >
> >     public ProductSetBean(){}
> >
> >     public void setSessionContext(javax.ejb.SessionContext sc) {
> >     }
> >     public void ejbRemove(){
> >     }
> >     public void ejbActivate() {
> >     }
> >     public void ejbPassivate() {
> >     }
> > }
> >
> >
> > �----------------------------------
> >
> >
> > package ProductSetPack;
> >
> > import javax.ejb.EJBObject;
> > import java.rmi.RemoteException;
> >
> >
> > public interface ProductSet extends javax.ejb.EJBObject {
> >
> >     public double returnTestNumber() throws RemoteException;
> >
> > }
> >
> > �-------------------------------------------
> >
> > package ProductSetPack;
> >
> > import java.io.Serializable;
> > import java.rmi.RemoteException;
> > import javax.ejb.CreateException;
> > import javax.ejb.EJBHome;
> >
> >
> > public interface ProductSetHome extends javax.ejb.EJBHome {
> >
> >     ProductSet create() throws RemoteException, CreateException;
> >
> > }
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
> >
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to