2

I am getting the following error in Tibco business works designer. Please assist.

/temp/javaCode/ProcessDefinitionJavaCode.java:23: cannot resolve symbol
symbol  : class PasswordProtection 
location: class java.security.KeyStore
    KeyStore.PasswordProtection password;
            ^

/temp/javaCode/ProcessDefinitionJavaCode.java:31: cannot resolve symbol
symbol  : class PasswordProtection 
location: class java.security.KeyStore
        password = new KeyStore.PasswordProtection("changeme".toCharArray());
                               ^

2 errors
fglez
  • 8,422
  • 4
  • 47
  • 78
dwyane
  • 317
  • 1
  • 4
  • 10
  • May be you are forgetting to import a package name. – Searock Mar 27 '11 at 03:34
  • @Searock it is able to compile when i remove the KeyStore in tibco business works. it also works when i compile it manually in msdos but it does not compile in tibco business work. – dwyane Mar 27 '11 at 04:31
  • Are you using the same Java version in both compilations? KeyStore.PasswordProtection needs Java 5. – fglez Jan 16 '13 at 10:43

3 Answers3

1

I have never trusted compiling code inside Designer, so I always generate a jar and then include this in the project and call the method via a Java process.

The benefit of this is you can then build a JUnit test suite and make sure the java code works properly before involving TIBCO. Just be sure to follow all the rules when using Java.

Ants
  • 1,338
  • 16
  • 27
-1

You need'nt to write class name and main method just start writing your code. TIBCO BW Java paletted doesn't need to write a class name and main method name,by default it is there.

mahesh
  • 274
  • 2
  • 4
  • 20
-2

Class KeyStore.PasswordProtection since java 1.5 Check your Java version in CMD:

java -version