You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/04/03 16:15:42 UTC

DO NOT REPLY [Bug 46961] New: org.apache.catalina.loader.WebappClassLoader throws exception related to Java 6 Bug 6434149

https://issues.apache.org/bugzilla/show_bug.cgi?id=46961

           Summary: org.apache.catalina.loader.WebappClassLoader throws
                    exception related to Java 6 Bug 6434149
           Product: Tomcat 5
           Version: 5.5.27
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: eduardo.torres-pardo@infor.com


Our application uses JSF. Upon defining navigation with NavigationRuleRule, we
get the exception

WARN  NavigationRuleRule - [NavigationRuleRule]{faces-config/navigation-rule}
Me

rge(*)

java.lang.ClassNotFoundException: [Ljava.lang.String;

        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa

der.java:1352)

        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa

der.java:1198)

        at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja

va:615)

        at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.ja

va:402)

        at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi

stener.java:328)

        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContex

t.java:3729)

        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4

187)

        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)



        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)



        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442

)

        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)


This is due to Java 6 Bug 6434149
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434149)

This link recommends the following actions to solve this bug:

1) Add -Dsun.lang.ClassLoader.allowArraySyntax=true if you want to use a
library for which you don't have the source with JDK6

2) Change loader.loadClass( name ) to Class.forName( name, false, loader ) if
you own the code.

class org.apache.catalina.loader.WebAppClassLoader 
uses this code to load classes:

clazz = loader.loadClass(name);

Can you please change the sections of code where this line is used (1352 and
others) to
clazz =  Class.forName( name, false, loader);

so this problem is solved?

Thanks

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46961] org.apache.catalina.loader.WebappClassLoader throws exception related to Java 6 Bug 6434149

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46961


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-04-09 05:55:57 PST ---
I've fixed this in trunk but won't be proposing it for backport to 6.0.x or
5.5.x. For those versions you can use setenv.sh|bat to configure
-Dsun.lang.ClassLoader.allowArraySyntax=true

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org