AnsweredAssumed Answered

url.toURI().getPath() is giving null .

Question asked by sashikumar on Sep 11, 2007
Latest reply on Sep 13, 2007 by sashikumar
Hi

iam using jdk1.5,jboss4.0.5GA, and mysql5.0. Upgraded from 1.2 to 2.1 . When i start the server i get this error , can you please guide me..

2007-09-06 09:44:13,715 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
java.lang.NullPointerException
at org.alfresco.util.RuntimeSystemPropertiesSetter.postProcessBeanFactory(RuntimeSystemPropertiesSetter.java:6
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:380)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:302)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)

I tried printing the url and path below:
———————————————-


ClassLoader loader = Thread.currentThread().getContextClassLoader();
        String path=null;
        try
        {
           URL url = loader.getResource("alfresco/alfresco-jmxrmi.password");
           System.out.println("url: " + url);
           path = url.toURI().getPath();
           System.out.println("path: " + path);
        }
        catch (java.net.URISyntaxException e ) { e.printStackTrace(); }

Able to get the url but path is giving null . I tried for getRawPath also . Is any bug fix problem ?.

Thanks
Sashi

Outcomes