Issues running on Android after Migrating to NativeScript 6.0 - angular2-nativescript

We have a Nativescript Angular app that we have not updated in several months and have migrated up to NativeScript 6.
When running tns run android the apk is building and getting sent to the device but am getting the black error screen and the following in the CLI:
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.MyApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.MyApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
System.err: at android.os.Handler.dispatchMessage(Handler.java:105)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6944)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err: at android.app.Activity.performCreate(Activity.java:7183)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
System.err: ... 9 more
Here is the package.json:
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.MyApp",
"tns-android": {
"version": "6.2.0"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"#angular/animations": "8.0.0",
"#angular/common": "8.0.0",
"#angular/compiler": "8.0.0",
"#angular/core": "8.0.0",
"#angular/forms": "8.0.0",
"#angular/http": "8.0.0-beta.10",
"#angular/platform-browser": "8.0.0",
"#angular/platform-browser-dynamic": "8.0.0",
"#angular/router": "8.0.0",
"nativescript-angular": "8.0.2",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-imagepicker": "^6.0.4",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "7.0.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.4.0",
"tns-core-modules": "6.0.1",
"zone.js": "0.9.1"
},
"devDependencies": {
"#angular-devkit/core": "~7.3.0",
"#angular/compiler-cli": "8.0.0",
"#ngtools/webpack": "8.0.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "~1.0.1",
"codelyzer": "~4.5.0",
"copy-webpack-plugin": "~4.6.0",
"css-loader": "~2.1.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-webpack": "1.0.1",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~1.0.0",
"resolve-url-loader": "~3.0.0",
"sass-loader": "~7.1.0",
"tslint": "~5.12.1",
"typescript": "3.4.5",
"uglifyjs-webpack-plugin": "~2.1.1",
"webpack": "~4.29.1",
"webpack-bundle-analyzer": "~3.0.3",
"webpack-cli": "~3.2.3",
"webpack-sources": "~1.3.0",
"node-sass": "4.12.0"
}
}
These dependencies are old so tried the following to update everything (backed up the original package.json):
ncu -u
which did the following:
#angular/animations 8.0.0 → 8.2.14
#angular/common 8.0.0 → 8.2.14
#angular/compiler 8.0.0 → 8.2.14
#angular/core 8.0.0 → 8.2.14
#angular/forms 8.0.0 → 8.2.14
#angular/platform-browser 8.0.0 → 8.2.14
#angular/platform-browser-dynamic 8.0.0 → 8.2.14
#angular/router 8.0.0 → 8.2.14
nativescript-angular 8.0.2 → 8.20.3
nativescript-drop-down ^4.0.1 → ^5.0.4
nativescript-imagepicker ^6.0.4 → ^7.1.0
nativescript-theme-core ~1.0.4 → ~2.0.24
nativescript-ui-listview 7.0.0 → 8.0.1
rxjs ~6.4.0 → ~6.5.3
tns-core-modules 6.0.1 → 6.2.3
zone.js 0.9.1 → 0.10.2
#angular-devkit/core ~7.3.0 → ~8.3.20
#angular/compiler-cli 8.0.0 → 8.2.14
#ngtools/webpack 8.0.0 → 8.3.20
clean-webpack-plugin ~1.0.1 → ~3.0.0
codelyzer ~4.5.0 → ~5.2.0
copy-webpack-plugin ~4.6.0 → ~5.0.5
css-loader ~2.1.0 → ~3.2.0
nativescript-dev-webpack 1.0.1 → 1.3.0
nativescript-worker-loader ~0.9.0 → ~0.10.0
raw-loader ~1.0.0 → ~4.0.0
resolve-url-loader ~3.0.0 → ~3.1.1
sass-loader ~7.1.0 → ~8.0.0
tslint ~5.12.1 → ~5.20.1
typescript 3.4.5 → 3.7.2
uglifyjs-webpack-plugin ~2.1.1 → ~2.2.0
webpack ~4.29.1 → ~4.41.2
webpack-bundle-analyzer ~3.0.3 → ~3.6.0
webpack-cli ~3.2.3 → ~3.3.10
webpack-sources ~1.3.0 → ~1.4.3
node-sass 4.12.0 → 4.13.0
Then did tns run android and this is the output:
Preparing project...
File change detected. Starting incremental webpack compilation...
webpack is watching the files…
Hash: 20eb6148e8a0814b11eb
Version: webpack 4.29.6
Time: 6917ms
Built at: 11/29/2019 17:08:03
Asset Size Chunks Chunk Names
bundle.js 73.1 KiB bundle [emitted] bundle
fonts/FontAwesome.ttf 176 KiB [emitted]
fonts/FontAwesome2 (2).ttf 39.4 KiB [emitted]
fonts/FontAwesome2.ttf 176 KiB [emitted]
fonts/FontAwesomem.ttf 162 KiB [emitted]
images/add.png 214 bytes [emitted]
images/background.jpg 251 KiB [emitted]
images/delete.png 409 bytes [emitted]
images/fe_icon.png 2.49 KiB [emitted]
images/logo.png 79.9 KiB [emitted]
images/logout27x27.png 205 bytes [emitted]
images/logout36x36.png 226 bytes [emitted]
images/no_receipt.jpg 3.36 KiB [emitted]
images/no_receipt.png 1.87 KiB [emitted]
images/pdf.jpg 5.81 KiB [emitted]
images/test.jpg 302 KiB [emitted]
package.json 182 bytes [emitted]
runtime.js 71.4 KiB runtime [emitted] runtime
tns-java-classes.js 0 bytes [emitted]
vendor.js 3.54 MiB vendor [emitted] vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
[./app.scss] 23.2 KiB {bundle} [built]
[./main.ts] 1.17 KiB {bundle} [built]
[./package.json] 166 bytes {bundle} [optional] [built]
+ 171 hidden modules
ERROR in ./app.scss
Module not found: Error: Can't resolve './nativescript-theme-core/css/core.light.css' in 'c:\Users\JoeSmith\apps\MyApp\app'
# ./app.scss 3:10-116
# ../node_modules/nativescript-dev-webpack/load-application-css-angular.js
# ./main.ts
ERROR in app/modal-datepicker/modal-datepicker.component.ts(16,6): error TS2554: Expected 2 arguments, but got 1.
app/shared/status-bar-util.ts(18,19): error TS2339: Property 'getter' does not exist on type 'typeof ios'.
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from C:\Users\JoeSmith\apps\MyApp\app\App_Resources\Android\app.gradle
Applying settings from C:\Users\JoeSmith\apps\MyApp\app\App_Resources\Android\settings.json
+ using andorid X library androidx.legacy:legacy-support-v4:1.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: C:\Users\JoeSmith\apps\MyApp\node_modules\nativescript-camera\platforms\android\nativescript_camera.aar
+ adding aar plugin dependency: C:\Users\JoeSmith\apps\MyApp\node_modules\nativescript-ui-listview\platforms\android\TNSListView-release.aar
+ adding aar plugin dependency: C:\Users\JoeSmith\apps\MyApp\node_modules\nativescript-ui-core\platforms\android\TNSCore-release.aar
+ adding aar plugin dependency: C:\Users\JoeSmith\apps\MyApp\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
Project successfully built.
The build result is located at: c:\Users\JoeSmith\apps\MyApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Installing on device 520031d8ee2715d9...
Successfully installed on device with identifier '520031d8ee2715d9'.
Restarting application on device 520031d8ee2715d9...
Successfully synced application org.nativescript.MyApp on device 520031d8ee2715d9.
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{org.nativescript.MyApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.MyApp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
System.err: at android.os.Handler.dispatchMessage(Handler.java:105)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6944)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
System.err: at android.app.Activity.performCreate(Activity.java:7183)
System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
System.err: ... 9 more
This is still there System.err: Error: Main entry is missing. App cannot be started. Verify app bootstrap.
I read on GitHub that Webpack compilation errors can cause this but I have no ideas how to address.
Any ideas what it could be? Thanks.

