2 Replies Latest reply on Jan 10, 2006 2:22 AM by Martin Ganserer

    Could not deploy par file

    Martin Ganserer Novice

      Hello,

      I created a very small test project with only one entity bean.
      When I want to deploy the par file. I always get an

      NullPointerException at:
      javax.naming.InitialContext.getURLScheme

      What could be the reason for this exception?
      From my point of view the par file is OK and the data source too, but whatever I try it doesn't work!

      Please help me.

        • 1. Re: Could not deploy par file
          Bill Burke Master

          more information please

          • 2. Re: Could not deploy par file
            Martin Ganserer Novice

            Hello Bill,

            I currently use JBOSS 4.0.3 SP1 and a MYSQL-Database. On the same database (on a different schema) I already have a EJB3 app working on.

            My one and only entity bean looks like this:

            package com.mg.jef.model.project;
            
            import java.io.Serializable;
            import javax.persistence.*;
            
            @Entity
            @Table(name="plattform")
            public class Plattform implements Serializable
            {
             private int id;
             private String name;
            
             @Id(generate=GeneratorType.AUTO)
             @Column(name="id")
             public int getId()
             {
             return id;
             }
            
             public void setId(int id)
             {
             this.id = id;
             }
            
             @Column(name="name")
             public String getName()
             {
             return name;
             }
            
             public void setName(String name)
             {
             this.name = name;
             }
            
            
            }


            This is my persistence file:

            <entity-manager>
             <name>meta</name>
             <jta-data-source>java:/jefDS</jta-data-source>
             <properties>
             <property name="hibernate.hbm2ddl.auto" value="create"/>
             <property name="hibernate.show_sql" value="true" />
             <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
             </properties>
            </entity-manager>
            


            My datasource (jefDS) has been successfully deployed!.

            When I run the deployment I get:

            08:21:22,859 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=JEF.par
            java.lang.NullPointerException
             at javax.naming.InitialContext.getURLScheme(InitialContext.java:228)
             at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:277)
             at javax.naming.InitialContext.lookup(InitialContext.java:351)
             at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:494)
             at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:253)
             at org.jboss.ejb3.Ejb3JmxDeployment.create(Ejb3JmxDeployment.java:230)
             at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
             at $Proxy0.create(Unknown Source)
             at org.jboss.system.ServiceController.create(ServiceController.java:341)
             at org.jboss.system.ServiceController.create(ServiceController.java:284)
             at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy10.create(Unknown Source)
             at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:208)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy11.create(Unknown Source)
             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
             at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy6.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
            08:21:22,953 INFO [EJB3Deployer] Deployed: file:/C:/Programme/jboss-4.0.3SP1/server/all/deploy/JEF.par
            08:21:22,953 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
            
            --- MBeans waiting for other MBeans ---
            ObjectName: jboss.j2ee:service=EJB3,module=JEF.par
             State: FAILED
             Reason: java.lang.NullPointerException
            
            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            ObjectName: jboss.j2ee:service=EJB3,module=JEF.par
             State: FAILED
             Reason: java.lang.NullPointerException


            Thank you for your help!!