Running from a fresh checkout

0 views
Skip to first unread message

Ivan R. Judson

unread,
Nov 24, 2008, 12:02:15 PM11/24/08
to Persevere

Is there documentation for running from a fresh checkout?

Thanks,

--Ivan

Kris Zyp

unread,
Nov 24, 2008, 12:16:03 PM11/24/08
to persevere...@googlegroups.com
There should be, I will create a write-up on how to do it.
Kris

Ivan R. Judson

unread,
Nov 24, 2008, 4:55:44 PM11/24/08
to Persevere

I'm sorry I didn't provide more information. Here's what's happening :

1) Using the persevere-0.9.25.tgz distribution I can run this fine,
2) using a subversion checkout, errors with the following message
(found in previous posts):

Abatwa:persevere-framework judson$ java -jar start.jar
2008-11-24 14:55:13.375::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
2008-11-24 14:55:14.555::INFO: jetty-6.1.11
2008-11-24 14:55:14.694::INFO: NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
2008-11-24 14:55:14.807::WARN: EXCEPTION
java.lang.ClassNotFoundException: org.persvr.remote.PersevereFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
....

I'm using a Mac Laptop, OS X 10.5, with Java as follows:
Abatwa:~ judson$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-
b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

--Ivan

Kris Zyp

unread,
Nov 24, 2008, 5:39:42 PM11/24/08
to persevere...@googlegroups.com
As you probably guessed this is because it hasn't been built yet. To
build the server, it should be as simple as running "ant" at the command
line at the root of the checkout. This should build everything except
the Dojo-based client code, which is a different ant task, and relies on
a Dojo checkout. Let me know if you have any problems with that.

Ivan R. Judson

unread,
Nov 24, 2008, 5:58:45 PM11/24/08
to Persevere

Yeah Ok, I thought I figured it out, but I'm suddenly feeling the
afternoon slump :-).

Here's my build output:

Abatwa:persevere-framework judson$ ant
Buildfile: build.xml

