Resource Menu


posted by Sebastien Jourdain at Mar 12, 2008 12:36 PM
Quote
That will be find...

Don't forget to add the build.xml and properties, so I can check the change you made.

Regards,

posted by reya at Mar 12, 2008 12:33 PM
Quote
I can give you the source of the module AdressBook but the module miss a lot of thing.

If you want I mail you an archive with only the module and youcan look if it's good

posted by Sebastien Jourdain at Mar 12, 2008 12:02 PM
Quote
I hope everything was find for your presentation and thanks for your support.

If you want us to integrate your work as a contribution to libresource we will be pleased to open you an access as developper.

Regards,

Seb

posted by reya at Mar 12, 2008 11:52 AM
Quote
it's too late. I have passed my presentation today. It's not important.

Good luck for the furture of LibreSource

Bye

Reya

posted by Sebastien Jourdain at Mar 12, 2008 1:15 AM
Quote
Great, but I don't understand what you mean about a schema for the module ?

A graph, or a directory structure ?

posted by reya at Mar 11, 2008 10:22 AM
Quote
Hello. I finish the addressbook.

Now I have to write an article about the project.

Do you have a schema for the organisation of the module?

My teacher want to see it!

posted by Sebastien Jourdain at Mar 3, 2008 7:06 AM
Quote
You will need to do:
  • deep clean (ant clean-all)
  • drop your adress book table (before that, make sure that no adressbook is in the naming tree) OR alter the table to add the new fields
posted by reya at Mar 3, 2008 1:44 AM
Quote
I found where was the the problem :
contactResourceValues[i] = new ContactResourceValue(contactResourceValue);
it doesn't work;
contactResourceValues[i] = contactResourceValue;
it works!!

Now I have to had firstname, lastname,adress, phone number,… Question: I have to only to had getFirstName, setFirstName, … in the file ContactResourceBean.java and modify the jsp pages?

posted by Sebastien Jourdain at Mar 2, 2008 8:26 PM
Quote
Code sample of the file: LS_ROOT/Src/LS-Server/wiki/src/org/libresource/wiki/ejb/LibresourceWikiServiceBean.java

public PageResourceValue getPage(URI uri) throws LibresourceWikiException, LibresourceSecurityException, URINotExistException {
        try {
            KernelService kernelService = (KernelService) Libresource.getService(KernelConstants.SERVICE);
            LibresourceResourceIdentifier resourceIdentifier = kernelService.lookup(uri);
            PageResourceLocal pageResourceLocal = (PageResourceLocal) Libresource.findResource(resourceIdentifier, PageResourceLocal.class);
            PageResourceValue resourceValue = pageResourceLocal.getPageResourceValue();
            resourceValue.setUri(kernelService.normalizeURI(uri));

return resourceValue; } catch (LibresourceSecurityException se) { throw se; } catch (URINotExistException se) { throw se; } catch (Exception e) { throw new LibresourceWikiException("Error in getPage : " + e.getMessage(), e); } }

posted by reya at Mar 2, 2008 5:50 PM
Quote
I don't understand. In the file messageresourcebean.java or threadresourcebean.java, there is not setURI(xxx). So where I have to set the uri. In the contactcontroler.java I use the method listContatAt(URI uri). And in this method :
public ContactResourceValue[] listContactsAt2(URI uri)
        throws LibresourceAdressBookException, LibresourceSecurityException, URINotExistException {
        try {
            KernelService kernelService = (KernelService) Libresource.getService("Kernel");
            LibresourceResourceValue[] pages = kernelService.listResourcesAt(uri, ContactResourceLocal.LIBRESOURCE_RESOURCE_SERVICE,
                    ContactResourceLocal.LIBRESOURCE_RESOURCE_TYPE);
            ContactResourceValue[] contactResourceValues = new ContactResourceValue"resourceLink" href="/home/community/forum/New_module/RE_New_module_50/pages.length">"error">! pages.length !;

for (int i = 0; i < contactResourceValues.length; i++) { LibresourceResourceIdentifier resourceIdentifier = pages[i].getLibresourceResourceIdentifier(); ContactResourceValue contactResourceValue = ((ContactResourceLocal) Libresource.findResource(resourceIdentifier)).getContactResourceValue();

contactResourceValue.setUri(kernelService.normalizeURI(pages[i].getUri()));

contactResourceValues[i] = new ContactResourceValue(contactResourceValue); }

return contactResourceValues; } catch (LibresourceSecurityException se) { throw se; } catch (URINotExistException se) { throw se; } catch (Exception e) { throw new LibresourceAdressBookException("Error in listContactsAt : " + e.getMessage(), e); } }

posted by Sebastien Jourdain at Mar 2, 2008 12:06 PM
Quote
You forget to set the uri of your value object in your session bean. Check setUri(xxx) on the value object from other services…
posted by reya at Mar 2, 2008 5:24 AM
Quote
Now my problem is with the jsp pages. I can't display contacts in the address book:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="ls" uri="http://www.libresource.org/taglib" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>

<html> <head> <title><fmt:message key="adressbook.view.adressbook.title"/></title> </head> <body> <div id="viewAdressBook">

<div id="description"> ${ls:render(resource.uri,adressbook.description)} </div> <br/>

<div id="actions"> <a href="${ls:path(resource.uri)}?action=post"><fmt:message key="adressbook.view.adressbook.new"/></a> </div> <br/>

