db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caron, Roger A." <roger.ca...@pw.utc.com>
Subject RE: Torque JNDI with Weblogic
Date Fri, 26 Mar 2004 17:30:32 GMT
One possibility that may be going wrong is in my declaration of my
Configuration object.  Should I set a "datasource" property with a
dataSource object on the Configuration object in the code below?

Thanks.

Roger

  ConfigurationFactory factory = new ConfigurationFactory();
  URL configURL = getClass().getResource("/Torque.properties.xml"); // xml
file pointing to location of properties file
  factory.setConfigurationURL(configURL);
  Configuration configuration = factory.getConfiguration();
  Torque.init(configuration);



-----Original Message-----
From: Caron, Roger A. [mailto:roger.caron@pw.utc.com]
Sent: Friday, March 26, 2004 8:37 AM
To: 'Apache Torque Users List'
Cc: Fischer,Christian
Subject: RE: Torque JNDI with Weblogic


I'm using BEA version 8.1 and have two parallel setups, PC and Solaris.
Neither are working against the datasource properly.

I too, have changed my DS name to jdbc/ssha-datasource to no avail.

Today I plan to add debug statements to the TorqueInstance class to see what
it's getting for a datasource in the dsf.getDataSource().getConnection()
command, where it's currently gettting the nullPointerException.  I'm
guessing the map is incomplete.

I'll let you know what I find and what's going on.

Roger 



-----Original Message-----
From: "Göschl,Siegfried" [mailto:Siegfried.Goeschl@drei.com]
Sent: Friday, March 26, 2004 2:33 AM
To: Apache Torque Users List
Cc: Fischer,Christian
Subject: RE: Torque JNDI with Weblogic


Hi Caron,

let's dig a little bit deeper ... :-)

+) which version of BEA are using?!
+) as far as I remember we changed the DS name of BEA to 'jdbc/H3G_WebShop'
as well.
+) we are probably looking at using JNDI datasource with BEA WebLogic 8.2
today so I keep you informed

Cheers,

Siegfried Goeschl


-----Original Message-----
From: Caron, Roger A. [mailto:roger.caron@pw.utc.com]
Sent: Thursday, March 25, 2004 8:28 PM
To: 'Apache Torque Users List'
Subject: RE: Torque JNDI with Weblogic


Thank you for the suggestion.  I've tried it, and I'm still getting the same
results.  I have a separate connection class to test the data-source which
works fine so I know the datasource is OK.  But Torque cannot use it.

I don't get it.

Can you think of any other setting I might be missing, either on the BEA
side or in the Torque properties?

Thanks.

Roger



-----Original Message-----
From: "Göschl,Siegfried" [mailto:Siegfried.Goeschl@drei.com]
Sent: Thursday, March 25, 2004 1:06 PM
To: Apache Torque Users List
Subject: RE: Torque JNDI with Weblogic


Hi Caron,

I'm using the following definition

torque.database.default=WEBSHOP
torque.database.WEBSHOP.adapter=oracle
torque.dsfactory.WEBSHOP.jndi.path=jdbc/H3G_WebShop
torque.dsfactory.WEBSHOP.factory=org.apache.torque.dsfactory.JndiDataSourceF
actory

My initial problem was that the JNDI name was initially 'H3G_WebShop' which
did not work with BEA. Prefixing with 'jdbc' did the trick


Cheers,

Siegfried Goeschl

-----Original Message-----
From: Caron, Roger A. [mailto:roger.caron@pw.utc.com]
Sent: Thursday, March 25, 2004 6:44 PM
To: 'torque-user@db.apache.org'
Subject: Torque JNDI with Weblogic



> I have a JNDI connection enabled on my weblogic server.  I've specified
> the following in my torque.properties:
> 
> ===================================
> torque.database.default          = ORAT017
> torque.database.ORAT017.adapter  = oracle
> torque.database.ORAT017.driver   = oracle.jdbc.driver.OracleDriver
> 
> torque.dsfactory.ORAT017.factory=org.apache.torque.dsfactory.JndiDataSourc
> eFactory
> torque.dsfactory.ORAT017.jndi.path=ssha-datasource
> 
> torque.dsfactory.ORAT017.jndi.java.naming.factory.initial=org.apache.namin
> g.java.javaURLContextFactory
> torque.dsfactory.ORAT017.jndi.java.naming.factory.url.pkgs=org.apache.nami
> ng
> ===================================
> 
> The Weblogic datasource name is ssha-datasource.  I've tried all different
> combinations for the jndi.path including 
> java:/comp/env/jdbc/ssha-datasource
> java:/comp/env/ssha-datasource
> java:/ssha-datasource
> 
> And just about any permutaion you can imagine.
> 
> I consistently get a NullPointerException in the
> TorqueInstance.getConnection method.  What am I missing?  
> 
> Thanks.
> 
> Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message