Support Questions
Find answers, ask questions, and share your expertise

CDH 5.4.4. - unable to start Oozie

Expert Contributor

I keep running into this while attempting to install CDH 5.4.4. I checked the 'create database' and seems to have worked fine. Please let me know what else might be causing this error:

 

org.apache.oozie.service.ServiceException: E0103: Could not load service classes, Unmatched braces in the pattern.
	at org.apache.oozie.service.Services.loadServices(Services.java:309)
	at org.apache.oozie.service.Services.init(Services.java:213)
	at org.apache.oozie.servlet.ServicesLoader.contextInitialized(ServicesLoader.java:46)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:944)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:779)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:505)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.IllegalArgumentException: Unmatched braces in the pattern.
	at java.text.MessageFormat.applyPattern(MessageFormat.java:508)
	at java.text.MessageFormat.<init>(MessageFormat.java:363)
	at java.text.MessageFormat.format(MessageFormat.java:835)
	at org.apache.oozie.service.JPAService.init(JPAService.java:187)
	at org.apache.oozie.service.Services.setServiceInternal(Services.java:386)
	at org.apache.oozie.service.Services.setService(Services.java:372)
	at org.apache.oozie.service.Services.loadServices(Services.java:305)
	... 26 more

 

Thanks!

2 REPLIES 2

Expert Contributor

If I do the override of the "oozie.services" property using a subset of the services list, I'm able to start the Oozie server:

 

<property>
    <name>oozie.services</name>
    <value>org.apache.oozie.service.SchedulerService,org.apache.oozie.service.InstrumentationService,org.apache.oozie.service.MemoryLocksService,org.apache.oozie.service.UUIDService,org.apache.oozie.service.ELService,org.apache.oozie.service.AuthorizationService,org.apache.oozie.service.UserGroupInformationService,org.apache.oozie.service.HadoopAccessorService,org.apache.oozie.service.JobsConcurrencyService,org.apache.oozie.service.URIHandlerService,org.apache.oozie.service.DagXLogInfoService,org.apache.oozie.service.SchemaService,org.apache.oozie.service.LiteWorkflowAppService</value>
  </property>

 

Upon adding a few more services to the end of the list comes back with the same error:

 

 E0103: Could not load service classes, Unmatched braces in the pattern.

 

I'm not sure if this is some sort of misconfiguration on my part? 

New Contributor

The problem is very silly, the password has character "{".

 

Caused by: java.lang.IllegalArgumentException: Unmatched braces in the pattern.
at java.text.MessageFormat.applyPattern(MessageFormat.java:508)
at java.text.MessageFormat.<init>(MessageFormat.java:363)
at java.text.MessageFormat.format(MessageFormat.java:835)
at org.apache.oozie.service.JPAService.init(JPAService.java:187)
at org.apache.oozie.service.Services.setServiceInternal(Services.java:386)
at org.apache.oozie.service.Services.setService(Services.java:372)
at org.apache.oozie.service.Services.loadServices(Services.java:305)
... 26 more

 

The code is:

 

String connProps = "DriverClassName={0},Url={1},Username={2},Password={3},MaxActive={4}";
connProps = MessageFormat.format(connProps, driver, url, user, password, maxConn);

 

Replace "{3}" by the password with character "{", and the last MessageFormat.format can find end character "}"


final Properties props = new Properties();
if (autoSchemaCreation) {
  connProps += ",TestOnBorrow=false,TestOnReturn=false,TestWhileIdle=false";
  props.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
}
else if (validateDbConn) {
  // validation can be done only if the schema already exist, else a
  // connection cannot be obtained to create the schema.
  final String interval = "timeBetweenEvictionRunsMillis=" + evictionInterval;
  final String num = "numTestsPerEvictionRun=" + evictionNum;
  connProps += ",TestOnBorrow=true,TestOnReturn=true,TestWhileIdle=true," + interval + "," + num;
  connProps += ",ValidationQuery=select count(*) from VALIDATE_CONN";
  connProps = MessageFormat.format(connProps, dbSchema);
}