Related

Eclipse Checkstyle Plugin 8.41.0 won't run

after upgrading to Checkstyle 8.41.0 in Eclipse 2021-3 the Checkstyle Plugin doesn't work anymore. In Preferences -> Checkstyle I get the following Message:
Here also the Stracktrace.
!ENTRY org.eclipse.ui 4 4 2021-05-07 17:30:27.528
!MESSAGE Could not create action delegate for id: net.sf.eclipsecs.ui.actions.CheckSelectedFilesAction
!SUBENTRY 1 org.eclipse.equinox.registry 4 1 2021-05-07 17:30:27.528
!MESSAGE Plug-in net.sf.eclipsecs.ui was unable to load class net.sf.eclipsecs.ui.actions.CheckSelectedFilesAction.
!STACK 0
java.lang.ClassNotFoundException: An error occurred while automatically activating bundle net.sf.eclipsecs.ui (80).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:572)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:346)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:401)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:480)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:617)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
at org.eclipse.ui.internal.WorkbenchPlugin.lambda$0(WorkbenchPlugin.java:287)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:57)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:55)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.Workbench$40.run(Workbench.java:2667)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.osgi.framework.BundleException: Exception in net.sf.eclipsecs.ui.CheckstyleUIPlugin.start() of bundle net.sf.eclipsecs.ui.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:763)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1012)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:366)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:506)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
... 18 more
Caused by: java.lang.LinkageError: loader constraint violation: loader org.eclipse.osgi.internal.loader.EquinoxClassLoader #335c220d wants to load class org.eclipse.swt.widgets.Display. A different class with the same name was previously loaded by org.eclipse.osgi.internal.loader.EquinoxClassLoader #5e7b892b. (org.eclipse.swt.widgets.Display is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader #5e7b892b, parent loader 'platform')
at net.sf.eclipsecs.ui.CheckstyleUIPlugin.start(CheckstyleUIPlugin.java:84)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:814)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:806)
... 25 more
I also checked .p2\pool\plugins and I only have the plugin once. Also deleted all the old versions of the plugin but still nothing.
Anyone knows how I can fix this Problem?