<div id="content"> <fmt:setBundle basename="resources/application"/> <display:table name="contacts" sort="list" defaultorder="descending" id="C" pagesize="20" class="lsTable" requestURI="${ls:path(resource.uri)}" defaultsort="3"> <display:column title="Nom" sortable="true" sortProperty="contact.name" headerClass="name" class="name" align="left"> <a href="${ls:path(c.contact.uri)}">${ls:render(resource.uri,c.contact.name)}</a> </display:column> </display:table>

</div>

</div> </body> </html>

It founds the items in the adress book but it display nothing. The variable contact.uri is null!!!! Why?
posted by reya at Mar 2, 2008 3:07 AM
Quote
I found! all works! Now i test the jsp page for my module and i think I will have some questions later!
posted by reya at Mar 1, 2008 9:29 PM
Quote
Yes I know but in what file. In the file build.xml in the LS-Server directory? And where in the file?
posted by Sebastien Jourdain at Mar 1, 2008 8:43 PM
Quote
add "-Xmx256m" on the javac command line…
posted by reya at Mar 1, 2008 7:14 PM
Quote
Thank you. I didn't make a clean. But now it's really strange :
compile:
    javac Compiling 20 source files to /home/reya/Desktop/LSC-2.2-src-thirdpartbon/build/ejb-work/classes

javac The system is out of resources. javac Consult the following stack trace for details. javac java.lang.OutOfMemoryError: Java heap space javac at java.util.zip.ZipEntry.initFields(Native Method) javac at java.util.zip.ZipEntry.<init>(ZipEntry.java:96) javac at java.util.zip.ZipFile$2.nextElement(ZipFile.java:329) javac at java.util.zip.ZipFile$2.nextElement(ZipFile.java:299) javac at com.sun.tools.javac.util.DefaultFileManager$ZipArchive.<init>(DefaultFileManager.java:405) javac at com.sun.tools.javac.util.DefaultFileManager.openArchive(DefaultFileManager.java:542) javac at com.sun.tools.javac.util.DefaultFileManager.listDirectory(DefaultFileManager.java:278) javac at com.sun.tools.javac.util.DefaultFileManager.list(DefaultFileManager.java:768) javac at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2096) javac at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1778) javac at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386) javac at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:272) javac at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446) javac at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:236) javac at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:250) javac at com.sun.tools.javac.comp.Enter.complete(Enter.java:444) javac at com.sun.tools.javac.comp.Enter.main(Enter.java:429) javac at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819) javac at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) javac at com.sun.tools.javac.main.Main.compile(Main.java:353) javac at com.sun.tools.javac.main.Main.compile(Main.java:279) javac at com.sun.tools.javac.main.Main.compile(Main.java:270) javac at com.sun.tools.javac.Main.compile(Main.java:69) javac at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) javac at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) javac at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) javac at java.lang.reflect.Method.invoke(Method.java:597) javac at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:61) javac at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942) javac at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) javac at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) javac at org.apache.tools.ant.Task.perform(Task.java:364)

posted by Sebastien Jourdain at Mar 1, 2008 9:38 AM
Quote
You might have forget a reference to the type message in xdocklet header or make a good clean. (ant clean-all)
posted by reya at Feb 29, 2008 7:52 PM
Quote
Hello, So I try to make an adress book. I use the module forum but without message.

I have a few errors but I don't know why:

genic:
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! building LibreSource-AdressBook-2.0.jar with 25 files
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! 2008-02-29 19:49:43,817 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract boolean org.libresource.LibresourceService.canMapResourceForSecurity(java.net.URI,java.net.URI) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceAdressBookService (set to the default value Supports)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! 2008-02-29 19:49:43,838 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract java.lang.String org.libresource.LibresourceService.getShortResourceName(org.libresource.LibresourceResourceIdentifier) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceAdressBookService (set to the default value Supports)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! GenIC for JOnAS 4.8.6: 'AdressBookResource', 'ContactResource', 'LibresourceAdressBookService' generation …
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/interfaces/JOnASLibresourceAdressBookService_1868577893Remote.java:227: cannot find symbol
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! symbol  : method getContact(java.net.URI)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! location: class org.libresource.adressbook.ejb.LibresourceAdressBookServiceBean
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !               b.getContact(p1);
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !                ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/interfaces/JOnASLibresourceAdressBookService_1868577893Remote.java:284: cannot find symbol
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! symbol  : method listContactsAt(java.net.URI)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! location: class org.libresource.adressbook.ejb.LibresourceAdressBookServiceBean
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !               b.listContactsAt(p1);
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !                ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/interfaces/JOnASLibresourceAdressBookService_1868577893Remote.java:503: cannot find symbol
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! symbol  : method getAdressBook(java.net.URI)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! location: class org.libresource.adressbook.ejb.LibresourceAdressBookServiceBean
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !               b.getAdressBook(p1);
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !                ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/interfaces/JOnASLibresourceAdressBookService_1868577893Remote.java:560: cannot find symbol
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! symbol  : method listAdressBooksAt(java.net.URI)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! location: class org.libresource.adressbook.ejb.LibresourceAdressBookServiceBean
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !               b.listAdressBooksAt(p1);
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !                ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/interfaces/JOnASLibresourceAdressBookService_1868577893Remote.java:671: cannot find symbol
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! symbol  : method listContactsInAdressBook(java.net.URI)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! location: class org.libresource.adressbook.ejb.LibresourceAdressBookServiceBean
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !               b.listContactsInAdressBook(p1);
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !                ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/ejb/JOnASAdressBookResource_1092315795Bean.java:67: org.objectweb.jonas_gen.org.libresource.adressbook.ejb.JOnASAdressBookResource_1092315795Bean is not abstract and does not override abstract method getLibresourceResourceIdentifier() in org.libresource.LibresourceResourceBase
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! public class JOnASAdressBookResource_1092315795Bean extends jorm.AdressBookResourceState implements PAccessor,
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !        ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! /tmp/genic15288.tmp/org/objectweb/jonas_gen/org/libresource/adressbook/ejb/JOnASContactResource54026605Bean.java:67: org.objectweb.jonas_gen.org.libresource.adressbook.ejb.JOnASContactResource54026605Bean is not abstract and does not override abstract method getLibresourceResourceIdentifier() in org.libresource.LibresourceResourceBase
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! public class JOnASContactResource54026605Bean extends jorm.ContactResourceState implements PAccessor,
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic !        ^
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! Note: Some input files use unchecked or unsafe operations.
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! Note: Recompile with -Xlint:unchecked for details.
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! 7 errors
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! Failed when compiling the generated classes via java compiler
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! GenIC fatal error:
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_42/genic">"error">! genic ! Exception during execution of org.objectweb.jonas_ejb.genic.GenIC : Failed when compiling the generated classes via java compiler

