cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 520043253981-0...@t-online.de (St├ęphane Delort)
Subject [flowscript] importclass ?
Date Sat, 19 Jun 2004 00:38:43 GMT
Hi,

Finally I had access to the Jetty messages:

My class is in .../webapp/WEB-INF/class/org/apache/
(both User.java and home compiled User.class are uner the same path)

I know that this place is not the better one, but it is just for
testing.

So, in my flowscript I have  (followinf Helma's eg): 
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

function myfunction() {
  
  importPackage(Packages.org.apache);
  var newUser = new Packages.org.apache.User();
  //newUser.setName("myName");
 
  print("I have an object of class User? " + newUser);
  //print("newUser should have name set: " + newUser.getName());
}

and then, the following message in Jetty :
02:26:32.723 WARN!! Error for /test-flow/
java.lang.NoClassDefFoundError: org/apache/User (wrong name: User)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
	(and so on...)

It's quite bizarre because if I try with a wrong path:
var newUser = new Packages.org.ape.User();

I've got an error throwed trough the browser 

file:/opt/cocoon-2.1.5/build/webapp/test-flow/flow.js", line 6: uncaught
JavaScript exception: at myfunction
(file:/opt/cocoon-2.1.5/build/webapp/test-flow/flow.js, Line 6): Class
not found: org.ape.User

So, this means that there is a 2 times processing nd the last one gives
problems (in my case).

If anyone has an explanation through this process and the way to resolve
my problem.......

regards,
Stephane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message