cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Alfresco Starting

sur344597
Champ in-the-making
Champ in-the-making
Hello
I am fresh to Alfresco. I am facing some problems while trying to start the server. Tom cat gives an error "11:27:47,537 ERROR [repo.admin.ConfigurationChecker] Ensure that the 'dir.root'
property is pointing to the correct data location."
I could not find any dir.root.

MySQL has started and I have checked for the process.

Actually I installed Alfresco 3.3 community edition with the guidelines pdf. Then I unzipped the alfresco-community-sdk3.3.zip. The folder structure has changed. I guess this is the reason for the error but I don't how to proceed.

Kindly help me on this regard. Thanks in advance
4 REPLIES 4

sur344597
Champ in-the-making
Champ in-the-making
HI anuj

Thanks for your help. I made the change and it worked.

Actually what does this "dir.root=./alf_data" refer to????

sur344597
Champ in-the-making
Champ in-the-making
Now I have a sample program "FirstFoundation.java" which I try to run and I am facing a problem


Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 50501; nested exception is: 
   java.net.BindException: Address already in use: JVM_Bind
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:84)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:63)
Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:243)
   at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178)
   at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
   at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
   at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:235)
   at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:280)
   at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
   … 14 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:97)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:27)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:333)
   at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:622)
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:231)
   … 24 more


I referred to this link http://www.lucasmanual.com/mywiki/Alfresco and removed commons-el.jar from lib. Still I am facing the same exception.

/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.sample;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
import org.springframework.context.ApplicationContext;


/**
* Simple client example demonstrating the use of the Alfresco Foundation Java APIs.
*
* The client creates a content node in the "Company Home" folder.  The content
* may be viewed and operated on within the Alfresco Web Client.  Note: the web client
* will need to be re-started after executing this sample to see the changes in
* effect.
*
* This client demonstrates the "Embedded Repository" deployment option as described
* in the Alfresco Respotiory Architecture docucment -
* http://wiki.alfresco.com/wiki/Alfresco_Repository_Architecture
*/
public class FirstFoundationClient
{

    public static void main(String[] args)
    {
        // initialise app content
        ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
        // get registry of services
        final ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
       
        // use TransactionWork to wrap service calls in a user transaction
        TransactionService transactionService = serviceRegistry.getTransactionService();
        RetryingTransactionCallback<Object> exampleWork = new RetryingTransactionCallback<Object>()
        {
            public Object execute() throws Exception
            {
                doExample(serviceRegistry);
                return null;
            }
        };
        transactionService.getRetryingTransactionHelper().doInTransaction(exampleWork);
        System.exit(0);
    }

   
    public static void doExample(ServiceRegistry serviceRegistry) throws Exception
    {
       //
        // authenticate
       //
        AuthenticationService authenticationService = serviceRegistry.getAuthenticationService();
        authenticationService.authenticate("admin", "admin".toCharArray());
       
        //
        // locate the company home node
        //
        SearchService searchService = serviceRegistry.getSearchService();
        StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
        ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home\"");
        NodeRef companyHome = resultSet.getNodeRef(0);
        resultSet.close();

        //
        // create new content node within company home
        //
       
        // assign name
        String name = "Foundation API sample (" + System.currentTimeMillis() + ")";
        Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>();
        contentProps.put(ContentModel.PROP_NAME, name);

        // create content node
        NodeService nodeService = serviceRegistry.getNodeService();
        ChildAssociationRef association = nodeService.createNode(companyHome,
              ContentModel.ASSOC_CONTAINS,
              QName.createQName(NamespaceService.CONTENT_MODEL_PREFIX, name),
                ContentModel.TYPE_CONTENT,
                contentProps);
        NodeRef content = association.getChildRef();
       
        // add titled aspect (for Web Client display)
        Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>();
        titledProps.put(ContentModel.PROP_TITLE, name);
        titledProps.put(ContentModel.PROP_DESCRIPTION, name);
        nodeService.addAspect(content, ContentModel.ASPECT_TITLED, titledProps);
       
        //
        // write some content to new node
        //

        ContentService contentService = serviceRegistry.getContentService();
        ContentWriter writer = contentService.getWriter(content, ContentModel.PROP_CONTENT, true);
        writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
        writer.setEncoding("UTF-8");
        String text = "The quick brown fox jumps over the lazy dog";
        writer.putContent(text);
    }
}

darryl_staflund
Champ in-the-making
Champ in-the-making
Alfresco can't start up because of a port conflict:


Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind

Make sure the port isn't being used by another application.

Darryl

abhashree
Champ in-the-making
Champ in-the-making
hi
your rmi port is running .
you may have not shut down completely so change the rmi port to another value.