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
Related
I've recently started working with Microsoft Web Deploy.
I got backups working in a basic configuration and now I'd like to experiment with adding some folder exclusions to the .pubxml file in my projects based on the comments to this answer.
Here are my deploy settings:
cd "\Program Files\IIS\Microsoft Web Deploy V3\scripts\"
. .\BackupScripts.ps1
Reset-BackupSettings
TurnOn-Backups -On $true
Configure-Backups -Enabled $true
Configure-Backups -ContinueSyncOnBackupFailure $false
Configure-Backups -NumberOfBackups 5
Configure-Backups -BackupPath "D:\UAT\AppBackups\{siteName}_snapshots"
Configure-BackupSettingsProvider -CanAddExcludedProviders $true
Get-BackupSettings
This works until I paste this snippet into my publish profile:
<Target Name="AddCustomSkipRules">
<ItemGroup>
<MsDeploySkipRules Include="SkipAppDataFolder">
<SkipAction></SkipAction>
<ObjectName>dirPath</ObjectName>
<AbsolutePath>$(_DestinationContentPath)\\App_Data$</AbsolutePath>
<Apply>Destination</Apply>
<XPath></XPath>
</MsDeploySkipRules>
</ItemGroup>
</Target>
A publish attempt with that code fails, and then seems to get stuck. Removing the snippet and republishing still fails.
Here's the error I get from the trace:
>trace eventLevel="Error" message="BACKUP_FAILED - Skipping backup because it failed due to an unknown reason.%C2%A0For more information, contact your server administrator."
AspNetModuleDiagErrorEvent
Uri /msdeploy.axd
User: username
Client IP: 10.148.69.225
Content-Type: application/msdeploy
Version: 9.0.0.0
MSDeploy.VersionMin: 7.1.600.0
MSDeploy.VersionMax: 9.0.3802.0
MSDeploy.Method: Sync
MSDeploy.RequestId: fa27c81c-12aa-47f3-ac37-7ea94caa14a4
MSDeploy.RequestCulture: en-US
MSDeploy.RequestUICulture: en-US
ServerVersion: 9.0.1973.0
Skip: objectName="^configProtectedData$"
Provider: auto, Path: A tracing deployment agent exception occurred that was propagated to the client.
Request ID 'fa27c81c-12aa-47f3-ac37-7ea94caa14a4'.
Request Timestamp: '11/10/2021 5:08:45 PM'.
Error Details:
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at Microsoft.Web.Deployment.BackupManager.HandleExceptionForBackupFailure(DeploymentBaseContext baseContext, BackupSettings settings, Exception ex, Boolean suppressLogging)
at Microsoft.Web.Deployment.BackupRuleHandler.PreSync(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable``1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequestWorker(DeploymentAgentAsyncData asyncData)
at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData)
Restarting IIS or the Web Deploy service doesn't help and I'd rather not restart the entire server if I can help it.
How can I get the backup service unstuck?
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?
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
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.
I added output=AST; to the grammar options at the top of cs.g to print out the tree.
options
{language = 'CSharp2';
output=AST;
}
When I build up the project after the change I got this message:
The command ""C:\Program Files\Java\jre6\bin\java" -cp "C:\Program Files\Java\jre6\lib\antlr-3.3.jar" org.antlr.Tool -message-format vs2005 cs.g -make -Xconversiontimeout 2500 -Xmultithreaded" exited with code 3. C:\Users\AMD\Desktop\Complier\antlrcsharp100620\UnitTest\UnitTest.csproj 68 24 UnitTest
Am I missing something here?
You need to modify the following lines in UnitTest.csproj:
<JavaDir>C:\Program Files\Java\jre6\bin\java</JavaDir>
<JarDir>C:\Program Files\Java\jre6\lib</JarDir>
to
<JavaDir>path to java.exe</JavaDir>
<JarDir>C:\users\amd\desktop\compiler\antlrcsharp100620\browse\browse\Antlr.Runtime\CSharp2</JarDir>
The JavaDir path needs point to the location of "java.exe". Mine was "C:\Program Files (x86)\Java\jre6\bin\"
The JarDir needs to have the path to the "antlr-3.3.jar" file. I set the path from your error message above.