Archives
-
[Java] jcifs problem fixed in 1.1.5
I got a message from Mike of the jcifs team that the problem with ArrayIndexOutOfBoundsException should be fixed in version 1.1.5. From http://jcifs.samba.org/:
jcifs-1.1.5 released / ArrayIndexOutOfBoundsException
posted by Santa, Dec 17, 2004
It was discovered that an ArrayIndexOutOfBoundsException could occur if the list of domain controllers returned by NbtAddress.getAllByName was shorter than the list returned in the previous call (possibly because the WINS query timed out and switched to an alternate WINS server). All NTLM HTTP Authentication Filter users should upgrade to prevent this error. Also, the value of jcifs.netbios.cachePolicy set by the NTLM HTTP Filter if it is not specified has been doubled to 20 minutes. Finally, some log levels have been increased such that running with jcifs.util.loglevel = 3 temporarily is actually reasonable in a production environment (must use loglevel > 3 to see individual SMB messages and loglevel > 5 to get hexdumps).Will test the new version in January I think.
-
[Java] Crash in the jcifs 1.1.3 version
UPDATE: I got a message from Mike of the jcifs team that the problem with ArrayIndexOutOfBoundsException should be fixed in version 1.1.5.
I though I would just warn users of the jcifs 1.1.3 and maybe also 1.1.4 package.
We got a pretty serious crash in our portal application this morning. We released a new version of the portal utilizing jcifs version 1.1.3 for NTML authentication. When we reached a higher number of concurrent users (perhaps some 50+ sessions) we got internal server error:
Error 500--Internal Server Error
java.lang.ArrayIndexOutOfBoundsException: 25
at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:94)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:123)
at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
(WebAppServletContext.java:6354)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)We had to go back to an older version of jcifs now.
-
[Java] Cookies in VAP
I found out a few more things about using cookies in the VAP portal. I blogged earlier about this, but I found a way to set cookies from the grid-file of the portal. It's not possible setting cookies through the response.addCookie() method, but since the grid also controls the <HEAD> section of the HTML page, use the <META> tag:
<meta http-equiv="set-cookie" content="cookiename=cookievalue; path=/">
This works just fine, but if you want to grab the cookies from a JSR 168 portlet, you must do that from a JSP page in the portlet applications. To write out all cookies you can see from the portlet:
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>
Hey, these are my cookies:
<p>
<%
Cookie[] cookies = request.getCookies();
for(int i=0; i<cookies.length; i++)
{
Cookie cookie = cookies[i];
%>
name=<%=cookie.getName()%>,
value=<%=cookie.getValue()%><br>
<%
}
%>
I've not found any way to do it from within the portlet class. Nor have I found a way to set a cookie from a portlet.
There is another way to send "parameters" to a JSR 168 portlet from a link or a button or a form in the "portal wireframe". For example from a style file. I'll write about that later, need to run now.