Skip to main content

alphaWorks  >  Forums  >  Security Workbench Development Environment for Java  >  developerWorks

quick start problem    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 1 - Pages: 1 - Last Post: Apr 8, 2008 8:57 AM Last Post By: habeck Threads: [ Previous | Next ]
pierre_p

Posts: 1
Registered: Apr 02, 2008 09:43:45 AM
quick start problem
Posted: Apr 02, 2008 09:50:54 AM
Click to report abuse...   Click to reply to this thread Reply
Hello,

I have been looking for a quick start tutorial for Sword4J, but I have not fond any.

My problem is the following:
  • I create a new Plugin (an OSGi Bundle), and would like to get the list of permission it requires

  • the code of the plugin is the following:

File myFile=new File("Toto");
if(!myFile.exists())
{
System.out.println("File "myFile.getAbsolutePath()" does not exist.");
myFile.createNewFile();
}

  • Thus I am expecting to get a 'FilePermission' requirement
  • when I launch 'Security > Analyze', all subtabs of the 'Analysis' one remain void, and no specific file is create (such as OSGI-INF/permissions.perm).

There seem to be an error while running the analysis (my config: JDK 1.6 + eclipse 3.3.2):

JaBA Version: 01/19/2004
Main: Run start: Wed Apr 02 15:47:40 CEST 2008
Creating loader 'Primordial' (primordial). It is a closed classloader.
Specified file(s)/URL(s): /opt/sun-jdk-1.6.0.04/jre/lib/charsets.jar,/opt/sun-jdk-1.6.0.04/jre/lib/deploy.jar,/opt/sun-jdk-1.6.0.04/jre/lib/javaws.jar,/opt/sun-jdk-1.6.0.04/jre/lib/jce. jar,/opt/sun-jdk-1.6.0.04/jre/lib/jsse.jar,/opt/sun-jdk-1.6.0.04/jre/lib/management-agent.jar,/opt/sun-jdk-1.6.0.04/jre/lib/plugin.jar,/opt/sun-jdk-1.6.0.04/jre /lib/resources.jar,/opt/sun-jdk-1.6.0.04/jre/lib/rt.jar
JarUrlLoader: Successfully used C.H. file /home/pierre/boulot/dev/test/eclipse/filehandlerbundle/Analysis/filehandlerbundle/Primordial.ch
Actual URL(s):
file:/opt/sun-jdk-1.6.0.04/jre/lib/charsets.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/deploy.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/javaws.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/jce.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/jsse.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/management-agent.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/plugin.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/resources.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/rt.jar
Creating loader 'Extension' with parent Primordial. It is a closed classloader.
Specified file(s)/URL(s): /opt/sun-jdk-1.6.0.04/jre/lib/ext/dnsns.jar,/opt/sun-jdk-1.6.0.04/jre/lib/ext/localedata.jar,/opt/sun-jdk-1.6.0.04/jre/lib/ext/sunjce_provider.jar,/opt/sun-jdk -1.6.0.04/jre/lib/ext/sunpkcs11.jar
JarUrlLoader: Successfully used C.H. file /home/pierre/boulot/dev/test/eclipse/filehandlerbundle/Analysis/filehandlerbundle/Extension.ch
Actual URL(s):
file:/opt/sun-jdk-1.6.0.04/jre/lib/ext/dnsns.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/ext/localedata.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/ext/sunjce_provider.jar
file:/opt/sun-jdk-1.6.0.04/jre/lib/ext/sunpkcs11.jar
Creating loader 'Application' with parent Extension. It is a closed classloader.
Specified file(s)/URL(s): /home/pierre/boulot/dev/test/eclipse/filehandlerbundle/filehandlerbundle.jar,/home/pierre/downloads/eclipse/eclipse/plugins/com.ibm.security.j2sesa_1.0.66/lib/ EclipseSecurityManagerSetter.jar
C.H. CRC values do not match: Jars: 3021781337 c.h. file: 3646499776
Rebuilding the C.H. cache file /home/pierre/boulot/dev/test/eclipse/filehandlerbundle/Analysis/filehandlerbundle/Application.ch
JCSLog: created file: /home/pierre/boulot/dev/test/eclipse/filehandlerbundle/Analysis/filehandlerbundle/Application.ch
Actual URL(s):
file:/home/pierre/boulot/dev/test/eclipse/filehandlerbundle/filehandlerbundle.jar
file:/home/pierre/downloads/eclipse/eclipse/plugins/com.ibm.security.j2sesa_1.0.66/lib/EclipseSecurityManagerSetter.jar
Main: Finding root nodes.
MethodSelector.extractSelectionCriteria: RootMods.2 must contain only 'public', 'protected', 'default' or 'native'. The values must be separated by one of comma(,), semicolon (;) or blank. Found: public,protected,private,default. Ignoring request.
Analyzing the program.
Total elapsed time: 1681ms. Interval time: 1681ms.
com.ibm.toad.utils.D$AssertionException:
Assertion failure:illegal LDC_W type7
at com.ibm.toad.utils.D.assert(Unknown Source)
at com.ibm.toad.utils.D.abort(Unknown Source)
at com.ibm.toad.jan.jbc.myIter.traverse(Unknown Source)
at com.ibm.toad.jan.jbc.cfgimpl.FindLeadersVisitor.findLeaders(Unknown Source)
at com.ibm.toad.jan.jbc.cfgimpl.myCFG.<init>(Unknown Source)
at com.ibm.toad.jan.jbc.cfgimpl.CFGFactory.makeNewGraph(Unknown Source)
at com.ibm.etools.saber.engine.cs.JCSMethodCFP.processByteCodes(Unknown Source)
at com.ibm.etools.saber.engine.cs.JCSMethodLP.processByteCodesAndResolve(Unknown Source)
at com.ibm.etools.saber.engine.cs.JCSMethodLP.getGetSites(Unknown Source)
at com.ibm.etools.saber.engine.cg.FirstActiveUse.getFirstActiveUse(Unknown Source)
at com.ibm.etools.saber.engine.cg.OldCallGraph.traverse(Unknown Source)
at com.ibm.etools.saber.engine.cg.OldCallGraph.makeCallGraph(Unknown Source)
at com.ibm.etools.saber.engine.main.Main.process(Unknown Source)
at com.ibm.etools.saber.engine.main.Main.start(Unknown Source)
at com.ibm.etools.saber.engine.main.Main.start(Unknown Source)
at com.ibm.security.handlers.j2sesa.AnalysisHandler.startNewAnalysis(Unknown Source)
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:597)
at com.ibm.security.j2sesa.jobs.JarAnalysisJob.run(JarAnalysisJob.java:248)
at java.lang.Thread.run(Thread.java:619)

Is something in my configuration wrong, or is their an error somewhere else ?

thanks,

Pierre

Message was edited by: pierre_p
habeck

Posts: 10
Registered: Mar 05, 2004 10:43:14 AM
Re: quick start problem
Posted: Apr 08, 2008 08:57:25 AM   in response to: pierre_p in response to: pierre_p's post
Click to report abuse...   Click to reply to this thread Reply
Hi Pierre,

Looks like you have an older version of SWORD4J installed (j2sesa 1.0.66). Upgrading to release 2.0.120 or higher should resolve this problem for you.
Here's a link to the download tab for your convenience: Download now. Some have reported problems when updating from the ETTK update site, so please install from the archive instead.

Point your RSS reader here for a feed of the latest messages in all forums