When I have the message bean, all is ok, but when I delete message, it doens't work!!

posted by reya at Jan 17, 2008 11:08 PM
Quote
Ok it will be great. I'm happy to contribute to the development of libresource. Its a good project!! But we doesn't know what module we will develop. I contact you when my teacher tell us what we have to develop.
posted by Sebastien Jourdain at Jan 17, 2008 10:55 PM
Quote
  • For the reminder, a scheduler is provided by the Libresource kernel...
  • For Instant messaging, Tigase can be used as server, and we currently use the smack library to communicate with jabber.
posted by Sebastien Jourdain at Jan 17, 2008 10:52 PM
Quote
Sure we are… This can been seen as a contribution and could be integrated under your name in a futur version of LibreSource.
posted by reya at Jan 17, 2008 10:31 PM
Quote
Yes. I'm doing a Master degree(bac+5) in the university of Dijon. I have to create PIM modules in libresource:
  1. Personal notes/journal
  2. Address books
  3. Lists (including task lists)
  4. Significant calendar dates
  • Birthdays
  • Anniversaries
  • Appointments and meeting
  1. Reminders
  2. Email, instant message archives
#...

Its to my big project. Are you interesting to have these modules after the end of the project (if I can do the modules ) ?

posted by Sebastien Jourdain at Jan 17, 2008 10:07 PM
Quote
Great… Are you doing this for your study ?
posted by reya at Jan 17, 2008 9:44 PM
Quote
Yes you are right.

At the beginning, I don't really understand how libresource works. Now I know how create new resources and I begin to know the architecture of LibreSource.

Thank you for you information

posted by Sebastien Jourdain at Jan 17, 2008 9:23 PM
Quote
Ok but its was not the same problem...

It was related to the link between web action and web controller… Which occur at the execution not at the compilation… Thats what I call a changed...

And this part was related to the point 9) Check the web app configuration file (libresource-web.xml) and 10.3)

This document is outdated, and doesn't help much with the latest release. But with this warning, I finally give it to someone who asked for it. And, guess what, he was more confused than before...

I can help you to find your way into libresource sources. Just follow few step in order to understands its architecture.

  1. Download the source package
  2. Configure and build the application
  3. Deploy this libresource on your local computer
  4. Make sure it works find.
  5. Look at the directory structure (where are the EJB, Web app, ant ...)
  6. Now you can start looking at the code.
  7. Look at the wiki code in the EJB subdirectory
  8. Look at the wiki controller and JSP in the web app subdirectory
  9. Check the web app configuration file (libresource-web.xml)
  10. Then create a new wikiPage by duplicating the current wiki
    1. Change the names...
    2. Add a task to build it in ant
    3. Add your module in the web (in ls config file)
    4. deploy and test
  11. Now you should have learned how to integrate a new module in libresource. You should be ready to create your own module...
Seb

posted by reya at Jan 17, 2008 9:16 PM
Quote
Yes I replace Wiki by Note to make a new service named LibresourceNote and a new resource named Note. ANd no it didn't change anything because in the fileLibreSource-web.xml you have :

<resource key="Page" name="Wiki Page" service="LibresourceWiki" type="Page">

and for my new resource, I do an other type named Note. I change in all file in directories xxx/note/ Page with Note and I write :

<resource key="Note" name="Note Page" service="LibresourceNote" type="Note">

posted by reya at Jan 17, 2008 8:46 PM
Quote
It works!!

Thank you for help.

Now I have to think about the modules I have to create for my project. I think I will need you help later! I hope not to be annoying.

posted by Sebastien Jourdain at Jan 17, 2008 8:02 PM
Quote
By doing that,

you mean from the given header, you replace Wiki by Note in order to make a new service named LibresourceNote and a new resource named Note ?

And by changing that, it didn't changed anything ?

