0 Replies Latest reply on Apr 2, 2002 6:48 PM by Matt

    Defining a custom data type..

    Matt Newbie

      Can someone verify the format of the custom data type declarations in the jbosscmp-jdbc.xml file.. I am using JBOSS3.0 from CVS about a week ago..

      The pay docs say it is supposed to be this...

      <jbosscmp-jdbc>
      <type-mapping>
      Oracle8

      <java-type>java.lang.Short</java-type>
      <jdbc-type>NUMERIC</jdbc-type>
      <sql-type>NUMBER(5)</sql-type>

      ...
      </type-mapping>
      </jbosscmp-jdbc>

      Which doesn't work.. The DTD looks like it should be this..

      <type-mappings>
      <type-mapping>
      mySQL

      <java-type>test.UIDKey</java-type>
      <jdbc-type>String</jdbc-type>
      <sql-type>String(100)</sql-type>

      </type-mapping>
      </type-mappings>

      But when I use this I get the following error message..

      2002-04-02 18:25:43,855 ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File njar:file:/C:/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/securestate.ear/74.securestate.ear^/securestate-ejb.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 1137. Error message: Element "type-mapping" does not allow "mapping" here.
      2002-04-02 18:25:43,865 ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File njar:file:/C:/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/securestate.ear/74.securestate.ear^/securestate-ejb.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 1142. Error message: Element "type-mapping" requires additional elements.
      2002-04-02 18:25:43,875 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Invalid XML: file=njar:file:/C:/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/java/jboss/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/securestate.ear/74.securestate.ear^/securestate-ejb.jar!/META-INF/jbosscmp-jdbc.xml
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:229)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:214)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:74)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:502)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java:265)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:138)
      at org.jboss.ejb.EntityContainer.create(EntityContainer.java:329)
      at org.jboss.ejb.Container.invoke(Container.java:765)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1003)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:673)
      at $Proxy1.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:210)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:169)
      at $Proxy4.create(Unknown Source)
      at org.jboss.ejb.EjbModule.createService(EjbModule.java:345)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:134)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:673)
      at $Proxy1.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:210)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:169)
      at $Proxy4.create(Unknown Source)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:397)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:603)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:597)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:499)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:463)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:169)
      at $Proxy3.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:300)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:506)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:379)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:190)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:179)
      2002-04-02 18:25:44,185 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: destroy
      java.lang.NullPointerException