0 Replies Latest reply on Feb 26, 2003 12:29 AM by sunil_mundluri

    CHAR problem

    sunil_mundluri

      Hi !

      I've a CHAR field in my CMP. Want to know what is the mapping for CHAR in POSTGRESQL. I tried the following, but in vain.
      <cmp-field>
      <field-name>chrc</field-name>
      <column-name>chrc</column-name>
      <jdbc-type>CHAR</jdbc-type>
      <sql-type>CHAR(1)</sql-type>
      </cmp-field>
      I also tried
      <cmp-field>
      <field-name>chrc</field-name>
      <column-name>chrc</column-name>
      <jdbc-type>CHAR</jdbc-type>
      <sql-type>CHAR</sql-type>
      </cmp-field>

      The system was working fine unyil I added this CHAr field to one of my CMPs. I was able to get the data from database even with this field. I tried printing the whole object too. It was successful. Bu when I next tried to access another method on this CMP (its a simle one like gteUserID , which just returns a member variable), the following exception is raised.


      javax.transaction.TransactionRolledbackException: Load failed; nested exception is:
      java.lang.IllegalArgumentException; nested exception is:
      java.rmi.ServerException: Load failed; nested exception is:
      java.lang.IllegalArgumentException
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:188)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:436)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:412)
      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:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)

      I'm using JBOSS 2.4.6 and POSTGRESQL 7.2 version. Can anybody help me with correct mapping(jaws.xml) for POSTGRESQL.