posted by Sebastien Jourdain at Jan 17, 2008 8:00 PM
Quote
wikiHelp is a tag lib, that is used to print wikiHelp… Simply remove this line or keep it like it was...

<c:if test="${printable == null}"><br/>${ls:wikiHelp(resource.uri)}</c:if>
posted by reya at Jan 17, 2008 7:54 PM
Quote
I do that and it doesn't work! After I edit all file and replace Page by Note and it works. But when I want to create a new ressource i have this error

Erreur Inattendue - Revenir en arrière /pages/modules/note/viewPage.jsp(92,7) The function noteHelp cannot be located with the specified prefix

posted by Sebastien Jourdain at Jan 17, 2008 7:26 PM
Quote
/**
 * The Libresource Wiki service
 *
 * @libresource.service name="LibresourceWiki" depends="Kernel, Membership,
 *                      LibresourceCore, LibresourceForum"
 */
and
/**
 * A libresource Wiki Page
 *
 * @libresource.resource name="Page" service="LibresourceWiki"
 */

posted by reya at Jan 17, 2008 6:57 PM
Quote
i'm sorry but I don't understand. Could you explain, detail more with only one example?
posted by Sebastien Jourdain at Jan 17, 2008 4:31 PM
Quote
In the source code of each ejb
  • xxxService.java
  • xxxResourceBean.java
  • xxxBean.java
posted by reya at Jan 17, 2008 4:24 PM
Quote
I don't find the xdoclet header. Where are it?
posted by Sebastien Jourdain at Jan 17, 2008 3:57 PM
Quote
in the xdoclet header, did you removed all wiki part ?
posted by reya at Jan 17, 2008 3:43 PM
Quote
No problem to keep in english :)

I don't know you are saying about JNDI and xdoclet. Could you explain more?

posted by Sebastien Jourdain at Jan 17, 2008 3:34 PM
Quote
Please could we keep going in english...

Sorry for english speaker

posted by Sebastien Jourdain at Jan 17, 2008 3:32 PM
Quote
Tu n'as pas de conflit de nom JNDI ? Dans les tag xdoclet...

Sinon, refactore le nom des classes…

posted by reya at Jan 17, 2008 3:20 PM
Quote
[reya@localhost LSC-2.2-src-thirdpart]$ grep -ir wiki.HistoryEntry *
Fichier binaire build/src-default-web/build/WEB-INF/lib/LibreSource-Wiki-2.0.jar concorde
Fichier binaire build/src-default-web/build/WEB-INF/classes/org/libresource/web/controllers/wiki/PageVersionController.class concorde
Fichier binaire build/ear-build/ear/LibreSource-Wiki-2.0.jar concorde
Fichier binaire Distribution/Components/Libresource/Wiki/LibreSource-Wiki-2.0.jar concorde
Fichier binaire Distribution/Components/Libresource/Wiki/LibreSource-Wiki-2.0-deployable.jar concorde
Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/wiki/PageVersionController.java:import org.libresource.wiki.HistoryEntry;
Src/LS-Server/wiki/src/org/libresource/wiki/ejb/LibresourceWikiServiceBean.java:import org.libresource.wiki.HistoryEntry;
Src/LS-Server/wiki/src/org/libresource/wiki/ejb/PageResourceBean.java:import org.libresource.wiki.HistoryEntry;

(empty line)

[reya@localhost LSC-2.2-src-thirdpart]$ grep -ir note.HistoryEntry * build/ejb-work/src/org/libresource/note/ejb/PageResourceBean.java:import org.libresource.note.HistoryEntry; build/ejb-work/src/org/libresource/note/ejb/LibresourceNoteServiceBean.java:import org.libresource.note.HistoryEntry; Fichier binaire build/ejb-work/classes/org/libresource/note/EntryComparator.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/HistoryEntry.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/PageExportHandler.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/PageImportHandler.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/interfaces/LibresourceNoteService.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/interfaces/PageResourceLocal.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/ejb/LibresourceNoteServiceBean.class concorde Fichier binaire build/ejb-work/classes/org/libresource/note/ejb/PageResourceBean.class concorde build/ejb-work/src-gen-libresource/org/libresource/note/ejb/LibresourceNoteServiceBean.java:import org.libresource.note.HistoryEntry; build/ejb-work/src-gen-libresource/org/libresource/note/ejb/PageResourceBean.java:import org.libresource.note.HistoryEntry; build/ejb-work/src-gen-xdoclet/org/libresource/note/interfaces/LibresourceNoteService.java: public org.libresource.note.HistoryEntry getPageVersion( java.net.URI uri,int version ) build/ejb-work/src-gen-xdoclet/org/libresource/note/interfaces/PageResourceLocal.java: public org.libresource.note.HistoryEntry getPageVersion( int version ) throws java.lang.Exception; Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/note/PageVersionController.java:import org.libresource.note.HistoryEntry; Src/LS-Server/note/src/org/libresource/note/ejb/PageResourceBean.java:import org.libresource.note.HistoryEntry; Src/LS-Server/note/src/org/libresource/note/ejb/LibresourceNoteServiceBean.java:import org.libresource.note.HistoryEntry;

posted by reya at Jan 17, 2008 3:04 PM
Quote
J'ai recommencer depuis le début en partant de l'archive. J'ai toujours les mêmes erreurs

J'ai modifié: *A la racine Build.xml

*Dans Src/LS-Server: Build.xml Build.properties

*Dans distribution Build.properties Build.xml Component.properties

*Dans Distribution/resources/ear application.xml.template

*Dans Src/LS-Client/Default-Web build.xml

*Dans Src/LS-Client/Default-Web/WEB-INF/ libresource-web.xml

*Dans Src/LS-Client/Default-Web/WEB-INF/src/java/resources appllication-fr.preperties

L'erreur est : code ! genic ! GenIC for JOnAS 4.8.6: 'PageResource', 'LibresourceNoteService' generation … ! genic ! /tmp/genic57357.tmp/org/objectweb/jonas_gen/org/libresource/note/interfaces/JOnASPageResource174952013Local.java:205: incompatible types ! genic ! found : org.libresource.wiki.HistoryEntry ! genic ! required: org.libresource.note.HistoryEntry ! genic ! b.getPageVersion(p1); ! genic ! ^ ! genic ! /tmp/genic57357.tmp/org/objectweb/jonas_gen/org/libresource/note/interfaces/JOnASPageResource174952013Local.java:569: incompatible types ! genic ! found : org.libresource.wiki.ejb.model.PageResourceValue ! genic ! required: org.libresource.note.ejb.model.PageResourceValue ! genic ! b.getPageResourceValue(); ! genic ! ^ ! genic ! Note: /tmp/genic57357.tmp/jorm/rdb/PageResourceMapping.java uses unchecked or unsafe operations. ! genic ! Note: Recompile with -Xlint:unchecked for details. ! genic ! 2 errors code

J'ai recherché si il y avait wiki dans un package note mais j'ai rien trouvé.

posted by reya at Jan 17, 2008 1:40 PM
Quote
I don't find wiki.HistoryEntry in xxx/note/

I will test with eclipse to find where are the problem and I say you later

posted by Sebastien Jourdain at Jan 17, 2008 1:17 PM
Quote
The important thing is that :
found   : org.libresource.wiki.HistoryEntry
required: org.libresource.note.HistoryEntry

It seem's that somewhere your are still using wiki.HistoryEntry instead of note.HistoryEntry.

Check that by listing line that contains wiki in your note package:

cd xxx/note/
grep -ir wiki *

posted by reya at Jan 17, 2008 12:40 PM
Quote
J'ai une erreur que je ne comprend pas. J'ai surement du oublier quelque chose ou faire une mauvaise manipulation:

genic:
    [genic] building LibreSource-Note-2.0.jar with 17 files
    [genic] 2008-01-17 12:43:37,050 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract boolean org.libresource.LibresourceService.canMapResourceForSecurity(java.net.URI,java.net.URI) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceNoteService (set to the default value Supports)
    [genic] 2008-01-17 12:43:37,054 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract java.lang.String org.libresource.LibresourceService.getShortResourceName(org.libresource.LibresourceResourceIdentifier) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceNoteService (set to the default value Supports)
    [genic] 2008-01-17 12:43:37,057 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract java.lang.String[] org.libresource.LibresourceService.listAvailablesPermissions(org.libresource.LibresourceResourceIdentifier) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceNoteService (set to the default value Supports)
    [genic] GenIC for JOnAS 4.8.6: 'PageResource', 'LibresourceNoteService' generation …
    [genic] /tmp/genic33045.tmp/org/objectweb/jonas_gen/org/libresource/note/interfaces/JOnASPageResource174952013Local.java:205: incompatible types
    [genic] found   : org.libresource.wiki.HistoryEntry
    [genic] required: org.libresource.note.HistoryEntry
    [genic]             b.getPageVersion(p1);
    [genic]                             ^
    [genic] /tmp/genic33045.tmp/org/objectweb/jonas_gen/org/libresource/note/interfaces/JOnASPageResource174952013Local.java:569: incompatible types
    [genic] found   : org.libresource.wiki.ejb.model.PageResourceValue
    [genic] required: org.libresource.note.ejb.model.PageResourceValue
    [genic]             b.getPageResourceValue();
    [genic]                                   ^
    [genic] Note: /tmp/genic33045.tmp/jorm/rdb/PageResourceMapping.java uses unchecked or unsafe operations.
    [genic] Note: Recompile with -Xlint:unchecked for details.
    [genic] 2 errors
    [genic] GenIC fatal error:
    [genic] Exception during execution of org.objectweb.jonas_ejb.genic.GenIC : Failed when compiling the generated classes via java compiler
    [genic] java.lang.RuntimeException: Failed when compiling the generated classes via java compiler
    [genic]     at org.objectweb.jonas_ejb.genic.GenIC.fatalError(GenIC.java:1258)
    [genic]     at org.objectweb.jonas_ejb.genic.GenIC.main(GenIC.java:451)
    [genic]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [genic]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [genic]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [genic]     at java.lang.reflect.Method.invoke(Method.java:597)
    [genic]     at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:97)
    [genic] Failed when compiling the generated classes via java compiler

BUILD FAILED /home/reya/Desktop/LSC-2.2-src-thirdpart/build.xml:120: Following error occured while executing this line /home/reya/Desktop/LSC-2.2-src-thirdpart/Src/LS-Server/build.xml:851: Following error occured while executing this line /home/reya/Desktop/LSC-2.2-src-thirdpart/Src/LS-Server/build.xml:555: Following error occured while executing this line /home/reya/Desktop/LSC-2.2-src-thirdpart/Src/LS-Server/build.xml:927: GenIC reported an error.