compilePersevere:
[javac] Compiling 137 source files to /Users/judson/Projects/
persevere/persevere-framework/WEB-INF/classes
[javac] /Users/judson/Projects/persevere/persevere-framework/WEB-
INF/src/org/persvr/data/ObjectId.java:11: cannot find symbol
[javac] symbol : class UserAssignableIdSource
[javac] location: package org.persvr.datasource
[javac] import org.persvr.datasource.UserAssignableIdSource;
[javac] ^
[javac] /Users/judson/Projects/persevere/persevere-framework/WEB-
INF/src/org/persvr/datasource/ClassDataSource.java:20: cannot find
symbol
[javac] symbol: class UserAssignableIdSource
[javac] public class ClassDataSource implements
WritableDataSource, UserAssignableIdSource {

[javac] ^
[javac] /Users/judson/Projects/persevere/persevere-framework/WEB-
INF/src/org/persvr/data/ObjectId.java:81: cannot find symbol
[javac] symbol : class UserAssignableIdSource
[javac] location: class org.persvr.data.ObjectId
[javac] if(e.getSource() instanceof UserAssignableIdSource)
[javac] ^
[javac] /Users/judson/Projects/persevere/persevere-framework/WEB-
INF/src/org/persvr/util/Console.java:68: cannot find symbol
[javac] symbol : class Console
[javac] location: package java.io
[javac] java.io.Console console = System.console();
[javac] ^
[javac] /Users/judson/Projects/persevere/persevere-framework/WEB-
INF/src/org/persvr/util/Console.java:68: cannot find symbol
[javac] symbol : method console()
[javac] location: class java.lang.System
[javac] java.io.Console console = System.console();

[javac]
^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors

BUILD FAILED
/Users/judson/Projects/persevere/persevere-framework/build.xml:19:
Compile failed; see the compiler error output for details.

Total time: 1 second

------

The console thing seems like it should be simple, the
UserAssignableIdSource is confusing, I can't find that defined
anywhere.

in WEB-INF/src/org/persvr/datasource, I find this:

Abatwa:datasource judson$ grep UserAssignableIdSource *
ClassDataSource.java:public class ClassDataSource implements
WritableDataSource, UserAssignableIdSource {

And I see a WritableDataSource.java. Perhaps
UserAssignableIdSource.java forgot to get checked in?

Thoughts?

--Ivan

Kris Zyp

unread,
Nov 24, 2008, 6:13:16 PM11/24/08
to persevere...@googlegroups.com

> The console thing seems like it should be simple, the
>
It's supposed to conditionally use the Java 6 console if the Java
runtime in version 6 (but still work with version 5), but unfortunately
it prevents compilation under 5. I commented out the Java 6 console, it
is not that important.

> And I see a WritableDataSource.java. Perhaps
> UserAssignableIdSource.java forgot to get checked in?
>

You guessed it, I forgot to check it in. I just checked it in now, can
you try again? I'll try myself (building from a fresh checkout) to make
sure...

Kris

Ivan R. Judson

unread,
Nov 24, 2008, 7:13:26 PM11/24/08
to Persevere

It looks like it builds now, but I can't seem to get the start.jar
file to update, so I'm not sure it's working. Which build target
rebuilds the start.jar file?

--Ivan

Kris Zyp

unread,
Nov 24, 2008, 7:25:01 PM11/24/08
to persevere...@googlegroups.com
start.jar is just copied from Jetty, I didn't create it (nor build it).
persevere.jar is main jar file that is built with the build process.
Kris

Ivan R. Judson wrote:

Ivan R. Judson

unread,
Nov 24, 2008, 10:06:38 PM11/24/08
to Persevere
Well cool.

In that case it works just fine :-). Thanks for the patching in real
time.

--Ivan

Liam Staskawicz

unread,
Dec 1, 2008, 4:29:49 PM12/1/08
to Persevere
Just wanted to chime in that it would be great to get instructions in
place to build from source, including the JS client, etc. It was easy
enough to build the server via ant after finding this thread, but it
would be nice to have instructions to reproduce from svn trunk what's
distributed in the tarballs. For the Dojo client code, perhaps some
svn:externals could be added?

Also, I noticed that there were no entries in the tags dir of the SVN
repo corresponding to releases. Do you keep snapshots somewhere else?

Just checking out Persevere now and starting to sketch out some of my
app...looks very exciting. Looking forward to the upcoming
developments!

Liam

Kris Zyp

unread,
Dec 1, 2008, 6:15:58 PM12/1/08
to persevere...@googlegroups.com
Ok, I must admit my incompetence when it comes to SVN, I know I haven't
really been fully utilizing it properly, and I apologize. I will try
learn some more, svn:externals and snapshots do sound like they would be
valuable. Any suggestions are certainly welcome. I have been wanting to
setup nightly builds at www.persvr.org, and a more automated build would
certainly be helpful for that purpose as well. I did put some brief
instructions on how I do the client build in the documentation for the
latest release of Persevere under the section "Building Persevere", but
more automation would certainly be preferable.
Kris

Liam Staskawicz

unread,
Dec 1, 2008, 6:50:22 PM12/1/08
to persevere...@googlegroups.com
No worries :)

The tags are the easiest. The svn copy (or just cp) command works
best, and should be run at the same time you're making your tarball
(could be part of the same script). Something like

svn cp http://psersevere-framework.googlecode.com/svn/trunk http://psersevere-framework.googlecode.com/svn/tags/v0.9.28

would do the trick. This makes it easier to do diffs between
releases, etc.

As for externals, what I usually do is create a text file that has the
svn externals command which specifies the directories to create from
the external sources...then I never have to remember the actual
command, since it's in the file. I've attached a sample file
according to the instructions mentioned in the "Building Persevere"
section - although I didn't see a 'util' dir in the most recent release.

To apply this (assuming the names and paths are correct), copy the
file into the appropriate spot in the svn tree (or update the
directory names in the file with the relative path they should be
imported to) and then run the command as instructed "svn propset
svn:externals -F EXTERNALS.txt .", commit the directory, and then the
next time you do an update, it will pull in the sources from the dojo
svn repo.

Hope that helps - let me know if you have any questions.

Liam

EXTERNALS.txt

Kris Zyp

