That is something where we don't really extend very well at the moment. You will need to store them on your own, and then either extend VariableManager or write a specific plugin to get your variables printed.

Sorry :-/

/Janne

On 22 Sep 2008, at 17:56, Benedikt Mohrmann wrote:

Hi,

just fixxed the problem.. THX for your help.

Have another question now:
I want to introduce two new variables for every user in the wiki!
Thus I changed the "PreferencesTab.jsp" and added two new textfiels, so that every user is able to insert the data (will be a username and a api-key for another service)!
But yet I dont know how and where to save the variables.
I know that I can create global variables in the "jspwiki.properties", but that won't help me, as every user must have the possibility to add this information!

Regards
Benedikt


Harry Metske schrieb:
Benedikt,

I think you should start debugging in the runtime environment.
Can you start JBoss/tomcat with the extra JVM argument '- verbose:class'
(without quotes) to see where the classes are loaded from.

It looks lilke com.ecyrd.jspwiki.plugin.WikiPlugin is loaded by two
different classloaders.

regards,
Harry


2008/9/22 Benedikt Mohrmann <[EMAIL PROTECTED]>


Hi,

problem is still actual :( !
I have already installed a new JSPWiki version and downloaded the actual
JSPWiki src and imported it into my Eclipse- still same error.

I compared the working plugin and the new one and there is one difference
in the .classpath file (contained in the .jar):
the working one says:
<classpathentry kind="src" path="/JSPWiki"/>

and the not working one:
<classpathentry combineaccessrules="false" kind="src" path="/ JSPWiki"/>

Dont know if that matters, but I tried to fixx it, but I don't get it.

Help is welcome,
Benedikt


Janne Jalkanen schrieb:


In that case my guess is that your classpath contains two copies of
JSPWiki.jar with different versions...  Or, that Eclipse is using a
different version of JSPWiki.jar than your actual instance of JSPWiki.

/Janne

On 21 Sep 2008, at 14:25, Benedikt Mohrmann wrote:

 Hi,

I already do so.
As a test, I just tried the following class:


import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.plugin.PluginException;
import com.ecyrd.jspwiki.plugin.WikiPlugin;


public class ReadRoomStructurePlugin implements WikiPlugin {

  public String execute(WikiContext context, Map params)
          throws PluginException {
      // TODO Auto-generated method stub
      return "x";
  }

}


Same error as before!

Regards
Benedikt


Janne Jalkanen schrieb:


You must implement the WikiPlugin interface.

public class ReadRoomStructurePlugin implements WikiPlugin
{
...
}

/Janne

On 21 Sep 2008, at 14:07, Benedikt Mohrmann wrote:

 Hi,

I already developed a plugin, which works quite well.
Now I tried to develope a new one, export it via Eclipse as a .jar file, but when I visit the page, where it should be inserted I get the
error:
"Instanziierung des Plugins 'ReadRoomStructurePlugin' fehlgeschlagen." English: "Instantiation of Plugin 'ReadRoomStructurePlugin' failed.

The Stacktrace says:

2008-09-21 12:48:18,421 [http-localhost%2F127.0.0.1-8080-1] INFO
com.ecyrd.jspwiki.plugin.PluginManager JSPWiki:/JSPWiki/ JSPWiki:
http://localhost:8080/JSPWiki/ - Cannot initialize plugin
ReadRoomStructurePlugin
java.lang.ClassCastException: ReadRoomStructurePlugin cannot be cast to
com.ecyrd.jspwiki.plugin.WikiPlugin
  at
com.ecyrd.jspwiki.plugin.PluginManager $WikiPluginInfo.newPluginInstance(PluginManager.java:868)

  at
com.ecyrd.jspwiki.plugin.PluginManager $WikiPluginInfo.initializePlugin(PluginManager.java:794)

  at
com.ecyrd.jspwiki.plugin.PluginManager.registerPlugin (PluginManager.java:683)

  at
com.ecyrd.jspwiki.plugin.PluginManager.execute (PluginManager.java:348) at com.ecyrd.jspwiki.forms.FormOutput.execute (FormOutput.java:127)
  at
com.ecyrd.jspwiki.plugin.PluginManager.execute (PluginManager.java:383)
  at
com.ecyrd.jspwiki.parser.PluginContent.getText (PluginContent.java:158)
  at
org.jdom.output.XMLOutputter.printTextRange(XMLOutputter.java: 1054) at org.jdom.output.XMLOutputter.printElement (XMLOutputter.java:934)
  at
org.jdom.output.XMLOutputter.printContentRange (XMLOutputter.java:1007)
  at
org.jdom.output.XMLOutputter.outputElementContent (XMLOutputter.java:445)
  at
com.ecyrd.jspwiki.render.XHTMLRenderer.getString (XHTMLRenderer.java:63)
  at
com.ecyrd.jspwiki.render.RenderingManager.getHTML (RenderingManager.java:258)

  at
com.ecyrd.jspwiki.render.RenderingManager.getHTML (RenderingManager.java:299)

at com.ecyrd.jspwiki.WikiEngine.textToHTML(WikiEngine.java: 1469)
  at com.ecyrd.jspwiki.WikiEngine.getHTML(WikiEngine.java:1411)
  at
com.ecyrd.jspwiki.tags.InsertPageTag.doWikiStartTag (InsertPageTag.java:128) at com.ecyrd.jspwiki.tags.WikiTagBase.doStartTag (WikiTagBase.java:89)
  at
org.apache.jsp.templates.default_.PageTab_jsp._jspx_meth_wiki_00 5fInsertPage_005f0(PageTab_jsp.java:677)

  at
org.apache.jsp.templates.default_.PageTab_jsp._jspService (PageTab_jsp.java:277)

at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:373)

  at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:654)

  at