J'ai vérifier tous les fichiers de configuration et je ne trouve pas pourquoi j'ai cette erreur.

posted by Sebastien Jourdain at Jan 14, 2008 3:54 PM
Quote
I forget the file Src/LS-Client/Default-WebApp/WEB-INF/libresource-web.xml

You need to register your new controllers to your new resource type...

posted by Sebastien Jourdain at Jan 14, 2008 3:52 PM
Quote
You forget to replace a wiki by note in one of the following config, but what is missing is :
  • Register your new target note in the file /Src/LS-Server/build.xml in the target : compile-all
  • Add your filtering key LIBRESOURCE_NOTE_MODULE in the file Distribution/resources/ear/application.xml.template
I might forget something else, but not much… You are pretty done...

posted by reya at Jan 14, 2008 3:30 PM
Quote
  • cd LS_SRC/Src/LS-Server
  • cp -r wiki note
  • I edit package name to prevent conflict
  • I edit build.properties and add : libresource-note.dir=${src.ls-server.dir}/note
  • I edit build.xml and add :
<condition property="rebuilt-note">
		<not>
			<uptodate targetfile="${components-jar.dir}/Libresource/Note/${libresource-note.component-name}-${libresource-note.version}.jar">
				<srcfiles dir="${libresource-note.dir}/src" />
			</uptodate>
		</not>
	</condition>
<equals arg1="${rebuilt-note}" arg2="true" />
<!-- libresource-note -->
	<target name="note" description="build the Libresource-Note module" if="rebuilt-note">
		<savant:dependency localcache="${components-jar.dir}">
			<savant:project name="Kernel" group="Libresource" dir="${base.dir}" target="kernel" />
			<savant:project name="Forum" group="Libresource" dir="${base.dir}" target="forum" />
			<savant:artifactgroup>
				<savant:artifact id="Kernel" group="Libresource" projectname="Kernel" name="${kernel.component-name}" version="${kernel.version}" type="jar" />
				<savant:artifact id="Forum" group="Libresource" projectname="Forum" name="${libresource-forum.component-name}" version="${libresource-forum.version}" type="jar" />
			</savant:artifactgroup>
		</savant:dependency>

<echo message="// Building Libresource Note" /> <antcall target="init" inheritall="true" inheritrefs="true" />

<savant:artifactcopy todir="${component.depends.thirdparty.dir}" localcache="${components-jar.dir}" flatten="true"> <savant:artifact id="Kernel" group="Libresource" projectname="Kernel" name="${kernel.component-name}" version="${kernel.version}" type="jar" /> <savant:artifact id="Forum" group="Libresource" projectname="Forum" name="${libresource-forum.component-name}" version="${libresource-forum.version}" type="jar" /> </savant:artifactcopy>

<property name="component.jar.name" value="${libresource-note.component-name}-${libresource-note.version}.jar" /> <property name="component.deployable.jar.name" value="${libresource-note.component-name}-${libresource-note.version}-deployable.jar" /> <property name="component.name" value="${libresource-note.component-name}" /> <property name="component.version" value="${libresource-note.version}" /> <mkdir dir="${component.depends.thirdparty.dir}" />

<copy todir="${component.src.dir}"> <fileset dir="${libresource-note.dir}/src"> <include name="**/*" /> </fileset> </copy>

<antcall target="genic" inheritall="yes" inheritRefs="true" /> <antcall target="ejb-jar" inheritall="yes" inheritRefs="true" /> <echo message="// Libresource Note is built !" />

<savant:publish from="${component.dist.dir}/${component.jar.name}" localcache="${components-jar.dir}"> <savant:artifact id="Note" group="Libresource" projectname="Note" name="${component.name}" version="${component.version}" type="jar" expireminutes="720" /> </savant:publish> <savant:publish from="${component.dist.dir}/${component.deployable.jar.name}" localcache="${components-jar.dir}"> <savant:artifact id="Note-deployable" group="Libresource" projectname="Note" name="${component.name}" version="${component.version}-deployable" type="jar" /> </savant:publish> </target>

...

That's all in the directory LS-Server

In Distribution :

  • I edit build.properties and add : services.note=yes
  • I edit build.xml and add :
<condition property="modules.wiki" value="<module><ejb>${libresource-note.component-name}-${libresource-noteversion}.jar</ejb></module>">
  			<equals arg1="${services.note}" arg2="yes" trim="yes" casesensitive="no"/>
  		</condition>
  		<condition property="modules.note" value="">
  			<not><equals arg1="${services.note}" arg2="yes" trim="yes" casesensitive="no"/></not>
  		</condition>
<filter token="LIBRESOURCE_NOTE_MODULE" value="${modules.note}"/>
  • I edit components.properties and add :
libresource-note.component-name=LibreSource-Note libresource-note.version=2.0
  • to finish I copy Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/Wiki to Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/note
posted by Sebastien Jourdain at Jan 14, 2008 3:16 PM
Quote
  • Did you create new EJB session bean ?
  • Did you update build.xml files ?
Could you be more precise of what you've done ? (from the beginning)
posted by reya at Jan 14, 2008 3:07 PM
Quote
All it's OK!!! I onstalled a Linux system and it works.

After i create a new module that is a copy of wiki name it "note" and I have a problem : Compiling 7 source files to /home/reya/Desktop/LSC-2.2-src-thirdpart/build/src-default-web/build/WEB-INF/classes

