JBoss Community

Re: EntityManager.find returns null.

created by Wolfgang Knauf in EJB3 - View the full discussion

Hi,

 

you might fill your "ID" with spaces before putting it in "find" ;-).

 

Do you have control over the oracle, or is it a predefined schema? If you can control it:

a) did you declare a type-mapping in your "....-ds.xml",  e.g. something like this?

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
         <type-mapping>Oracle9i</type-mapping>
      </metadata>

In "\server\default\conf\standardjbosscmp-jdbc.xml, the java type "String" is mapped to "VARCHAR(255)" for "Oracle9i".

 

b) in "persistence.xml", you can set a property "hibernate.dialect":

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-optional-dialects

 

Hope this helps

 

Wolfgang

Reply to this message by going to Community

Start a new discussion in EJB3 at Community