SGX STEP building process - c#

I'm trying to implement sgx Foreshadow vulnerability follow the instruction contained in https://github.com/jovanbulck/sgx-step/tree/master/app/foreshadow
but I get the following error:
/usr/bin/ld: ../../libsgxstep/libsgx-step.a(aep_trampoline.o): relocation R_X86_64_32S against symbol `sgx_step_tcs' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target 'app' failed
make: *** [app] Error 1
How can I implement this vulnerability?

Related

Azure Synapse Pipeline running Spark Notebook Generates Random Errors

I am processing approximately 19,710 directories containing IIS log files in an Azure Synapse Spark notebook. There are 3 IIS log files in each directory. The notebook reads the 3 files located in the directory and converts them from text delimited to Parquet. No partitioning. But occasionally I get the following two errors for no apparent reason.
{
"errorCode": "2011",
"message": "An error occurred while sending the request.",
"failureType": "UserError",
"target": "Call Convert IIS To Raw Data Parquet",
"details": []
}
When I get the error above all of the data was successfully written to the appropriate folder in Azure Data Lake Storage Gen2.
sometimes I get
{
"errorCode": "6002",
"message": "(3,17): error CS0234: The type or namespace name 'Spark' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)\n(4,17): error CS0234: The type or namespace name 'Spark' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)\n(12,13): error CS0103: The name 'spark' does not exist in the current context",
"failureType": "UserError",
"target": "Call Convert IIS To Raw Data Parquet",
"details": []
}
When I get the error above none of the data was successfully written to the appropriate folder in Azure Data Lake Storage Gen2.
In both cases you can see that the notebook did run for a period of time.
I have enabled 1 retry on the spark notebook, it is a pyspark notebook that does python for the parameters with the remainder of the logic using C# %%csharp. The spark pool is small (4 cores/ 32GB) with 5 nodes.
The only conversion going on in the notebook is converting a string column to a timestamp.
var dfConverted = dfparquetTemp.WithColumn("Timestamp",Col("Timestamp").Cast("timestamp"));
When I say this is random the pipeline is currently running and after processing 215 directories there are 2 of the first failure and one of the second.
Any ideas or suggestions would be appreciated.
OK after running for 113 hours (its almost done) I am still getting the following errors but it looks like all of the data was written out
Count 1
{
"errorCode": "6002",
"message": "(3,17): error CS0234: The type or namespace name 'Spark' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)\n(4,17): error CS0234: The type or namespace name 'Spark' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)\n(12,13): error CS0103: The name 'spark' does not exist in the current context",
"failureType": "UserError",
"target": "Call Convert IIS To Raw Data Parquet",
"details": []
}
Count 1
{
"errorCode": "6002",
"message": "Exception: Failed to create Livy session for executing notebook. LivySessionId: 4419, Notebook: Convert IIS to Raw Data Parquet.\n--> LivyHttpRequestFailure: Something went wrong while processing your request. Please try again later. HTTP status code: 500. Trace ID: e0860852-40e6-498f-b2df-4eff9fee504a.",
"failureType": "UserError",
"target": "Call Convert IIS To Raw Data Parquet",
"details": []
}
Count 17
{
"errorCode": "2011",
"message": "An error occurred while sending the request.",
"failureType": "UserError",
"target": "Call Convert IIS To Raw Data Parquet",
"details": []
}
Not sure what these errors are about and of course I will rerun the specific data in the pipeline to see if this is a one-off or keeps occurring on this specific data. But it seems as if these errors or occurring after the data as been written to parquet format.
Well I think this is part of the issue. Keep in mind that I am writing the main part of the logic in C# so your mileage in another language may vary. Also these are IIS log files that are space delimited and they can be multiple megabytes in size like one file could be 30MB.
My new code has been running for 17 hours without a single error. All of the changes I made were to ensure that I disposed of resources that would consume memory. Examples follow:
When reading a text delimited file as a binary file
var df = spark.Read().Format("binaryFile").Option("inferSchema", false).Load(sourceFile) ;
byte[] rawData = df.First().GetAs<byte[]>("content");
the data in the byte[] eventually gets loaded into a List<GenericRow> but I never set the variable rawData to null.
After filling the byte[] from data frame above I added
df.Unpersist() ;
After fully putting all data into List<GenericRow> rows from the byte[] and adding it into a data frame using the code below I cleared out the rows variable.
var dfparquetTemp = spark.CreateDataFrame(rows,inputSchema);
rows.Clear() ;
finally after changing a column type and writing out the data I did an unpersist on the data frame.
var dfConverted = dfparquetTemp.WithColumn("Timestamp",Col("Timestamp").Cast("timestamp"));
if(overwrite) {
dfConverted.Write().Mode(SaveMode.Overwrite).Parquet(targetFile) ;
}
else {
dfConverted.Write().Mode(SaveMode.Append).Parquet(targetFile) ;
}
dfConverted.Unpersist() ;
finally I have most of my logic inside of a C# method that gets called in a foreach loop with the hopes that the CLR will dispose of anything else I missed.
And last but not least a lesson learned.
When reading a directory containing multiple parquet files it seems
that spark reads all of the files into the data frame.
When reading a directory containing multiple text delimited files that you are
treating as binary files spark reads only ONE of the files into the
data frame.
So in order to process multiple text delimited files out of a folder I had to pass in the names of the multiple files and process the first file with an SaveMode.Overwrite and the other files as SaveMode.Append. Every method of attempting to use any kind of wild card and specifying the directory name only ever resulted in reading one file into the data frame. (Trust me here after hours of GoogleFu I tried every method I could find.)
Again 17 hours into processing not one single error so one important lesson seems to be to keep your memory usage as low as possible.
OK I am adding another answer rather than editing the existing ones. After 113 hours I had 52 errors that I had to reprocess. I found that some of the errors were due to Kryo serialization failed: Buffer overflow. Available: 0, required: 19938070. To avoid this, increase spark.kryoserializer.buffer.max well after a few hours of GoogleFu which also included increasing the size of my spark pool from small to medium (had no effect) I added this as the first cell in my notebook
%%configure
{
"conf":
{
"spark.kryoserializer.buffer.max" : "512"
}
}
So this fixed the Kryo serialization failed issue and I believe that the larger spark pool has fixed all of the remaining errors because they are now all processing successfully. Also jobs that previously failed after taking 2 hours to run are now completing after 30 minutes. I suspect this speed increase is due to the larger spark pool memory. So lesson learned. Do not use the small pool for IIS files.
Finally something that bugged me. when you type %%configure into an empty cell Microsoft so unhelpfully puts in the following crap
%%configure
{
# You can get a list of valid parameters to config the session from https://github.com/cloudera/livy#request-body.
"driverMemory": "28g", # Recommended values: ["28g", "56g", "112g", "224g", "400g", "472g"]
"driverCores": 4, # Recommended values: [4, 8, 16, 32, 64, 80]
"executorMemory": "28g",
"executorCores": 4,
"jars": ["abfs[s]: //<file_system>#<account_name>.dfs.core.windows.net/<path>/myjar.jar", "wasb[s]: //<containername>#<accountname>.blob.core.windows.net/<path>/myjar1.jar"],
"conf":
{
# Example of standard spark property, to find more available properties please visit: https://spark.apache.org/docs/latest/configuration.html#application-properties.
"spark.driver.maxResultSize": "10g",
# Example of customized property, you can specify count of lines that Spark SQL returns by configuring "livy.rsc.sql.num-rows".
"livy.rsc.sql.num-rows": "3000"
}
}
I call it crap because IT HAS COMMENTS IN IT. If you try and just add in the one setting you want it will fail due to the comments. JUST BE WARNED.

Not able to Publish the ASP.Net app in Visual studio

I am trying to publish the app from Visual-Studio but I am getting the error:
The command "node node_modules/webpack/bin/webpack.js --env.prod"
exited with code 1. first azure app
C:...\firstazureapp
C:...firstazureapp\firstazureapp.csproj 497
I have followed this Article
Getting Started With Angular 5 And ASP.NET Core
Everything is working fine but at publish time only I am getting the error.
I have run this command In the node modules folder and it is giving these issue
C:\Users\acer\source\repos\testfromcmd>node node_modules/webpack/bin/webpack.js --env.prod
Hash: 40bd2f76867df4f7cc31ffb9aab17185511f568b
Version: webpack 2.5.1
Child
Hash: 40bd2f76867df4f7cc31
Time: 26026ms
Asset Size Chunks Chunk Names
main-client.js 1.73 MB 0 [emitted] [big] main-client
ERROR in main-client.js from UglifyJs
TypeError: Cannot read property 'reset' of undefined
at filterdFiles.forEach (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\optimize\UglifyJsPlugin.js:81:21)
at Array.forEach ()
at Compilation.compilation.plugin (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\optimize\UglifyJsPlugin.js:40:18)
at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:142:13)
at self.applyPluginsAsync.err (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:635:10)
at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:131:46)
at sealPart2 (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:631:9)
at Compilation.applyPluginsAsyncSeries (C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:131:46)
at Compilation.seal (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:579:8)
at C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compiler.js:493:16
at C:\Users\acer\source\repos\testfromcmd\node_modules\tapable\lib\Tapable.js:225:11
at _addModuleChain (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:481:11)
at processModuleDependencies.err (C:\Users\acer\source\repos\testfromcmd\node_modules\webpack\lib\Compilation.js:452:13)
at process._tickCallback (internal/process/next_tick.js:150:11)
Child
Hash: ffb9aab17185511f568b
Time: 26026ms
Asset Size Chunks Chunk Names
main-server.js 2.04 MB 0 [emitted] [big] main-server
I solved my problem by changing the uglify version from 3.0.23 to 2.8.23 and this works for me thanks for help

SONAR 3.7.3 setup for .net project. MOQ code coverage

I am doing a POC for .Net projects by using SONAR.
My 1st attempt is to only evaluate the code coverage of my Mock tests.
So far I have installed in my sandbox (Win7) the below apps:
SONAR 3.7.3
SONAR RUNNER 2.3
My sonar website is hosted in the default url localhost:9000 and I am able to see on the browser.
I have created a sonar-project.propeties file under the same folder where my sln file is
My sonar-project.propeties looks like this:
# required metadata
sonar.projectKey=my:project
sonar.projectName=My project
sonar.projectVersion=1.0
sonar.sources=.
sonar.language=cs
My problem comes when I execute the sonar-runner on the sane folder, which throws the below error message:
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 2.767s
Final Memory: 5M/20M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: You must define the following mandatory properties for 'Unknow
n': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with t
he -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Any idea what might be causing this?
I believe that I am not missing nothing.
Additonal Infomation
When I execute the sonar-runner with the flag -e i get the below message:
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 20.841s
Final Memory: 12M/110M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher
.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102
)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: org.sonar.api.utils.SonarException: Error while reading Gendarme resu
lt file: C:\Users\a-jose.valdes\Documents\Visual Studio 2012\Projects\PoC\NAFT
.PoC.Implementation\.sonar\gendarme-report.xml
at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parse(
GendarmeResultParser.java:105)
at org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyseResults(Genda
rmeSensor.java:226)
at org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyse(GendarmeSens
or.java:182)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:7
2)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanConta
iner.java:142)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.j
ava:187)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScan
Container.java:182)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScan
Container.java:180)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanCon
tainer.java:175)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.ja
va:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapCon
tainer.java:156)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapCo
ntainer.java:144)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo
ntainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.
java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java
:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher
.java:87)
... 9 more
Caused by: com.ctc.wstx.exc.WstxIOException: Unexpected first character (char co
de 0xEF), not valid in xml document: could be mangled UTF-8 BOM marker. Make sur
e that the Reader uses correct encoding or pass an InputStream instead
at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.
java:174)
at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:5
31)
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:585
)
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:641
)
at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFac
tory.java:323)
at org.codehaus.staxmate.SMInputFactory.createStax2Reader(SMInputFactory
.java:234)
at org.codehaus.staxmate.SMInputFactory.rootElementCursor(SMInputFactory
.java:337)
at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parse(
GendarmeResultParser.java:100)
... 39 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Based on this message in the stack trace:
Caused by: com.ctc.wstx.exc.WstxIOException: Unexpected first character (char co
de 0xEF), not valid in xml document: could be mangled UTF-8 BOM marker. Make sur
e that the Reader uses correct encoding or pass an InputStream instead
I would suggest setting this property in either your sonar-project.properties file or in the sonar-runner.properties file:
sonar.sourceEncoding=UTF-8

Sonar C# project with multiple modules using the Simple Java Runner

I'm trying Sonar 3.2 with C# projects (the only plugins are C# Core and C# FX Cop) and using the Simple Java Runner.
It worked fine on a solution with a single project, but when I tried to analyse using a solution with 2 projects I always get the following error:
17:01:41.775 INFO .s.b.b.ProjectModule - ------------- Analyzing Project1
17:01:42.055 INFO .s.b.ProfileProvider - Selected quality profile : [name=Custom C#,language=cs]
17:01:42.075 INFO nPluginsConfigurator - Configure maven plugins...
17:01:42.125 INFO org.sonar.INFO - Compare to previous analysis
17:01:42.155 INFO org.sonar.INFO - Compare over 5 days (2012-09-27)
17:01:42.175 INFO org.sonar.INFO - Compare over 30 days (2012-09-02)
17:01:42.215 INFO .b.p.SensorsExecutor - Initializer ProjectFileSystemLogger...
17:01:42.215 INFO jectFileSystemLogger - Source directories:
17:01:42.215 INFO jectFileSystemLogger - $(Solution folder)\Project1
17:01:42.215 INFO .b.p.SensorsExecutor - Initializer ProjectFileSystemLogger done: 0 ms
17:01:42.225 INFO .b.p.SensorsExecutor - Initializer CSharpProjectInitializer...
17:01:42.225 INFO .b.p.SensorsExecutor - Initializer CSharpProjectInitializer done: 0 ms
17:01:42.255 INFO o.s.p.cpd.CpdSensor - Detection of duplicated code is not supported for C#.
Total time: 8.442s
Final Memory: 5M/118M
Exception in thread "main" org.sonar.runner.RunnerException: java.lang.NullPointerException
at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: java.lang.NullPointerException
at org.sonar.plugins.csharp.api.sensor.AbstractRegularCSharpSensor.assembliesFound(AbstractRegularCSharpSensor.java:101)
at org.sonar.plugins.csharp.api.sensor.AbstractRegularCSharpSensor.shouldExecuteOnProject(AbstractRegularCSharpSensor.java:81)
at org.sonar.plugins.csharp.api.sensor.AbstractRuleBasedCSharpSensor.shouldExecuteOnProject(AbstractRuleBasedCSharpSensor.java:48)
at org.sonar.api.batch.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:109)
at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:99)
at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:57)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:57)
at org.sonar.batch.phases.Phases.execute(Phases.java:93)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:139)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:131)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:126)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:104)
at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:69)
at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
... 3 more
The solution folder contains the following sonar-project.properties:
# Project identification
sonar.projectKey=com.project.btg
sonar.projectVersion=1.0
sonar.projectName=BTG
# Info required for Sonar
sonar.sources=.
sonar.language=cs
sonar.dotnet.visualstudio.solution.file=Sonar.project.sln
sonar.dotnet.buildPlatform=x86
sonar.dotnet.buildConfiguration=Debug
sonar.modules=Project1,Project2
#modules specific configuration
Project1:sonar.sources=.\Project1
Project1:sonar.projectName=Project 1
Project2:sonar.sources=.\Project2
Project2:sonar.sources=Project 2
The solution only has this 2 projects.
I tried adding the modules configuration in a sonar-project.properties for each project with just:
# Project identification
sonar.projectName=Project 1
For the single project I used I had:
# Project identification
sonar.projectKey=com.Project1
sonar.projectVersion=1.0
sonar.projectName=Project 1
# Info required for Sonar
sonar.sources=.
sonar.language=cs
I feel I'm missing something very simple, but I couldn't find much information on this.
If someone can help me with this I have an additional question:
Can you analyse a hybrid solution of C++ and C# project?
Thanks
The support of multi-module is built-in for the C# plugins, you don't need to (and should not) specify:
sonar.modules=Project1,Project2
#modules specific configuration
Project1:sonar.sources=.\Project1
Project1:sonar.projectName=Project 1
Project2:sonar.sources=.\Project2
Project2:sonar.sources=Project 2
, nor add a "sonar-project.properties" inside each module.
The C# Plugins rely on the SLN file to automatically discover the modules. Take a look at our sample application, and just replace the Maven POM by a single "sonar-project.properties" file.

sharpen The activator sharpen.core.Sharpen for bundle sharpen.core is invalid

Am trying to run Sharpen to convert some Java code to c#. Below is the detail of the instruction I am following, environment and problem statement.
Instruction followed:
http://www.pauldb.me/post/14916717048/a-guide-to-sharpen-a-great-tool-for-converting-java
http://community.versant.com/documentation/reference/db4o-7.12/net2/reference/index_Left.html#CSHID=sharpen%2Fhow_to_setup_sharpen.htm|StartTopic=Content%2Fsharpen%2Fhow_to_setup_sharpen.htm|SkinName=RedVersant
Environment:
Eclipse 4.2.0
JDK 1.7 (jdk1.7.0_03)
Problem:
I am able to set up the project in Eclipse and run the build file to convert the code. While executing the target "sharpen-docs" of the build file it errors out with the following message in the eclipse configuration log.
Any help will be much appreciated. Thanks in advance.
!ENTRY org.eclipse.osgi 2 0 2012-07-31 13:23:04.507
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: The activator sharpen.core.Sharpen for bundle sharpen.core is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:172)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Caused by: java.lang.ClassNotFoundException: sharpen.core.Sharpen
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
... 25 more
Root exception:
java.lang.ClassNotFoundException: sharpen.core.Sharpen
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
at org.eclipse.core.launcher.Main.main(Main.java:34)
!ENTRY org.eclipse.osgi 4 0 2012-07-31 13:23:04.737
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in sharpen.core was unable to load class sharpen.core.SharpenApplication.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Caused by: java.lang.ClassNotFoundException: sharpen.core.SharpenApplication
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 17 more
For the records:
The problem got resolved after I install Java 6 .. thanks Anders for pointing towards this.

Categories

Resources