You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Greg Akins <an...@gmail.com> on 2009/11/11 21:29:37 UTC

Pain Trying FirstHop application

I'm trying to work through the "First Hops" tutorial.. any help would
be much appreciated. (Sent this to the users list yesterday, but
thought this list might be more appropriate).

After working through a lot of NoClassDefFound exceptions, I'm getting
a ConfigurationException (stacktrace below) from transientRepository.login()

The standalone server doesn't appear to be putting any errors in it's
logs, so it looks like there is a problem with repository.xml on the
client (though I'm not sure where/how/why that is on the client).

I'm running this on OS 10.6 and am using this on the command line to execute

CLASSPATH="."
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/slf4j/slf4j-api/1.5.3/slf4j-api-1.5.3.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.6.0/jackrabbit-api-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-core/1.6.0/jackrabbit-core-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-jcr-commons/1.6.0/jackrabbit-jcr-commons-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.6.0/jackrabbit-spi-commons-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/javax/jcr/jcr/1.0/jcr-1.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/oswego-concurrent/concurrent/1.3.4/concurrent-1.3.4.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar


java -cp $CLASSPATH:target/jcrApp-1.0-SNAPSHOT.jar com.gregakins.app.App

178 [main] WARN
org.apache.jackrabbit.core.config.ConfigurationErrorHandler - Fatal
error parsing the configuration at line -1 using system id null:
org.xml.sax.SAXParseException: Premature end of file.
Exception in thread "main" javax.jcr.RepositoryException: Invalid
repository configuration file: repository.xml: Configuration file
syntax error. (Line: -1 Column: -1): Premature end of file.:
Configuration file syntax error. (Line: -1 Column: -1): Premature end
of file.: Premature end of file.
       at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:236)
       at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:251)
       at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:319)
       at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:374)
       at com.gregakins.app.App.main(App.java:17)

-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net

Re: Pain Trying FirstHop application

Posted by "dbrosius@mebigfatguy.com" <db...@mebigfatguy.com>.
What you're looking to do sounds like it's in jackrabbit's domain,
so welcome and good luck.

You should probably send questions to
users@jackrabbit.apache.org

not the dev list though.

Cheers!



Greg Akins wrote:
> Thanks for clearing that up.
>
> I'll try not to ask anymore stupid questions until I read more of the
> documentation.
>
> Just to state what I'm hoping for, before I get too far down the wrong
> path, I'm working on an application for storing and associating a lot
> of different data (movies linked to pictures, text linked to movies,
> powerpoint presentations linked to audio, etc..)
>
> It seems obvious to me, that using JCR for a content repository is the
> right way to go; but I'm not sure past that.  Am I in the right place?
>
> On Wed, Nov 11, 2009 at 5:09 PM, Dave Brosius <db...@mebigfatguy.com> wrote:
>   
>> FirstHop uses what's called a Transient Repository. This is a 10 cent word
>> that really means 'embedded'. So if you want to use jackrabbit such that the
>> actually cms is inside your program (jvm), then you use that. and so your
>> program and the 'cms' share the same xml files because they are one. You can
>> use other types of repositories that this is not the case.
>>
>> -----Original Message-----
>> From: "Greg Akins" <an...@gmail.com>
>> Sent: Wednesday, November 11, 2009 3:50pm
>> To: "Dave Brosius" <db...@mebigfatguy.com>
>> Cc: dev@jackrabbit.apache.org
>> Subject: Re: Pain Trying FirstHop application
>>
>> That worked. Thanks!
>>
>> I am a little confused. I expected that the java app I'm writing
>> would be a client app that communicates with the same repository
>> created by the server.
>>
>> So when I try the sample /populate app, then the respository and
>> respository.xml get created in ./jackrabbit
>>
>> However, when I use my "FirstHops" app, the repository get's created
>> in ./FirstHops/repository
>>
>> So.. I obviously need to get some more education on how Jackrabbit,
>> and JCR, is supposed to work. Any pointers to good documentation
>> would be much appreciated
>>
>> On Wed, Nov 11, 2009 at 3:32 PM, Dave Brosius <db...@mebigfatguy.com>
>> wrote:
>>     
>>> try deleting your repository directory and doing it again. My guess is
>>> that
>>> you created that file when your class path wasn't right.
>>>
>>>       
>> --
>> Greg Akins
>>
>> http://insomnia-consulting.org
>> http://www.pghcodingdojo.org
>> http://pittjug.dev.java.net
>>
>>     
>
>
>
>   


Re: Pain Trying FirstHop application

Posted by Greg Akins <an...@gmail.com>.
Thanks for clearing that up.

I'll try not to ask anymore stupid questions until I read more of the
documentation.

Just to state what I'm hoping for, before I get too far down the wrong
path, I'm working on an application for storing and associating a lot
of different data (movies linked to pictures, text linked to movies,
powerpoint presentations linked to audio, etc..)

It seems obvious to me, that using JCR for a content repository is the
right way to go; but I'm not sure past that.  Am I in the right place?