org.apache.catalina.core.ApplicationDispatcher.doInclude (ApplicationDispatcher.java:557)

  at
org.apache.catalina.core.ApplicationDispatcher.include (ApplicationDispatcher.java:481)

  at
org.apache.jasper.runtime.JspRuntimeLibrary.include (JspRuntimeLibrary.java:968)

  at
org.apache.jasper.runtime.PageContextImpl.include (PageContextImpl.java:609) at com.ecyrd.jspwiki.tags.IncludeTag.doEndTag (IncludeTag.java:84)
  at
org.apache.jsp.templates.default_.PageContent_jsp._jspx_meth_wik i_005fInclude_005f0(PageContent_jsp.java:442)

  at
org.apache.jsp.templates.default_.PageContent_jsp._jspService (PageContent_jsp.java:148)

at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:373)

  at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:654)

  at
org.apache.catalina.core.ApplicationDispatcher.doInclude (ApplicationDispatcher.java:557)

  at
org.apache.catalina.core.ApplicationDispatcher.include (ApplicationDispatcher.java:481)

  at
org.apache.jasper.runtime.JspRuntimeLibrary.include (JspRuntimeLibrary.java:968)

  at
org.apache.jasper.runtime.PageContextImpl.include (PageContextImpl.java:609) at com.ecyrd.jspwiki.tags.ContentTag.doEndTag (ContentTag.java:126)
  at
org.apache.jsp.templates.default_.ViewTemplate_jsp._jspx_meth_wi ki_005fContent_005f0(ViewTemplate_jsp.java:566)

  at
org.apache.jsp.templates.default_.ViewTemplate_jsp._jspService (ViewTemplate_jsp.java:142)

at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:373)

  at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:654)

  at
org.apache.catalina.core.ApplicationDispatcher.doInclude (ApplicationDispatcher.java:557)

  at
org.apache.catalina.core.ApplicationDispatcher.include (ApplicationDispatcher.java:481)

  at
org.apache.jasper.runtime.JspRuntimeLibrary.include (JspRuntimeLibrary.java:968)

  at
org.apache.jasper.runtime.PageContextImpl.include (PageContextImpl.java:609) at com.ecyrd.jspwiki.tags.IncludeTag.doEndTag (IncludeTag.java:84)
  at org.apache.jsp.Wiki_jsp._jspService(Wiki_jsp.java:114)
at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:373)

  at
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 803)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter (WikiServletFilter.java:99) at com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter (WikiJSPFilter.java:91)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96)

  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)

  at
org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)

  at
org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:230)

  at
org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175)

  at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke (SecurityAssociationValve.java:182)

  at
org.jboss.web.tomcat.security.JaccContextValve.invoke (JaccContextValve.java:84)

  at
org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:127)

  at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)

  at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke (CachedConnectionValve.java:157)

  at
org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109)

  at
org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:262)
  at
org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844)
  at
org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583)

  at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:446)
  at java.lang.Thread.run(Unknown Source)


Any idea, why it is not able to cast ?

Regards
Benedikt







Reply via email to