Javax.naming.LinkException  JNDI error Help please

Hello All,
I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactory latter on.
I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
public static void loop(final Context ctx, final String name) throws Exception {
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahce from.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
Brad

Hello All,
I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
using the fully qualified class name so that I can do an EJBHomeFactory latter on.
I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
public static void loop(final Context ctx, final String name) throws Exception {
try {
String local;
NamingEnumeration childrenOfNaming = ctx.list(name);
while (childrenOfNaming.hasMore()) {
NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
System.out.print(ncPair.getName() + " (type ");
System.out.println(ncPair.getClassName() + ")");
if (name.length() > 0) {
local = name + "." + ncPair.getName();
} else {
local = ncPair.getName();
loop(ctx, local);
} catch (javax.naming.CannotProceedException e) {
// We are at a leaf, no more children.
I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
So I know it exist!
But why as a javax.naming.LinkRef?
Now when I try the following:
String cName = ObjectIDLocalHome.class.getName();
ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
I get:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
What is wrong?
It must be in one of the .xmls but I can't see it:
weblogic-ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ObjectID</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
<cache-between-transactions>False</cache-between-transactions>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OIDServer</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?xml version = '1.0'?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>OIDRecord</display-name>
<enterprise-beans>
<session>
<description><Session Bean ( Stateless )></description>
<display-name>OIDServer</display-name>
<ejb-name>OIDServer</ejb-name>
<local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
<local>com.oga.gserve.biz.oid.OIDServerLocal</local>
<ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<description><The Entity Bean we get our ID cahce from.></description>
<ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
</ejb-local-ref>
</session>
<entity>
<description><Entity Bean ( CMP )></description>
<display-name>ObjectID</display-name>
<ejb-name>ObjectID</ejb-name>
<local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
<local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
<ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ObjectIDBean</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>blockSize</field-name>
</cmp-field>
<cmp-field>
<field-name>nextId</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OIDServer</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>ObjectID</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Thank you for any help,
Brad

Similar Messages

  • Javax.naming.LinkException: Help please

    Hi all,
    I hope one of you can help figure this out.
    I am useing WLS 7 on Win2K.
    When I try this:
    home = (ObjectIDLocalHome) ctx.lookup("ObjectIDLocalHome");
    I get this:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: ''
    Unresolved:'java:app' ; remaining name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    My weblogic-ejb-jar.xml has:
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <local-jndi-name>ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    And my ejb-jar.xml has:
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    And yes the EJB lives in gs-ejbs.jar
    When I goto the WLS console and look at the JNDI Tree I see ObjectIDLocalHome under javax.
    I hope this is just something stupid that I have over looked. HELP please.
    Brad

    Hi Guys,
    Please help me with the solution if any one got it by now ??
    Malay
    >
    Shan, have you found a solution? I'm interested in
    knowing since the same error
    is happening at my end!
    Thanks!
    "Shan" <[email protected]> wrote:
    I am facing the same problem too. Please someonesolve it.
    Thanks.
    ~Shan
    "George Job" <[email protected]> wrote:
    I too am facing the same problem. Does anyone have
    a solution to this
    problem.
    please help.
    "zollen" <[email protected]> wrote:
    I am having the same problem. I even packaged the
    ejbs and jps files
    into a web
    application archive file. It does not seems tosolve the problem. Would
    you mind
    sharing your solution??
    Brad@NoWhere wrote:
    Hi all,
    I hope one of you can help figure this out.
    I am useing WLS 7 on Win2K.
    When I try this:
    home = (ObjectIDLocalHome)
    ctx.lookup("ObjectIDLocalHome");
    I get this:
    javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException:
    Unable to resolve'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    Resolved:
    Unresolved:'java:app' ; remaining name'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    My weblogic-ejb-jar.xml has:
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <entity-cache>
    <cache-between-transactions>False</cache-between-tran
    sactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</ty
    pe-storage>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <local-jndi-name>ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    And my ejb-jar.xml has:
    <entity>
    <description>Entity Bean ( CMP)</description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome<
    /local-home>
    ><local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    ><ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-c
    lass>
    ><persistence-type>Container</persistence-type>
    ><prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-n
    ame>
    And yes the EJB lives in gs-ejbs.jar
    When I goto the WLS console and look at the JNDITree I see ObjectIDLocalHome
    under javax.
    I hope this is just something stupid that I haveover looked. HELP
    please.
    Brad

  • Javax.naming.LinkException Please Help

    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactory latter on.
    I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
    public static void loop(final Context ctx, final String name) throws Exception {
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to
    resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining
    name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahce from.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name =
    ?1]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

    you must pack all .java into one package ,even the client,
    then you can use it normally.
    <Brad@NoWhere> wrote in message news:[email protected]...
    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get thedeployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name iscom.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactorylatter on.
    >
    I have used the WLS console and see my bean in the JNDI tree I also usedthe following to find it:
    >
    public static void loop(final Context ctx, final String name) throwsException {
    >
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair)childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf ofcom.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException: Unable to
    resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: ''Unresolved:'java:app' ; remaining
    name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahcefrom.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS
    o]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name
    => ?1]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

  • Javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Cre...

    Sir/Madam,
    i am working on Windows Platform and I am getting this error when i want ot configure the LDAP.
    Please suggest
    javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3005)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2753)
         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2667)
         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:287)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
         at TestClient.main(TestClient.java:33)
    Thanks in advance.
    Regards
    Neelamadhab

    javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]LDAP is rejecting your credentials (username / password). Make sure your credentials are coorectly given, otherwise get help from LDAP admin.
    regards,
    Sekar

  • Javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundExc

    Hi,
    I get this message when i tried to run the application after i have deployed the EJBs and the application. When i test the EJBs i am also getting that there is a problem in the JNDI name but everything looks fine in the DD and i have checked them twice!! Its really frustrating me as i have finish some work soon.. if you know what i mean. Any help is appreciated , thanks in advance.

    The message is----------->> javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException                                                                                                                                                                                                                           

  • Javax.naming.NameAlreadyBoundException [LDAP: error code 68

    I am getting the below Error when I am trying to add the entry into the LPAD Server.
    javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - Entry Already Exists]; remaining name 'ou=People,dc=company,dc=co,dc=in'
         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
         at com.sun.jndi.ldap.LdapCtx.c_bind(Unknown Source)
         at com.sun.jndi.ldap.LdapCtx.c_bind(Unknown Source)
         at com.sun.jndi.toolkit.ctx.ComponentContext.p_bind(Unknown Source)
         at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(Unknown Source)
         at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(Unknown Source)
         at javax.naming.InitialContext.bind(Unknown Source)
         at com.test.CreateUser.main(CreateUser.java:54)
    I am using the following sample program to test this.
    public class CreateUser {     
    public static void main(String[] args) {
         java.util.Hashtable env = new java.util.Hashtable();
         env.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
         env.put( javax.naming.Context.PROVIDER_URL, "ldap://c-4966:62260");
         env.put( javax.naming.Context.SECURITY_AUTHENTICATION, "simple");
         env.put( javax.naming.Context.SECURITY_PRINCIPAL, "cn=Directory Manager");
         env.put( javax.naming.Context.SECURITY_CREDENTIALS, "test");
         String dn = "ou=People,dc=company,dc=co,dc=in";     
         try {
         // create DirContext
         DirContext ctx = new InitialDirContext(env);
         // Attributes for new entry
         Attributes attrs = new BasicAttributes();
         Attribute attr = new BasicAttribute("objectclass");
         attr.add( 0, "top" );
         attr.add( 1, "person" );
         attr.add( 2, "organizationalPerson" );
         attr.add( 3, "inetorgperson" );
         attrs.put(attr);
         System.out.println("1...........");           
         attrs.put("cn", "Sai Krishna");
         attrs.put("sn", "Potluri");
         attrs.put("givenName","Sia Potluri");
         attrs.put("uid","saipotluri");
         attrs.put("userPassword", "balaji");
         /*attr = new javax.naming.directory.BasicAttribute("mail");
         attr.add( 0, "[email protected]" );
         attr.add( 1, "[email protected]" );
         attrs.put( attr );
         attrs.put( "telephonenumber", "111-1111-3333" );*/
         System.out.println("2...........");
         ctx.bind(dn, attrs);
         } catch ( javax.naming.NamingException ex ) {
         System.err.println("Fail to Add Entry\n");
         ex.printStackTrace();
    Any help is highly appreciated.
    Thanks in Advance
    DARMA

    You're adding the entry "ou=people,dc=company,dc=co,dc=in" and not an entry under "ou=people,dc=company,dc=co,dc=in".
    The dn of the new entry should be something like "cn=Sai Krishna,ou=people,dc=company,dc=co,dc=in" when you call ctx.bind(dn,...)

  • Javax.naming.OperationNotSupportedException:[LDAP: error code 12-00000057

    Hi All,
    I getting the below OperationNotSupportedException while searching the LDAP container
    "'ou=Subscriptions,ou=BMCMarimba,DC=marimba,DC=bmc-dns,DC=com'".
    In our application during the initial search i'm able to search the above container and get the results.But during subsequent search getting the below mentioned error.
    javax.naming.OperationNotSupportedException: [LDAP: error code 12 - 00000057: LdapErr: DSID-0C09068F, comment: Error processing control, data 0, vece]; remaining name 'ou=Subscriptions,ou=BMCMarimba,DC=marimba,DC=bmc-dns,DC=com'
         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3048)\
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)\
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)\
         at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1811)\
         at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1734)\
         at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)\
         at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:328)\
         at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:245)\
         at com.marimba.tools.ldap.physical.LDAPConnectionImpl.getResult(LDAPConnectionImpl.java:901)\
         at com.marimba.tools.ldap.physical.LDAPConnectionPoolImpl.searchWithConnection(LDAPConnectionPoolImpl.java:1369)\
         at com.marimba.tools.ldap.physical.LDAPPagedSearchPR.getPage(LDAPPagedSearchPR.java:402)\
         at com.marimba.tools.ldap.physical.LDAPPagedSearchPR.getPage(LDAPPagedSearchPR.java:238)\
         at com.marimba.tools.ldapsync.util.PageResultEnumeration.getNextPage(PageResultEnumeration.java:159)\
         at com.marimba.tools.ldapsync.policy.core.PolicySync.processNewPolicies(PolicySync.java:351)\
         at com.marimba.tools.ldapsync.policy.core.PolicySync.syncPolicies(PolicySync.java:164)\
         at com.marimba.tools.ldapsync.core.TargetSync.syncTargets(TargetSync.java:163)\
         at com.marimba.tools.ldapsync.core.LDAPDBSync.run(LDAPDBSync.java:617)\
         at java.lang.Thread.run(Thread.java:534)
    Any idea why this exception is coming only in the subsequent search.
    Any help would be greatly appriciated.
    Thanks
    Vallinayagam

    Hope this question raised long back and no suitable answers provided. I want to share my solution which worked for this problem to all the developers hitting their heads to thier PC :-)
    You must use single LDAP connection to retrive all the results.
    For example:
    If your query returns around 10000 results, best way to get the results is using paging. Let us assume you set the page size to 500. Once you retrieve the first 500 results LDAP Connection will give you cookie which stores the information on last page. We need to set the cookie to future use i.e., for retrieving next page (next 500 results). If the connection to get next page is new/different (can be new instance or retrieved from pool) you will get "javax.naming.OperationNotSupportedException:[LDAP: error code 12-00000057".
    So, to avoid this you need to use the same LDAP connection (conext) till you retieve all the results.
    Regards,
    Nageswara Rao.V                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Javax.naming.LinkException:

    While Login to my application I am getting this in my log. How to resolve this? Anyone please guide me.
    javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.TestDS' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/TestDS']; Link Remaining Name: 'jdbc/TestDS'
    -Thanks

    Have you defined the jdbc connection on the server you are deploying the application to (internal, stand alone...)?
    you get the error because the jdbc datasource is not defined.
    Timo

  • LDAP Newbie:    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT)

    Hi,
    I am getting the following error when I try to do a search on an ldap (AD LDS) database:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031522C9, problem 2001 (NO_OBJECT), data 0, best match of:
    'DC=AppPartFE,DC=com'
    ]; remaining name 'cn=Users,dc=AppPartFE,dc=com'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)
    at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
    at javax.naming.directory.InitialDirContext.search(Unknown Source)
    at Test.<init>(Test.java:70)
    at Test.main(Test.java:118)
    I can bind successfully using either the userPrincipalName (UPN) or the Distinguished Name (DN), however my search is failing.
    It is almost as if I am connected to the db tree at the wrong place.  Do I need a different search scope?
    I appreciate any assistance you can provide.
    Here is my code:
    import java.util.*; 
    import static java.lang.System.err;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    import javax.naming.ldap.InitialLdapContext;
    import javax.naming.ldap.LdapContext;
    public class Test 
    public Test() 
      Properties prop = new Properties(); 
      prop.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory"); 
      prop.put("java.naming.provider.url", "ldap://MyHost.Mydomain.labs.CompanyX.com:50004");
      String strProviderUrl = "ldap://MyHost.Mydomain.labs.CompanyX.com:50004";
      // Can successfully bind with the userPrincipalName in AD LDS
      //prop.put("java.naming.security.principal", "[email protected]");
      // Can successfully bind with Distinguished Name
      // Note: the string is case insensitive and embedded blank after a comma is not a problem
       prop.put("java.naming.security.principal", "cn=tst0001,cn=Users,dc=AppPartFE,dc=com"); 
      prop.put("java.naming.security.credentials", "password"); 
      try { 
        LdapContext ctx = new InitialLdapContext(prop, null); 
        System.out.println("Bind successful");
    //I am successful to this point....
       //now try doing a search on another user
         String strFilter = "(&(objectClass=userProxy)(sAMAccountName=tst0001))";
        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); //works with object class=* to find top partition node
        NamingEnumeration<SearchResult> results = ctx.search("cn=Users,dc=AppPartFE,dc=com", strFilter, searchControls);
        SearchResult searchResult = null;
        if(results.hasMoreElements()) {
             searchResult = (SearchResult) results.nextElement();
            //make sure there is not another item available, there should be only 1 match
            if(results.hasMoreElements()) {
                System.err.println("Matched multiple users for the accountName");
      catch (NamingException ex) { 
        ex.printStackTrace(); 
    public static void main(String[] args) 
      Test ldaptest = new Test(); 

    Because you are specifiying a base distinguished name in your ldap url, the ldap context will be rooted at that context and all subsequent objects will be relative to that base distinguished name.//connect to my domain controller
    String ldapURL = "ldaps://rhein:636/dc=bodensee,dc=de";andString userName = "CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de";results in an fully distinguished name of:CN=verena bit,OU=Lehrer,OU=ASR,DC=bodensee,DC=de,dc=bodensee,dc=deEither specify your ldap url asString ldapURL = "ldaps://rhein:636";and leave your username as is, or specify the user object relative to the base distinguished name in the ldapurlString userName = "CN=verena bit,OU=Lehrer,OU=ASR";

  • Javax.naming.AuthenticationNotSupportedException:[LDAP:error Code 13

    package test;
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    import javax.naming.ldap.*;
    public class Test1{
    public static void main(String[] args) {
         try{
              Hashtable env = new Hashtable();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,INITCTX);
                   env.put(Context.PROVIDER_URL,My_HOST);     
                   env.put(Context.SECURITY_AUTHENTICATION,"simple");
                   env.put(Context.SECURITY_PRINCIPAL,MGR_DN);
                   env.put(Context.SECURITY_CREDENTIALS,MGR_PW);
                   DirContext ctx=new InitialDirContext(env);
              }catch(Exception e){
                   e.printStackTrace();
                   System.exit(1);
         public static String INITCTX="com.sun.jndi.ldap.LdapCtxFactory";
         public static String My_HOST="ldap://192.168.0.88:389";
         public static String MGR_DN="uid=kvaughan,ou=people,o=airius.com";
         public static String MGR_PW="bribery";
         public static String MY_SEARCHBASE="o=Airius.com";
    javax.naming.AuthenticationNotSupportedException:[LDAP:error Code 13 Confidentiality Required]

    i have the same Exception
    this post from 2003 and no one post an advice!!
    the exception
    javax.naming.AuthenticationNotSupportedException: [LDAP: error code 48 - Inappropriate Authentication]
    but i found that it is related the
    env.put(Context.SECURITY_AUTHENTICATION, "simple"); // 'simple' = username + password
    simple, EXTERNAL, none
    but after adding this line i still have the same error!!

  • Javax.naming.AuthenticationException [LDAP: error code 49 - 80090308

    i am getting a problem in connection.
    javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece
    plz suggest                                                                                                                                                                                                                                                                                                                                                                                                           

    satish_dhn wrote:
    plz suggesterr code 49 means problem with login credentials.
    "525" (between "data" and "vece" ) means user not found.

  • Javax.naming.NameNotFoundException: LDAP: error code 32

    Hey,
    Scenario:
    User ID does not exist. Two months before it was there. But right now user is no more.
    Since I have returned obj1 which is of type LDAP which contains Strings of Name, User ID, Phone etc. What will be the return value? I have just returned like
    attributes = getContextLdap(servletCtx);
    if (attributes.getAll() == null) {
    return obj1;
    and throws me error javax.naming.NameNotFoundException: LDAP: error code 32
    Rgds,
    Jenni

    One of the reason, as per your requirement, may due to PREDOMINANT catch block for javax.naming.NameNotFoundException.
    Catch that exception.

  • Javax.naming.LinkException: .  Root exception is javax.naming.NameNotFoundException

    Hi
    I have a startup class which needs to access a local entity bean. It used to work
    in weblogic 6.1, i am currently migrating to 8.1 and i get a Link Exception. I
    tried to make the startup class as a listener with in the application (EAR), it
    still complains.
    Since it worked in 6.1 i am sure there should be a way for a startup class to
    access a local EJB, please help, i have seen lot of posting regarding this issue
    in the newsgroup but no clear answer.
    Any one who faced this problem before and had it solved please do repsond ASAP.
    U can mail to me at [email protected]
    Thanks
    Siju

    Are you sure the EJB deployed with that JNDI name?
    Can you show me your weblogic-ejb-jar.xml?
    -- Rob
    Arun wrote:
    Hi,
    Do we have a solution for this problem? I am encountering this problem with an
    Applciation Lifecycle Listener. I have deployed this Listener with my EAR file
    and it accesses a local ejb (stateful) in its postStart() method. The JNDI look
    up is causing a LinkException (root exception is NameNotFoundException)
    I am not at my work PC but the application was something like this.
    "weblogic-application.xml" had something like.
    <listener>
    <listener-class>MyListener</listener-class>
    <listener-uri>mylistener.jar</listener-uri>
    </listener>
    where mylistener.jar was placed at the root of the EAR file.
    MyListener.java was something like,
    import weblogic.application.ApplicationLifecycleListener;
    import weblogic.application.ApplicationLifecycleEvent;
    import mypackage.mylocalhome;
    import mypackage.mylocal;
    import javax.naming.*;
    public class MyListener extends ApplicationLifecycleListener {
    public void preStart(ApplicationLifecycleEvent evt) {
    System.out.println
    ("MyListener(preStart) -- we should always see you..");
    } // preStart
    public void postStart(ApplicationLifecycleEvent evt) {
    try {
    System.out.println
    ("MyListener(postStart) -- we should always see you..");
    Context ctx = new InitialContext();
    mylocalhome localhome = (mylocalhome)ctx.lookup("MYLOCALJNDINAME");
    mylocal localobj = localhome.create();
    } catch (Exception e) {
    e.printStackTrace();
    } // postStart
    public void preStop(ApplicationLifecycleEvent evt) {
    System.out.println
    ("MyListener(preStop) -- we should always see you..");
    } // preStop
    public void postStop(ApplicationLifecycleEvent evt) {
    System.out.println
    ("MyListener(postStop) -- we should always see you..");
    } // postStop
    public static void main(String[] args) {
    System.out.println
    ("MyListener(main): in main .. we should never see you..");
    } // main
    Any help is greatly appreciated.
    Thanks,
    Arun
    Rob Woollen <[email protected]> wrote:
    We'll need some more info. Can you show me your weblogic-ejb-jar.xml,
    the code you are using to lookup the bean, and the full exception?
    -- Rob
    Siju Hariharan wrote:
    Hi
    I have a startup class which needs to access a local entity bean. Itused to work
    in weblogic 6.1, i am currently migrating to 8.1 and i get a Link Exception.I
    tried to make the startup class as a listener with in the application(EAR), it
    still complains.
    Since it worked in 6.1 i am sure there should be a way for a startupclass to
    access a local EJB, please help, i have seen lot of posting regardingthis issue
    in the newsgroup but no clear answer.
    Any one who faced this problem before and had it solved please do repsondASAP.
    U can mail to me at [email protected]
    Thanks
    Siju

  • JNDI lookup help please-Bean to Bean callout locally in same oc4j container

    Hi - I'm fairly new to oc4j/ejb coding - I'm trying to get a simple application running to show that our code can be run in local mode - here is the scenario:
    - Bean A (our application bean) within Application A
    - Bean B (customer-developed bean) within Application B
    - Bean B calls Bean A
    - Bean A + Bean B are different application instances in the same oc4j container
    - Jsp (residing in ApplicationB) within the same oc4j container calling Bean B, which invokes Bean A
    ====
    I get the following exception (classes renamed to match scenario):
    javax.naming.NameNotFoundException: oracle.apps.applicationa.common.BeanA not found in anothercompany.applicationb.common.BeanB
    [java] at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:93)
    [java] at com.oracle.naming.J2EEContext.lookup(J2EEContext.java:76)
    [java] at com.evermind.server.ApplicationContext.lookupJavaCompEnv(ApplicationContext.java:265)
    [java] at com.evermind.server.ApplicationContext.lookupJavaComp(ApplicationContext.java:132)
    [java] at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:306)
    [java] at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:120)
    [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
    - BeanA is part of application named "AppA" in server.xml
    - BeanB is part of application named "AppB" in server.xml
    - AppB has attribute 'parent="AppA"' in server.xml
    - If I change the Jsp file (residing in AppB) to call BeanA directly in the jsp code it works with no JNDI error, but changing the jsp code back to calling BeanB (which then calls BeanA) will throw the NameNotFoundException
    My Stateless Session Bean is very simple and I have tried not setting the context and setting the context. I'm thinking this is a very simple configuration issue, but have not been able to find the solution yet... I've tried playing with the setSessionContext method in the session bean but have had no luck and am not sure what to set the variables to or even if I'm in the correct method...
    public void setSessionContext(SessionContext ctx) {   
    if (verbose)
    System.out.println("setSessionContext called");
    Properties env = new Properties();
    // tried all three context factories...
    //env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationInitalContextFactory");
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory");
    //env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    // not sure what url to put, if any
    //env.put(Context.PROVIDER_URL, "ormi://localhost:23791/AppB");
    env.put(Context.PROVIDER_URL, "ormi://localhost/AppB");
    // tried with and without security principals... also tried sysadmin/sysadmin
    env.put(Context.SECURITY_PRINCIPAL, "guest");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    // mProps is a local transient member var of type Properties
    mProps = env;
    // mCtx is a local transient member var of type SessionContext
    mCtx = ctx;
    (edit) additional info:
    - all beans/classes are in the same classes directory; there are no jar files, so in application.xml the specified classpath is "classes" which includes both appA and appB classes
    - I verified that if I point (appB) jsp directly to BeanA it works with the "parent" attribute set on appB in server.xml, and when I remove the "parent" attribute on appB in server.xml the jsp throws a NameNotFoundException
    edit #2:
    another interesting note is that the exception message says "oracle.apps.applicationa.common.BeanA not found in anothercompany.applicationb.common.BeanB"
    and usually the naming error I see is:
    "oracle.apps.applicationa.common.BeanA not found in appB"
    (as with the case when I use a jsp to access appA beans without setting the parent application of appB to appA)
    - also my j2ee/home/applications/appB/WEB-INF/web.xml includes the oracle.apps.applicationa.common.BeanA ejb-ref tag
    any help is appreciated - thanks!
    Message was edited by:
    oleon

    Hi Steve
    thanks for the reply - I currently have the parent attribute set in server.xml which is why the jsp connection works, but for some strange reason the bean cannot connect to other bean...
    my server.xml has something like...
    <application name="appA" location="appA" auto-start="true"/>
    <application name="appB" location="appB" parent="appA" auto-start="true"/>
    (ok, the tags might be off because I'm not in front of my workstation looking at the xml file...)
    on another interesting note, in the session bean for AppB I've tried searching for the ejb bean for app B (itself basically) with the default initial context and it cannot find its own bean within the same application... the message would be something like "NameNotFoundException: anothercompany.applicationb.common.BeanB not found in anothercompany.applicationb.common.BeanB"

  • Javax.naming.NoInitialContextException! Urgent help needed

    Hi All
    I'm using Oracle Application Server(OC4J) for J2EE. i created an application of Stateless Session Bean & tested on j2sdkee1.3.1, & it is working fine on it. Same Application (an .ear file) i deployed on OC4J. But it is giving an error NoInitialContextException, lookup fails here.
    Application contains method getEchoString(String):String & a index.jsp page calling a bean's method.
    Can anybody tell me the solution to get handle of beans home interface for calling method.
    Already i've wasted many days for this. Plz help. It's urgent
    Thanks in Advance

    To the best of my knowledge, the 'javax.naming.ldap' package is fairly new, and is only included in the most recent distributions of the JNDI API. I know that this package is included with J2SDK 1.3, and I can also confirm that the very latest JNDI distribution (from http://java.sun.com/products/jndi/#download) contains the package.
    Good luck,
    -Derek

Maybe you are looking for

  • How to add a watermark at the back of the report page

    I want to add a watermark 'DRAFT' at the back of the report page. Could you please tell me how can I do that? regards

  • PC Suite not starting automatically after re-boot.

    Running the latest version of PC Suite in 32bit Vista. Every time I re-boot my PC, PC Suite refuses to start automatically, and there is no icon in the tray. I have to go into start, programs, etc..,then 'click to connect a phone' every time. Very an

  • Foreign character sets in a database

    I am developing a site where people in many countries (mainly Scandinavian) can log on and update their pages. The information, (including passwords and usernames) is stored in an access database. I am using Access because I have no knowledge of PHP

  • BI Dashboard Performance

    I just want to explore any options for imporiving the perfomance on BI dashboards using Static HTML to generate the UI for iview on portal.  ANy experts please suggest orpoint me to a certain documentation.

  • Force Closing when trying to edit contacts

    Lately after receiving my new replacement droid with the Froyo already installed; every time i try to edit a contact i get force closed error messages? Is anyone else receiving this message?