unread,
Dec 2, 2008, 12:27:21 AM12/2/08
to persevere...@googlegroups.com
Awesome, thank you for the help, the svn:externals works beautifully.
You should be able to do an update/checkout and do a full build
(JavaScript as well as Java) now with just the default ant build:
ant
and then start up persevere:
cd builds/persevere
java -jar start.jar

I still need to do a few more updates to make it easier to actually run
persevere in development mode with the pre-built Dojo, but at least you
can do a full build now with little effort.
Thanks,
Kris
> ------------------------------------------------------------------------
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google
>> Groups "Persevere" group.
>> To post to this group, send email to persevere...@googlegroups.com
>> To unsubscribe from this group, send email to persevere-frame...@googlegroups.com
>> For more options, visit this group at http://groups.google.com/group/persevere-framework?hl=en
>> -~----------~----~----~----~------~----~------~--~---
>>
>

Liam Staskawicz

unread,
Dec 2, 2008, 2:23:00 AM12/2/08
to persevere...@googlegroups.com
Great - just confirmed that I was able to 'svn up' and rebuild it
successfully. Will be much easier to start playing this way, without
having to wipe the tarball directory each time an update is made -
thanks.

Also, it's of course up to you, but I usually like to check in the
EXTERNALS.txt file itself in the directory that it's applied to...both
indicates to somebody browsing that there are externals involved, and
is convenient to have the command there in case it ever needs to be
modified.

Liam

Kris Zyp

unread,
Dec 2, 2008, 2:23:40 PM12/2/08
to persevere...@googlegroups.com
OK, I made some more changes that should make it much easier to start
hacking on Persevere. I moved the dojo externals to the jsclient
directory so that the examples point to the same relative directory in
dev and built versions, and added some tasks to the ant build to make
things easier. I also put up a Wiki page:
http://code.google.com/p/persevere-framework/wiki/BuildingDevelopingPersevere
with a little more detailed instructions.
Kris

Liam Staskawicz

unread,
Dec 2, 2008, 2:52:48 PM12/2/08
to persevere...@googlegroups.com
Cool - although I'm actually getting an error in the build now from
one of your recently added files. It looks like it doesn't like the
import statements....traceback at http://pastie.org/329057.

Liam

Kris Zyp

unread,
Dec 2, 2008, 3:13:27 PM12/2/08
to persevere...@googlegroups.com
Oops, I added that to try make it easier start up Persevere in
development, guess I missed some classpath additions with that. I will
get that fixed.
Kris

Liam Staskawicz

unread,
Dec 5, 2008, 12:33:25 PM12/5/08
to Persevere
Hm - there are still just a couple weirdnesses building from trunk.
Most of the core stuff seems to work (I can happily make REST
requests), but a lot of the content for the documentation doesn't make
it to the right spot...none of the links on the standard doc page
work, and the table of contents div is empty. And then accessing the
object browser seems on the surface to work OK, but the console spews
out a bunch of instances of the following traceback: http://pastie.org/332008.

Liam

On Dec 2, 12:13 pm, Kris Zyp <kris...@gmail.com> wrote:
> Oops, I added that to try make it easier start up Persevere in
> development, guess I missed some classpath additions with that. I will
> get that fixed.
> Kris
>
> Liam Staskawicz wrote:
> > Cool - although I'm actually getting an error in the build now from  
> > one of your recently added files.  It looks like it doesn't like the  
> > import statements....traceback athttp://pastie.org/329057.
>
> > Liam
>
> > On Dec 2, 2008, at 11:23 AM, Kris Zyp wrote:
>
> >> OK, I made some more changes that should make it much easier to start
> >> hacking on Persevere. I moved the dojo externals to the jsclient
> >> directory so that the examples point to the same relative directory in
> >> dev and built versions, and added some tasks to the ant build to make
> >> things easier. I also put up a Wiki page:
> >>http://code.google.com/p/persevere-framework/wiki/BuildingDevelopingP...
> >>>>> svn cphttp://psersevere-framework.googlecode.com/svn/trunkhttp://psersevere-framework.googlecode.com/svn/tags/v0.9.28
> >>>>>> setup nightly builds atwww.persvr.org, and a more automated build
Reply all
Reply to author
Forward
0 new messages