-
1. Re: Frustration has set in. Need assistance.
jaikiran Feb 9, 2012 3:03 AM (in response to cbroussard)Please post the entire exception stacktrace. Also which exact version of JBoss AS6 are you using?
P.S: AS6 and previous versions of JBoss AS are no longer in development. AS7 is the latest version available and actively developed. 7.1.0.Final is being released very soon.
-
2. Re: Frustration has set in. Need assistance.
cbroussard Feb 9, 2012 3:21 AM (in response to jaikiran)Hi Jaikiran,
Thank you for taking the time to respond. Here's the information you requested:
02:12:19,154 ERROR [STDERR] javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
02:12:19,155 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:223)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialContext.java:175)
02:12:19,155 ERROR [STDERR] at com.frostylabs.es.jmx.jboss.bindings.client.impl.LocalClientImpl.getContext(LocalClientImpl.java:23)
in
server/%name%/conf/jboss-service.xml i have
<classpath codebase="${jboss.server.lib.url}" archives="*"/>
<classpath codebase="${jboss.common.lib.url}" archives="*"/>
<classpath codebase="${jboss.server.lib.url}/lightedworks" archives="*"/>
inside lightedworks folder i have a couple jars i've created that house the Valve Code and jmx bindings code. This is the location that I attempted to put all the client jars.
Any ideas?
Thanks,
Chris
[edit]
ps.. forgot to say.. i'm on JBossAS [6.0.0.Final "Neo"]
-
3. Re: Frustration has set in. Need assistance.
jaikiran Feb 9, 2012 4:46 AM (in response to cbroussard)Chris Broussard wrote:
02:12:19,154 ERROR [STDERR] javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
02:12:19,155 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:223)
02:12:19,155 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialContext.java:175)
02:12:19,155 ERROR [STDERR] at com.frostylabs.es.jmx.jboss.bindings.client.impl.LocalClientImpl.getContext(LocalClientImpl.java:23)
in
Is that exception on the server side? Also, I think that's not the complete stacktrace, can you please post the full one.
Chris Broussard wrote:
server/%name%/conf/jboss-service.xml i have
<classpath codebase="${jboss.server.lib.url}" archives="*"/>
<classpath codebase="${jboss.common.lib.url}" archives="*"/>
<classpath codebase="${jboss.server.lib.url}/lightedworks" archives="*"/>
inside lightedworks folder i have a couple jars i've created that house the Valve Code and jmx bindings code. This is the location that I attempted to put all the client jars.
I don't think you would need all that. I would recommend that you not change the jboss-service.xml and instead just place your jars in the JBOSS_HOME/server/<servername>/lib folder directly or maybe in JBOSS_HOME/common/lib depending on how you want to distribute it.
-
4. Re: Frustration has set in. Need assistance.
cbroussard Feb 9, 2012 6:56 PM (in response to jaikiran)Hi Jaikiran,
Just got home from work.. Sorry I didn't include the entire stack originally. Here it is:
17:38:56,283 INFO [STDOUT] com.lightedworks.sso.agent.SimpleSessionCatalinaValve DEBUG begin invoked.
17:38:56,303 ERROR [STDERR] javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
17:38:56,304 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
17:38:56,304 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
17:38:56,304 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:223)
17:38:56,305 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialContext.java:175)
17:38:56,305 ERROR [STDERR] at com.frostylabs.es.jmx.jboss.bindings.client.impl.ProtectionRuleClientImpl.getRule(ProtectionRuleClientImpl.java:42)
17:38:56,305 ERROR [STDERR] at com.lightedworks.sso.agent.ProtectionRulesProcessor.initialize(ProtectionRulesProcessor.java:39)
17:38:56,305 ERROR [STDERR] at com.lightedworks.sso.agent.SimpleSessionCatalinaValve.initialize(SimpleSessionCatalinaValve.java:207)
17:38:56,305 ERROR [STDERR] at com.lightedworks.sso.agent.SimpleSessionCatalinaValve.invoke(SimpleSessionCatalinaValve.java:142)
17:38:56,306 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:38:56,306 ERROR [STDERR] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
17:38:56,306 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
17:38:56,306 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
17:38:56,306 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
17:38:56,307 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
17:38:56,307 ERROR [STDERR] at java.lang.Thread.run(Thread.java:680)
17:38:56,307 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
17:38:56,307 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
17:38:56,307 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
17:38:56,308 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
17:38:56,308 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
17:38:56,308 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
17:38:56,308 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
17:38:56,308 ERROR [STDERR] at java.lang.Class.forName(Class.java:247)
17:38:56,309 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
17:38:56,309 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
17:38:56,309 ERROR [STDERR] ... 14 more
17:38:56,315 INFO [STDOUT] initialize
The exception happens from the catalina valve. I'm trying to make jmx call to retrieve some configuration data out of the management bean.
any ideas?
again much appreciation for your time and effort on this.
Chris
-
5. Re: Frustration has set in. Need assistance.
fabrizio.benedetti Feb 10, 2012 4:47 AM (in response to cbroussard)It is a strange behaviour.
Anyway I think you don't need to make a JNDI lookup to get local MBeanServerConnection.
Try this:
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
Regards
/Fabrizio
-
6. Re: Frustration has set in. Need assistance.
cbroussard Feb 11, 2012 12:15 PM (in response to fabrizio.benedetti)Hi Fabrizio!
That worked!! I got further... Still trying to isolate the container error... But when you said 'It is a strange behavior' you are talking about ClassNotFoundException or something else?
Thanks!
Chris
-
7. Re: Frustration has set in. Need assistance.
fabrizio.benedetti Feb 11, 2012 1:28 PM (in response to cbroussard)Happy for you.
Yes, about ClassNotFoundException. Class org.jnp.interfaces.NamingContextFactory should be always available, also for tomcat valves. Problably your valve runs in a different classloader.
I would follow Jaikiran's advice, with a clean jboss installation and putting your jars only in JBOSS_HOME/server/<servername>/lib folder.
Anyway JNDI lookup is needed only when you want to retrieve remote MBeanServerConnection.
Regards
/Fabrizio