This page (revision-90) was last changed on 24-Feb-2016 11:06 by Albrecht Striffler

This page was created on 20-Nov-2012 15:45 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
90 24-Feb-2016 11:06 9 KB Albrecht Striffler to previous
89 15-May-2014 09:33 9 KB Volker Belli to previous | to last
88 15-May-2014 09:32 9 KB Volker Belli to previous | to last
87 15-May-2014 09:30 9 KB Volker Belli to previous | to last
86 21-Jun-2013 15:09 8 KB Jochen Reutelshöfer to previous | to last
85 21-Jun-2013 15:08 8 KB Jochen Reutelshöfer to previous | to last
84 21-Dec-2012 16:15 7 KB Jochen Reutelshöfer to previous | to last
83 21-Dec-2012 16:14 7 KB Jochen Reutelshöfer to previous | to last
82 18-Dec-2012 17:47 7 KB Alex Legler to previous | to last Fix Image link URL
81 17-Dec-2012 21:33 7 KB CarstenWasner to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 changed one line
This page is supposed to help you getting started with the development of KnowWE. Feel free to add your solutions to this page. If you don't find the information you need here, you can post it in the [Forum|http://sourceforge.net/projects/knowwe/forums].
!!! FAQ
At line 3 removed one line
[{TableOfContents title='Frequently Asked Questions'}]
At line 4 added one line
This Page is supposed to help you getting started with the development of KnowWE. Feel free to add your Solutions to this page. If you don't find the Informations you need here, you can post it in the [Forum|http://sourceforge.net/projects/knowwe/forums].
At line 6 changed one line
!!General
[{TableOfContents }]
!! What is a Plugin?
A Plugin is a module extending KnowWE's functionality. The plugins are recognized by their Plugin.xml. A plugin is installed by adding its artifact id to the .
At line 9 changed one line
!What is a Plugin?
!! Management of Plugins
Their management is provided by the {{PluginManager}}, which is an abstract class that itself holds a singleton instance.
The singleton has to initialized by an inheriting class; an implementation is provided by the class {{JPFPluginManager}}, which is based on the [Java Plugin Frameworks|http://jpf.sourceforge.net] (JPF).
At line 11 changed one line
A plugin is a module extending KnowWE's functionality. A plugin needs a [plugin.xml|Meaning of plugin.xml] file defining the extensions for this plugin.
One of the static methods {{init(String dir)}} or {{init(File[] pluginFiles)}} initializes the {{PluginManager}}.
The passed parameter {{dir}} of the first method specifies the path of the directory including the plugins. The parameter of the second method directly contains the plugin files.
KnowWE uses the second method, because it filters the files from "WEB-INF/lib".
It is required to copy the developed plugin into the specified directory; this is described in more detail in [Build process].
At line 21 added one line
!! Extension Points
At line 14 changed one line
!What is an Extension?
A plugin consists of an XML file and a collection of class files (compiled source code).
The XML file specifies, which points in the source code are extended by the classes.
Also, new points in code can be defined that are extensible.
We call these points within the code {{ExtensionPoints}}, and we call the classes extending these points {{Extensions}}.
The structure of the XML file is described in more detail in [plugin.xml|Meaning of pluginxml].
At line 16 changed one line
An extension implements the plugin's functionality using an extension point. For further definition and usage instructions see [this page|How-To Extension Points]..
For each {{ExtensionPoint}} there exists an interface, that have to be implemented by the class extending the {{ExtensionPoint}}.
Then, the {{PluginManager}} provides an array of instances, that define this {{ExtensionPoint}}.
The array is sorted according to the priority of the extensions.
The priority is defined in the XML file as well as the name and the description of the extension.
At line 34 added 3 lines
In addition, it is possible to define further attributes for an {{ExtensionPoint}}.
These attributes have to be included in the XML file of the implementing extensions.
<tags>plugin extension jpf </tags>
At line 19 changed one line
!What is the Scope of an Extension?
!!Creating new projects
At line 21 changed one line
A scope is an selector of a specific subset of KDOM nodes. Its selection is based on the type of the KDOM nodes itself as well as on the type of the KDOM node's anchestors. It can be compared a little bit to the css selectors.
Every new project has to be allocated to one of the three main repositories: __d3web-core, d3web-KnowWE or Research.__
At line 23 changed one line
The scope is a path of those KDOM node types that should be matched/selected. The path can be relative (anywhere in the KDOM tree) or root based. Specific path wildcards as "*" and "**" are allowed. The different kinds of scopes and their usage are explained [here|How-To Extension Points].
!Creating the project in Eclipse
At line 44 added 4 lines
* Do a right click on the main project (one of the three projects mentioned above) → New → Other…. In the window, in the Maven folder, select "Maven Module"
* Check the checkbox called "Skip Archetype selection", give the project a name and hit Next.
* Enter a human-readable name into the field "Name", fill in "Description" as needed.
* Click "Finish".
At line 26 changed one line
!What is an Extension Point?
Now you will see the new project in the Eclipse Project Explorer. Now you can start creating or copying source files. Using the __UTF-8 encoding__ is __mandatory.__
! License header
At line 28 removed 22 lines
An extension point has a specific type, for example ''Action, TagHandler, TypeHandler'' or ''EventListener''. The defined extension point specifies that each extension has to give values for class, name, description, version, and priority. This has to be defined by each extension point; an extension point further can require additional value, for example the specification of a file name.
For further definition and usage instructions see [this page|How-To Extension Points].
!!Getting Started
!Why isn't Plugin X included in my build?
[{Image src='attach/Developer%20FAQ/m2eclipse-plugins.png' width='232' height='202' align='right' link='attach/Developer%20FAQ/m2eclipse-plugins.png'}]
You need to enable the plug-ins you want to build into KnowWE when using Eclipse. Here's how:
Open your Run Configuration for the KnowWE build and add parameters for the plug-ins you want to have in the goals section.
For instance: You want to enable the Comment plug-in. Here, you have to add a {{comment-plugin}} parameter. List all the profile names for the Plug-ins you want to add in the Profiles Section and build KnowWE.
See the screenshot on the right for another example.
! What do I have to mind about the license?
At line 53 removed one line
At line 76 removed one line
At line 79 added one line
!First check-in
At line 79 removed 4 lines
! What is important about the first check-in?
At line 93 added 2 lines
!!Why isn't Plugin X included in my Build?
[{Image src='attach/Developer%20FAQ/m2eclipse-plugins.png' width='232' height='202' align='right' link='http://d3webwiki.informatik.uni-wuerzburg.de/attach/FAQ/m2eclipse-plugins.png'}]
At line 96 changed one line
!! Plugin-Development
You need to enable the plug-ins you want to build into KnowWE when using Eclipse. Here's how:
At line 98 added one line
Open your Run Configuration for the KnowWE build and add parameters for the plug-ins you want to have in the goals section.
At line 99 changed one line
!What do I need to do after I change a .java file?
For instance: You want to enable the Comment plug-in. Here, you have to add a {{comment-plugin}} parameter. List all the profile names for the Plug-ins you want to add in the Profiles Section and build KnowWE.
At line 101 changed one line
Usually you only have to refresh your browser page. Hot Code Replacement makes your changes effective at runtime.
See the screenshot on the right for another example.
At line 104 added 2 lines
!!Why does Eclipse not catch breakpoints?
This Issue is caused by an outdated JDK. Please update your JDK to the [latest Version | http://www.oracle.com/technetwork/java/javaee/downloads/index.html].
At line 104 changed one line
!I'm done editing. How to make my changes permanent?
<tags>workspace problems FAQ </tags>
At line 106 changed one line
You don't have to worry that you changes will be lost after you shut down KnowWE. To make the changes effective for the next restart, you have to perform Maven install on KnowWE-App.
!!Why do i get a java.util.MissingResourceException: Can't find bundle for base name Exception?
This happens after cleaning the workspace.
At line 112 added one line
Solution: For each of the two maven super projects (d3web, d3web-KnowWE), select the project, right click on it, "Run as...", "Maven package".
At line 109 changed one line
!Hot Code Replacement failed. What to do?
!!!What do I need to do after I change a .java file?
Usually you only have to refresh your browser page. Hot Code Replacement makes your changes effective at runtime.
At line 117 added 5 lines
!I'm done editing. How to make my changes permanent?
You don't have to worry that you changes will be lost after you shut down KnowWE. To make the changes effective for the next restart, you have to perform Maven Install on KnowWE-App.
!Hot Code Replacement failed. What to do?
At line 113 changed one line
*Perform a Maven install on KnowWE-App and
*Perform a Maven Install on KnowWE-App and
At line 117 changed one line
!What do I need to do after I change a Non-Java file?
!!!What do I need to do after I change a Non-Java file?
Unfortunately, there is no Hot Code Replacement for Non-Java files. However, there is a [How-To for developing Javascript at runtime|http://denkbares.dyndns.org/d3web/Wiki.jsp?page=How-To%20Develop%20JavaScript%20in%20KnowWE], which may be useful for you.
At line 119 removed 2 lines
Unfortunately, there is no Hot Code Replacement for Non-Java files. However, there is a [How-To for developing Javascript at runtime|How-To Develop JavaScript in KnowWE], which may be useful for you.
At line 126 changed 4 lines
!Tomcat successfully starts, but the wiki pages are not loaded. What to do?
This can happen when you perform a Maven install while Tomcat is still running. To fix this, you have to follow these steps:
!!!Tomcat successfully starts, but the wiki pages are not loaded. What to do?
This can happen when you perform a Maven Install while Tomcat is still running. To fix this, you have to follow these steps:
At line 131 removed one line
At line 133 removed one line
At line 142 added one line
!!Offline Build (if Artifactory is not available or you have no Internet connection)
At line 137 changed one line
! Why cannot my JUnit tests be executed?
Create a second runtime configuration for building KnowWE, just like shown here: [http://d3webwiki.informatik.uni-wuerzburg.de/Wiki.jsp?page=Workspace#section-Workspace-CreateARunConfigurationForBuildingTheWiki], just check the "Offline" checkbox. __Note__: Do not enable this option for your regular build, only use it if Artifactory is down or you are not connected to the internet!
At line 139 changed one line
If the message appears 'dependencies/output.txt not found' read further in this [howto|How-To Initialize Plugin Manager for JUnit Tests].
!! Why are Umlauts viewed uncorrectly?
At line 148 added 2 lines
Tomcat can be configured in UTF-8 to handle Umlauts correctlty. Look at [http://www.jspwiki.org/wiki/BugProblemsWithGermanUmlaute]
//End Old
At line 142 changed one line
!Can I make a build without a Internet connection?
What... ? and Why...? Questions\\
Coordinate with How-To
At line 154 added 2 lines
%%Todo
Set this page up, add table of contents and some introductory words. Every question is its own small headline with the answer directly below.
At line 145 changed one line
Create a second runtime configuration for building KnowWE, just like shown here: [http://d3webwiki.informatik.uni-wuerzburg.de/Wiki.jsp?page=Workspace#section-Workspace-CreateARunConfigurationForBuildingTheWiki], just check the "Offline" checkbox. __Note__: Do not enable this option for your regular build, only use it if artifactory is down or you are not connected to the internet!
@user: Christian Henniger
%
At line 160 added 5 lines
%%Todo
Developer FAQ
* Define questions
* Answer questions, get the information if unkown
* Get and update/improve stuff from old pages: [http://d3webwiki.informatik.uni-wuerzburg.de/Wiki.jsp?page=FAQ]
At line 148 changed one line
!!Common Problems
@user: Christian Henniger
%
At line 169 added 7 lines
%%Todo
Developer FAQ
* Some examples:
** What do I need do mvn install, after I change a java file or non-java file?
** Tomcat starts, but wikipages are not loaded -> update Tomcat-Context... this happens when mvn installing while tomcat is running...
** What is an plugin, what is an extension, what is an extension point ([http://d3webwiki.informatik.uni-wuerzburg.de/Wiki.jsp?page=Plugins%20and%20Extensions])
** What is the Scope of an extension
At line 151 changed 39 lines
! Why are Umlauts viewed uncorrectly?
Tomcat can be configured in UTF-8 to handle Umlauts correctly. Look at [http://www.jspwiki.org/wiki/BugProblemsWithGermanUmlaute]
!Why does Eclipse not catch breakpoints?
This issue is caused by an outdated JDK. Please update your JDK to the [latest version | http://www.oracle.com/technetwork/java/javaee/downloads/index.html].
!Why do i get a java.util.MissingResourceException: Can't find bundle for base name Exception?
This happens after cleaning the workspace.
For each of the two maven super projects (d3web, d3web-KnowWE), select the project, right click on it, "Run as...", "Maven package".
! INFO: ERROR: Failed to create a Wiki engine: JSPWiki: Unable to load and setup properties from jspwiki.properties.
This is a missleading message display caused by unprecise error handling within jspwiki initialization code. The try-catch does not only include reading of the jspwiki.properties file, but also initialization of plugins/filters, i.e. also entire initialisiation of KnowWE. If you have recently changed code of KnowWE or a KnowWE-Plugin this error __most likely__ has __nothing__ to do with the jspwiki.properties file. It can be any kind of exception happening during KnowWE initialization. After the ''Unable to load and setup properties from jspwiki.properties'' the ''e.getMessage()'' of the actual exception is shown (without stack-trace unfortunately). __Tipp:__ Check the message string to guess what kind of exception it might have been; Consider your latest code changes; if nothing helps start debugging, e.g. in ''Environment.initInstance()''
! Are d3web's Session objects thread-safe for multi-threaded environments?
In general a single d3web session is not thread-safe for write access. Reading contents from the same session with multiple threads is ok. But having an applications where multiple threads simultaneously read/write to a session, they need to be synchronized. Even if there is only one thread that writes to the session, it need to be synchronized with all reading threads. By convention, in d3web this should be done using the "Session"-Object as the semaphore for synchronization. This makes sure that your code will be interoperable with all other applications code (also considering this convention), without being in danger to create deadlocks.
%%prettify
{{{
// put your non d3web-code here
// ...
synchronized (session) {
// your read/write access to the session or blackboard or ... here
// ...
}
}}}
/%
%%tags
FAQ Developer
@user: Daniel Zügner