On Wed, Nov 11, 2009 at 5:09 PM, Dave Brosius <db...@mebigfatguy.com> wrote:
> FirstHop uses what's called a Transient Repository. This is a 10 cent word
> that really means 'embedded'. So if you want to use jackrabbit such that the
> actually cms is inside your program (jvm), then you use that. and so your
> program and the 'cms' share the same xml files because they are one. You can
> use other types of repositories that this is not the case.
>
> -----Original Message-----
> From: "Greg Akins" <an...@gmail.com>
> Sent: Wednesday, November 11, 2009 3:50pm
> To: "Dave Brosius" <db...@mebigfatguy.com>
> Cc: dev@jackrabbit.apache.org
> Subject: Re: Pain Trying FirstHop application
>
> That worked. Thanks!
>
> I am a little confused. I expected that the java app I'm writing
> would be a client app that communicates with the same repository
> created by the server.
>
> So when I try the sample /populate app, then the respository and
> respository.xml get created in ./jackrabbit
>
> However, when I use my "FirstHops" app, the repository get's created
> in ./FirstHops/repository
>
> So.. I obviously need to get some more education on how Jackrabbit,
> and JCR, is supposed to work. Any pointers to good documentation
> would be much appreciated
>
> On Wed, Nov 11, 2009 at 3:32 PM, Dave Brosius <db...@mebigfatguy.com>
> wrote:
>> try deleting your repository directory and doing it again. My guess is
>> that
>> you created that file when your class path wasn't right.
>>
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
>



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net

Re: Pain Trying FirstHop application

Posted by Dave Brosius <db...@mebigfatguy.com>.
FirstHop uses what's called a Transient Repository. This is a 10 cent word that really means 'embedded'. So if you want to use jackrabbit such that the actually cms is inside your program (jvm), then you use that. and so your program and the 'cms' share the same xml files because they are one. You can use other types of repositories that this is not the case.

-----Original Message-----
From: "Greg Akins" <an...@gmail.com>
Sent: Wednesday, November 11, 2009 3:50pm
To: "Dave Brosius" <db...@mebigfatguy.com>
Cc: dev@jackrabbit.apache.org
Subject: Re: Pain Trying FirstHop application

That worked.  Thanks!

I am a little confused.  I expected that the java app I'm writing
would be a client app that communicates with the same repository
created by the server.

So when I try the sample /populate app, then the respository and
respository.xml get created in ./jackrabbit

However, when I use my "FirstHops" app, the repository get's created
in ./FirstHops/repository

So.. I obviously need to get some more education on how Jackrabbit,
and JCR, is supposed to work.  Any pointers to good documentation
would be much appreciated

On Wed, Nov 11, 2009 at 3:32 PM, Dave Brosius <db...@mebigfatguy.com> wrote:
> try deleting your repository directory and doing it again. My guess is that
> you created that file when your class path wasn't right.
>

-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net

Re: Pain Trying FirstHop application

Posted by Greg Akins <an...@gmail.com>.
That worked.  Thanks!

I am a little confused.  I expected that the java app I'm writing
would be a client app that communicates with the same repository
created by the server.

So when I try the sample /populate app, then the respository and
respository.xml get created in ./jackrabbit

However, when I use my "FirstHops" app, the repository get's created
in ./FirstHops/repository

So.. I obviously need to get some more education on how Jackrabbit,
and JCR, is supposed to work.  Any pointers to good documentation
would be much appreciated

On Wed, Nov 11, 2009 at 3:32 PM, Dave Brosius <db...@mebigfatguy.com> wrote:
> try deleting your repository directory and doing it again. My guess is that
> you created that file when your class path wasn't right.
>

-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net

RE: Pain Trying FirstHop application

Posted by Dave Brosius <db...@mebigfatguy.com>.
try deleting your repository directory and doing it again. My guess is that you created that file when your class path wasn't right.

-----Original Message-----
From: "Greg Akins" <an...@gmail.com>
Sent: Wednesday, November 11, 2009 3:29pm
To: dev@jackrabbit.apache.org
Subject: Pain Trying FirstHop application

I'm trying to work through the "First Hops" tutorial.. any help would
be much appreciated. (Sent this to the users list yesterday, but
thought this list might be more appropriate).

After working through a lot of NoClassDefFound exceptions, I'm getting
a ConfigurationException (stacktrace below) from transientRepository.login()

The standalone server doesn't appear to be putting any errors in it's
logs, so it looks like there is a problem with repository.xml on the
client (though I'm not sure where/how/why that is on the client).

I'm running this on OS 10.6 and am using this on the command line to execute

CLASSPATH="."
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/slf4j/slf4j-api/1.5.3/slf4j-api-1.5.3.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.6.0/jackrabbit-api-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-core/1.6.0/jackrabbit-core-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-jcr-commons/1.6.0/jackrabbit-jcr-commons-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.6.0/jackrabbit-spi-commons-1.6.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/javax/jcr/jcr/1.0/jcr-1.0.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/oswego-concurrent/concurrent/1.3.4/concurrent-1.3.4.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
CLASSPATH=$CLASSPATH:/Users/gakins/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar


java -cp $CLASSPATH:target/jcrApp-1.0-SNAPSHOT.jar com.gregakins.app.App

178 [main] WARN
org.apache.jackrabbit.core.config.ConfigurationErrorHandler - Fatal
error parsing the configuration at line -1 using system id null:
org.xml.sax.SAXParseException: Premature end of file.
Exception in thread "main" javax.jcr.RepositoryException: Invalid
repository configuration file: repository.xml: Configuration file
syntax error. (Line: -1 Column: -1): Premature end of file.:
Configuration file syntax error. (Line: -1 Column: -1): Premature end
of file.: Premature end of file.
       at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:236)
       at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:251)
       at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:319)
       at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:374)
       at com.gregakins.app.App.main(App.java:17)

-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net