Re: Can't compile unicorn

Thanks,

Works like a charm with latest JDK/JRE :)

However i'm having the same issue as Johan Cardel, Ivan Smith, JC Etiemble,
tanyuqiang, Bobbi Fox, Billy Walker, ...
The validatation by URI is failing for local addresses. I've edited *
unicorn.properties* to set *ACCEPT_LOCAL_ADDRESSES* to *true.*
Here is the stack:

class org.apache.xmlbeans.XmlException
error: Reference to undefined entity: nbsp
org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
org.w3.x2009.x10.unicorn.observationresponse.ObservationresponseDocument$Factory.parse(Unknown
Source)
org.w3c.unicorn.response.impl.DefaultResponseXBeans.<init>(DefaultResponseXBeans.java:60)
sun.reflect.GeneratedConstructorAccessor20.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
org.w3c.unicorn.response.ResponseFactory.getResponse(ResponseFactory.java:24)
org.w3c.unicorn.request.URIRequest.doRequest(URIRequest.java:141)
org.w3c.unicorn.RequestThread.run(RequestThread.java:66)

As a temporary workaround, i'm using the file upload which is working.


[Community bonus]
Very small installation tuto (for windows) :

-Download & extract the following software:

apache-ant        # used to compile unicorn
apache-ivy         # needed to add features to apache-ant
apache-tomcat   # the webserver

- Copy apache-ivy\ivy-x.x.x.jar to apache-ant\lib
- Set the following environment variables (adapth paths to your system):

ANT_HOME = D:\...\apache-ant\
ANT_OPTS = -Xmx256Mo       # Optionnal, I guess you can offer 256Mo to the
compiler
JAVA_HOME = C:\Program Files\Java\jdk
JRE_HOME = C:\Program Files (x86)\Java\jre
TOMCAT_OPTS = -Dunicorn.home=/C:/unicorn

- Edit apache-tomcat\conf\tomcat-users.xml to add the manager role (replace
username/password !):

<role rolename="manager"/>
<user username="tomcat" password="s3crets3crets3cret" roles="manager"/>

- Start tomcat with apache-tomcat\bin\startup.bat [use shutdown.bat to close
it properly]

- Go to http://localhost:8080/ to see tomcat home page
Then clic on "Tomcat Manager" or go to http://localhost:8080/manager/html
Use login & password you've just define in tomcat-users.xml

- Leave this window a few minutes, time to build unicorn:

- Fetch the source code with Mercurial :

hg clone https://dvcs.w3.org/hg/unicorn

- Then open a console where you just clone/pull latest code and execute the
following command to get dependancies & compile :

ant retrieve generate_observer generate_tasklist default_conf war

- BUILD SUCCESSFUL
-> Go next step
BUILD FAILED
-> Something's missing / broken, try to resolve the issue, look on the
internet, eventually request some help in the forums

- Copy unicorn\WebContent\WEB-INF\resources\tomcat_policy\05unicorn.policy
to apache-tomcat\conf\

- Deploy the .war you've just built by filling the form "Select WAR file to
upload", it is located in unicor\dist\unicorn.war

- Goto to http://localhost:8080/unicorn

- n'joy

- A few more stuff:
I've edited unicorn.properties to set ACCEPT_LOCAL_ADDRESSES to true
I've edited unicorn_log4j.xml to reduce log level to "info" for Velocity,
Framework & unicorn.


Sources :
-------------
- http://code.w3.org/unicorn/wiki/Documentation/Install
- unicorn/README (downloaded file)
- http://mercurial.selenic.com/wiki/Mercurial
- http://lists.w3.org/Archives/Public/public-qa-dev/2010Aug/0004.html
- http://lists.w3.org/Archives/Public/public-qa-dev/2010Aug/0014.html


On Thu, Aug 12, 2010 at 6:26 PM, Jean-Guilhem Rouel <jean-gui@w3.org> wrote:

> Le 11/08/2010 19:00, Thibault ROHMER a écrit :
>
>  Hi,
>>
>> Sorry to bother you but I can't compile unicorn, it fails here
>> (Framework.java:32)
>>
>> import org.*w3*.unicorn.tasklist.TUi;
>>
>> The TUi class seems to be missing. Notice w3 != w3c.
>>
>
> Hi,
>
> You may want to check
> http://lists.w3.org/Archives/Public/public-qa-dev/2010Aug/0004.html.
>
> You have to run [[ant retrieve generate_observer generate_tasklist
> default_conf war]] to generate and compile everything. Note that the task
> retrieve needs apache ivy to work properly.
>
> And yes, we need to update http://code.w3..org/unicorn/wiki/Documentation/Install
> :).
>
> HTH.
>
> Regards,
> Jean-Gui
>
>
>  I'm using the mercurial repository mentionned here
>> http://code.w3.org/unicorn/wiki/Documentation/Install
>> <http://code.w3..org/unicorn/wiki/Documentation/Install> but
>>
>> I've also added the following .jars in filesystem & build.xml to avoid
>> first obvious build errors :
>> <fileset file="WebContent/WEB-INF/lib/commons-lang-2.5.jar" />
>> <fileset file="WebContent/WEB-INF/lib/commons-logging-1.1.1.jar" />
>> <fileset file="WebContent/WEB-INF/lib/log4j-1.2.16.jar" />
>> <fileset file="WebContent/WEB-INF/lib/velocity-1.6.4.jar" />
>> <fileset file="WebContent/WEB-INF/lib/velocity-tools-generic-2.0.jar" />
>>
>> Thanks for helping me :)
>>
>> Thibault
>>
>
>

Received on Monday, 16 August 2010 19:58:30 UTC