Mahesh Malviya

Ranch Hand
+ Follow
since Aug 20, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mahesh Malviya

Hi friends,
I want to find members of a group from LDAP Directory.
I am writing code in java.
I tried a lot with many different combinations of objectClass.
I am able to get all persons, all groups , all groups in which all a user belong to.But I am not able to get members of a group. Can anybody please suggest me the possible solution. I am new to LDAP.

Thanks in advance.
Mahesh Malviya
19 years ago
Thanks for reply.
Santosh I couldnt find even from the link you sent to me. There were no options in weblogic workshop as told in the link. Yes it is true from WebSphere becuase I have worked on WebSphere Studio.

Can you please tell me how to call ejbmethods in weblogic workshop?
Thanks
Mahesh Malviya
19 years ago
Hi,
I am new to weblogic. I build a stateless session bean FirstEjb. I was able to lookup FirstEjb. I have defined a getName() method in FirstEjbBean class. But this is not visible through the remote interface.
Yes I know that this is becuase the method doesn't exist in remote interface.
My question : I simply want to know that what and where changes should be made so that the method in FirstEjbBean can be made available to the client through remote interface.

Thanks And Regards
Mahesh Malviya
19 years ago
Hi,
I know that defuat port for oracle is 1521. I want to know if we do not provide port no in connection url then is it go for the defualt 1521?

Or we have to specify.

Thanks in advance
Mahesh Malviya
Hi,
Lotus notes is installed at my pc. domino server is at "Crisdev" server. I am running the following program from my machine.

import lotus.domino.*;
public class platform1 extends NotesThread
{
public static void main(String argv[])
{
platform1 t = new platform1();
t.start();
}
public void runNotes()
{
try
{
Session s = NotesFactory.createSession("crisdev","bmember1","domino");
///To bypass Readers fields restrictions
// Session s = NotesFactory.createSessionWithFullAccess();
String p = s.getPlatform();
System.out.println("Platform = " + p);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}



The program compiles well when I includes Notes.jar file in classpath. But it does not run. It give me following exception on running.


D:\CRISIL-Projects\database>java platform1
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no nlsxbe in java
.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at lotus.domino.NotesThread.load(NotesThread.java:281)
at lotus.domino.NotesThread.checkLoaded(NotesThread.java:301)
at lotus.domino.NotesThread.initThread(NotesThread.java:139)
at lotus.domino.NotesThread.run(NotesThread.java:197)

Hey any suggestions please.

Thanks and Regard
Mahesh Malviya
19 years ago
Rob, I am glad to get your reply. But I tried with your code as well. It is allowing everyone with blank password. Yes ofcourse it allows with the original password and do not allow for wrong password. But it allows for blank password.
I tried with your code at my environment

<%@ page import="java.util.*" %>
<%@ page import="javax.naming.*" %>
<%@ page import="javax.naming.directory.*" %>
<% Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
props.put(Context.PROVIDER_URL,"ldap://abc:389");
props.put(Context.SECURITY_PRINCIPAL,"cn=" + "amember");
props.put(Context.SECURITY_CREDENTIALS,"");
DirContext ctx = new InitialDirContext(props);
String verification = "true";
%>
<%=verification%>

I do not get any exception with blank password.

Thanks
Mahesh Malviya
19 years ago
Hi
I started learning about java mail.
I am trying with this code

<%@ page import="java.util.Properties,javax.mail.*,javax.mail.internet.*"%>

<% String smtpHost = "crisdev";
String from = "[email protected]";
String to = "[email protected]";

// Get system properties
Properties props = System.getProperties();

// Setup mail server
props.put("mail.smtp.host", smtpHost);

// Get session
Session s =
Session.getDefaultInstance(props, null);

// Define message

MimeMessage message = new MimeMessage(s);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject("Hello, JDC");
message.setText("Welcome to the JDC");
// Send message
Transport.send(message);
%>

But I am getting this exception.

javax.servlet.ServletException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)


Please suggest me with appropriate solution and good link for learning java mail.
Thanks
Mahesh Malviya
Hi Rob,
Thanks for the reply.
I am using internet password in

env.put(Context.SECURITY_CREDENTIALS, "lotusnotes123");

Please suggest me which could be more reasons beacuase with blank password the code runs fine. It does not throw any exception. Context.SECURITY_AUTHENTICATION type is "simple". If it is "simple" then it password entered should be accurate it should not take blank password as well. I am stuck...

Thanks

Mahesh Malviya
19 years ago
Hi Rob,
Thanks for the reply.
I am using internet password in

env.put(Context.SECURITY_CREDENTIALS, "lotusnotes123");
19 years ago
I want to authenticate users in the Domino server directory.
I wrote following code in jsp.



<%@ page import="java.util.Properties" isErrorPage="true" autoFlush="true"%>
<%@ page import="javax.naming.*"%>
<%@ page import="javax.naming.directory.*"%>
<%
Properties env = null;
env = new Properties();
String tCtx="com.sun.jndi.ldap.LdapCtxFactory";
String tURL="ldap://abc:389";
env.put(Context.INITIAL_CONTEXT_FACTORY, tCtx);
env.put(Context.PROVIDER_URL, tURL);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "CN=Db Signer,O=PERL");
env.put(Context.SECURITY_CREDENTIALS, "lotusnotes123");

