Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001047 [Resin] major always 04-12-06 04:24 07-18-06 10:27
Reporter keith View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.0.18
Summary 0001047: war files containing compiled classes do not work on OSX, .java files work
Description This looks like a regression,

This may happen on more platforms than OSX

I am trying out resin and was successfully modifying the tutorial files example.Hello.java in resin-3.0.18/webapps/ROOT/. However when I moved to eclipse and assembled a war file which is a direct copy of the example the compiled classes cause the error below.

When I changed my ant build.xml to only include the .java files everything works fine.

[17:41:38.984] WebApp[http://localhost:8080/example] [^] stopping
[17:41:39.003] expanding /Developer/Applications/resin-3.0.18/webapps/example.war to /Developer/Applications/resin-3.0.18/webapps/example
[17:41:39.516] Amber enhancing class example.Property
[17:41:39.525] Compiling example/Property__ResinExt.java
[17:41:41.034] Compiling _ejb/HelloBean/HelloBean__EJB.java
[17:41:41.735] WebApp[http://localhost:8080/example] [^] starting
[17:41:41.778] Amber enhancing class example.Property
[17:41:41.834] Compiling example/Property__ResinExt.java
[17:41:43.225] WebApp[http://localhost:8080/example] [^] error
[17:41:43.227] com.caucho.loader.StartRuntimeException: com.caucho.config.ConfigException: java.lang.RuntimeException: java.lang.ClassNotFoundException: example.Property [java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in class file example/Property]
[17:41:43.227] at com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.java:325)
[17:41:43.227] at com.caucho.server.webapp.Application.start(Application.java:1578)
[17:41:43.227] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:587)
[17:41:43.227] at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:550)
[17:41:43.227] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm(StartAutoRedeployAutoStrategy.java:176)
[17:41:43.227] at com.caucho.server.deploy.DeployController.handleAlarm(DeployController.java:708)
[17:41:43.227] at com.caucho.util.Alarm.handleAlarm(Alarm.java:350)
[17:41:43.227] at com.caucho.util.Alarm.run(Alarm.java:320)
[17:41:43.227] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)
[17:41:43.227] at com.caucho.util.ThreadPool.run(ThreadPool.java:425)
[17:41:43.227] at java.lang.Thread.run(Thread.java:613)
[17:41:43.227] Caused by: com.caucho.config.ConfigException: java.lang.RuntimeException: java.lang.ClassNotFoundException: example.Property [java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in class file example/Property]
[17:41:43.227] at com.caucho.amber.entity.AmberEntityHome.init(AmberEntityHome.java:178)
[17:41:43.227] at com.caucho.amber.AmberManager.initEntityHomes(AmberManager.java:789)
[17:41:43.227] at com.caucho.ejb.cfg.EjbConfig.deployBeans(EjbConfig.java:478)
[17:41:43.227] at com.caucho.ejb.cfg.EjbConfig.deploy(EjbConfig.java:455)
[17:41:43.227] at com.caucho.ejb.EnvServerManager.start(EnvServerManager.java:376)
[17:41:43.227] at com.caucho.ejb.EnvServerManager.environmentStart(EnvServerManager.java:510)
[17:41:43.227] at com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.java:318)
[17:41:43.227] ... 10 more
[17:41:43.227] Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: example.Property [java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in class file example/Property]
[17:41:43.227] at com.caucho.amber.type.EntityType.getInstanceClass(EntityType.java)
[17:41:43.227] at com.caucho.amber.entity.AmberEntityHome.init(AmberEntityHome.java:176)
[17:41:43.227] ... 16 more
[17:41:43.227] Caused by: java.lang.ClassNotFoundException: example.Property [java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in class file example/Property]
[17:41:43.227] at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1271)
[17:41:43.227] at com.caucho.loader.DynamicClassLoader.findClass(DynamicClassLoader.java:1156)
[17:41:43.227] at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1078)
[17:41:43.227] at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1027)
[17:41:43.227] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[17:41:43.227] at java.lang.Class.forName0(Native Method)
[17:41:43.227] at java.lang.Class.forName(Class.java:242)
[17:41:43.227] ... 18 more
[17:41:43.227] Caused by: java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in class file example/Property
[17:41:43.227] at java.lang.ClassLoader.defineClass1(Native Method)
[17:41:43.227] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[17:41:43.227] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[17:41:43.227] at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1266)
[17:41:43.227] ... 24 more
Additional Information
Attached Files

- Relationships

- Notes
(0001096)
keith
04-26-06 22:36

looking elsewhere on the net this looks like a bug in ADT, the eclipse compiler (used internally by resin?). It only happens with classes to be enhanced for persistance i.e. EJB3 entity classes. I can successlly deploy anything EXCEPT EJB3 enity classes in class form, entity classes must be in source only.
 
(0001098)
fbertra
04-30-06 13:23

I can replicate this bug running Resin on Windows XP and compiling with Netbeans 5.5 Preview.

>>>>>

500 Servlet Exception

java.lang.RuntimeException: java.lang.ClassNotFoundException: cl.fbd.caja_negra.entities.Equipos
[java.lang.ClassFormatError: Invalid length 5 in LocalVariableTable in
class file cl/fbd/caja_negra/entities/Equipos]

Resin-3.0.s060404 (built Tue, 04 Apr 2006 10:18:51 PDT)

<<<<<

Note: "Equipos" is a EJB 3.0 Entity class.
 
(0001411)
ferg
07-18-06 10:27

Updated eclipse compiler. Note, that Resin doesn't need to run eclipse. The chosen compiler is selected by the <javac> configuration in the resin.conf.
 

- Issue History
Date Modified Username Field Change
04-12-06 04:24 keith New Issue
04-26-06 22:36 keith Note Added: 0001096
04-30-06 13:23 fbertra Note Added: 0001098
07-18-06 10:27 ferg Note Added: 0001411
07-18-06 10:27 ferg Assigned To  => ferg
07-18-06 10:27 ferg Status new => closed
07-18-06 10:27 ferg Resolution open => fixed
07-18-06 10:27 ferg Fixed in Version  => 3.0.20


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
29 unique queries executed.
Powered by Mantis Bugtracker