PasswordMustChange Attribute missing on Sun One LDAP 5.2.4
Hi,
I've install DS 5.2.4 build 2005.230.0301 on NT and set up the system to act as a directory server for my java application.
everything works fine except that no controls are ever return via
LDAPControl[] controls = ld.getResponseControls();
I have resort to using attributes to detect certain password Attribute like time to expiry .
One of the issue is that I need to know when the user is loggin in for the first time after reset. passwordMustChange checkbox is check in password policy (but after the IDs have been created)
Since no controls are return, I was looking for passwordMustChange attribute but could not find it in the ID entries.
Can anyone tell me how to get the passwordMustChange attrinbute created in each of the user entry?
Or better still, what I am doing wrong.
thanks
Hans
The issue is fixed. Damned productregistry was found in /var/adm/sw.
Similar Messages
-
SUN ONE Ldap - Default value is not getting displayed
Hello,
I have created an attribute in slapd.user_at.conf and it is associated in slapd.user_oc.conf.
The default value for the attribute has been given in the SUN ONE Ldap. But it is not getting displayed in our application.
Can any one help me in this for this issue.
Regards,
K. Senthil KumarI assume that you are referring to a brand new field on the second step that was not on the form of the first step. If this is the case, then you should put the field in a hidden block of the first steps form. Default values and Auto-population from shells/single record BPs only occur of the create step, even if they are not used on that step. As long as you put them on the create step (even in a hidden block) they should initialize.
-
Import netscape.ldap.* ; is it not supported in Sun one LDAP server
import netscape.ldap.*;
is the above line not supported n Sun One LDAP directory Server
if that is the case what should i do
wenever i compile my code the error tat comes up is : package netscap.ladp does not exists
need help immediately
my code is as follows
import netscape.ldap.*;
import java.util.*;
* Simple search program to experiment with filters
public class SearchFilter {
* Do a subtree search using a specified filter
* @parm args host, port, authDN, password, baseDN, filter
public static void main(String[] args) {
if (args.length != 6) {
System.out.println("Usage: java FilterSearch " + "<host> <port> " + "<authdn> <password> " + "<baseDN> <filter>");
System.out.println("Example:");
System.out.println(" java FilterSearch " + "localhost 389 " + "\"\" \"\" " + "\"o=airius.com\" " + "\"(|(cn=sam*)(cn=b*))\"");
System.exit(1);
}Couldn't you download the netscape.ldap package (iPlanet LDAP SDK) and put its jars in your app classpath?
The suggested way to replace netscape.ldap package is to use only JNDI calls, but maybe they can not fulfill all your needs.
By the way, you can get the source code for that package in Mozilla.org site.
(Note: if you are using Netscape LDAP SDK for parsing/generating ASN.1 streams including X.509 certificates, try using BouncyCastle instead of netscape.ldap.ber.stream package - I had to modify several classes from Netscape's package that is not meant to handle certificates, but LDAP streams...) -
Authentication getting failed in sun one Ldap
HI,
Any one please can assist me for sun one ldap.
My application developed(ldap related) based on lotus domino ldap server and webspere.
now we are trying to deploy the same code with Websphere and sun one ldap server at our local environment.
Iam getting the prblem of authentication fail.
please follow the logs as.
My question is what ever the code written for lotus domino is compatible with sun one ldap.Iam new to LDAP .
pls any one give the suggestions.
LDAP Interface: Performing LDAP authentication for user [NYilmaz]
17 Dec 2007 18:43:13,359 [WARN ] NABLDAP: Transmission will be over an unencrypted connection. The username and password are transmitted in clear text form which is very insecure. Consider replacing the LDAP protocol with LDAPS (SSL).
17 Dec 2007 18:43:13,359 [DEBUG] NABLDAP: Establishing a new authenticating connection to [ldap://gpat.bsdev.com]
17 Dec 2007 18:43:13,375 [INFO ] NABLDAP: Failed to authenticate with the remote server on [ldap://gpat.bsdev.com] because of error '[LDAP: error code 34 - Invalid DN]'
17 Dec 2007 18:43:13,375 [WARN ] LDAP Interface: Unsuccessful authentication attempt for user [NYilmaz]
17 Dec 2007 18:43:13,375 [DEBUG] LDAP Interface: Writing the value {javax.naming.InvalidNameException:[LDAP: error code 34 - Invalid DN]} to General[1].OnionErrorMessage
17 Dec 2007 18:43:13,390 [WARN ] NABLDAP: Transmission will be over an unencrypted connection. Consider replacing the LDAP protocol with LDAPS (SSL).
17 Dec 2007 18:43:13,390 [DEBUG] NABLDAP: Establishing a new anonymous connection to [ldap://gpat.bsdev.com]
17 Dec 2007 18:43:13,390 [DEBUG] NABLDAP: Connection established.
17 Dec 2007 18:43:13,390 [DEBUG] NABLDAP: Searching remote LDAP directory using the filter of [(&(objectclass=person)(&(cn=NYilmaz)))]Hello Vinay,
when configuring multiple Ldap directories, There are a number of prerequisities that you need to
consider.
For example, One prerequisite for Multi domains is that logon IDs must be unique across mutliple LDAP datasources. This will cause issue if duplicate IDs exist.
Please see the following Documentation and notes for more information on this.
Examples of Data Source Configuration Files - Identity Management - SAP Library
Example: Configuration of Multiple LDAP Data Sources - Identity Management - SAP Library
1618342 - Multiple LDAP Datasources - Active Directories where logon IDs
are not unique
762419 - Multi-Domain Logon Using Microsoft Active Directory
Please have a look at the above notes which documet this and also tells
you what to do in these situations.
Regards,
David -
Default Value is not getting displayed in SUN ONE Ldap
Hello,
I have created an attribute in slapd.user_at.conf and it is associated in slapd.user_oc.conf.
The attribute default value is given through SUN ONE Console. But, In our application the default value is not getting displayed.
We need the default value to run our applicatin. Can anyone help me for this issue
Regards,
K. Senthil KumarHi anandkumar,
I belive this issue can be resolved by changing the Query proprties for the perticular field.
Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
__Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
Hope this helps you!!
Best Regards,
Maruthi -
Problem instaliing sun one LDAP server on windows server 2008 r2
Hi all ,
I am trying to install Ldap server (Sun ONE Directory Server) on windows server 2008
I am using apache-tomcat-7.0.28 and java jdk1.7.0_05
I am following this manual for installing :
https://blogs.oracle.com/marginNotes/entry/installing_directory_server_enterprise_edition1
I have a problem with the cacao agent and how to install it .
I've got this error message :
c:\Program Files\Sun\dsee7\bin>dsccsetup cacao-reg
Configuring Cacao...
## Failed to run "c:/Program Files/Sun/dsee7/ext/cacao_2/bin/cacaoadm.bat" set-
aram "jdmk-home=c:/Program Files/Sun/dsee7/lib/private"
#### Cannot create service for instance: [cacao.instance.name].
#### Cannot perform firstime inialisation and configuration.
## Exit code is 1
Failed to configure Cacao.
I stuck and with no other solutions . I hope if you could to help with this issue .
i will glad to know if there is any other ways to install this specific Ldap server ,
Thanks,
AlonYou most likely skipped the step of starting the installed server prior to trying to access admin URL. Please check this document:
http://docs.sun.com/source/817-1830-10/win.html
Relevant section is:
You can start the Administration Server in either of the following ways:
# Select Start Menu -> Programs -> Sun ONE Web Server, and choose Start Web Server Administration Server.
# From the Control Panel�s Services item.
HTH... -
SUN One LDAP Retrieving Dynamic group
Hi, I would like to know how can I retrieve the groups a user belongs to, if the groups are of dynamic type.
can I use the attribute memberOf?
//Create the initial directory context
LdapContext ctx = new InitialLdapContext(env,*null*);
//Create the search controls
SearchControls searchCtls = new SearchControls();
//Specify the search scope
searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
//specify the LDAP search filter
String searchFilter = "(&(objectClass=user)(CN=Andrew Anderson))";
//Specify the Base for the search
String searchBase = "DC=antipodes,DC=com";
//initialize counter to total the group members
int totalResults = 0;
//Specify the attributes to return
String returnedAtts[]={"*memberOf*"};
searchCtls.setReturningAttributes(returnedAtts);
//Search for objects using the filter
NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);Hello Vinay,
when configuring multiple Ldap directories, There are a number of prerequisities that you need to
consider.
For example, One prerequisite for Multi domains is that logon IDs must be unique across mutliple LDAP datasources. This will cause issue if duplicate IDs exist.
Please see the following Documentation and notes for more information on this.
Examples of Data Source Configuration Files - Identity Management - SAP Library
Example: Configuration of Multiple LDAP Data Sources - Identity Management - SAP Library
1618342 - Multiple LDAP Datasources - Active Directories where logon IDs
are not unique
762419 - Multi-Domain Logon Using Microsoft Active Directory
Please have a look at the above notes which documet this and also tells
you what to do in these situations.
Regards,
David -
How can I import Openldap schema into sun one directory server?
Hello All
I have a schema which was written for openldap, and I want to import this schema into sun directory server. I found that some attribute syntaxes, like "NumericString", are not exist in sun directory server and some attribute definitions are also different. For example, the "internationaliSDNNumber" in sun directory is defined in "IA5String" syntax, but it is "NumericString" in openldap. Is there any effect on querying data from two different ldap server? How can I solve this problem?
Thank you!http://directory.fedora.redhat.com/wiki/Howto:OpenLDAP
Migration
GaryThanks! But after I use some of scripts in that page, I got
"Unknown attribute syntax OID "1.3.6.1.4.1.1466.115.121.1.36"
It seems those scripts only transform schema file format, not the gap between different type(attribute syntax). Is it possible to import or add new type(attribute syntax) in sun one directory server?
Thanks. -
Configuring more than one LDAP as data source
Hi Portal Gurus,
We have requiremnt to configure MS ADS LDAP-> DEEP HIERARCHY & Sun one LDAP->FLAT HIERRARCHY as PORTAL Datra Source.we have already configured MS ADS LDAP.
for merging these 2 LDAPS as a data source can anybody having experiece ...
we tried to configure with the below server parameters for 2nd lDAP merging as per below reference
Configuration of More Than One LDAP Data Source"http://help.sap.com/saphelp_nw04/helpdata/en/4e/4d0d40c04af72ee10000000a1550b0/frameset.htm".But
we could not suceeded.
Server parameters:
Server: xxxx:23xx
LDAP Search root: dv=hub, o=vds
Connection ID: cn=Directory Manager
password: xxxxx
we dont have user path or group path for the above 2nd LDAP.
anybody can help in this ..
Regards
TagTag,
It sounds like this issue might be releated to the fact that your second LDAP connection is to SUN One. Maybe one of these links will help
http://help.sap.com/saphelp_erp2005vp/helpdata/en/aa/8f10f1e2bae346bef2853aa0f88f4c/frameset.htm
or
http://help.sap.com/saphelp_erp2005vp/helpdata/en/43/4c3725aeaf30b4e10000000a11466f/frameset.htm
Regards,
Keith
Message was edited by: Keith Crossett -
Java programming guide for Sun ONE
Where can I find the "Sun ONE LDAP SDK for Java Programming Guide" for version 5.2. ?
I have the programming guide for Netscape Directory SDK 4.0 for Java. Will that do?
Thanks for your help.
[email protected]this to also create and manage the LDAP groups. We
are using the Sun ONE 5.2 LDAP directory server. Are
there significant advantages to using JNDI over the
SunONE directory SDK, or vice versa?JNDI (bundled with J2SE) in combination with the Booster Pack release version 1.0, provides API support for accessing both static and dynamic Groups. It also provides API support for the new extensions and controls that are made available in Sun ONE DS 5.2.
The Booster Pack can be downloaded from:
http://java.sun.com/products/jndi/
You can also check the LDAP trail of the JNDI Tutorial that contains detailed descriptions and examples of how to use JNDI . It is available at:
http://java.sun.com/products/jndi/tutorial/ldap/index.html -
IdM setup - LDAP Sun One Vs Microsoft AD
All:
I am attempting to configure IdM for our landscape.The LDAP templates provided are all for Sun One directory server.
The configuration guide says
"Templates for the Sun One directory server are provided. Templates for other directory servers are not available. You can adjust the tasks and jobs for other directory servers to
meet your needs on a project base."
How does one do this? Is it just copy the template and rename it or is there anything else involved?
Thanks
S.Hi Shabnam,
after copying and renaming the template you have to adjust some settings and mappings but this is not a big deal.
Settings: Check the base entries and filters for entries and groups
Mappings: Some attributes may be used differently. Especially, check the usage of cn and uid.
Kind regards
Frank -
How to use DS 5.2 to create LDAP user ID and password to Login to Sun ONE I
Hi all,
I have just install Sun One Web server 6.1, Sun One Directory 5.2 and Sun One Instant Messaging 6.1 together on Win2K advance server. And I have successful launch Sun� ONE Instant Messenger.
But I can not know, how to create LDAP user ID and password to Login to Sun ONE Instant Messenger???
Could anyone help me to solve this problem?
I'm looking forward to receive your reply soon.
ThanksHi Tuo,
I think you better ask this in the forum where the ACS experts are, since this does not seem to be a problem on the ASA side.
hth
Herbert -
Sun One App Server 8.1,Sun One Message Q3.6,administered objects in LDAP
Hi,
Has anyone tried hosting an MDB on Sun One App Server 8.1 listening to a queue on Sun One Message Queue 3.6 through administered objects in directory server...? It looks quite straight forward but somehow it doesn't seems to work. Any idea if Sun one app server supports this type of architecture...?
Regards,
PriteshHi,
Even I didn't see any obvious reason why it shouldn't work untill I found that Sun One App Server 8.1 does not support external JNDI lookup to Sun MQ 3.6 through administered objects. However, it is possible using a newly released generic resource adapter for JMS 1.5 RC1. I am still fighiting on it and let you know if it works.
I was getting an error "JMS resource can not be created" during deployment time.
Regards,
Pritesh Thakor -
I have a working Sun One directory that has explicit groups -- groupOfUniqueName objectswith uniqueMember attributes.
I'm trying to use JNDI to do something similar to what I've done in the past on OpenLDAP. My searches are successful, but I have yet to be able to retrieve the uniqueMember attributes. It's as if they don't exist. Coincidentally (or not), a generic LDAP browser tool has the same problem.
I've perused what little I can find in the development documentation and there doesn't seem to be anything special required to do JNDI against a Sun One Directory Server.
What am I missing?You don't have to create these files. You need to import the package and make sure your environment Classpath has access to the package also. Then only you will be able to compile your code.
Let me know if you need further help -
Crystal Reports XI and Sun One 6.1 web server SP 5 Error finding JNDI name
I am trying to create a Crystal Reports XI report in a JSP using Sun One 6.1 Web server sp 5.
At this point I am getting the error �Error finding JNDI name� on Sun One
The application will run on Netbeans/Tomcat
I have done the following:
I edited CRConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<CrystalReportEngine-configuration>
�
<DataDriverCommon>
<JavaDir>C:\Program Files\Java\j2re1.4.2_10\bin</JavaDir>
<Classpath>C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar;�</Classpath>
�
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>jdbc:oracle:thin:@10.10.10.10:1521:dev</JDBCURL>
<JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
<JDBCUserName>lab_ro</JDBCUserName>
<JNDIURL></JNDIURL>
�
</JDBC>
I created a report using JDBC (JNDI) connection and have the JNDI Connection set to the name of DATA.
The report works just fine in Crystal Reports.
Then in Netbeans I created an application and it runs in the Tomcat part of Netbeans
In context.xml I have:
<Context path="/BOEnterpriseTest3">
<Resource name="jdbc/dev" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev"
username="theuserid" password="thepassword" maxActive="20" maxIdle="10" maxWait="-1"/>
</Context>
In web.xml I have
<web-app>
<context-param>
<param-name>crystal_image_uri</param-name>
<param-value>crystalreportviewers11</param-value>
</context-param>
�
<taglib>
<taglib-uri>/crystal-tags-reportviewer.tld</taglib-uri>
<taglib-location>/WEB-INF/crystal-tags-reportviewer.tld</taglib-location>
</taglib>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
<res-ref-name>jdbc/dev10g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
<res-ref-name>Data</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
in web-inf\sun-web.xml I have
<sun-web-app>
<resource-ref>
<res-ref-name>jdbc/dev10g</res-ref-name>
<jndi-name>Data</jndi-name>
</resource-ref>
</sun-web-app>
I have copied all of Common Files\Business Objects\3.0\java\lib and Common Files\Business Objects\3.0\java\lib\external to the lib folder
I have copied crystalreportviewers11 to the root of my web application
I have tried to load the JNDI information and display the report
<%@page pageEncoding="UTF-8"
import="com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.report.web.viewer.*,
javax.naming.*,
javax.sql.*,
java.sql.*"%>
<%
InitialContext initContext = new InitialContext();
DataSource source = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
try{
// Look up our data source
DataSource ds = (DataSource)initCtx.lookup("Data");
out.println("found ds under jdbc/Data");
catch ( NamingException e ){
// Look up our data source
DataSource ds = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
initCtx.bind("Data", ds);
out.println("found ds under java:com/env:jdbc/Data - bound into root initial context for Crystal to find");
%>
<%
//Use the relative path to the report; the physical or full qualified URL cannot be used.
String reportName = "useridincluded.rpt";
//Database username and password
String userName = "theuserid";
String password = "thepassword";
//check to see if the Report Source Session Variable already exist
Object reportSource = session.getAttribute("Report1");
// Create a new ConnectionInfos and ConnectionInfo object
com.crystaldecisions.sdk.occa.report.data.ConnectionInfos connectionInfos = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfos();
com.crystaldecisions.sdk.occa.report.data.ConnectionInfo connectionInfo = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfo();
//Set username and password for the report's database
connectionInfo.setUserName(userName);
connectionInfo.setPassword(password);
//Add object to collection
connectionInfos.add(connectionInfo);
//---------- Create a ReportClientDocument -------------
com.crystaldecisions.reports.sdk.ReportClientDocument reportClientDocument = new com.crystaldecisions.reports.sdk.ReportClientDocument();
//---------- Set the path to the location of the report soruce -------------
//Open report.
reportClientDocument.open(reportName, 0);
//Get the report source
reportSource = reportClientDocument.getReportSource();
//---------- Create the viewer and render the report -------------
//create the CrystalReportViewer object
com.crystaldecisions.report.web.viewer.CrystalReportViewer crystalReportViewer = new com.crystaldecisions.report.web.viewer.CrystalReportViewer();
//set the reportsource property of the viewer
crystalReportViewer.setReportSource(reportSource);
//set the DB logon into the viewer
crystalReportViewer.setDatabaseLogonInfos(connectionInfos);
//set viewer attributes
crystalReportViewer.setOwnPage(true);
crystalReportViewer.setOwnForm(true);
crystalReportViewer.refresh();
//set the CrystalReportViewer print mode
//crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.ACTIVEX);
crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.PDF);
//process the report
crystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
%>
On the Sun One Web server
On the Java Tab
JDBC Connection Pools
Pool Name = dev10g
Class name = oracle.jdbc.pool.OracleDataSource
User id = theuserid
url = 10.10.10.10
password=thepassword
JDBC Resources
JNDI Name=dev10g
Pool = dev10g
I get the error finding JNDI name � how do I tell Sun One where the JNDI is to make Crystal Reports work?I tried the following to test the JNDI
I am trying to do JNDI in Sun One Web server 6.1 sp 5 but I seem to be missing an important part. I get two different errors based on the JSP code, �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance� or �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�.
Context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/BOTest">
<Resource name="jdbc/dev10g" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
<Resource name="Data" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
</Context>Sun-one.xml:
<sun-web-app>
<context-root>BOTest</context-root>
<resource-ref>
<res-ref-name>jdbc/dev10g</res-ref-name>
<jndi-name>jdbc/dev10g</jndi-name>
</resource-ref>
</sun-web-app>web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
<res-ref-name>jdbc/dev10g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
<res-ref-name>Data</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>server.xml has:
<RESOURCES>
- <JDBCCONNECTIONPOOL name="dev10g" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
<PROPERTY name="User" value="lab_ro" />
<PROPERTY name="Password" value="0asphalt1" />
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/dev10g" poolname="dev10g" enabled="on" />
<JDBCRESOURCE jndiname="Data" poolname="dev10g" enabled="on" />
- <JDBCCONNECTIONPOOL name="Data" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
<PROPERTY name="User" value="lab_ro" />
<PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
<PROPERTY name="Password" value="0asphalt1" />
</JDBCCONNECTIONPOOL>
<JDBCRESOURCE jndiname="jdbc/Data" poolname="Data" enabled="on" />
<JDBCRESOURCE jndiname="dev10g" poolname="dev10g" enabled="on" />
</RESOURCES>I am getting the following error: �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�
With the following code:
<%@page
import="java.io.*,
javax.sql.*,
javax.naming.*,
java.sql.*,
java.util.*"%>
<%
Context init;
Context ctx;
DataSource datasource;
Connection con;
try
init = new InitialContext();
Context envCtx = (Context) init.lookup("java:comp/env");
datasource = (DataSource) envCtx.lookup("jdbc/dev10g");
catch(NamingException ex)
out.print("Cannot retrieve data source: " + ex.toString(true));
return;
try
con = datasource.getConnection();
catch (Exception e)
out.print("Cannot retrieve connection: " + e.toString());
return;
try
PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
ResultSet results = pstmt.executeQuery();
while (results.next())
out.println(results.getString(1));
catch(Exception ex)
out.print("Got connection, can't execute query: " + ex.toString());
return;
%>I get the following error: Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance
With the following code:
<%@page
import="java.io.*,
javax.sql.*,
javax.naming.*,
java.sql.*,
java.util.*"%>
<%
Context init;
Context ctx;
DataSource datasource;
Connection con;
try
init = new InitialContext();
ctx = (Context) init.lookup("java:comp/env");
datasource = (DataSource) ctx.lookup("jdbc/dev10g");
catch(NamingException ex)
out.print("Cannot retrieve data source: " + ex.toString(true));
return;
try
con = datasource.getConnection();
catch (Exception e)
out.print("Cannot retrieve connection: " + e.toString());
return;
try
PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
ResultSet results = pstmt.executeQuery();
while (results.next())
out.println(results.getString(1));
catch(Exception ex)
out.print("Got connection, can't execute query: " + ex.toString());
return;
%>
Maybe you are looking for
-
Greyed out Volume Format box in Disk Utility 10.4.
Hi, i'm trying to open up more space on my hard drive by doing a full erase. Available space is about 6GB on a 80GB drive. Running OS X 10.4.11. on a Mac Book Black. Want to install 10.6. SL. In Disk Utility the Volume Format box is greyed out. It's
-
Inserting () and $ together in Advanced Actions
Hi, I'm having trouble with advanced actions. When I type in a literal statement ($40,000), it strips out the dollar sign. How can I get it to accept both the parenthesis and the dollar sign? It works correctly if I remove the parenthesis. I'm using
-
Apple & at&t don't like the small business
I own a small business and I am on Verizon. I saw that the new iPhone was coming out that has active sync etc, so I decide that I will try at&t. Well that seems to be where the it went down hill. I sign up with at&t for business contract etc, I have
-
ever since session installs lemon when initiating opens mail, (with leopard not open), and I do not have noticeable the option in dock "to open when initiating session"
-
URGENT: Pool vs. Cache From JDBC
JDBC forum is pretty empty, so I'll try here. I have a database layer that is configurable to allow admin to choose Oracle JDBC connection pooling or connection caching. Here are the results: OracleConnectionPoolDataSource.getPooledConnection().getCo