It is still the same ...
I was change code to:
//ds = getDataSource(request, "ISSPD-ORA-DS");
ServletContext context = servlet.getServletContext();
ds = (DataSource) context.getAttribute("IsspdOracleDS");on struts-config disabled datasource and in servlet container root check datasource name if it is as used:
(I have JBoss 3.2.1 with Jetty container)
<datasources>
<local-tx-datasource>
<jndi-name>IsspdOracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@chaloupkaj.iccc.cz:1521:ordb</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>xxx</user-name>
<password>xxx</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
</local-tx-datasource>
</datasources>
I tried to use <connection-url>jdbc:oracle:oci:@ordb</connection-url> and <connection-url>jdbc:oracle:oci:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=ordb)))</connection-url> too, but stil I have NPE.
In log I have:
17:07:31,031 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss
_jetty/server/default/deploy/oracle-ds.xml
17:07:31,062 INFO [XSLSubDeployer] transformed into doc: [#document: null]
17:07:31,078 INFO [RARDeployment] Creating
17:07:31,078 INFO [RARDeployment] Created
17:07:31,078 INFO [JBossManagedConnectionPool] Creating
17:07:31,078 INFO [JBossManagedConnectionPool] Created
17:07:31,078 INFO [TxConnectionManager] Creating
17:07:31,078 INFO [TxConnectionManager] Created
17:07:31,078 INFO [RARDeployment] Starting
17:07:31,093 INFO [RARDeployment] Started
17:07:31,093 INFO [JBossManagedConnectionPool] Starting
17:07:31,093 INFO [JBossManagedConnectionPool] Started
17:07:31,093 INFO [TxConnectionManager] Starting
17:07:31,093 INFO [IsspdOracleDS] Bound connection factory for resource adapter
for ConnectionManager 'jboss.jca:service=LocalTxCM,name=IsspdOracleDS to JNDI n
ame 'java:/IsspdOracleDS'
17:07:31,093 INFO [TxConnectionManager] Started
17:07:31,093 INFO [MainDeployer] Deployed package: file:/D:/jboss_jetty/server/
default/deploy/oracle-ds.xml
Is there any other way to go? ...
Mark Lowe wrote:
Looks okay to me.. Do your logs oracle and tomcat say anything interesting? I also assume that you can connect to you oracle server and all relevant listeners are running on oracle.
This always worked for me on the occasions when i used this stuff.
ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute("myConn");
try this in your config xml
<data-source key="myConn" type="org.apache.commons.dbcp.BasicDataSource">
I don't know about hibernate but i could do what you're saying it doesn't. torque will generate a schema from an exiting DB and then you can generate your OM from that schema. But if you've just gotta get it done the dataSource settings worked for me as before. Configuring a dataSource as per the tomcat docs is better than in struts but suffers the same problem that the connection stuff is best in your model.
Hope this helps
Mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

