cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in thread 'main' java.lang.NoSuchMethodError: java

activiti-admin
Champ in-the-making
Champ in-the-making
Doing…

ProcessEngine processEngine = new Configuration()
            .configurationResource("activiti.cfg.xml")
            .buildProcessEngine();

i'm getting…

Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
   at org.activiti.impl.cfg.SqlSessionFactoryBinding.getResource(SqlSessionFactoryBinding.java:49)
   at org.activiti.impl.cfg.SqlSessionFactoryBinding.parse(SqlSessionFactoryBinding.java:38)
   at org.activiti.impl.cfg.ConfigurationParse.parseObject(ConfigurationParse.java:170)
   at org.activiti.impl.cfg.ConfigurationParse.parseConfiguration(ConfigurationParse.java:131)
   at org.activiti.impl.cfg.ConfigurationParse.execute(ConfigurationParse.java:102)
   at org.activiti.impl.cfg.ConfigurationParse.parseConfiguration(ConfigurationParse.java:143)
   at org.activiti.impl.cfg.ConfigurationParse.execute(ConfigurationParse.java:102)
   at org.activiti.Configuration.configurationResource(Configuration.java:67)

My conf files were generated and packed in the .jar that is located in classpath.

<?xml version="1.0" encoding="UTF-8"?>

<activiti-cfg name="default">
  <import resource="activiti.cfg.defaults.xml" />
  <import resource="activiti.db.standalone.xml" /> 
</activiti-cfg>

and

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
  PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN"
  "http://ibatis.apache.org/dtd/ibatis-3-config.dtd">
<configuration>
   <environments default="development">
      <environment id="development">
         <transactionManager type="JDBC" />
         <dataSource type="POOLED">
            <property name="driver" value="org.h2.Driver" />
            <property name="url" value="jdbc:h2:tcp://localhost/activiti" />
            <property name="username" value="sa" />
            <property name="password" value="" />
         </dataSource>
      </environment>
   </environments>
   <mappers>
     <mapper resource="org/activiti/db/ibatis/engine.mapping.xml" />
    <mapper resource="org/activiti/db/ibatis/deployment.mapping.xml" />
    <mapper resource="org/activiti/db/ibatis/processdefinition.mapping.xml" />
    <mapper resource="org/activiti/db/ibatis/execution.mapping.xml" />
    <mapper resource="org/activiti/db/ibatis/task.mapping.xml" />
    <mapper resource="org/activiti/db/ibatis/identity.mapping.xml" />
   </mappers>
</configuration>

Using J2SE 1.5.0_05
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
It appears that String.isEmpty() is a JDK 1.6 feature. Since we want JDK 5+ compatibility, this is obviously a bug.

Thanks for pointing that out, I'll fix it straight away on trunk.

alistair
Champ in-the-making
Champ in-the-making
Hi,

I've found another String.isEmpty() Java 6 reference in the Activiti source (org.activiti.engine.impl.persistence.entity.TaskManager) within the deleteTasksByProcessInstanceId() method and wondered whether it has been fixed since the 5.9 release:

String reason = (deleteReason == null || deleteReason.isEmpty()) ? TaskEntity.DELETE_REASON_DELETED : deleteReason;Is Java 5 support going to continue for the foreseeable future?

Many thanks

Alistair

frederikherema1
Star Contributor
Star Contributor
This is fixed for 5.10, thanks for reporting.