[javac] /home/reya/Desktop/LSC-2.2-src-thirdpart/Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/note/CreatePageController.java:36: package org.libresource.note.interfaces does not exist
    [javac] import org.libresource.note.interfaces.LibresourceNoteService;

I don't where is the problem because I copy all files.

posted by Sebastien Jourdain at Jan 10, 2008 1:42 PM
Quote
Your problem seems to come from those lines in the file JONAS_ROOT/conf/jonas.properties

jonas.services    registry,jmx,jtm,dbm,security,resource,ejb,web,ear,mail
jonas.service.mail.factories	libresourceMail, libresourceConfig

Or maybe because you don't have a file named libresourceConfig.properties in JONAS_ROOT/conf

posted by reya at Jan 10, 2008 1:31 PM
Quote
I read the install documentation and do everything but: type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: com/sun/mail/util/LineInputStream org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:293) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114) org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:91) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:619)

root cause

java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream javax.mail.Session.loadProvidersFromStream(Session.java:940) javax.mail.Session.access$000(Session.java:187) javax.mail.Session$1.load(Session.java:882) javax.mail.Session.loadAllResources(Session.java:1141) javax.mail.Session.loadProviders(Session.java:898) javax.mail.Session.<init>(Session.java:220) javax.mail.Session.getInstance(Session.java:242) org.objectweb.jonas.mail.factory.JavaMailSessionFactory.getObjectInstance(JavaMailSessionFactory.java:136) javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) org.objectweb.jeremie.services.registry.jndi.JRMIRegistryContext.lookup(JRMIRegistryContext.java:161) javax.naming.InitialContext.lookup(InitialContext.java:396) org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:140) org.objectweb.carol.jndi.spi.AbsContext.lookup(AbsContext.java:150) javax.naming.InitialContext.lookup(InitialContext.java:392) org.objectweb.carol.jndi.spi.MultiContext.lookup(MultiContext.java:118) javax.naming.InitialContext.lookup(InitialContext.java:392) org.libresource.Libresource.getLibresourceConfiguration(Libresource.java:381) org.libresource.web.config.Config.<init>(Unknown Source) org.libresource.web.config.Config.getInstance(Unknown Source) org.libresource.web.servlets.Browse.init(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114) org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:91) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:619)

posted by Sebastien Jourdain at Jan 10, 2008 12:50 PM
Quote
Read the Install documentation !

This error is related to the configuration of Jonas.

posted by reya at Jan 10, 2008 12:35 PM
Quote
Thanks. it works!

I have an error when I try libresource: type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Unable to load the LibreSource configuration file. org.libresource.web.servlets.Browse.init(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114) org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:91) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:619)

root cause

java.lang.RuntimeException: Unable to load the LibreSource configuration file. org.libresource.Libresource.getLibresourceConfiguration(Libresource.java:387) org.libresource.web.config.Config.<init>(Unknown Source) org.libresource.web.config.Config.getInstance(Unknown Source) org.libresource.web.servlets.Browse.init(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114) org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:91) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:619)

Mick

posted by Sebastien Jourdain at Jan 10, 2008 9:45 AM
Quote
You should have read the INSTALL_JONAS.txt. But mainly you get through...

What is missing here, is that you didn't remove the default jonas web application that is listening at the context root. So Libresource get into conflict with it… To do so remove the directory or the war file: JONAS_ROOT/webapp/autoload/????ROOT???? (I don't remember the exact name)

Seb

posted by reya at Jan 9, 2008 11:10 PM
Quote
I find the solution of mapper.properties.

But now I can't deploy the ear:

2008-01-09 23:12:02,515 : AbsJWebContainerServiceImpl.deployWars : Error when deploying '/C:/JOnas/w ork/apps/jonas/LibreSource-2.3_2008.01.09-23.01.20/LibreSource-Web-2.0.war' 2008-01-09 23:12:02,531 : AbsJWebContainerServiceImpl.deployWars : Cannot deploy war '/C:/JOnas/work /apps/jonas/LibreSource-2.3_2008.01.09-23.01.20/LibreSource-Web-2.0.war' is already deployed with th e context '/'. You must undeploy the war before a new deployment. 2008-01-09 23:12:02,546 : AbsJWebContainerServiceImpl.deployWars : Undeploy war of the ear applicati on 2008-01-09 23:12:02,562 : EarServiceImpl.deployEar : Error during the deployment of the wars file of the Ear file /C:/JOnas/apps/autoload/LibreSource-2.3.ear': Error during the deployment: org.objectw eb.jonas.web.JWebContainerServiceException : Cannot deploy war '/C:/JOnas/work/apps/jonas/LibreSourc e-2.3_2008.01.09-23.01.20/LibreSource-Web-2.0.war' is already deployed with the context '/'. You must undeploy the war before a new deployment.

The problem is that I don't ahve the war deployed!

posted by reya at Jan 9, 2008 8:49 PM
Quote
I find the solution!

Now i use LibreSource 2.3 and i define the classpath.

But now the problem is that I can't deploy:

2008-01-09 20:46:05,234 : EarServiceImpl.deployEar : Error during the deployment of the jars files o f the Ear file /C:/JOnas/apps/autoload/LibreSource-2.3.ear': Error during the deployment: javax.ejb. EJBException: Impossible to instanciate the entity factory: null; nested exception is: javax.ejb.EJB Exception: Unable to retrieve mapperName for libresourceDS; nested exception is: java.lang.RuntimeEx ception: Cannot find properties for c:JOnas
confmapper.properties

