Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation should explain what you'll see if misconfigured #47

Closed
dkaplan-pivotal opened this issue Feb 8, 2017 · 7 comments
Closed

Comments

@dkaplan-pivotal
Copy link

I'm trying to run the script that says

if {"aa" starts_with "a"} {
  puts "The jtcl-irule extension has successfully been installed"
}

But I get an error that says:

syntax error in expression ""aa" starts_with "a"": variable references require preceding $
    ("if" test expression)
    invoked from within
"if {"aa" starts_with "a"} {
  puts "The jtcl-irule extension has successfully been installed"
}"
    (file "misc/f5/irules/test/test_jtcl_irule.tcl" line 1)

Is that because I have not configured jtcl-irule.jar correctly? It would be nice if the documentation provided some troubleshooting information if someone can't get past this step.

@dkaplan-pivotal
Copy link
Author

Turns out I put the jtcl-irule.jar too late in the classpath. Consider modifying the docs to say where to put the export CLASSPATH line.

@landro
Copy link
Owner

landro commented Feb 9, 2017 via email

@dkaplan-pivotal
Copy link
Author

dkaplan-pivotal commented Feb 9, 2017 via email

@mcjffld
Copy link

mcjffld commented Feb 10, 2017

I am getting this error on my tests. examples.sh works fine, but verification test fails:

checking the classpath, the irule JAR is ahead of the standard jtcl JAR file, still getting the error?

jtcl verification/test_jtcl_irule_all.tcl

/Users/mjames/jtcl-2.8.0/jtcl-irule.jar:/Users/mjames/jtcl-2.8.0/jtcl-2.8.0.jar :: printing classpath from jtcl shell script ::

starts_with works as expected
ends_with works as expected
contains works as expected
matches_glob works as expected
matches_regex works as expected
equals works as expected
syntax error in expression " 1 and 1 ": variable references require preceding $
("if" test expression)
invoked from within
"if { 1 and 1 } { puts "and works as expected" }"
(file "verification/test_jtcl_irule_all.tcl" line 10)

@landro
Copy link
Owner

landro commented Feb 17, 2017

hmm - I'm able to reproduce in jtcl 2.8 @mcjffld. Seems like there is an issue related to boolean operators. I'll have to look into that. In the meanwhile, you can either:

  • use an older jtcl version (2.4 should be ok)
  • use standard tcl syntax instead of f5 syntax for boolean operators

@mcjffld
Copy link

mcjffld commented Feb 18, 2017

one other issue that we found, the rule { ... } syntax doesn't work on the version that we are running, 11.4, I think.

I'm guessing that the rule {} syntax was a standard in previous versions? Just wondering.

@landro
Copy link
Owner

landro commented Mar 23, 2017

I've added some more docs (ffe609b) that should help in solving the initial issue. Please report a new issue for the rule{} problem you're hitting, @mcjffld

@landro landro closed this as completed Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants