Its working now. I had to rename the file in src/main/resources/META- INF/services/ from:

net.sf.taverna.t2.security.credentialmanager.MasterPasswordProviderSPI
to
net.sf.taverna.t2.security.credentialmanager.CredentialProviderSPI

as the interface name has changed. I will run a bunch of tests and let you know how it goes.

Thanks for you help,
-Dina

On Apr 18, 2010, at 7:23 AM, Alexandra Nenadic wrote:

Hi Dina,

Looks like caGrid activity is trying to pop-up a dialog and you are running in "the server mode" i.e. in a headless environment.

Look at the line
at net .sf .taverna .cagrid .activity.CaGridActivity.initializeSecurity(CaGridActivity.java:752)

Check first if you are running headlessly and then make sure there are no GUI pop-ups - I think that remained from the caGrid activity when it was only ran in a Workbench. If you are running headlessly you have to provide passwords some other way and not ask user for them. I think it is asking for a Java truststore password when you get that error but I do not have the latest code to check it.


Cheers,
Alex

Dinanath Sulakhe wrote:

Hi,

I am upgrading our TavernaExecutor to T2.1.2 jars and it looks like the changes in the CredentialProviderSPI interface is giving some errors. I have added my own master password provider with higher priority but after a quick debug, it looks like "MyMasterPasswordProvider" isn't getting picked!! List<CredentialProviderSPI> masterPasswordProviders = findMasterPasswordProviders();

the list above in CredentialManager.java doesn't have mymasterpasswordprovider that I have added in my project. It worked fine in the previous versions (2.1.1 and 2.1-beta2).

I have checked in the Executor project at svn for you to take a quick look: https://svn.ci.uchicago.edu/svn/caBIG/TavernaExecutor

MyMasterPasswordProvider.java looks as pasted below.

public class MyMasterPasswordProvider implements CredentialProviderSPI {
  public boolean canHandleTrustConfirmation(X509Certificate[] arg0) {
 return false;
 }
 public boolean canProvideJavaTruststorePassword() {
 return false;
 }
 public boolean canProvideMasterPassword() {
 return true;
 }
 public boolean canProvideUsernamePassword(URI arg0) {
 return false;
 }
 public String getJavaTruststorePassword() {
 return null;
 }
 public String getMasterPassword(boolean arg0) {
 return "somePass";
 }
 public int getProviderPriority() {
 return 500;
 }
 public UsernamePassword getUsernamePassword(URI arg0, String arg1) {
 return null;
 }
 public TrustConfirmation shouldTrust(X509Certificate[] arg0) {
 return null;
 }
}


I get the following error when I try to run any workflow that has secure workflows and requires cagrid-activity and credential-manager:

sh target/appassembler/bin/executeworkflow -scuflFile ~/Desktop/t2- secure-workflows/secure-hellodina.t2flow
Unable to determine file for log4j.properties
No splash screen : null
Exception from method net.sf.taverna.raven.launcher.Launcher.main(String[])
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun .reflect .NativeConstructorAccessorImpl .newInstance(NativeConstructorAccessorImpl.java:39) at sun .reflect .DelegatingConstructorAccessorImpl .newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
 at java.lang.Class.newInstance0(Class.java:350)
 at java.lang.Class.newInstance(Class.java:303)
at net .sf .taverna .t2 .workflowmodel .serialization .xml .ActivityXMLDeserializer .deserializeActivity(ActivityXMLDeserializer.java:69) at net .sf .taverna .t2 .workflowmodel .serialization .xml .ActivityXMLDeserializer .deserializeActivity(ActivityXMLDeserializer.java:110) at net .sf .taverna .t2 .workflowmodel .serialization .xml .ProcessorXMLDeserializer .deserializeProcessor(ProcessorXMLDeserializer.java:55) at net .sf .taverna .t2 .workflowmodel .serialization .xml .DataflowXMLDeserializer .deserializeDataflow(DataflowXMLDeserializer.java:67) at net .sf .taverna .t2 .workflowmodel .serialization .xml .XMLDeserializerImpl.deserializeDataflow(XMLDeserializerImpl.java:56) at net .sf .taverna .t2 .examples .execution.ExecuteWorkflow.loadDataflow(ExecuteWorkflow.java:195) at net .sf .taverna .t2.examples.execution.ExecuteWorkflow.run(ExecuteWorkflow.java:217) at net .sf .taverna .t2.examples.execution.ExecuteWorkflow.launch(ExecuteWorkflow.java: 347) at net.sf.taverna.raven.launcher.Launcher.launchMain(Launcher.java: 150)
 at net.sf.taverna.raven.launcher.Launcher.main(Launcher.java:66)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:592)
at net .sf .taverna.raven.prelauncher.PreLauncher.runLauncher(PreLauncher.java: 115) at net .sf .taverna.raven.prelauncher.PreLauncher.launchArgs(PreLauncher.java: 69) at net.sf.taverna.raven.prelauncher.PreLauncher.main(PreLauncher.java: 47)
Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java: 159)
 at java.awt.Window.<init>(Window.java:318)
 at java.awt.Frame.<init>(Frame.java:419)
 at java.awt.Frame.<init>(Frame.java:384)
at javax.swing.SwingUtilities $SharedOwnerFrame.<init>(SwingUtilities.java:1667) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java: 1744)
 at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1624)
 at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:836)
 at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:645)
 at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:616)
at net .sf .taverna .cagrid .activity .CaGridActivity.loadCaGridCAsCertificates(CaGridActivity.java:804) at net .sf .taverna .cagrid .activity.CaGridActivity.initializeSecurity(CaGridActivity.java:752) at net .sf .taverna .cagrid.activity.CaGridActivity.<clinit>(CaGridActivity.java:126)
 ... 23 more


--------------------------
Dinanath Sulakhe
The Globus Alliance
Computation Institute, University of Chicago &
Math and Computer Science Division, Argonne National Laboratory.
Ph: (630) 252-7856




--------------------------
Dinanath Sulakhe
The Globus Alliance
Computation Institute, University of Chicago &
Math and Computer Science Division, Argonne National Laboratory.
Ph: (630) 252-7856



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to