6

I am trying to follow the official Tapestry tutorial

Following steps were fine :

  • launching mvn jetty:run (from command line)
  • launching mvn eclipse:eclipse -DdownloadSources=true
  • importing the project inside Eclipse
  • configuring a new Jetty configuration from the imported project inside Eclipse

But as soon as I run the configuration from Eclipse, I get an error, whose log is here. (relevant part, according to me :

ioc.Registry Error building service proxy for service 'RegistryStartup'

)

Also, please notice that my issue is different from the one in this post : indeed, I've managed to set up Jetty 6 in Eclipse.

My OS is Ubuntu 13.10 64 bits.

On ubuntu i've installed Maven 3.1.1

I am using Eclipse Kepler Service Release 2

I installed the jetty plugin (RunJettyRun) 1.3.2 (Jetty 6).

Also, in Eclipse I set up the patch in order to use java8 runtime.

Community
  • 1
  • 1
loloof64
  • 5,252
  • 12
  • 41
  • 78

2 Answers2

2

JVM arguments don't seem to be the cause for this issue.

The jdk8 compatibility guide does indeed list removed options that you may had to set to run large applications in Java 7. Those small example applications still run fine without using this setting in Java 7 though. In Java 8 there is no more need to set those options:

The command line flags PermSize and MaxPermSize have been removed and are ignored.

The full stack trace indicates an incompatibility in the plastic library for bytecode manipulation. The root exception is thrown because the library's ClassReader includes this check and it doesn't seem to care in which version the application has been compiled:

// checks the class version
if (readShort(6) > Opcodes.V1_7) {
    throw new IllegalArgumentException();
}
kapex
  • 28,903
  • 6
  • 107
  • 121
1

The problem was that the tapestry framework needs special java virtual machine settings, which are ignored starting from Java8.

So, I removed java 8 from the build path, and set up java 7 instead.

loloof64
  • 5,252
  • 12
  • 41
  • 78
  • Sir, can you elaborate more on the specifics of the problem? Which jvm settings are necessary for this to work? – frhd Jul 22 '14 at 08:16
  • Sorry but it is quite a moment ago I faced the problem, since I gave up tapestry and also gone for Eclipse Luna. But you should find these settings on tapestry official documentation : http://jumpstart.doublenegative.com.au/jumpstart6.10/tips.html – loloof64 Jul 22 '14 at 12:38
  • I've also moved on to Luna, but I'm still commited to Tapestry. I still don't see the connection to those VM arguments. Can you tell why you think so? Because this would be a very minor thing to fix, but I assume that there is a much bigger mess behind the problem. For now I think I'll have to go back to Java 7... – frhd Jul 22 '14 at 13:23
  • In fact, I saw in an Oracle Documenation, that some JVM settings were deprecated in Java 8. I can't remember where I saw that, but that's why I switched back to Java 7. – loloof64 Jul 22 '14 at 14:17
  • Maybe you saw it in the [Compatibility Guide for JDK 8](http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999387)? I couldnt find many changes to the JVM options that I could make sense of regarding this issue. Plus, my eyes literally hurt reading Oracle docs :-/ – frhd Jul 22 '14 at 14:46
  • It was not this one. If I find it again, I put the link here. But same for me, Oracle docs are very difficult to read without headeache. Have a look at http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BABDCEGG – loloof64 Jul 22 '14 at 15:05
  • Thanks for the link. Btw, in case you re interested: I have the same problem using the gradle jetty plugin as well as starting a leiningen server with tapestry.ioc-registry dependency used with java 8. – frhd Jul 22 '14 at 15:31
  • You're welcome. Meanwhile, I am still an absolute beginner for gradle or Leineingen. – loloof64 Jul 22 '14 at 15:48
  • I totally recommend gradle for JVM-based projects. – frhd Jul 22 '14 at 15:52
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/57772/discussion-between-laurent-bernabe-and-archie-hicox). – loloof64 Jul 22 '14 at 15:53
  • 1
    @archiehicox I think I found those removed vm options (and the real cause of the problem). See my answer – kapex Sep 17 '14 at 15:19
  • @kapep: Very intriguing.. I will look into it. Thanks for sharing. – frhd Sep 17 '14 at 15:42