Javax.naming.NotContextException when trying to bind to a context
Hi all.
I am trying to use file system service provider.
This is how I create the context:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/test");
DirContext ctx = new InitialDirContext(env);
When I try to invoke bind on ctx ;
ctx.bind(name, obj, attrs)
I get exception:
javax.naming.NotContextException: Not an instance of DirContext
at javax.naming.directory.InitialDirContext.getURLOrDefaultInitDirCtx(Unknown Source)
Can anyone help me get around this problem.
thanks.
I don't think that
com.sun.jndi.fscontext.RefFSContextFactory
supports DirContext; just Context.
Similar Messages
-
Looking up a remote session bean javax.naming.NotContextException
Hi,
I am having trouble when looking up for a remote session bean from my ejb application. I am running jboss 4.0.4 with ejb3.0. I am trying to access a remote computer running jboss 4.0.4 but with 2.1 option. Following is my code
Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.security.jndi.JndiLoginInitialContextFactory");
props.setProperty(Context.SECURITY_PRINCIPAL, "admin");
props.setProperty(Context.SECURITY_CREDENTIALS, "admin");
props.setProperty(Context.PROVIDER_URL, "jnp://192.168.10.130:1099/");
Context ctx = new InitialContext(props);
Object object = ctx.lookup( "ejb/com/blah/Manager/remote" );
ManagerRemoteHome home = (ManagerRemoteHome)PortableRemoteObject.narrow ( object, ManagerRemoteHome.class);
ManagerRemote manager = home.create();
I get an exception at the following line
ManagerRemoteHome home = (ManagerRemoteHome)PortableRemoteObject.narrow ( object, ManagerRemoteHome.class);
2006-11-02 15:02:49,194 ERROR [STDERR] javax.naming.NotContextException
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:285)
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
2006-11-02 15:02:49,194 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
2006-11-02 15:02:49,194 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Instead of deploying remotely on a different machine I deployed in on my instance of jboss and everything works ok.
Message was edited by:
fkzeljoThanks for your reply,
I tried deploying it under local instance of jboss. It worked. However when I add the following line
props.setProperty(Context.PROVIDER_URL, host);
even if host is set to
String host = "jnp://localhost:1099";
I started getting the following exception
2006-11-03 10:17:18,319 ERROR [STDERR] java.lang.ClassCastException
2006-11-03 10:17:18,319 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
2006-11-03 10:17:18,319 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
As soon as I uncomment that line everything works fine.
I have seen this type of exception before when I tried invoking the ejb on a different computer as well. I am not sure how to see what is the wrapper class for the object since the call to object.getClass().getName() prints something like this $Proxy184
This is my code again:
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.security.jndi.JndiLoginInitialContextFactory");
props.setProperty(Context.SECURITY_PRINCIPAL, "admin");
props.setProperty(Context.SECURITY_CREDENTIALS, "admin");
props.put(javax.naming.Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
String host = "jnp://localhost:1099";
props.setProperty(Context.PROVIDER_URL, host);
ctx = new InitialContext( props );
Object object = ctx.lookup( "ejb/com/blah/Manager" );
ManagerRemoteHome home = (ManagerRemoteHome)PortableRemoteObject.narrow ( object, ManagerRemoteHome.class);
ManagerRemote manager = home.create();
Thanks -
hi,
i have installed hr schema and created a page with a table.when i run the page,
i am getting javax.naming.NameNotFoundException: While trying to lookup 'jdbc.SampleHR1DS' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/SampleHR1DS'
Do i need to create data source for this.How to resolve this.
i am using 11.1.2.4.0 jdevthere are multiple option of creating data source.which one i should use.
should i use generic one. what is URL information for oracle xe client.what is driver name? -
Summary of problem: Get a javax.naming.NamingNotFoundException when selecting the DataSource (see the configuration below) in server JNDI tree in Admin Console
TheConnection Pool and a corresponding DataSource are configured as follows:
<JDBCDataSource
JNDIName="jdbc.PNStoreDB"
Name="PNStoreDB"
PoolName="PNStorePool"
Targets="serverA"
/>
<JDBCConnectionPool
CapacityIncrement="2"
DriverName="weblogic.jdbc.oci.Driver"
InitialCapacity="2"
LoginDelaySeconds="1"
MaxCapacity="10"
Name="PNStorePool"
Properties="user=rms;password=rms;server=ora81"
RefreshMinutes="10"
Targets="serverA"
TestTableName="dual"
URL="jdbc:weblogic:oracle"
/>
Can't figure out why this is happening. The following is output to the Admin Server command prompt:
<May 18, 2001 10:20:02 AM EDT> <Error> <HTTP> <[WebAppServletContext(6233000,console)] exception raised on '/console/panel
javax.naming.NameNotFoundException: Unable to resolve jdbc. Resolved: '' Unresolved:'jdbc' ; remaining name ''
<<no stack trace available>>
I tried using a different JNDI name for the DataSource (e.g. just PNStoreDB) with no success.
The weird thing is that it messes up other resources bound in the JNDI tree. For e.g. I have some EJB's bound under ejb/XXXX that I can click on and view in the Admin Console (JNDI tree) before I add the pool and DataSource. After I add them though, I see the same NameNotFoundException for these as well.
Thanks in advance for your help.
[att1.html]Are you sure that the connection pool and datasource deployed
successfully? (Check the logs for an error.)
Also, I suspect that you want a TxDataSource instead of a
JDBCDataSource.
-- Rob
Weblogic NewsGroups wrote:
Summary of problem: Get a javax.naming.NamingNotFoundException when
selecting the DataSource (see the configuration below) in server JNDI
tree in Admin Console
TheConnection Pool and a corresponding DataSource are configured as
follows:
<JDBCDataSource
JNDIName="jdbc.PNStoreDB"
Name="PNStoreDB"
PoolName="PNStorePool"
Targets="serverA"
/>
<JDBCConnectionPool
CapacityIncrement="2"
DriverName="weblogic.jdbc.oci.Driver"
InitialCapacity="2"
LoginDelaySeconds="1"
MaxCapacity="10"
Name="PNStorePool"
Properties="user=rms;password=rms;server=ora81"
RefreshMinutes="10"
Targets="serverA"
TestTableName="dual"
URL="jdbc:weblogic:oracle"
/>
Can't figure out why this is happening. The following is output to
the Admin Server command prompt:
<May 18, 2001 10:20:02 AM EDT> <Error> <HTTP>
<[WebAppServletContext(6233000,console)] exception raised on
'/console/panel
javax.naming.NameNotFoundException: Unable to resolve jdbc. Resolved:
'' Unresolved:'jdbc' ; remaining name ''
<<no stack trace available>>
I tried using a different JNDI name for the DataSource (e.g. just
PNStoreDB) with no success.
The weird thing is that it messes up other resources bound in the JNDI
tree. For e.g. I have some EJB's bound under ejb/XXXX that I can
click on and view in the Admin Console (JNDI tree) before I add the
pool and DataSource. After I add them though, I see the same
NameNotFoundException for these as well.
Thanks in advance for your help.--
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com -
ExtendedOperation() with TLS fails with javax.naming.NotContextException
With JDK 1.4.2_12, I'm trying to access a Win2003 server with "ldap://<fqdn.server>:389" as Context.PROVIDER_URL. An SSL connection ("ldaps://<fqdn.server>:636") using the same keystore works fine. Testing it as a stand-alone app with TLS on a different machine also works fine (JDK 1.4.2_11) . Any help would be much appreciated as I'm completely flummoxed.
The line that throws the error is:
tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest());-Gregg
======================================
LdapContext ctx = null;
StartTlsResponse tls = null;
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put("java.naming.ldap.version" , "3");
env.put("java.naming.ldap.derefAliases", "always");
env.put(Context.PROVIDER_URL, getLDAPURL());
if (useSSL()) env.put(Context.SECURITY_PROTOCOL, "ssl");
if (useSSL() || useTLS()) {
java.lang.System.setProperty(JAVA_NET_KEYSTORE, getKeystore());
java.lang.System.setProperty(JAVA_NET_KEYSTORE_PW, getKeystorePass());
java.lang.System.setProperty(JAVA_NET_TRUSTSTORE, getKeystore());
java.lang.System.setProperty(JAVA_NET_TRUSTSTORE_PW, getKeystorePass());
try {
// Create initial context
ctx = new InitialLdapContext(env, null);
if (useTLS()) {
tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest());
} catch (NamingException e) {
}======================================
Partial stack trace:
at javax.naming.ldap.InitialLdapContext.extendedOperation(InitialLdapContext.java:163)
at javax.naming.ldap.InitialLdapContext.getDefaultLdapInitCtx(InitialLdapContext.java:151)
javax.naming.NotContextException: Not an instance of LdapContextIf it works on one machine and not another, then I hate to state the obvious, but you have to find out what is the difference between the two.
I have no idea why or how you get the "Not an instance of LdapContext". Unfortunately for you, this is where I can resort to my lame "I'm not a Java developer" excuse :-)
The only thing I can suggest is to remove the StartTLS stuff, and just see whether you can perform a basic LDAP operation over the ctx, such as a simple search.
Sorry that this is not much help.
Good luck. -
What are solutions to the "Unexpected error while attempting to bind. Operation cancelled." message when trying to bind and i alreeady cheack my DNS settings and everything
Has this worked before, or is this a new configuration?
On the server, launch Terminal.app from Applications > Utilities and post the output of the following harmless diagnostic command — and you'll need to enter an administrative password when requested:
sudo changeip -checkhostname
On the OS X (presumably) Mavericks client, please post the IP address(es) of the DNS server(s) you're referencing. These are available via the System Preferences > Network > Advanced > DNS settings.
To check the console logs, launch Console.app from Applications > Utilities on both the client and the server, and then attempt the binding, and then post a (short! no more than ~25 to 50 lines!) of any errors related to the binding error.
If you're not in a position to post configuration details here — which is perfectly reasonable, and entirely your prerogative — or if I'm getting too confusing or too technical with some of the questions here, which would be my error of course — then (assuming these systems are under warranty) I'd suggest contacting the folks at the local Apple Store and having a chat with the local Geniuses about this, or checking directly with the Apple Support folks via telephone. -
"Protocol family unavailable" when trying to bind to an IPv6 address
Hi,
When trying to bind to an IPv6 address using the Socket class, I get "Protocol family unavailable". Is there a fix to that?
Thanks,
Ronenread:
http://search.msdn.microsoft.com/search/Default.aspx?
query=IPv6&brand=msdn&locale=en-us&refinement=00&lang=en-us -
DataSource CORP_LDAP: Naming exception when trying to create principal
Using NetWeaver 6.40 SP 15.
I have configured the UME to use writable LDAP and database. Specifically, for LDAP I'm using the Sun One Directory Server. I'm able to authenticate using one of the LDAP users using a Web Dynpro app.
When I try to create a user through the NWA web app, I simply get a "Could not create user" error in the application. In the server instance "security.log" I found the following:
Date : 03/08/2006
Time : 16:22:59:248
Message : DataSource CORP_LDAP: Naming exception when trying to create principal ***************************************************************************
com.sap.security.core.persistence.imp.PrincipalDatabagMaint Wed Mar 08 16:22:59 CST 2006
UniqueID: USER.CORP_LDAP.testuser
Type: USER
Home data source: CORP_LDAP
Private id part: testuser
"com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="testuser"
"com.sap.security.core.usermanagement"|->"department" (no time limit)="CI&T"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_CREATION_DATE" (no time limit)="0001141856579248"
"com.sap.security.core.usermanagement"|->"firstname" (no time limit)="user"
"com.sap.security.core.usermanagement"|->"lastname" (no time limit)="test"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_TYPE_ATTRIBUTE" (no time limit)="USER"
"com.sap.security.core.usermanagement"|->"email" (no time limit)="[email protected]"
"com.sap.security.core.usermanagement"|->"company" (no time limit)=""
"com.sap.security.core.usermanagement"|->"accessibilitylevel" (no time limit)="0"
Severity : Error
Category : /System/Security/Usermanagement
Location : com.sap.security.core.persistence
Application : sap.com/com.sap.security.core.admin
Thread : SAPEngine_Application_Thread[impl:3]_22
Datasource : 1141856104605:C:\usr\sap\J2E\JC00\j2ee\cluster\server0\log\system\security.log
Message ID : 000D60DD8A4D00540000001C0000136000040E8333C9FD7C
Source Name : /System/Security/Usermanagement
Argument Objs : CORP_LDAP,***************************************************************************
com.sap.security.core.persistence.imp.PrincipalDatabagMaint Wed Mar 08 16:22:59 CST 2006
UniqueID: USER.CORP_LDAP.testuser
Type: USER
Home data source: CORP_LDAP
Private id part: testuser
"com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="testuser"
"com.sap.security.core.usermanagement"|->"department" (no time limit)="CI&T"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_CREATION_DATE" (no time limit)="0001141856579248"
"com.sap.security.core.usermanagement"|->"firstname" (no time limit)="user"
"com.sap.security.core.usermanagement"|->"lastname" (no time limit)="test"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_TYPE_ATTRIBUTE" (no time limit)="USER"
"com.sap.security.core.usermanagement"|->"email" (no time limit)="[email protected]"
"com.sap.security.core.usermanagement"|->"company" (no time limit)=""
"com.sap.security.core.usermanagement"|->"accessibilitylevel" (no time limit)="0"
Arguments : CORP_LDAP,***************************************************************************
com.sap.security.core.persistence.imp.PrincipalDatabagMaint Wed Mar 08 16:22:59 CST 2006
UniqueID: USER.CORP_LDAP.testuser
Type: USER
Home data source: CORP_LDAP
Private id part: testuser
"com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="testuser"
"com.sap.security.core.usermanagement"|->"department" (no time limit)="CI&T"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_CREATION_DATE" (no time limit)="0001141856579248"
"com.sap.security.core.usermanagement"|->"firstname" (no time limit)="user"
"com.sap.security.core.usermanagement"|->"lastname" (no time limit)="test"
"com.sap.security.core.usermanagement"|->"PRINCIPAL_TYPE_ATTRIBUTE" (no time limit)="USER"
"com.sap.security.core.usermanagement"|->"email" (no time limit)="[email protected]"
"com.sap.security.core.usermanagement"|->"company" (no time limit)=""
"com.sap.security.core.usermanagement"|->"accessibilitylevel" (no time limit)="0"
Dsr Component : <masked id>_J2E_7234450
Dsr Transaction : 79521ee0aef011da9168000d60dd8a4d
Dsr User : Administrator
Indent : 0
Level : 0
Message Code :
Message Type : 1
Relatives : com.sap.security.core.persistence
Resource Bundlename :
Session : 200
Source : /System/Security/Usermanagement
ThreadObject : SAPEngine_Application_Thread[impl:3]_22
Transaction :
User : Administrator
Where can I find the initial NamingException?Hi All,
Thanks for your replies and SORRY for my late response.
Now, what I actually want is that though my UME is connected to LDAP i want to the portal admin to be able to create users in the portal DB. I checked my UME configuration and it says
Microsoft ADS (Deep Hheirarchy) + Database
and the name of the configuration file is
dataSourceConfiguration_ads_deep_writeable_db.xml
Now I could not understand why I am not able to create users in the DB?
Does the portal has any restriction like at any given point of time only one of the user stores can be active? Doesnt the portal allow both the user stores to be active at a time?
regards,
PK -
Hi All,
Am using jdeveloper 11.1.1.6. Am trying to send a mail through ADF
I have verfied the link which given below and trying to do the same.
http://adfblogs.blogspot.in/2012/01/sending-e-mail-from-adf-application.html
While am pressing the send button am getting the exception as
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.el.EvaluationException: javax.naming.NameNotFoundException: While trying to lookup 'mail.NewMailSession' didn't find subcontext 'mail'. Resolved ''; remaining name 'mail/NewMailSession'
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
Could any one pls help me to resolve it?I had restarted the weblogic server even though am getting the same error
javax.naming.NameNotFoundException: While trying to lookup 'mail.NewMailSession' didn't find subcontext 'mail'. Resolved ''; remaining name 'mail/NewMailSession'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at Mail.SendAction(Mail.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) -
Error when trying to bind without "cn=" prefix
I am trying to bind a java object, via jndi, into an LDAP server and
am getting an error.
We have already bound jms.topics using IBM's JMSAdmin tool (a java
tool), and they are in with names like "bucks" and "dela". Now, we
want to put objects in from another tool instead of using the IBM
tool.
I am able to get the objects in, but I am forced to use "cn=myObject"
instead of "myObject". For programic reasons, the later is what I
need to do.
Here is the code:
// create the ctx
InitialDirContext ctx = new InitialDirContext(env);
// create the topic object with topic name of myTopic
Topic q = new com.ibm.mq.jms.MQTopic("myTopic");
// bind the object to the LDAP with the name == the topic name
ctx.bind(new CompositeName("myTopic"),q);
This results in
javax.naming.directory.SchemaViolationException: [LDAP: error code 65
- Object Class Violation]; remaining name 'myTopic'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:903)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:657)
at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:1428)
at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:459)
at com.sun.jndi.toolkit.ComponentContext.p_bind(ComponentContext.java:594)
at com.sun.jndi.toolkit.PartialCompositeContext.bind(PartialCompositeContext.java:185)
at javax.naming.InitialContext.bind(InitialContext.java:366)
at JNDITool.main(JNDITool.java:74)
But, if I use
ctx.bind(new CompositeName("cn=myTopic"),q);
it works fine, but appears as "cn=myTopic" in the naming directory.
In order to be backward compatible with another application, I need to
have the name be merely "myTopic".
Anybody know what IBM's JMSAdmin tool is doing differenctly to achieve
this?
TIA,
GonzoSo the answer is you need to create some attributes to use when binding:
// create the attributes for the binding.
BasicAttributes basicattributes = new BasicAttributes();
basicattributes.put("objectclass", "javaContainer");
basicattributes.put("cn", topicName);
// do the binding
((DirContext)ctx).bind(topicName, newTopic, basicattributes);
Gonzo -
JNDI hanging when trying to BIND
We are currently having problems with our application hanging when it tries to obtain LDAP context. I have attached a thread dump. Once all the threads start hanging the weblogic server cannot do any work and needs to be restarted. Any help would be appreciatted.
I can make it happen by creating a load on the server.
Code snippet:
we call a static method to return us a context instance, context is not shared.
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://"+directoryHost+":"+directoryPort);
env.put(Context.SECURITY_PRINCIPAL, name);
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(Context.REFERRAL,"follow");
DirContext ctx = new InitialDirContext(env);
return ctx;
Thread dump (there are a few threads like this)
"ExecuteThread: '36' for queue: 'default'" daemon prio=5 tid=0x2718c808 nid=0x77
c waiting on monitor [0x2852f000..0x2852fdc0]
at java.lang.Object.wait(Native Method)
- waiting on <55e31f0> (a com.sun.jndi.ldap.LdapRequest)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:283)
- locked <55e31f0> (a com.sun.jndi.ldap.LdapRequest)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:310)
- locked <55e31d8> (a com.sun.jndi.ldap.LdapClient)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:163)
- locked <55e31d8> (a com.sun.jndi.ldap.LdapClient)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2386)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:239)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
a:74)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
60)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:193)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.jav
a:78)
at com.truecontext.wasabi.business.util.LDAPUtil.getContext(LDAPUtil.jav
a:318)
at com.truecontext.wasabi.business.devman.dao.SynchronizationProfileDAOi
Planet.getObjectsByFilter(SynchronizationProfileDAOiPlanet.java:562)
at com.truecontext.wasabi.business.devman.dao.SynchronizationProfileDAOi
Planet.getObjectsByFilter(SynchronizationProfileDAOiPlanet.java:544)
at com.truecontext.wasabi.business.devman.dao.SynchronizationProfileDAOi
Planet.findSynchronizationProfileDataByDeviceAndUser(SynchronizationProfileDAOiP
lanet.java:1319)
at com.truecontext.wasabi.business.devman.ejb.DeviceMgrEJB.findSynchroni
zationProfileDataByDeviceAndUser(DeviceMgrEJB.java:6502)
at com.truecontext.wasabi.business.devman.ejb.DeviceMgrEJB_fo5kg5_EOImpl
.findSynchronizationProfileDataByDeviceAndUser(DeviceMgrEJB_fo5kg5_EOImpl.java:7
010)
at com.truecontext.wasabi.business.devman.ejb.DeviceMgrSyncSessionEJB.fi
ndSynchronizationProfileDataByDeviceAndUser(DeviceMgrSyncSessionEJB.java:880)
at com.truecontext.wasabi.business.devman.ejb.DeviceMgrSyncSessionEJB_th
6b7o_EOImpl.findSynchronizationProfileDataByDeviceAndUser(DeviceMgrSyncSessionEJ
B_th6b7o_EOImpl.java:166)
at com.truecontext.wasabi.business.sync.ejb.SFSyncEngineEJB.beginSync(SF
SyncEngineEJB.java:1008)
at com.truecontext.wasabi.business.sync.ejb.SFSyncEngineEJB.doProcess(SF
SyncEngineEJB.java:867)
at com.truecontext.wasabi.business.sync.ejb.SFSyncEngineEJB.doProcess(SF
SyncEngineEJB.java:782)
at com.truecontext.wasabi.business.sync.ejb.SFSyncEngineEJB_62algz_EOImp
l.doProcess(SFSyncEngineEJB_62algz_EOImpl.java:199)
at com.truecontext.wasabi.presentation.sync.servlet.SFSyncListener.onMes
sage(SFSyncListener.java:352)
at com.truecontext.wasabi.presentation.sync.servlet.SFSyncListener.doPos
t(SFSyncListener.java:284)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:5445)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:780)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3105)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2588)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Environment:
iplanet directory server 5.1 Service Pack 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_08-b03) (also tried 1.4.2)
OS Name Microsoft Windows 2000 Server
Version 5.0.2195 Service Pack 4 Build 2195
BEA Weblogic Server 7.0 sp2We are having the same problem as well and this has been reported else where as well.
We were able to reproduce this problem on the full blown Weblogic application, with a simple program which creates a large number of connection in quick succession - after a certain number of connections ( about 60), the client simply hangs! It turns out that this is a known problem with iPlanet 5.1 with SSL: http://www.openldap.org/lists/openldap-software/200205/msg00567.html
I have also posted this message to the Directory Server forum at Sun, but have not heard anything yet!
http://swforum.sun.com/jive/thread.jspa?threadID=46914&tstart=0
There have been quite a few other cases of this problem ( probably manifesting itself in other forms!)
http://forum.java.sun.com/thread.jsp?forum=51&thread=358357
Let me know if you come up with a solution to your problem -
Javax.naming.NoInitialContextException when invoking an EJB
Hi,
I've deployed a stateless session EJB in oc4j and invoking it thru a Java client. I'm using Eclipse. I've a jndi.properties in config folder of my application which is in the classpath of the client code.
The jndi.properties has :
java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://<localhost>:12401/OC4JEJB
java.naming.security.principal=oc4jadmin
java.naming.security.credentials=oc4jadmin
where OC4JEJB is the application name deployed in oc4j.
This jndi.properties file is in the classpath.
My client code is :
Server server = null; //interface
ServerHome testSessionBean; //implementation of methods in Server interface
try {
Context ctx = new InitialContext();
Object objref = ctx.lookup("EJBServer"); //JNDI name
Object obj = PortableRemoteObject.narrow(objref, ServerHome.class);
testSessionBean = (ServerHome) PortableRemoteObject.narrow(objref,
ServerHome.class);
server = testSessionBean.create();
} catch (...) { }
When i set the properties and do a look up
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");//oc4jadmin
env.put(Context.SECURITY_CREDENTIALS, "oc4jadmin");
env.put(Context.PROVIDER_URL,
"ormi://<localhost>:12401/OC4JEJB");
InitialContext ctx = new InitialContext(env);
it works perfectly fine.
But when i use the jndi.properties it gives the following exception.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.ORION_EJB_Util.getServer(ORION_EJB_Util.java:203)
at client.ORION_EJB_Util.<init>(ORION_EJB_Util.java:90)
at client.TestClient.main(TestClient.java:26)
client.exception.EJBUtilException
at client.ORION_EJB_Util.getServer(ORION_EJB_Util.java:248)
at client.ORION_EJB_Util.<init>(ORION_EJB_Util.java:90)
at client.TestClient.main(TestClient.java:26)
Invoking the server
Inside getServer method
Obtained Initial Context javax.naming.InitialContext@422ede
Exception null
I've tried placing the jndi.properties in j2ee/home/applib too. Where shud i place this jndi.properties and invoke the EJB?
Could anyone help resolve this issue?
Thanks in advance,
SprighteeTry add your jndi.properties to your CLASSPATH.
See this doc for more details of RMI.
http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28958/rmi.htm#i1084792 -
Weblogic not finding javax.naming classes when instantiating bean
Hello,
I am developing a JSP which contains a JavaBean.
This bean is a wrapper for a session EJB, the getProperty() methods in
the bean call methods on the EJB's remote interface.
I have tested this bean as a stand alone application by adding a
main(String[] args) method to it and it works.
However, when adding the bean to the JSP, the JSP does not show in the
browser, I get a n internal server error 500 instead.
It seems that Weblogic is not finding the javax.naming.NamingException
class when instantiating the bean.
When looking at the weblogic log, I see the following stack trace:
Fri Aug 18 15:12:06 EDT 2000:<E> <ServletContext-General> Servlet failed
with Exception
java.lang.NoClassDefFoundError: javax/naming/NamingException
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:579)
at
weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(GenericClassLoader.java,
Compiled Code)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java,
Compiled Code)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java,
Compiled Code)
at java.beans.Beans.instantiate(Beans.java:194)
at java.beans.Beans.instantiate(Beans.java:55)
at weblogic.servlet.jsp.JspLexer.processBeanTag(JspLexer.java:1138)
at weblogic.servlet.jsp.JspLexer.mXML_OPEN_USEBEAN(JspLexer.java,
Compiled Code)
at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1554)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java, Compiled Code)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java, Compiled
Code)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java, Compiled Code)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java, Compiled Code)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java,
Compiled Code)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled
Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:92)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:191)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
Any idea on how to fix this?
Thanks for any help,
David
yes, weblogicaux.jar is definitely in the weblogic.class.path. i've even tried starting the server from the command line, declaring the classes there. my "trade.xml" document has the URI set as "http://localhost:7001/BizTalkServer". when i enter this on the "BizClient.jsp" form, i get the error discussed below. however, if i enter "http://localhost:7001", even though this is not the explicit location of the BizTalk server, the server returns:
Thank you! Your trade has been recieved. A BizTalk document has been sent to http://localhost:7001/ with the following information: etc...............
So there appears to be something wrong with the "/BizTalkServer" setup on my machine. Any ideas?
Kumar Allamraju <[email protected]> wrote:
>Make sure weblogicaux.jar is in your weblogic.class.path
>
>i.e -Dweblogic.class.path=$WL_HOME/lib/weblogicaux.jar:$WL_HOME/classes etc etc...
>
>--
>Kumar
>
>Mike Bachers wrote:
>
>> I'm currently struggling with a similar problem, although as a newcomer to WL I'm having some trouble figuring it out. I'm trying to run the BizTalk server example (http://www.weblogic.com/docs51/examples/xml/biztalk/index.html) under Windows 2000 and JDK1.2.2. I'm able to proceed without problems until I submit the form on the "BizClient.jsp" page. At this point, I receive this error:
>> ------------------------------------------------
>> There was a problem connecting to the BizTalk server. Exception caught: java.io.FileNotFoundException: Response: '500' for url: 'http://localhost:7001/BizTalkServer'
>> ------------------------------------------------
>>
>> At the same time, the WL console spits this out:
>> ------------------------------------------------
>> java.lang.NoClassDefFoundError: javax/naming/NamingException
>> ....
>> ------------------------------------------------
>>
>> I know this class is in the weblogicaux.jar, and it's included in my classpath. I think David's fix (see below) is getting at my problem, too, but I'm not sure. Anyone relate?
>>
>> "David R. Heffelfinger" <[email protected]> wrote:
>> >Figured it out. The problem was that the beans were in a directory
>> >in the JAVA_CLASSPATH in weblogic.properties. Moved the directory to
>> >WEBLOGIC_CLASSPATH and the problem went away.
>> >
>> >David
>> >
>> >"David R. Heffelfinger" wrote:
>> >
>> >> Hello,
>> >>
>> >> I am developing a JSP which contains a JavaBean.
>> >> This bean is a wrapper for a session EJB, the getProperty() methods in
>> >> the bean call methods on the EJB's remote interface.
>> >>
>> >> I have tested this bean as a stand alone application by adding a
>> >> main(String[] args) method to it and it works.
>> >>
>> >> However, when adding the bean to the JSP, the JSP does not show in the
>> >> browser, I get a n internal server error 500 instead.
>> >> It seems that Weblogic is not finding the javax.naming.NamingException
>> >> class when instantiating the bean.
>> >>
>> >> When looking at the weblogic log, I see the following stack trace:
>> >>
>> >> Fri Aug 18 15:12:06 EDT 2000:<E> <ServletContext-General> Servlet failed
>> >> with Exception
>> >>
>> >> java.lang.NoClassDefFoundError: javax/naming/NamingException
>> >>
>> >> at java.lang.ClassLoader.resolveClass0(Native Method)
>> >>
>> >> at java.lang.ClassLoader.resolveClass(ClassLoader.java:579)
>> >>
>> >> at
>> >> weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(GenericClassLoader.java,
>> >> Compiled Code)
>> >>
>> >> at
>> >> weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java,
>> >> Compiled Code)
>> >>
>> >> at
>> >> weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java,
>> >> Compiled Code)
>> >>
>> >> at java.beans.Beans.instantiate(Beans.java:194)
>> >>
>> >> at java.beans.Beans.instantiate(Beans.java:55)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.processBeanTag(JspLexer.java:1138)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.mXML_OPEN_USEBEAN(JspLexer.java,
>> >> Compiled Code)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.mXML_THING(JspLexer.java:1554)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java, Compiled Code)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java, Compiled
>> >> Code)
>> >>
>> >> at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java, Compiled Code)
>> >>
>> >> at weblogic.servlet.jsp.JspParser.doit(JspParser.java, Compiled Code)
>> >>
>> >> at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
>> >>
>> >> at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
>> >>
>> >> at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java,
>> >> Compiled Code)
>> >>
>> >> at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java, Compiled
>> >> Code)
>> >>
>> >> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
>> >>
>> >> at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:92)
>> >>
>> >> at
>> >> weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:191)
>> >>
>> >> at
>> >> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
>> >>
>> >> at
>> >> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
>> >>
>> >> at
>> >> weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
>> >>
>> >> at
>> >> weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
>> >>
>> >> at
>> >> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
>> >>
>> >> at
>> >> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
>> >>
>> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
>> >>
>> >> Any idea on how to fix this?
>> >>
>> >> Thanks for any help,
>> >> David
>> >
>
-
Fold down window just disappears when trying to bind to AD
We're switching back to Macs!!
In preparation I'm trying to bind my MacBook (10.5.6) to the Windows server (I've done this successfully at another school).
When I go to Directory Access, click the + , put in the info, the fold down window goes away and nothing happens, I'm pretty ignorant so be gentle.AD is already enabled, I'm bound at another location. Just when when I click the + to add this one, fill it out and click OK,it folds away and nothing happens, I tried putting in rubbish and I get the same, no error messages, it just folds up and ignores me. I did create a computer for this Macbook on the AD server.
-
Underflow Exception when trying to bind small double to BINARY_DOUBLE
I get exception when trying to insert small double value (1.0E-131) into BINARY_DOUBLE column via jdbc.
The exception I get:
Exception in thread "main" java.sql.SQLException: Underflow Exception trying to bind 1.0000000000000001E-131
at oracle.jdbc.driver.DoubleBinder.bind(OraclePreparedStatement.java:13856)
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2866)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2151)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
at dbAccess.main(dbAccess.java:18)
According to oracle documentation the smallest positive number the BINARY_DOUBLE column can store is 2.22507485850720E-308.
I'm using oracle 10g r2 and thin jdbc driver.
Any ideas?That is expected since a double is converted to a Oracle NUMBER before passing it to the database and Oracle NUMBER does not support 1.0e-131, the range is 1E-130 .. 10E125.
Look at the SQL output below,
SQL> select to_char(to_number(1.0e-131)) from dual;
T
0
SQL> select to_char(to_number(1.0e-130)) from dual;
TO_CHAR(TO_NUMBER(1.0E-130))
1.000000000000000000000000000000000E-130
==
Use oracle.sql.BINARY_DOUBLE for numbers like this.
eg:
preparedStatement.setBINARY_DOUBLE(1, new oracle.sql.BINARY_DOUBLE(1.0e-131));
==
hope this helps.
Ashok
Maybe you are looking for
-
IPhone6 won't pair with BlueTooth on MBPro
IPhone6, iOS 8.1.1 won't pair with BlueTooth on MBPro nor can I use it as Blue Tooth "hands free" device in my car. Blue Tooth is enabled on the phone and on the MBPro. I try to "connect to network" on the iPhone, using BT preferences on the MBPro,
-
Problem in print job in F110 - automatic payment program
Hi All, When I try to execute a print job for a payment run that has been executed already, the job is getting calcelled. In the job log I see the following message: "Cannot process message, no route from xxxx (user name) to &01242263526" The number
-
ok, so I've just tried to do a migration from my ibookG4 and the migration got hung up at 38 minutes remaining. So I did a hard reboot by holding down the power button as the finder locked up after I quit Migration Assistant. Now after reboot my hard
-
SAP Integration KIT FOR SAP BO Edge 3.1 Trial
Hi, The SAP Integration Kit 3.1 for BO Enterprise 3.1 is the same for BO Edge 3.1 Trial or there is a specific for BO Edge? Because I did the download of BO Edge Trial in the SAP BO area, and install the SAP Integration KIT but the system doesn´t wor
-
I have 1 outbound delivery. When we change the qty in delivery it gives error that only10.012 TO of mateirla 51600 available. We have activated negative stock at plant and storage location level in config. Also in material master sales view mateiral