JazzPlainJava snippets failed to run
I got the following error when trying to run the snippets downloaded from JazzPlainJavaClient-0.6.zip.
I followed all the steps described in the README.TXT.
Looking around the forum, seeing several posts about the log4j warning, but non of them is related to the log4j configure. It is very confusing. Please help.
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NullPointerException
at java.security.SecureRandom.nextBytes(SecureRandom.java:430)
at java.security.SecureRandom.next(SecureRandom.java:452)
at java.util.Random.nextInt(Random.java:202)
at com.ibm.jsse2.bc.engineInit(bc.java:95)
at javax.net.ssl.SSLContext.init(SSLContext.java:11)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFac
tory.createSSLContext(SecureInterruptableSocketFactory.java:48)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFac
tory.<init>(SecureInterruptableSocketFactory.java:66)
at com.ibm.team.repository.transport.client.RemoteTeamServer.ensureIniti
alized(RemoteTeamServer.java:145)
at com.ibm.team.repository.transport.client.RemoteTeamServer.setCredenti
als(RemoteTeamServer.java:170)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRep
ository.java:332)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createS
haredTeamRepository(TeamRepositoryService.java:366)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeam
Repository(TeamRepositoryService.java:91)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeam
Repository(TeamRepositoryService.java:110)
at snippets.Snippet1.login(Snippet1.java:37)
at snippets.Snippet1.main(Snippet1.java:28)
I followed all the steps described in the README.TXT.
Looking around the forum, seeing several posts about the log4j warning, but non of them is related to the log4j configure. It is very confusing. Please help.
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NullPointerException
at java.security.SecureRandom.nextBytes(SecureRandom.java:430)
at java.security.SecureRandom.next(SecureRandom.java:452)
at java.util.Random.nextInt(Random.java:202)
at com.ibm.jsse2.bc.engineInit(bc.java:95)
at javax.net.ssl.SSLContext.init(SSLContext.java:11)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFac
tory.createSSLContext(SecureInterruptableSocketFactory.java:48)
at com.ibm.team.repository.transport.client.SecureInterruptableSocketFac
tory.<init>(SecureInterruptableSocketFactory.java:66)
at com.ibm.team.repository.transport.client.RemoteTeamServer.ensureIniti
alized(RemoteTeamServer.java:145)
at com.ibm.team.repository.transport.client.RemoteTeamServer.setCredenti
als(RemoteTeamServer.java:170)
at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRep
ository.java:332)
at com.ibm.team.repository.client.internal.TeamRepositoryService.createS
haredTeamRepository(TeamRepositoryService.java:366)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeam
Repository(TeamRepositoryService.java:91)
at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeam
Repository(TeamRepositoryService.java:110)
at snippets.Snippet1.login(Snippet1.java:37)
at snippets.Snippet1.main(Snippet1.java:28)
4 answers
Thanks for the tips.
But I think I did when I run it on command line as below:
>java -Djava.ext.dirs="F:\Program Files\IBM\TeamConcert"\jre\lib/ext;. snippets.Snippet1.class
I can make it work in Eclipse client UI. But I really need to get it work on command line. What do I miss now?
But I think I did when I run it on command line as below:
>java -Djava.ext.dirs="F:\Program Files\IBM\TeamConcert"\jre\lib/ext;. snippets.Snippet1.class
I can make it work in Eclipse client UI. But I really need to get it work on command line. What do I miss now?
Hello ghu,
in my batch file the following finally worked:
cd JazzPlain
C:\JazzDemo\build\jdk1.6.0_05\bin\java -Djava.ext.dirs=C:/JazzDemo/build/jdk1.6.0_05/jre/lib/ext;snippets;.
snippets.Snippet2
pause
the issue could be the darn \ vs / problem, couldn't it?
in my batch file the following finally worked:
cd JazzPlain
C:\JazzDemo\build\jdk1.6.0_05\bin\java -Djava.ext.dirs=C:/JazzDemo/build/jdk1.6.0_05/jre/lib/ext;snippets;.
snippets.Snippet2
pause
the issue could be the darn \ vs / problem, couldn't it?
Thanks for the tips.
But I think I did when I run it on command line as below:
java -Djava.ext.dirs="F:\Program
Files\IBM\TeamConcert"\jre\lib/ext;. snippets.Snippet1.class
I can make it work in Eclipse client UI. But I really need to get it
work on command line. What do I miss now?
Ralph,
Thanks for the help.
Yes it is the path but it is more than the typo I had.
It looks like I have a different Java defined on the PATH. SO I saw you use the same path for your Java and Djava, I tried and it finally worked:
>"F:\Program Files\IBM\TeamConcert"\jdk\jre\bin\java -Djava.ext.dirs="F:\Program Files\IBM\TeamConcert"\jdk\jre\lib\ext;snippets;. snippets.Snippet1.class
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
Contacting https://localhost:9443/jazz/...
Connected
Thanks for the help.
Yes it is the path but it is more than the typo I had.
It looks like I have a different Java defined on the PATH. SO I saw you use the same path for your Java and Djava, I tried and it finally worked:
>"F:\Program Files\IBM\TeamConcert"\jdk\jre\bin\java -Djava.ext.dirs="F:\Program Files\IBM\TeamConcert"\jdk\jre\lib\ext;snippets;. snippets.Snippet1.class
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
Contacting https://localhost:9443/jazz/...
Connected