cancel
Showing results for 
Search instead for 
Did you mean: 

alfresco-jmxrmi.access The system cannot find the path!!

amit_wmw
Champ in-the-making
Champ in-the-making
Hello,

From my custom program I am trying to connect to alfresco repository but only manage to get the below error. Please suggest what's not in place? Will be kind help.

##################################################################

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: ${alfresco.jmx.dir}\alfresco-jmxrmi.access (The system cannot find the path specified)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
   at org.hcl.grcmip.workflow.document.vo.impl.Main.main(Main.java:16)
Caused by: java.lang.IllegalArgumentException: ${alfresco.jmx.dir}\alfresco-jmxrmi.access (The system cannot find the path specified)
   at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)
   at org.springframework.jmx.support.ConnectorServerFactoryBean.afterPropertiesSet(ConnectorServerFactoryBean.java:168)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
   … 15 more
Caused by: java.io.FileNotFoundException: ${alfresco.jmx.dir}\alfresco-jmxrmi.access (The system cannot find the path specified)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(Unknown Source)
   at java.io.FileInputStream.<init>(Unknown Source)
   at com.sun.jmx.remote.security.MBeanServerFileAccessController.propertiesFromFile(Unknown Source)
   at com.sun.jmx.remote.security.MBeanServerFileAccessController.<init>(Unknown Source)
   … 19 more

####################################################################
Thanks
Amit
2 REPLIES 2

amit_wmw
Champ in-the-making
Champ in-the-making
Hello,

I have changed the path of "${alfresco.jmx.dir}/alfresco-jmxrmi.access" with  "classpath:alfresco/alfresco-jmxrmi.access" (which is my local system path) in core service context.xml file and rebuilt the war. But still it searches for alfresco-jmxrmi.access file in the same location ${alfresco.jmx.dir} and leading to the same error as I mentioned in my above post!!!!!!  Can anybody please suggest where to change the configuration for ${alfresco.jmx.dir}, so that I can make it to read file alfresco-jmxrmi.access from path which I specify.

Thanks
Amit.

dma_k
Champ in-the-making
Champ in-the-making
I am also facing the same problem when trying to run Alfresco v2.9.0 on JBoss 6. Unfortunately, "classpath:" schema will not work, as
<a href="http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/com/sun/jmx/remote/s...">
MBeanServerFileAccessController
requires direct access to file</a>, which is located inside JBoss VFS. The solution is to extract these files from WAR and put them to some folder where JBoss is running (e.g.
/usr/local/jboss/config/alfresco
). Then start JBoss with
-Dalfresco.jmx.dir=/usr/local/jboss/config/alfresco
JVM parameter.