PDA

View Full Version : Quercus 4.1.8 & SugarCRM 6.2.0 R2 failure


ssozonoff
05-24-2011, 04:32 PM
Hi all,

Trying to get the latest SugarCRM working under quercus but failing... It started of real well during the install phase but then dies when during the setup of DB tables.

Monster stack trace below..

Will try and debug myself.....

Thanks for any ideas.

Serge


com.caucho.quercus.QuercusException: com.caucho.quercus.lib.date.DateTime.setTimeZone: java.lang.ClassCastException@cd73c3c
at com.caucho.quercus.env.JavaMethod.invoke(JavaMetho d.java:136)
at com.caucho.quercus.env.JavaInvoker.callMethod(Java Invoker.java:737)
at com.caucho.quercus.env.QuercusClass.callMethod(Que rcusClass.java:1274)
at com.caucho.quercus.expr.ClassMethodExpr.eval(Class MethodExpr.java:120)
at com.caucho.quercus.expr.Expr.evalTop(Expr.java:523 )
at com.caucho.quercus.statement.ExprStatement.execute (ExprStatement.java:67)
at com.caucho.quercus.statement.BlockStatement.execut e(BlockStatement.java:105)
at com.caucho.quercus.program.Function.callImpl(Funct ion.java:433)
at com.caucho.quercus.program.Function.callMethod(Fun ction.java:469)
at com.caucho.quercus.env.ObjectExtValue.callMethod(O bjectExtValue.java:809)
at com.caucho.quercus.expr.AbstractMethodExpr.eval(Ab stractMethodExpr.java:97)
at com.caucho.quercus.expr.ObjectMethodExpr.eval(Obje ctMethodExpr.java:97)
at com.caucho.quercus.expr.Expr.evalValue(Expr.java:4 69)
at com.caucho.quercus.statement.ReturnStatement.execu te(ReturnStatement.java:69)
at com.caucho.quercus.program.Function.callImpl(Funct ion.java:433)
at com.caucho.quercus.program.Function.callMethod(Fun ction.java:469)
at com.caucho.quercus.env.ObjectExtValue.callMethod(O bjectExtValue.java:809)
at com.caucho.quercus.expr.AbstractMethodExpr.eval(Ab stractMethodExpr.java:97)
at com.caucho.quercus.expr.ObjectMethodExpr.eval(Obje ctMethodExpr.java:97)
at com.caucho.quercus.expr.Expr.evalValue(Expr.java:4 69)
at com.caucho.quercus.statement.ReturnStatement.execu te(ReturnStatement.java:69)
at com.caucho.quercus.statement.IfStatement.execute(I fStatement.java:84)
at com.caucho.quercus.statement.BlockStatement.execut e(BlockStatement.java:105)
at com.caucho.quercus.program.Function.callImpl(Funct ion.java:433)

cut ...... cut

SugarBean.populateDefaultValues(C:\workspace\Sugar Crm_quercus\tomcat\webapps\app\data\SugarBean.php: 641)

domdorn
05-27-2011, 08:49 AM
could you please post the code snipped at and around app\data\SugarBean.php:641 ?

it should be something date related.

thanks,
dominik

rsoika
10-19-2011, 05:51 PM
Hi,
I have exaclly the same problem.
The Code/Method in the SugarBean.php file looks like this:



function populateDefaultValues($force=false){
if ( !is_array($this->field_defs) )
return;
foreach($this->field_defs as $field=>$value){
if((isset($value['default']) || !empty($value['display_default'])) && ($force || empty($this->$field))){
$type = $value['type'];

switch($type){
case 'date':
if(!empty($value['display_default'])){
$this->$field = $this->parseDateDefault($value['display_default']);
}
break;
case 'datetime':
case 'datetimecombo':
if(!empty($value['display_default'])){
$this->$field = $this->parseDateDefault($value['display_default'], true);
}
break;
case 'multienum':
if(empty($value['default']) && !empty($value['display_default']))
$this->$field = $value['display_default'];
else
$this->$field = $value['default'];
break;
default:
if ( isset($value['default']) && $value['default'] !== '' ) {
$this->$field = htmlentities($value['default'], ENT_QUOTES, 'UTF-8');
} else {
$this->$field = '';
}
} //switch
}
} //foreach
}


The affected line in my case is the switch statement:

switch($type){

@ssozonoff : how did you solve the problem?

===
Ralph