no jdk1.7 but with error Unsupported major.minor version 51.0

I use eclipse with JDK1.6 and webLogic12, also use egit to control source, there is no any JDK1.7 on my PC, but when I start server, I got error as below, what can I do?
<2017/11/10 13:31:50 JST> <Error> <HTTP> <BEA-101371>Error: Class bytes found but defineClass()failed for: 'MyLogin'>
<2017/11/10 13:31:50 JST> <Error> <Deployer> <BEA-149265> Error: Class bytes found but defineClass()failed for: 'MyLogin''
weblogic.application.ModuleException: Error: Class bytes found but defineClass()failed for: 'MyLogin'
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:732)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:188)
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:83)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
Truncated. see log file for complete stacktrace
Caused By: java.lang.UnsupportedClassVersionError: MyLogin : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
I got answer as below follow enter link description here
In Servers view, right click on 12c node | Properties
WebLogic | Publishing, switch to "Publish as an exploded archive" - Click OK
Re-publish your app

Start up errors with Oracle Weblogic Server plugin for Eclipse Luna

We have an existing project which we built using Eclipse Indigo and the relevant weblogic server plugin. This was done four years back and we are trying to migrate to the Eclipse Luna. The project imports and everything works fine until I add the weblogic server tools plugin for Eclipse Luna or a lower version and restart eclipse. It starts complaining "An internal error occurred during"
Building Workspace
Initializing Java Tooling
Validating project
AppXray Indexing (This I could fix by disabling from Windows->Preferences->Oracle->AppXray)
The resulting application EAR is deployed on Oracle Weblogic Server 10gR3.
Any help with resolving the issues will be highly appreciated. I know the problem is with the Oracle Weblogic Server tool plugin for Eclipse Luna as the moment I remove it I do not see any errors. I have tried cleaning up .metadata and then relaunching eclipse but still the error starts ocurring.
UPDATE: Below is the exception stacktrace that I found from the .log file within .metadata. I am not able to understand anything from the log. Can anyone help?
!ENTRY org.eclipse.core.jobs 4 2 2015-04-29 07:07:17.086
!MESSAGE An internal error occurred during: "Initializing Java Tooling".
!STACK 0
java.lang.RuntimeException: IModuleReferenceSystemLibrary.ResolvedPath: ResolvedPathDerivedValueService.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.DerivedValueService.value(DerivedValueService.java:34)
at org.eclipse.sapphire.Value.refreshContent(Value.java:119)
at org.eclipse.sapphire.Value.refreshContent(Value.java:83)
at org.eclipse.sapphire.Value.text(Value.java:260)
at org.eclipse.sapphire.Value.text(Value.java:253)
at oracle.eclipse.tools.weblogic.syslib.internal.SystemLibrariesContainerImpl.createContainer(SystemLibrariesContainerImpl.java:200)
at oracle.eclipse.tools.weblogic.syslib.internal.SystemLibrariesContainerImpl$Initializer.initialize(SystemLibrariesContainerImpl.java:278)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2902)
at org.eclipse.jdt.internal.core.JavaModelManager$9.run(JavaModelManager.java:2808)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2848)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1932)
at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:4016)
at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:36)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: IModuleReferenceSystemLibrary.ModuleId: PossibleValuesValidationService.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.services.ValidationService.validation(ValidationService.java:49)
at org.eclipse.sapphire.Property.refreshValidation(Property.java:254)
at org.eclipse.sapphire.Property.validation(Property.java:476)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleReferenceSystemLibraryServices$ResolvedPathDerivedValueService.compute(ModuleReferenceSystemLibraryServices.java:74)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleReferenceSystemLibraryServices$ResolvedPathDerivedValueService.compute(ModuleReferenceSystemLibraryServices.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 16 more
Caused by: java.lang.RuntimeException: IModuleReferenceSystemLibrary.ModuleId: ModuleIdValuesProvider.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.PossibleValuesService.values(PossibleValuesService.java:77)
at org.eclipse.sapphire.services.internal.PossibleValuesValidationService.compute(PossibleValuesValidationService.java:57)
at org.eclipse.sapphire.services.internal.PossibleValuesValidationService.compute(PossibleValuesValidationService.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 23 more
Caused by: java.lang.NullPointerException
at oracle.eclipse.tools.common.util.DomUtil.elements(DomUtil.java:152)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.parseFeatureXmlFile(WebLogicServerInstall.java:490)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.loadModulesRegistry(WebLogicServerInstall.java:477)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.getModules(WebLogicServerInstall.java:394)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleIdValuesProvider.compute(ModuleIdValuesProvider.java:22)
at org.eclipse.sapphire.PossibleValuesService.compute(PossibleValuesService.java:93)
at org.eclipse.sapphire.PossibleValuesService.compute(PossibleValuesService.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 28 more
!ENTRY org.eclipse.ui.workbench 4 2 2015-04-29 07:07:17.274
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.RuntimeException: IModuleReferenceSystemLibrary.ResolvedPath: ResolvedPathDerivedValueService.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.DerivedValueService.value(DerivedValueService.java:34)
at org.eclipse.sapphire.Value.refreshContent(Value.java:119)
at org.eclipse.sapphire.Value.refreshContent(Value.java:83)
at org.eclipse.sapphire.Value.text(Value.java:260)
at org.eclipse.sapphire.Value.text(Value.java:253)
at oracle.eclipse.tools.weblogic.syslib.internal.SystemLibrariesContainerImpl.createContainer(SystemLibrariesContainerImpl.java:200)
at oracle.eclipse.tools.weblogic.syslib.internal.SystemLibrariesContainerImpl$Initializer.initialize(SystemLibrariesContainerImpl.java:278)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2902)
at org.eclipse.jdt.internal.core.JavaModelManager$9.run(JavaModelManager.java:2808)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2848)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1932)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3247)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2693)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
at org.eclipse.jdt.internal.core.JavaProject.isOnClasspath(JavaProject.java:2240)
at org.eclipse.jdt.internal.ui.BuildpathIndicatorLabelDecorator.getOverlay(BuildpathIndicatorLabelDecorator.java:48)
at org.eclipse.jdt.internal.ui.BuildpathIndicatorLabelDecorator.decorate(BuildpathIndicatorLabelDecorator.java:35)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:273)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:83)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:367)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:349)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:372)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:332)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: IModuleReferenceSystemLibrary.ModuleId: PossibleValuesValidationService.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.services.ValidationService.validation(ValidationService.java:49)
at org.eclipse.sapphire.Property.refreshValidation(Property.java:254)
at org.eclipse.sapphire.Property.validation(Property.java:476)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleReferenceSystemLibraryServices$ResolvedPathDerivedValueService.compute(ModuleReferenceSystemLibraryServices.java:74)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleReferenceSystemLibraryServices$ResolvedPathDerivedValueService.compute(ModuleReferenceSystemLibraryServices.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 28 more
Caused by: java.lang.RuntimeException: IModuleReferenceSystemLibrary.ModuleId: ModuleIdValuesProvider.compute() has failed
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
at org.eclipse.sapphire.PossibleValuesService.values(PossibleValuesService.java:77)
at org.eclipse.sapphire.services.internal.PossibleValuesValidationService.compute(PossibleValuesValidationService.java:57)
at org.eclipse.sapphire.services.internal.PossibleValuesValidationService.compute(PossibleValuesValidationService.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 35 more
Caused by: java.lang.NullPointerException
at oracle.eclipse.tools.common.util.DomUtil.elements(DomUtil.java:152)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.parseFeatureXmlFile(WebLogicServerInstall.java:490)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.loadModulesRegistry(WebLogicServerInstall.java:477)
at oracle.eclipse.tools.weblogic.WebLogicServerInstall.getModules(WebLogicServerInstall.java:394)
at oracle.eclipse.tools.weblogic.syslib.internal.ModuleIdValuesProvider.compute(ModuleIdValuesProvider.java:22)
at org.eclipse.sapphire.PossibleValuesService.compute(PossibleValuesService.java:93)
at org.eclipse.sapphire.PossibleValuesService.compute(PossibleValuesService.java:1)
at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
... 40 more
After experiencing this problem on our team I thought I would post the solution we found.
This occurred when we moved from a Luna based IDE to the Mars SR1 release. We tracked it down to a file that was in source control.
.settings/oracle.eclipse.tools.weblogic.syslib.xml
Once deleted eclipse would start happily, and we were good to go. One developer tracked the issue down to a single line inside the file.
<module id="javax.persistence" javadoc="http://java.sun.com/javaee/5/docs/api"/>
If that single <module> line is commented out the eclipse oepe error goes away. FYI, you won't see this error when importing the project, just on every restart after the project has been pulled down.

How to Fix Eclipse Debug Hang

I'm running Ubuntu 10.04 LTS and Eclipse Version: Helios Service Release 2
Build id: 20110218-091, debugging PHP. While it doesn't happen every time, after I'm done debugging when I click the red square to stop the process the Eclipse screen goes grey, and stays there. A top, or System Monitor shows Eclipse is using whatever CPU cycles remain, which in my case is between 67-85%. It'll stay this way until I kill the process (I've waited up to 10 or more minutes). The last error in the log is:
Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.
This just started happening today so I'm inclined to think something's up with my machine, an update from Ubuntu, memory???
Output from Eclipse Event Details is below.
Any suggestions would be most welcome.
eclipse.buildId=M20110210-1200
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product
Error
Tue Oct 11 14:35:03 EDT 2011
Plug-in net.sf.simpletest.eclipse was unable to load class net.sf.simpletest.eclipse.launcher.SimpletestLaunchShortcut.
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle net.sf.simpletest.eclipse (505).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
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.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getDelegate(LaunchShortcutExtension.java:410)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getLaunchConfigurations(LaunchShortcutExtension.java:505)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getParticipatingLaunchConfigurations(LaunchingResourceManager.java:486)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getLabel(LaunchingResourceManager.java:320)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.computeLabels(LaunchingResourceManager.java:241)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager$2.run(LaunchingResourceManager.java:138)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.osgi.framework.BundleException: The activator net.sf.simpletest.eclipse.SimpletestPlugin for bundle net.sf.simpletest.eclipse is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
... 22 more
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
... 28 more
Caused by: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Display.error(Display.java:1203)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:751)
at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:2068)
at net.sf.simpletest.eclipse.SimpletestPlugin.<clinit>(SimpletestPlugin.java:65)
... 35 more
The reason is very clear. An exception was thrown when initializing a class, which is caused by accessing SWT Display in a non-UI thread.