DirContext ctx=null;
DirContext authenticationctx=null;
authenticationctx = new InitialDirContext(env);

%>
<%=authenticationctx.getEnvironment()%>



But it works fine if I do not provide any password. I mean if I write
env.put(Context.SECURITY_CREDENTIALS, "");
instead of
env.put(Context.SECURITY_CREDENTIALS, "lotusnotes123");

it gives no error, but if I provide password it throws

javax.servlet.ServletException: [LDAP: error code 48 - Bind failed: Invalid credentials for CN=Db Signer/O=PERL]


Please help me.

Thanks and regards
Mahesh Malviya
19 years ago
Thanks a lot.

Mahesh Malviya
Hi,

There are number of rows in a table in a html page.
I want to change the color of the row(<tr> in which my mouse comes and its colour should become as it is when mouse moves out of the row.
I have trapped both in and out events of the mouse when it moves in the row and goes out of the row. But what java script code should I write to show one row coloured when mouse moves on the row.

Thanks
Mahesh Malviya
Hi All,
I am developing a project, which contains an ejb module and a web module in websphere studio 5.1. Web module has struts1.1 support. It works fine in studio. I made an .ear file by exporting from websphere studio.
My WebSphere application server 5.0 is configured with LDAP. Only ldap user can log in to it. When I go to deploy this ear file. It show no error and 0 warnings. It is also started successfully. I am able to view htmls and jsps(without without struts support). But problem starts from here.
1) I am not able to view any jsp with struts support and it gives me error.

Error page exception
The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.


Original Exception:
Error Message: org/apache/struts/taglib/html/HtmlTag
Error Code: 500
Target Servlet: null
Error Stack:
java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/HtmlTag
at org.apache.jsp._jspWelcome._jspService(_jspWelcome.java:42)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.servlet.SimpleFileServlet.doGet(SimpleFileServlet.java:174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)




Error Page Exception:
Error Message: org/apache/struts/taglib/html/HtmlTag
Error Code: 0
Target Servlet: null
Error Stack:
java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/HtmlTag
at org.apache.jsp._Login500._jspService(_Login500.java:43)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.webapp.WebApp.handleError(WebApp.java:977)
at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:836)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:121)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)

I think this could be a reason of security. Becuase I am able to view all jsps with struts support also before configuring websphere application server with Lotus Domino(ldap)server.

Waiting for your great replys. Thanks in advance.
bye
Mahesh Malviya
[email protected]
19 years ago
Hey Jyothi if you have already fix the problem. Please email me also. I am stuck into same problem since last few days. Please do it for me.
Thanks in advance.
Mahesh Malviya
[email protected]
19 years ago
But, what I left to make entry into the deployement descriptor. Please help me out. I am helpless.

Mahesh Malviya