Hi, I' m trying to use the Oracle SDO Java API in an EJB with container managed transactions without success. The problem raise with the following code:
InitialContext ctx=new InitialContext(); DataSource ds=(DataSource)ctx.lookup("jdbc/sitdemo"); Conn=ds.getConnection(); sdo = OraSpatialManager.getGeometryAdapter("SDO", "8.1.6", STRUCT.class, STRUCT.class, null,Conn); This last call give me a null pointer when I use the DataSource at the ejb-location "jdbc/sitdemo" (I need it for CMT) while using the location "jdbc/sitdemoCoreDS" I get the Oracle GeometryAdapter. The problem seems to be that the DataSource received in this last case is of type oracle.jdbc.driver.OracleConnection so it works. The Oracle SDO API doesn't give a requirement for a specific kind of Connection, but the jdbc connection returned from the DataSource at the ejb-location doesn't work. This is my datasource: <data-source class="com.evermind.sql.DriverManagerDataSource" name="sitdemo" location="jdbc/sitdemoCoreDS" xa-location="jdbc/xa/sitdemoXADS" ejb-location="jdbc/sitdemo" connection-driver="oracle.jdbc.OracleDriver" username="sitdemo" password="demosit" url="jdbc:oracle:thin:@127.0.0.1:1521:ORASITDB" inactivity-timeout="30" /> Thanks, Luciano Montebove