posted by reya at Jan 9, 2008 6:38 PM
Quote
OS : Windows XP JVM version : 1.6 LibreSource version : 2.2

I don't modify the configuration file

posted by Sebastien Jourdain at Jan 9, 2008 5:27 PM
Quote
  • Ok what did you put in the configuration file for the compilation ?
  • What OS ?
  • JVM Version ?
  • LibreSource version ?
Regards,

Seb

posted by reya at Jan 9, 2008 3:37 PM
Quote
When i compile the source, i have this error:

genic:
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! building LibreSource-Synchronizer-2.0.jar with 496 files
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! 2008-01-09 15:27:21,968 : SessionDesc.checkTxAttribute : trans-attribute missing for met
hod public abstract boolean org.libresource.LibresourceService.canMapResourceForSecurity(java.net.UR
I,java.net.URI) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean
 LibresourceSynchronizerService (set to the default value Supports)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! 2008-01-09 15:27:21,968 : SessionDesc.checkTxAttribute : trans-attribute missing for met
hod public abstract java.lang.String org.libresource.LibresourceService.getShortResourceName(org.lib
resource.LibresourceResourceIdentifier) throws org.libresource.LibresourceException,java.rmi.RemoteE
xception in session bean LibresourceSynchronizerService (set to the default value Supports)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! GenIC for JOnAS 4.8.6: 'LibresourceSynchronizerService', 'Workspace', 'WsConnectionResou
rce', 'SynchronizerResource' generation …
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! 2008-01-09 15:27:25,781 : Cmd.run : exception
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! java.io.IOException: Cannot run program "C:SunSDKjdkjre..binjavac": CreateProcess
 error=87, ParamÞtre incorrect
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.Runtime.exec(Runtime.java:593)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.Runtime.exec(Runtime.java:509)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.common.Cmd.run(Cmd.java:147)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas_ejb.genic.GenIC.compilClasses(GenIC.java:870)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas_ejb.genic.GenIC.main(GenIC.java:420)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! Failed when compiling the generated classes via java compiler
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.reflect.Method.invoke(Method.java:597)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:97)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! Caused by: java.io.IOException: CreateProcess error=87, ParamÞtre incorrect
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.ProcessImpl.create(Native Method)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     … 10 more
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! GenIC fatal error:
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! Exception during execution of org.objectweb.jonas_ejb.genic.GenIC : Failed when compilin
g the generated classes via java compiler
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic ! java.lang.RuntimeException: Failed when compiling the generated classes via java compile
r
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas_ejb.genic.GenIC.fatalError(GenIC.java:1258)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas_ejb.genic.GenIC.main(GenIC.java:451)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at java.lang.reflect.Method.invoke(Method.java:597)
    "resourceLink" href="/home/community/forum/New_module/RE_New_module_2/genic">"error">! genic !     at org.objectweb.jonas.server.Bootstrap.main(Bootstrap.java:97)
------------------------------------------------------------------------------------------------------------------------------------------

I don't know how fix this problem!!

posted by Sebastien Jourdain at Dec 10, 2007 5:42 PM
Quote
if you are on unix system to duplicate the current wiki:
  • cd LS_SRC/Src/LS-Server
  • cp -r wiki myWiki
To change name:
  • Edit package name to prevent conflict
Add task in ant
  • Copy/past the wiki building task and rename it to your service name and fix paths...
  • Add the dependancy like the original wiki to make sure that your task will be executed
Deploy
  • ant deploy
  • Fix errors if you get any
If ok do duplicate the wiki part in the web part in the same manner...

For more documentation, sorry but everything is online, otherwise you will have to follow our trainning.

Regards,

Seb

posted by reya at Dec 10, 2007 5:15 PM
Quote
Can you explain more:

Then create a new wikiPage by duplicating the current wiki

  1. Change the names...
  2. Add a task to build it in ant
  3. Add your module in the web (in ls config file)
  4. deploy and test
Do you document which explain more libresource architecture?
posted by Sebastien Jourdain at Dec 10, 2007 9:09 AM
Quote
This document is outdated, and doesn't help much with the latest release. But with this warning, I finally give it to someone who asked for it. And, guess what, he was more confused than before...

I can help you to find your way into libresource sources. Just follow few step in order to understands its architecture.

  1. Download the source package
  2. Configure and build the application
  3. Deploy this libresource on your local computer
  4. Make sure it works find.
  5. Look at the directory structure (where are the EJB, Web app, ant ...)
  6. Now you can start looking at the code.
  7. Look at the wiki code in the EJB subdirectory
  8. Look at the wiki controller and JSP in the web app subdirectory
  9. Check the web app configuration file (libresource-web.xml)
  10. Then create a new wikiPage by duplicating the current wiki
    1. Change the names...
    2. Add a task to build it in ant
    3. Add your module in the web (in ls config file)
    4. deploy and test
  11. Now you should have learned how to integrate a new module in libresource. You should be ready to create your own module...
Seb
posted by reya at Dec 9, 2007 11:59 PM
Quote
hello, I'm a student and I have to create new modules. But I can't access to the developer-manual!

Can I have this document?