[Installation, Configuration & DEPLOYMENT] - Getting java.lang.NoSuchFieldError: TRACE on initial startup
by caspersgrin
Hi,
I downloaded jboss-4.2.1.GA.zip (community edition) and unzipped it into /usr/local. I also purchased a copy of JBoss 4.0 The Official Guide (I realize the book was written for 4.0 and I've installed 4.2). Following the instruction in the book, after unzipping, go to the bin directory and run run.sh to make sure JBoss starts up without generating exception errors. It doesn't. What has gone wrong or what additional steps are required to eliminate the errors?
Here's the complete stack trace:
[root@beowulf bin]# ./run.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/local/jboss-4.2.1.GA
JAVA: /usr/java/jdk1.5.0_08/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
CLASSPATH: /usr/local/jboss-4.2.1.GA/bin/run.jar:/usr/java/jdk1.5.0_08/lib/tools.jar
=========================================================================
09:27:41,895 WARN [Server] Caught Throwable Error, this probably means we've already set the URLStreamHAndlerFactory before
09:27:41,899 INFO [Server] Starting JBoss (MX MicroKernel)...
09:27:41,899 INFO [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)
09:27:41,900 INFO [Server] Home Dir: /usr/local/jboss-4.2.1.GA
09:27:41,901 INFO [Server] Home URL: file:/usr/local/jboss-4.2.1.GA/
09:27:41,902 INFO [Server] Patch URL: null
09:27:41,902 INFO [Server] Server Name: default
09:27:41,903 INFO [Server] Server Home Dir: /usr/local/jboss-4.2.1.GA/server/default
09:27:41,903 INFO [Server] Server Home URL: file:/usr/local/jboss-4.2.1.GA/server/default/
09:27:41,903 INFO [Server] Server Log Dir: /usr/local/jboss-4.2.1.GA/server/default/log
09:27:41,903 INFO [Server] Server Temp Dir: /usr/local/jboss-4.2.1.GA/server/default/tmp
09:27:41,904 INFO [Server] Root Deployment Filename: jboss-service.xml
09:27:42,093 WARN [BasicMBeanRegistry] preRegister() failed for JMImplementation:type=MBeanServerDelegate:
java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jboss.mx.server.AbstractMBeanInvoker.initAttributeContexts(AbstractMBeanInvoker.java:1009)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.initAttributeContexts(ModelMBeanInvoker.java:597)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:647)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:215)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:71)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:420)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Failed to boot JBoss:
java.lang.RuntimeException: Cannot create MBeanServer
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:239)
at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:71)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:316)
at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:219)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:420)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.management.NotCompliantMBeanException: Cannot register MBean: JMImplementation:type=MBeanServerDelegate
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:314)
at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:215)
... 8 more
Caused by: javax.management.RuntimeErrorException
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:725)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
... 9 more
Caused by: java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jboss.mx.server.AbstractMBeanInvoker.initAttributeContexts(AbstractMBeanInvoker.java:1009)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.initAttributeContexts(ModelMBeanInvoker.java:597)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:647)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
... 10 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088515#4088515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088515
18 years, 7 months
[JBoss Portal] - Re: Calling JAAS
by NM-156
cpage - I too have a custom LoginModule involved here. I backtracked a little and the problem appears to be with my LoginModule.
Try deactivating your valve temporarily. Leave your LoginModule active, and see if you get the same results when you try the Dashboard link after login.
I vertified this by deactivating my valve first, then I activated my LoginModule (only). My LoginModule extends AbstractServerLoginModule. Here is the overridden getRoleSets() method (getIdentity() simply returns a Principal created with the login name). Anybody know what could be causing the 403 error on the dashboard link? Admin and Logout links still work fine. Thanks.
| protected Group[] getRoleSets() throws LoginException
| {
| logger.info("%%%%% - CALLING LoginModule.getRoleSets() method from PORTAL %%%%%");
|
| Group rolesGroup = new SimpleGroup("Roles");
| rolesGroup.addMember(new SimplePrincipal("Authenticated")); // Must add authenticated principle
| rolesGroup.addMember(new SimplePrincipal("Users")); // Gives user Users rites (Test)
| rolesGroup.addMember(new SimplePrincipal("Admin")); // Gives user Administrators rites (Test)
| rolesGroup.addMember(new SimplePrincipal("testrole")); // Custom test role
|
| // Note that the identity needs to exist as a user account inside the portal prior to login
|
| rolesGroup.addMember(getIdentity()); // Add login identity as role (Test)
|
| return new Group[] { rolesGroup };
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088514#4088514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088514
18 years, 7 months