Hello-world applet crashes for a basic-authenticated user
Johnny Maine
Greenhorn
Joined: Nov 21, 2011
Posts: 1
posted
0
Hi everybody,
I already posted this question in the Spring forum.
I am stuck with a problem.
A simple Hello-world applet crashes for a basic-authenticated user, but it works fine without authentication.
Please help, where is the error and what are the easiest corrections to make it working?
Thanks a lot in advance.
Johnny Maine.
Here is a detailed description.
Environment:
64-bit Windows 7;
Java - 1.6.0_29;
Eclipse - Indigo Release, Build id: 20110615-0604;
Tomcat - v7.0.20;
Spring - 3.1.0;
Firefox - 10.0a1 (or 3.6.3);
User authentication - basic.
Code:
-------------
home.jsp
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>
<html>
<head>
<title>Home</title>
</head>
<body>
<h1>
Hello world!
</h1>
<P> The time on the server is ${serverTime}. </P>
<a href="<c:out value="resources/tst-appl.jsp"/>">appl-test</a>
</body>
</html>
------------
HomeController.java
package com.myfirm.mysystem;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model) {
logger.info("Welcome home! the client locale is "+ locale.toString());
Date date = new Date();
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
String formattedDate = dateFormat.format(date);
model.addAttribute("serverTime", formattedDate );
return "home";
}
}
Java Plug-in 1.6.0_29
Using JRE version 1.6.0_29-b11 Java HotSpot(TM) 64-Bit Server VM
User home directory = C:\Users\me
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
security: Accessing keys and certificate in Mozilla user profile: null
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@606f8b2b
basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/spring-mvc/resources/MyAppl.jar network: Cache entry not found [url: http://localhost:8080/spring-mvc/resources/com/myfirm/mysystem/MyAppl.class, version: null]
network: Connecting http://localhost:8080/spring-mvc/resources/com/myfirm/mysystem/MyAppl.class with proxy=DIRECT
network: Connecting http://localhost:8080/ with proxy=DIRECT
network: Server http://localhost:8080/spring-mvc/resources/com/myfirm/mysystem/MyAppl.class requesting to set-cookie with "JSESSIONID=99A8F94DB72AA4C1F49EF71070468B58; Path=/spring-mvc/; HttpOnly"
network: Cache entry not found [url: http://localhost:8080/spring-mvc/spring_security_login;jsessionid=99A8F94DB72AA4C1F49EF71070468B58, version: null]
network: Connecting http://localhost:8080/spring-mvc/spring_security_login;jsessionid=99A8F94DB72AA4C1F49EF71070468B58 with proxy=DIRECT
network: Connecting http://localhost:8080/ with proxy=DIRECT
basic: error: Incompatible magic value 1013478509 in class file com/myfirm/mysystem/MyAppl.
java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/myfirm/mysystem/MyAppl
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/myfirm/mysystem/MyAppl
Ignored exception: java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file com/myfirm/mysystem/MyAppl
subject: Hello-world applet crashes for a basic-authenticated user