Eclipse RPC bundle activation error: "The System Bundle was updated"

I get the following error when I try to launch my Eclipse RPC application:
!SESSION 2011-05-05 17:07:38.649 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE
Framework arguments: -application org.eclipse.ui.ide.workbench
Command-line arguments: -application org.eclipse.ui.ide.workbench -data C:\Users\eramkoh\PCI Workspace/../runtime-EclipseApplication -dev file:C:/Users/eramkoh/PCI Workspace/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86 -consoleLog
!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2011-05-05 17:07:39.492
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 11 more
Root exception:
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:71)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:129)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:143)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.492
!MESSAGE Bundle org.eclipse.equinox.simpleconfigurator_1.0.101.R35x_v20090807-1100 [127] is not active.
!ENTRY org.eclipse.osgi 4 0 2011-05-05 17:07:39.523
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
What should I do to resolve it?
I had exactly the same problem and I realized what causes it. If you have some system related bundle more than once (org.eclipse.osgi for example) in your target file, then if you let your application running, then by default Eclipse adds all of the bundles to the launch configuration. So steps to take:
Open launch config and go to plugins tab
click on validate
See which plugin is duplicated
Leave only one checked, which is appropiate
See the picture below for details:
I've got a similar problem when trying to launch Eclipse CDT 4.1.1 (with couple 4.2.2 and several own plug-ins) from Eclipse SDK 4.2.2 on 32bit Java 7 VM in 32bit Windows Vista. I'm not sure what the root cause is, but I can reliably reproduce and solve it using the following steps.
Set a new target platform definition, or reload an existing one.
Try running JUnit4 plug-in tests in debug mode (Ctrl+F11), and observe everything working well.
Restart Eclipse.
Repeat step 2 and get the same java.lang.IllegalStateException as the topic starter.
Reload the target platform definition, and click OK on "Target Definition Out Of Synch: The active target platform is out of synch with the file system. Pressing ok on the preference page will update the target platform"
Repeat step 2 and observe that the error is gone again.
Since I don't get this error in a similar scenario with Eclipse 3.6, I would guess that the target platform code in Eclipse Juno does not handle NTFS file timestamps well enough. So, when an Eclipse instance is actually loaded, a changed bundle is erroneously detected and an attempt to reinstall it is made, leading to this error later.
Summary: try reloading the target platform if you get this error.
Try adding org.eclipse.core.runtime on the configuration tab of your product, and set it to a default start level (0) and auto start set to true.