Put a class file into the Confluence
Asked by Pangianto Pang:

Hi all,

I have this class file that i have put into the directory below:

"atlassian-confluence-4.2.8/confluence/WEB-INF/classes/com/atlassian/configurable/ SMAunthenticator.class".

i think it is an authentication class and so i change the seraph-config.xml to this

\<security-config\>

-----

\<!-- Default Confluence authenticator, which uses the configured user management for authentication. --\>

\<authenticator class="com.atlassian.configurable.SMAunthenticator"/\>

-----

\</security-config\>

I shutdown the confluence service before i put in the class file and start after i think i am done.

However it is not working, here is the log file:

2012-07-24 09:43:11,665 ERROR \[main\] \[ContainerBase.\[Standalone\].\[localhost\].\[/\]\] log Exception starting filter security

java.lang.ClassFormatError: Unknown constant tag 32 in class file com/atlassian/configurable/SMAunthenticator

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:791)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)

at com.opensymphony.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:96)

at com.atlassian.seraph.config.SecurityConfigImpl.configureClass(SecurityConfigImpl.java:273)

at com.atlassian.seraph.config.SecurityConfigImpl.configureAuthenticator(SecurityConfigImpl.java:215)

at com.atlassian.seraph.config.SecurityConfigImpl.\<init\>(SecurityConfigImpl.java:159)

at com.atlassian.seraph.config.SecurityConfigFactory.loadInstance(SecurityConfigFactory.java:56)

at com.atlassian.seraph.config.SecurityConfigFactory.getInstance(SecurityConfigFactory.java:39)

at com.atlassian.seraph.filter.SecurityFilter.init(SecurityFilter.java:49)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)

at org.apache.catalina.core.ApplicationFilterConfig.\<init\>(ApplicationFilterConfig.java:115)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)

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

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

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

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)  
i think it could not find the class file that i have put in. Can somebody help me?


Answers:
author: Harry Chan
body: It's definitely found the class file, but there's a runtime error. "Unknown constant tag 32 in class file" You'll need to debug this from the source.