JODConverter: StarOffice.ServiceManager started but its pid could not be found

1.6k Views Asked by At

I've faced with next problem while starting officeManager:

A process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' started but its pid could not be found

@Configuration
public class LibreOfficeConfig {

    @Value("${libre.office.path}")
    private String officeHomeDirectory;

    @Bean
    public OfficeManager officeManagerConfig() {
        return LocalOfficeManager.builder()
                .install()
                .officeHome(Paths.get(officeHomeDirectory).toFile())
                .install()
                .build();
    }
}

public class LibreOfficeConversionServiceImpl implements DocumentConversionChain {
    private void startOfficeManager() {
        if (!officeManager.isRunning()) {
            try {
                officeManager.start();
            } catch (OfficeException e) {
                throw new RedactionServiceException(e.getMessage(), e);
            }
        }
    }
}
1

There are 1 best solutions below

1
Zhu Fei On

In my win7 dev environment, I'm facing the exact same exception: "org.jodconverter.office.OfficeException: A process with acceptString 'socket,host=127.0.0.1,port=8100,tcpNoDelay=1;urp;StarOffice.ServiceManager' started but its pid could not be found"

I searched Google and found little info, but someone says:

jodconverter config folder CANNOT have chinese letters!

I've tried all efforts to reinstall LibreOffice, pre-start its service, all failed!

Finally, I changes my win7 default language from Chinese back to English, thus solve upper "pid could not be found" exception!

Hope that can make sense.