You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Phukan, Anit" <An...@intuit.com> on 2009/10/10 01:55:58 UTC

Location of repository.xml and workspace.xml

Hi,

Could anyone please let me know the correct directory location for the 2
config files that I mentioned in the subject. 

It seems to work fine when the repository.xml file resides directly
under the project (outside src). However, if I create a server and
client project separately in my IDE(IntelliJ IDEA) and try to run the
test cases, it's not able to read from the xml files. Is there a fixed
location that these files have to reside under?

Any piece of advice would be appreciated.

Thanks
Anit


Re: Location of repository.xml and workspace.xml

Posted by Guo Du <mr...@gmail.com>.
On Mon, Oct 12, 2009 at 11:50 PM, Phukan, Anit <An...@intuit.com> wrote:
> Did anyone encounter this type of issue on JBOSS or any other
> application server?
>
> Any suggestions would be highly appreciated.

First time seen it. Google may help you out:

http://www.google.ie/search?q=IllegalAnnotationExceptions+java.util.List+is+an+interface%2C+and+JAXB+can%27t+handle+interfaces&ie=utf-8&oe=utf-8&aq=t&rls={moz:distributionID}:{moz:locale}:{moz:official}

-Guo

RE: Location of repository.xml and workspace.xml

Posted by "Phukan, Anit" <An...@intuit.com>.
Thanks Guo,

I have one more query regarding deploying a war on jboss which has
jackrabbit dependencies.

I get the following JAXB exception while trying to deploy my war file to
jboss:

2009-10-12 14:45:38,217 SEVERE
[javax.enterprise.resource.webservices.jaxws.server.http]
(ResourceContainer.invoker.nonDaemon-1) WSSERVLET11: failed to parse
runtime descriptor: javax.xml.ws.WebServiceException: Unable to create
JAXBContext
javax.xml.ws.WebServiceException: Unable to create JAXBContext
        at
com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIM
odelImpl.java:158)
        at
com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelIm
pl.java:87)
        at
com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.jav
a:262)
        at
com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.jav
a:322)
        at
com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.jav
a:188)
        at
com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)

Caused by: java.security.PrivilegedActionException:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
IllegalAnnotationExceptions
java.util.List is an interface, and JAXB can't handle interfaces.
        this problem is related to the following location:
                at java.util.List
java.util.List does not have a no-arg default constructor.
        this problem is related to the following location:
                at java.util.List


Did anyone encounter this type of issue on JBOSS or any other
application server?

Any suggestions would be highly appreciated.

Thanks
Anit


-----Original Message-----
From: Guo Du [mailto:mrduguo@gmail.com] 
Sent: Saturday, October 10, 2009 2:24 AM
To: users@jackrabbit.apache.org
Subject: Re: Location of repository.xml and workspace.xml

On Sat, Oct 10, 2009 at 12:55 AM, Phukan, Anit <An...@intuit.com>
wrote:
> Hi,
>
> Could anyone please let me know the correct directory location for the
2
> config files that I mentioned in the subject.
>
> It seems to work fine when the repository.xml file resides directly
> under the project (outside src). However, if I create a server and
> client project separately in my IDE(IntelliJ IDEA) and try to run the
> test cases, it's not able to read from the xml files. Is there a fixed
> location that these files have to reside under?
>
> Any piece of advice would be appreciated.
>
There are different place to load the repository, they will finally
invoke following constructor:
public TransientRepository(final File xml, final File dir)

Default constructor will detect the locations based on your current
java working directory with following code.
    private static final String CONF_PROPERTY
="org.apache.jackrabbit.repository.conf";
    private static final String CONF_DEFAULT = "repository.xml";
    private static final String HOME_PROPERTY =
"org.apache.jackrabbit.repository.home";
    private static final String HOME_DEFAULT = "repository";
public TransientRepository() {
        this(System.getProperty(CONF_PROPERTY, CONF_DEFAULT),
             System.getProperty(HOME_PROPERTY, HOME_DEFAULT));
    }

You may see more details from the TransientRepository class.

-Guo

Re: Location of repository.xml and workspace.xml

Posted by Guo Du <mr...@gmail.com>.
On Sat, Oct 10, 2009 at 12:55 AM, Phukan, Anit <An...@intuit.com> wrote:
> Hi,
>
> Could anyone please let me know the correct directory location for the 2
> config files that I mentioned in the subject.
>
> It seems to work fine when the repository.xml file resides directly
> under the project (outside src). However, if I create a server and
> client project separately in my IDE(IntelliJ IDEA) and try to run the
> test cases, it's not able to read from the xml files. Is there a fixed
> location that these files have to reside under?
>
> Any piece of advice would be appreciated.
>
There are different place to load the repository, they will finally
invoke following constructor:
public TransientRepository(final File xml, final File dir)

Default constructor will detect the locations based on your current
java working directory with following code.
    private static final String CONF_PROPERTY
="org.apache.jackrabbit.repository.conf";
    private static final String CONF_DEFAULT = "repository.xml";
    private static final String HOME_PROPERTY =
"org.apache.jackrabbit.repository.home";
    private static final String HOME_DEFAULT = "repository";
public TransientRepository() {
        this(System.getProperty(CONF_PROPERTY, CONF_DEFAULT),
             System.getProperty(HOME_PROPERTY, HOME_DEFAULT));
    }

You may see more details from the TransientRepository class.

-Guo