Hi,

I have succeeded to build recent version. Now I have compiled  class
located at

'org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.class'

How can I run that to generate credential token?

I tried
'java org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest',
but it says

#############################################################################################
[heechae@biobrainpool test-classes]$ java
org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest
Error: A JNI error has occurred, please check your installation and try
again
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/airavata/common/exception/ApplicationSettingsException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException:
org.apache.airavata.common.exception.ApplicationSettingsException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
############################################################################################


it seems it cannot find dependent classes.

I manually copied all required classes to same location and tried to run,
but at the end I still got

##############################################################################################
Exception in thread "main" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at org.apache.airavata.common.utils.DBUtil.<clinit>(DBUtil.java:43)
at
org.apache.airavata.credential.store.store.impl.db.SSHCredentialTest.main(SSHCredentialTest.java:50)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
##############################################################################################

Thanks,
Heejoon.

On Tue, Dec 22, 2015 at 10:34 AM, Supun Nakandala <[email protected]
> wrote:

> The build should work fine now.
>
> On Mon, Dec 21, 2015 at 8:17 PM, Heejoon Chae <[email protected]>
> wrote:
>
>> Unfortunately, the compile fails at certain point,
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 7:41.368s
>> [INFO] Finished at: Tue Dec 22 10:05:36 KST 2015
>> [INFO] Final Memory: 95M/3073M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
>> (default-compile) on project airavata-client-samples: Compilation failure:
>> Compilation failure:
>> [ERROR]
>> /data/project/mcpg/airavata/test/airavata/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java:[63,55]
>> incompatible types: java.lang.String cannot be converted to
>> org.apache.airavata.model.security.AuthzToken
>> [ERROR]
>> /data/project/mcpg/airavata/test/airavata/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java:[38,65]
>> incompatible types: java.lang.String cannot be converted to
>> org.apache.airavata.model.security.AuthzToken
>> [ERROR]
>> /data/project/mcpg/airavata/test/airavata/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java:[193,81]
>> incompatible types: java.lang.String cannot be converted to
>> org.apache.airavata.model.security.AuthzToken
>>
>> Thanks,
>> Heejoon.
>>
>> On Tue, Dec 22, 2015 at 10:02 AM, Heejoon Chae <[email protected]>
>> wrote:
>>
>>> Sorry, I found my JAVA_HOME set to different location even I use java
>>> 1.8.
>>>
>>> Now it seems building goes correctly!
>>>
>>> Thank you!
>>> Heejoon.
>>>
>>> On Tue, Dec 22, 2015 at 9:56 AM, Heejoon Chae <[email protected]>
>>> wrote:
>>>
>>>> Yes. I am using java 1.8
>>>>
>>>> [heechae@biobrainpool airavata]$ which java
>>>> /packages/jdk1.8.0_65/bin/java
>>>>
>>>> Thanks,
>>>> Heejoon.
>>>>
>>>> On Tue, Dec 22, 2015 at 9:46 AM, Chathuri Wimalasena <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Heejoon,
>>>>>
>>>>> I hope you are using java 1.8.
>>>>>
>>>>> Thanks..
>>>>> Chathuri
>>>>>
>>>>> On Mon, Dec 21, 2015 at 7:08 PM, Heejoon Chae <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi, Supun,
>>>>>>
>>>>>> Thank you for fixing that. I updated and do mvn clean install.
>>>>>> I got some errors like,
>>>>>>
>>>>>> INFO] BUILD FAILURE
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] Total time: 7.754s
>>>>>> [INFO] Finished at: Tue Dec 22 09:05:21 KST 2015
>>>>>> [INFO] Final Memory: 36M/1931M
>>>>>> [INFO]
>>>>>> ------------------------------------------------------------------------
>>>>>> [ERROR] Failed to execute goal
>>>>>> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
>>>>>> (default-compile) on project airavata-data-models: Fatal error compiling:
>>>>>> invalid target release: 1.8 -> [Help 1]
>>>>>> [ERROR]
>>>>>> [ERROR] To see the full stack trace of the errors, re-run Maven with
>>>>>> the -e switch.
>>>>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>>>>> [ERROR]
>>>>>> [ERROR] For more information about the errors and possible solutions,
>>>>>> please read the following articles:
>>>>>> [ERROR] [Help 1]
>>>>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>>>>>> [ERROR]
>>>>>> [ERROR] After correcting the problems, you can resume the build with
>>>>>> the command
>>>>>> [ERROR]   mvn <goals> -rf :airavata-data-models
>>>>>>
>>>>>> Thanks,
>>>>>> Heejoon.
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 12:35 AM, Supun Nakandala <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Heejoon,
>>>>>>>
>>>>>>> There was an issue in the pom files and I fixed it now. Can you
>>>>>>> check whether your build is working now
>>>>>>>
>>>>>>> On Sun, Dec 20, 2015 at 7:52 PM, Heejoon Chae <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> I got following as well,
>>>>>>>>
>>>>>>>> [INFO] Scanning for projects...
>>>>>>>> [ERROR] The build could not read 2 projects -> [Help 1]
>>>>>>>> [ERROR]
>>>>>>>> [ERROR]   The project
>>>>>>>> org.apache.airavata:data-manager-cpi:0.16-SNAPSHOT
>>>>>>>> (/data/project/mcpg/airavata/test/airavata/modules/data-manager/data-manager-cpi/pom.xml)
>>>>>>>> has 1 error
>>>>>>>> [ERROR]     Non-resolvable parent POM: Could not find artifact
>>>>>>>> org.apache.airavata:airavata:pom:0.16-SNAPSHOT and 
>>>>>>>> 'parent.relativePath'
>>>>>>>> points at wrong local POM @ line 5, column 13 -> [Help 2]
>>>>>>>> [ERROR]
>>>>>>>> [ERROR]   The project
>>>>>>>> org.apache.airavata:data-manager-core:0.16-SNAPSHOT
>>>>>>>> (/data/project/mcpg/airavata/test/airavata/modules/data-manager/data-manager-core/pom.xml)
>>>>>>>> has 1 error
>>>>>>>> [ERROR]     Non-resolvable parent POM: Could not find artifact
>>>>>>>> org.apache.airavata:airavata:pom:0.16-SNAPSHOT and 
>>>>>>>> 'parent.relativePath'
>>>>>>>> points at wrong local POM @ line 5, column 13 -> [Help 2]
>>>>>>>> [ERROR]
>>>>>>>> [ERROR] To see the full stack trace of the errors, re-run Maven
>>>>>>>> with the -e switch.
>>>>>>>> [ERROR] Re-run Maven using the -X switch to enable full debug
>>>>>>>> logging.
>>>>>>>> [ERROR]
>>>>>>>> [ERROR] For more information about the errors and possible
>>>>>>>> solutions, please read the following articles:
>>>>>>>> [ERROR] [Help 1]
>>>>>>>> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
>>>>>>>> [ERROR] [Help 2]
>>>>>>>> http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Heejoon.
>>>>>>>>
>>>>>>>> On Mon, Dec 21, 2015 at 9:48 AM, Chathuri Wimalasena <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Instead of building only credential store module, could you build
>>>>>>>>> from airavata source root. Credential store module depends on
>>>>>>>>> airavata-server-configuration and other jars. That should resolve
>>>>>>>>> your issue..
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>> Chathuri
>>>>>>>>>
>>>>>>>>> On Sun, Dec 20, 2015 at 7:45 PM, Heejoon Chae <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi, Chathuri,
>>>>>>>>>>
>>>>>>>>>> Thank you for the explanation.
>>>>>>>>>>
>>>>>>>>>> I cloned the git and tried to compile credential-store with 'mvn
>>>>>>>>>> clean install -Dmaven.test.skip=true' with mvn 3.0 and java 8 but got
>>>>>>>>>> following errors.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ###############################################################################################################
>>>>>>>>>> Downloaded:
>>>>>>>>>> http://repo1.maven.org/maven2/org/apache/derby/derbyclient/10.11.1.1/derbyclient-10.11.1.1.jar
>>>>>>>>>> (571 KB at 2.8 KB/sec)
>>>>>>>>>> [INFO]
>>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>> [INFO] BUILD FAILURE
>>>>>>>>>> [INFO]
>>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>> [INFO] Total time: 3:53.576s
>>>>>>>>>> [INFO] Finished at: Mon Dec 21 09:38:34 KST 2015
>>>>>>>>>> [INFO] Final Memory: 11M/1931M
>>>>>>>>>> [INFO]
>>>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>>> [ERROR] Failed to execute goal on project
>>>>>>>>>> airavata-credential-store: Could not resolve dependencies for project
>>>>>>>>>> org.apache.airavata:airavata-credential-store:jar:0.16-SNAPSHOT: The
>>>>>>>>>> following artifacts could not be resolved:
>>>>>>>>>> org.apache.airavata:airavata-credential-store-stubs:jar:0.16-SNAPSHOT,
>>>>>>>>>> org.apache.airavata:airavata-server-configuration:jar:0.16-SNAPSHOT,
>>>>>>>>>> org.apache.airavata:airavata-commons:jar:0.16-SNAPSHOT: Could not 
>>>>>>>>>> find
>>>>>>>>>> artifact
>>>>>>>>>> org.apache.airavata:airavata-credential-store-stubs:jar:0.16-SNAPSHOT
>>>>>>>>>>  in
>>>>>>>>>> apache.snapshots (http://repository.apache.org/snapshots) ->
>>>>>>>>>> [Help 1]
>>>>>>>>>> [ERROR]
>>>>>>>>>> [ERROR] To see the full stack trace of the errors, re-run Maven
>>>>>>>>>> with the -e switch.
>>>>>>>>>> [ERROR] Re-run Maven using the -X switch to enable full debug
>>>>>>>>>> logging.
>>>>>>>>>> [ERROR]
>>>>>>>>>> [ERROR] For more information about the errors and possible
>>>>>>>>>> solutions, please read the following articles:
>>>>>>>>>> [ERROR] [Help 1]
>>>>>>>>>> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
>>>>>>>>>>
>>>>>>>>>> ###############################################################################################################
>>>>>>>>>>
>>>>>>>>>> Any suggestion?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Heejoon.
>>>>>>>>>>
>>>>>>>>>> On Fri, Dec 18, 2015 at 9:29 PM, Chathuri Wimalasena <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Heejoon,
>>>>>>>>>>>
>>>>>>>>>>> You need to set up a valid credential store token in the
>>>>>>>>>>> credential store (experiment-catalog database has tables related to
>>>>>>>>>>> credential store). Same credential store token needs to be set in 
>>>>>>>>>>> gateway
>>>>>>>>>>> profiles. This token is used when airavata ssh to resource, input 
>>>>>>>>>>> staging
>>>>>>>>>>> and all the remote connections with the resource. Credential store 
>>>>>>>>>>> token is
>>>>>>>>>>> the identifier for SSH credential object which contains valid SSH 
>>>>>>>>>>> keys.
>>>>>>>>>>> Refer this code
>>>>>>>>>>> https://github.com/apache/airavata/blob/master/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java.
>>>>>>>>>>> There are API methods to generate SSH keys as well. You can use any 
>>>>>>>>>>> of the
>>>>>>>>>>> two methods.
>>>>>>>>>>>
>>>>>>>>>>> Thanks..
>>>>>>>>>>> Chathuri
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Dec 18, 2015 at 12:02 AM, Heejoon Chae <
>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi, Suresh,
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you for the help. It correctly parses the email.
>>>>>>>>>>>>
>>>>>>>>>>>> Now I have another error caused by 'credential token' as below,
>>>>>>>>>>>>
>>>>>>>>>>>> ERROR] expId: ttt_d0a8ca90-46b3-4225-add7-c29207130fc8,
>>>>>>>>>>>> processId: PROCESS_273f058f-a0bc-400b-9a82-5d71246c8fa8, taskId:
>>>>>>>>>>>> TASK_fc9dd43b-f0ea-4e6c-bd92-c5daa698257b type: DATA_STAGING,:- 
>>>>>>>>>>>> output
>>>>>>>>>>>> staging failed, reason: Provided credential store token is not 
>>>>>>>>>>>> valid.
>>>>>>>>>>>> Please provide the correct credential store token
>>>>>>>>>>>> [INFO] expId: ttt_d0a8ca90-46b3-4225-add7-c29207130fc8,
>>>>>>>>>>>> processId: PROCESS_273f058f-a0bc-400b-9a82-5d71246c8fa8 :- Process 
>>>>>>>>>>>> status
>>>>>>>>>>>> changed FAILED -> FAILED
>>>>>>>>>>>> [INFO] Publishing status to rabbitmq...
>>>>>>>>>>>> [ERROR] GFac Worker throws an exception
>>>>>>>>>>>> org.apache.airavata.gfac.core.GFacException: Error while
>>>>>>>>>>>> staging output data
>>>>>>>>>>>> at
>>>>>>>>>>>> org.apache.airavata.gfac.impl.GFacEngineImpl.outputDataStaging(GFacEngineImpl.java:478)
>>>>>>>>>>>> at
>>>>>>>>>>>> org.apache.airavata.gfac.impl.GFacEngineImpl.runProcessOutflow(GFacEngineImpl.java:393)
>>>>>>>>>>>> at
>>>>>>>>>>>> org.apache.airavata.gfac.impl.GFacWorker.runProcessOutflow(GFacWorker.java:172)
>>>>>>>>>>>> at
>>>>>>>>>>>> org.apache.airavata.gfac.impl.GFacWorker.run(GFacWorker.java:105)
>>>>>>>>>>>> at
>>>>>>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>>>>>>>>>> at
>>>>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>>>>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>>>
>>>>>>>>>>>> I actually set 'false' for storing credential in the
>>>>>>>>>>>> 'airavata-server.properties' file as bellow
>>>>>>>>>>>>
>>>>>>>>>>>> start.credential.store=false
>>>>>>>>>>>>
>>>>>>>>>>>> but it seems still they are active.
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you,
>>>>>>>>>>>> Heejoon.
>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Dec 18, 2015 at 12:42 AM, Suresh Marru <
>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Heejoon,
>>>>>>>>>>>>>
>>>>>>>>>>>>> You will need to configure your email within gfac-config.yaml
>>>>>>>>>>>>> (you will find it in the bin directory).
>>>>>>>>>>>>>
>>>>>>>>>>>>> If you can add your email to:
>>>>>>>>>>>>>
>>>>>>>>>>>>> - jobManagerType: SLURM
>>>>>>>>>>>>>   commandOutputParser:
>>>>>>>>>>>>> org.apache.airavata.gfac.impl.job.SlurmOutputParser
>>>>>>>>>>>>>   emailParser:
>>>>>>>>>>>>> org.apache.airavata.gfac.monitor.email.parser.SLURMEmailParser
>>>>>>>>>>>>>   resourceEmailAddresses:
>>>>>>>>>>>>>     - SDSC Admin <[email protected]> # comet
>>>>>>>>>>>>>     - [email protected] # stampede
>>>>>>>>>>>>>    - [email protected]
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Suresh
>>>>>>>>>>>>>
>>>>>>>>>>>>> > On Dec 16, 2015, at 6:33 PM, Heejoon Chae <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > Hi, Suresh,
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > I am using one month old version of PGA and Airavata server.
>>>>>>>>>>>>> Both were recent version at that time.
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > apache-airavata-server-0.16-SNAPSHOT
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > Thank you,
>>>>>>>>>>>>> > Heejoon.
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > On Thu, Dec 17, 2015 at 8:28 AM, Suresh Marru <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>> > Hi Heejoon,
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > Are you using Airavata 0.15 or 0.16 for this purpose?
>>>>>>>>>>>>> >
>>>>>>>>>>>>> > Suresh
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >> On Dec 16, 2015, at 5:38 PM, Heejoon Chae <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> Hi,
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> I have succeeded run job with SLURM.
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> Now, the job monitoring through email causes some errors as
>>>>>>>>>>>>> bellow.
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> It seems the Airavata server correctly log in the email
>>>>>>>>>>>>> account and bring email list, but it could not parse it correctly.
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> #################################################################################
>>>>>>>>>>>>> >> [ERROR] [EJM]: Error parsing email message
>>>>>>>>>>>>> =====================================>
>>>>>>>>>>>>> >> org.apache.airavata.common.exception.AiravataException:
>>>>>>>>>>>>> [EJM]: Couldn't identify Resource job manager type from address
>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>> >>      at
>>>>>>>>>>>>> org.apache.airavata.gfac.monitor.email.EmailBasedMonitor.getJobMonitorType(EmailBasedMonitor.java:160)
>>>>>>>>>>>>> >>      at
>>>>>>>>>>>>> org.apache.airavata.gfac.monitor.email.EmailBasedMonitor.parse(EmailBasedMonitor.java:144)
>>>>>>>>>>>>> >>      at
>>>>>>>>>>>>> org.apache.airavata.gfac.monitor.email.EmailBasedMonitor.processMessages(EmailBasedMonitor.java:239)
>>>>>>>>>>>>> >>      at
>>>>>>>>>>>>> org.apache.airavata.gfac.monitor.email.EmailBasedMonitor.run(EmailBasedMonitor.java:208)
>>>>>>>>>>>>> >>      at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>>>> >> [ERROR] FROM: [email protected]
>>>>>>>>>>>>> >> [ERROR] TO: [email protected]
>>>>>>>>>>>>> >> [ERROR] SUBJECT: SLURM Job_id=116 Name=A1514598207 Ended,
>>>>>>>>>>>>> Run time 00:00:01, COMPLETED, ExitCode 0
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> #################################################################################
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> >> Thank you,
>>>>>>>>>>>>> >> Heejoon.
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thank you
>>>>>>> Supun Nakandala
>>>>>>> Dept. Computer Science and Engineering
>>>>>>> University of Moratuwa
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> --
> Thank you
> Supun Nakandala
> Dept. Computer Science and Engineering
> University of Moratuwa
>

Reply via email to