jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "JackrabbitOnJBoss" by IjonasKisselbach
Date Thu, 31 May 2007 11:19:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by IjonasKisselbach:
http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

The comment on the change is:
Added hints to get the WebDAV configuration working under JBoss 4.0.5

------------------------------------------------------------------------------
  
    You can also try adding the parameter -Dorg.jboss.logging.Log4jService.catchSystemOut=false
to the JBoss startup parameters.
  
+ 
+ 4. In JBoss 4.0.5, I've got the repository configured and I can look it up in the JNDI using
a test app, but my WebDav app cannot find the repository eventhough I've followed the instructions
and my configuration looks ok...
+    If you're trying to get the jackrabbit-server.war (WebDAV) to deploy against a Model-2
shared JCA-based repository as per the instructions      above on JBoss 4.0.5, you might run
into the problem where the servlet complains about an "invalid config". The servlet will dump
you're current config to the console/log file:
+ 
+ {{{
+ 12:07:31,087 INFO  [AbstractConfig] Configuration of BootstrapConfig
+ 12:07:31,087 INFO  [AbstractConfig] ----------------------------------------------
+ 12:07:31,090 INFO  [AbstractConfig]   jndiConfig: org.apache.jackrabbit.j2ee.JNDIConfig@9d2834
+ 12:07:31,090 INFO  [AbstractConfig]   rmiConfig: org.apache.jackrabbit.j2ee.RMIConfig@baae59
+ 12:07:31,090 INFO  [AbstractConfig]   repositoryHome: null
+ 12:07:31,090 INFO  [AbstractConfig]   repositoryConfig: null
+ 12:07:31,091 INFO  [AbstractConfig]   class: class org.apache.jackrabbit.j2ee.BootstrapConfig
+ 12:07:31,091 INFO  [AbstractConfig]   valid: true
+ 12:07:31,091 INFO  [AbstractConfig]   repositoryName: java:jcr/local
+ 12:07:31,091 INFO  [AbstractConfig] ----------------------------------------------
+ 12:07:31,091 INFO  [AbstractConfig] Configuration of JNDIConfig
+ 12:07:31,091 INFO  [AbstractConfig] ----------------------------------------------
+ 12:07:31,091 INFO  [AbstractConfig]   jndiName: java:jcr/local
+ 12:07:31,091 INFO  [AbstractConfig]   class: class org.apache.jackrabbit.j2ee.JNDIConfig
+ 12:07:31,091 INFO  [AbstractConfig]   jndiEnv: {}
+ 12:07:31,091 INFO  [AbstractConfig]   valid: true
+ 12:07:31,091 INFO  [AbstractConfig]   jndiEnabled: false
+ 12:07:31,091 INFO  [AbstractConfig] ----------------------------------------------
+ }}}
+ 
+    The big hint is "jndiEnabled: false", which in the source code is set to true/false whether
or not java.naming.provider.url is specified in your web.xml <init-param> section. So
the solution for me was to set the following <init-param> section in the web.xml:
+ {{{
+     <servlet>
+         <servlet-name>Repository</servlet-name>
+         <description>
+             This servlet provides other servlets and jsps a common way to access
+             the repository. The repository can be accessed via JNDI, RMI or Webdav.
+         </description>
+         <servlet-class>org.apache.jackrabbit.j2ee.RepositoryAccessServlet</servlet-class>
+         <init-param>
+             <param-name>repository-name</param-name>
+             <param-value>java:jcr/local</param-value>
+             <description>Repository Name that is used to retrieve it via JNDI</description>
+         </init-param>
+         <init-param>
+             <param-name>java.naming.provider.url</param-name>
+             <param-value>jnp://localhost:1099</param-value>
+         </init-param>
+         <init-param>
+             <param-name>java.naming.factory.initial</param-name>
+             <param-value>org.jnp.interfaces.NamingContextFactory</param-value>
+         </init-param> 
+         <load-on-startup>3</load-on-startup>
+     </servlet>
+ }}}
+    It's a hack, because the code shouldn't need the JNDI environment details when deployed
inside JBoss, but that's all it took to get the WebDAV servlets working in JBoss 4.0.5.
+ 

Mime
View raw message