Closed kaosko closed 9 years ago
Please try updating to latest version (it's 2.7.5 currently), I've added more logging to this release to help you identify failing page/component class.
From what I see there's a problem parsing the @Import
annotation. Could you paste it here?
Will do, but my Eclipse didn't find any updates - is the update is still at https://dl.bintray.com/anjlab/eclipse-tapestry5-plugin?
Yep, try restarting Eclipse?
Ok, so you must have just updated it because I scanned for a new update in the morning. Not sure if this helps, but with 2.7.5, I get:
!ENTRY org.eclipse.core.resources 4 2 2015-01-19 23:14:57.433
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.RuntimeException: Error creating context from L/xxx/yyy/zzz/Xxx.java
at com.anjlab.eclipse.tapestry5.TapestryUtils.createTapestryContext(TapestryUtils.java:225)
at com.anjlab.eclipse.tapestry5.watchdog.TapestryProjectWatchdog$2.resourceChanged(TapestryProjectWatchdog.java:247)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:378)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1498)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2322)
at org.eclipse.mylyn.internal.java.ui.LandmarkMarkerManager$LandmarkUpdateJob.run(LandmarkMarkerManager.java:259)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NullPointerException
at com.anjlab.eclipse.tapestry5.AssetReference.<init>(AssetReference.java:13)
at com.anjlab.eclipse.tapestry5.TapestryContext.processImportedFile(TapestryContext.java:298)
at com.anjlab.eclipse.tapestry5.TapestryContext.processImport(TapestryContext.java:266)
at com.anjlab.eclipse.tapestry5.TapestryContext.access$1(TapestryContext.java:260)
at com.anjlab.eclipse.tapestry5.TapestryContext$3.run(TapestryContext.java:246)
at com.anjlab.eclipse.tapestry5.TapestryContext.analyzeCompilationUnit(TapestryContext.java:156)
at com.anjlab.eclipse.tapestry5.TapestryContext.addImports(TapestryContext.java:224)
at com.anjlab.eclipse.tapestry5.TapestryContext.analyzeCompilationUnit(TapestryContext.java:138)
at com.anjlab.eclipse.tapestry5.TapestryContext.initFromJavaOrTemplateFile(TapestryContext.java:419)
at com.anjlab.eclipse.tapestry5.TapestryContext.initFromFile(TapestryContext.java:120)
at com.anjlab.eclipse.tapestry5.LocalTapestryContext.<init>(LocalTapestryContext.java:32)
at com.anjlab.eclipse.tapestry5.TapestryUtils.createTapestryContext(TapestryUtils.java:221)
... 10 more
I'm starting to think perhaps there's some damaged library in my Eclipse installation that causes this.
Could you paste source code of the @Import
annotation that's declared in /xxx/yyy/zzz/Xxx.java
?
I need this bit:
@org.apache.tapestry5.annotations.Import(
stylesheet = "index.css")
public class Index
It happens on opening any Java class. Anyhow, figured it out, the issue is an incompatibility with JRE 1.8. I'm running Eclipse on Java 8 and saw this in the log on startup:
!ENTRY org.eclipse.core.jobs 4 2 2015-01-19 23:14:51.802
!MESSAGE An internal error occurred during: "Eclipse Integration for Tapestry5".
!STACK 0
java.lang.IllegalArgumentException: Unsupported JLS level
at org.eclipse.jdt.core.dom.AST.<init>(AST.java:681)
at org.eclipse.jdt.core.dom.AST.newAST(AST.java:270)
at com.anjlab.eclipse.tapestry5.TapestryModule.readValuesFromAnnotation(TapestryModule.java:1000)
at com.anjlab.eclipse.tapestry5.TapestryModule.readMarkerAnnotation(TapestryModule.java:183)
at com.anjlab.eclipse.tapestry5.TapestryModule.findMarkers(TapestryModule.java:166)
at com.anjlab.eclipse.tapestry5.TapestryModule.initialize(TapestryModule.java:144)
at com.anjlab.eclipse.tapestry5.TapestryProject.addModule(TapestryProject.java:410)
at com.anjlab.eclipse.tapestry5.TapestryProject.addModule(TapestryProject.java:387)
at com.anjlab.eclipse.tapestry5.TapestryProject.findModules(TapestryProject.java:274)
at com.anjlab.eclipse.tapestry5.TapestryProject.initialize(TapestryProject.java:121)
at com.anjlab.eclipse.tapestry5.watchdog.TapestryProjectWatchdog$TapestryProjectAnalyzerJob.run(TapestryProjectWatchdog.java:85)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I switched back to running with JRE 1.7.0 and the issue is gone. Looks like this is a problem with Eclipse libraries rather than your plugin (still looking for an Eclipse bug report and/or an updated version of the underlying library).
@kaosko please try version 2.7.6
I assume this fixed now?
Sorry failed to reply. Works great thanks!
I'm regularly getting a NullPointerException just when I open a .java file for a page in Tapestry5 project. Things still seem to work fine after the initial exception. It seems that this started happening when I updated this plugin or some of the underlying components to a new version. I'm using Luna Service Release 1 (4.4.1), "Tapestry5 Support" version 2.6.3 (basic + additional for Eclipse4) and many other plugins.