powered by Jive Software

Plugin show some error when Openfire update to 3.5.0 RC1

java.lang.NullPointerException

at org.jivesoftware.admin.SidebarTag.doEndTag(SidebarTag.java:192)

at org.jivesoftware.openfire.admin.decorators.main_jsp._jspx_meth_admin_sidebar_0( main_jsp.java:425)

at org.jivesoftware.openfire.admin.decorators.main_jsp._jspService(main_jsp.java:2 25)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)

at com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.ja va:156)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:59)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:65)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

/quote

Any new documents for plugin develop?

The source code is:

<%@ page import="net.smilingj.openfire.plugin.netlog.configuration.Config"%>
<%@ page import="net.smilingj.openfire.plugin.netlog.main.IConfig"%>
<%@ page import="java.io.*"%>
<%@ page import="org.jivesoftware.util.ParamUtils"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<% String from = ""; String to = ""; String log = ""; String logfile = ""; // 0: select from, 1: select to, 2: show int state = ParamUtils.getIntParameter(request, "next", 0); IConfig c = Config.getInstance(); String[] availableLoggedUsers = new String[0]; String logPath = c.getValue("logging", "path"); File l = new File(logPath); if(!l.isDirectory()) l.mkdirs(); availableLoggedUsers = l.list(); String[] files = new String[0]; String path = ""; if(state == 1) {
  from = ParamUtils.getParameter(request, "from");
  path = c.getValue("logging", "path")+"/"+from;
  File d = new File(path);
  files = d.list(); } else if (state == 2) {
  try {
   from = ParamUtils.getParameter(request, "from");
   to = ParamUtils.getParameter(request, "to");
   logfile = c.getValue("logging", "path")+from+"/"+to;
   FileReader fr = new FileReader(logfile);
   BufferedReader buf = new BufferedReader(fr);
   boolean eof = false;
   log += logfile + "\n\n";
   while(!eof) {
    String line = buf.readLine();
    if(line == null) eof = true;
    else log += line + "\n";
   }
   buf.close();
  } catch (Exception e) {} } %>
<html>
    <head>
        <title>Netlog view logs</title>
        <meta name="pageID" content="netlog-view"/>
    </head>
    <body>
  <%    switch(state) {    case 0 : {
    %>
     <form action="netlog-view.jsp">
      <select name="from">
      <% for(String f : availableLoggedUsers) { %>
      <option value="<%= f %>"><%= f %></option>
      <% } %>
      </select>
      <input type="hidden" name="next" value="1" />
      <input type="submit" value="next" />
     </form>
    <%
    break;
   }
   case 1 : {
    %>
     Select to which contact from <%= from %> you want to view the logfile.
     <form action="netlog-view.jsp" method="post">
     <select name="to">
     <% for(String f : files) { %>
     <option value="<%= f %>"><%= f %></option>
     <% } %>
     </select>
     <input type="hidden" name="next" value="2" />
     <input type="hidden" name="from" value="<%= from %>" />
     <input type="submit" value="next" />
     </form>
    <%
    break;
   }
   case 2 : {
    %>
    <form action="netlog-view.jsp" method="post">
     <p>You're watching the logfile from <%= from %> with <%= to %>.</p>
     <div style="widht: 100%; height: 600px;"><textarea style="width: 100%; height: 100%;"><%= log %></textarea></div>
     <p><input type="submit" value="back" /></p>
    </form>
    <%
    break;
   }
   }
  %> </body>
</html>

Did you update your plugins as per the 3.5.0 RC1 documentation ?

Where is it?

Thanks.

Hi adun,

they say the following near the bottom of the RC1 announcement:

Plugin updates required for Openfire 3.5.0 are available on the betaplugins page.

The specific plugins that need to be updated are:

* IM Gateway

* User Search

* Enterprise

* MOTD

* SIP

So I am thinking if you have any of these installed, your problem should go away when you replace them with the ones found in the beta repository here:

http://www.igniterealtime.org/projects/openfire/plugins-beta.jsp

Thanks, But this plugin is not from Ignite but from 3rd party, It’s work good in 3.4.5 version.

I have the source file, but I want to know how to modify it compatible with 3.5.0 rc1.

What did you do to fix this?

thanks

Nick