0
votes

I'm trying to access a jackrabbit repository from within my glassfish server. Therefore i pasted the jcr-2.0.jar into my domains/{$mydomain}/lib/ directory. When I try to set up a Repository instance in netbeans, I can't find the import javax.jcr.repository, so glassfish doesn't have it available either right? Or do I have to import the jcr-2.0.jar into my local project libraries folder aswell in order to let netbeans know I'll be using it? I found no way to see which libraries are installed to my application container neither through the glassfish-admin ui nor any other way. I also tried asadmin add-library jcr-2.0.jar but still in netbeans the import cannot be resolved. (I also tried restarting glassfish server). How do I get this to work?

2

2 Answers

0
votes

jcr-2.0.jar just contains the interfaces, you'll need the jackrabbit jars too.

I use maven and just package everything into a war file ready to deploy to any container. Works well for me and that's how I would recommend using it.

0
votes

To whom it may concern,

I solved the problem myself. Netbeans can't access the server libraries, you have to work with a local copy. Therefore click "Tools" in the menu and then add the library through "Ant Libraries". Next click "new Library" and specify your library. It's important to change the "Library type" to "Server library". That should do it.