This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: 31 Jul 19, 13:15 Last Post By: JeffTucker
tomsgr

Posts: 5
Registered: 29-May-2003
meta.get Iptc
Posted: 31 Jul 19, 12:02
 
  Click to reply to this thread Reply
Hi!

I finally have time to move from the old jAlbum 7.4 to the new one, but when I try to generate album with my old skin, I got an error message:

Stack trace for jAlbum 18.3.1 using skin Fotoarhivs5:
 
se.datadosen.util.ScriptException: bsh.UtilEvalError: Attempt to resolve method: get() on undefined variable or class name: meta in slide.htt at line number 3
	at se.datadosen.util.ScriptException.of(ScriptException.java:59)
	at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:75)
	at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
	at se.datadosen.jalbum.ast.GroupNode.doEval(GroupNode.java:78)
	at se.datadosen.jalbum.ast.ASTNode.eval(ASTNode.java:50)
	at se.datadosen.jalbum.AST.eval(AST.java:68)
	at se.datadosen.jalbum.AlbumBean.makeSlide(AlbumBean.java:3644)
	at se.datadosen.jalbum.AlbumBean$StandardImageProcessor.processImages(AlbumBean.java:5738)
	at se.datadosen.jalbum.AlbumBean$ImageProcessingTask.call(AlbumBean.java:5678)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.script.ScriptException: Sourced file: inline evaluation of: ``  // te no autora tiek nogriezts "Foto: "  String _FotoAutors = (meta.get("Iptc. . . . '' : Typed variable declaration : Attempt to resolve method: get() on undefined variable or class name: meta : at Line: 3 : in file: inline evaluation of: ``  // te no autora tiek nogriezts "Foto: "  String _FotoAutors = (meta.get("Iptc. . . . '' : meta .get ( "Iptc.Credit" ) 
 in inline evaluation of: ``  // te no autora tiek nogriezts "Foto: "  String _FotoAutors = (meta.get("Iptc. . . . '' at line number 3
	at bsh.BshScriptEngine.evalSource(BshScriptEngine.java:96)
	at bsh.BshScriptEngine.eval(BshScriptEngine.java:57)
	at java.scripting/javax.script.AbstractScriptEngine.eval(Unknown Source)
	at se.datadosen.jalbum.ast.ScriptletNode.doEval(ScriptletNode.java:54)
	... 11 more
Caused by: bsh.UtilEvalError: Attempt to resolve method: get() on undefined variable or class name: meta
	at bsh.Name.invokeMethod(Name.java:835)
	at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
	at bsh.BSHVariableDeclarator.eval(BSHVariableDeclarator.java:86)
	at bsh.BSHTypedVariableDeclaration.eval(BSHTypedVariableDeclaration.java:84)
	at bsh.Interpreter.eval(Interpreter.java:672)
	at bsh.Interpreter.eval(Interpreter.java:766)
	at bsh.Interpreter.eval(Interpreter.java:755)
	at bsh.BshScriptEngine.evalSource(BshScriptEngine.java:82)
	... 14 more

The code part of the skin template is this:

<%
// te no autora tiek nogriezts "Foto: "
String _FotoAutors = (meta.get("Iptc.Credit"));
if (_FotoAutors != null) Autors = (_FotoAutors.replace("Foto:",""));

Thanks for any advice!

tomsgr

Posts: 5
Registered: 29-May-2003
Re: meta.get Iptc
Posted: 31 Jul 19, 12:26   in response to: tomsgr in response to: tomsgr
 
  Click to reply to this thread Reply
Obviously, it happened due to *.ico files located in the picture folders.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: meta.get Iptc
Posted: 31 Jul 19, 13:15   in response to: tomsgr in response to: tomsgr
Helpful
  Click to reply to this thread Reply
I think the way to avoid that error, even if there are "bad" files in the project directory, is to check to make sure meta isn't void before you try to extract information from it:
if(meta != void) {
     do your "gets"
}
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums