3 Replies Latest reply on May 14, 2002 1:11 PM by Tim Fox

    error mapping Oracle char(1) field to java char prim. type

    Tim Fox Master

      I'm using 3.0 RC2.

      I'm trying to map an oracle char(1) field to a java primitive type char attribute in my bean.

      on deployment I get the following error:

      14:24:35,774 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.NoClassDefFoundError: java/lang/Char
      at $Proxy120.(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Native Method)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:562)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.getEntityEJBLoc
      alObject(BaseLocalContainerInvoker.java:201)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.getEntityLocalC
      ollection(BaseLocalContainerInvoker.java:210)
      at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityC
      ontainer.java:1116)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractIntercep
      tor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Ent
      itySynchronizationInterceptor.java:230)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      keHome(CachedConnectionInterceptor.java:176)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInst
      anceInterceptor.java:134)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInte

      jboss seems to be looking for a class called java.lang.Char which clearly does not exist.

      I don't mention this "class" in either ejb-jar.xml, or jbosscmp-jdbc.xml (or in the type mapping).

      from a naive point of view it seems to me jboss is assuming the primitive wrapper class name can be obtained from the primitive type name by appending "java.lang". (???)

      anyway, that's just a guess - either that or I'm just doing something wrong (which is probably more likely!).

      anyone come across this before?

      anyone successfully mapped char fields? (but not to boolean?)