This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Reply locked New topic
Author

NullPointerException

vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
i hav a program to monitor jboss Application server and collect statistics and display in the form of xml.one of my program is AbstractStatsServlet.java,in that program i hav a NullPointerException at the following lines

objectNames = this.preloadObjectNames( server);
System.out.println("server ==="+server);

it display output as server===null

it display only as

<jboss-stats><mbeans /></jboss-stats>

but i need to get something like that

<jboss-stats>
<mbeans>
<domain name="Catalina">
<type name="Server">
<mbean name="Catalina:type=Server" />
</type>
</domain>
<domain name="JMImplementation">
<type name="MBeanRegistry">
<mbean name="JMImplementation:type=MBeanRegistry" />
</type>
<type name="MBeanServerDelegate">
<mbean name="JMImplementation:type=MBeanServerDelegate" />
</type>
<type name="none">
<mbean name="JMImplementation:name=Default,service=LoaderRepository" />
</type>
</domain>
<domain name="jboss">
<type name="HiLo">
<mbean name="jboss:service=KeyGeneratorFactory,type=HiLo" />
</type>
<type name="Service">
<mbean name="jboss:name=SystemProperties,type=Service" />
<mbean name="jboss:name=PropertyEditorManager,type=Service" />
</type>
<type name="UUID">
<mbean name="jboss:service=KeyGeneratorFactory,type=UUID" />
</type>
<type name="http">
<mbean name="jboss:readonly=true,service=invoker,target=Naming,type=http" />
<mbean name="jboss:service=invoker,type=http" />
<mbean name="jboss:service=invoker,target=Naming,type=http" />
</type>
<type name="jrmp">
<mbean name="jboss:service=invoker,type=jrmp" />
</type>
<type name="local">
<mbean name="jboss:service=invoker,type=local" />
</type>
<type name="none">
<mbean name="jboss:service=proxyFactory,target=ClientUserTransactionFactory" />
<mbean name="jboss:service=ClientUserTransaction" />
<mbean name="jboss:service=XidFactory" />
<mbean name="jboss:database=localDB,service=Hypersonic" />
<mbean name="jboss:service=TransactionManager" />
<mbean name="jboss:service=Mail" />
<mbean name="jboss:service=proxyFactory,target=ClientUserTransaction" />
<mbean name="jboss:service=WebService" />
<mbean name="jboss:service=JNDIView" />
<mbean name="jboss:service=AttributePersistenceService" />
<mbean name="jboss:service=Naming" />
</type>
<type name="pooled">
<mbean name="jboss:service=invoker,type=pooled" />
</type>
</domain>
<domain name="jboss.admin">
<type name="none">
<mbean name="jboss.admin:service=PluginManager" />
<mbean name="jboss.admin:service=DeploymentFileRepository" />
</type>
</domain>
<domain name="jboss.alerts">
<type name="none">
<mbean name="jboss.alerts:service=ConsoleAlertListener" />
</type>
</domain>
<domain name="jboss.aop">
<type name="none">
<mbean name="jboss.aop:service=AspectManager" />
<mbean name="jboss.aop:service=AspectDeployer" />
</type>
</domain>
<domain name="jboss.cache">
<type name="none">
<mbean name="jboss.cache:service=InvalidationManager" />
</type>
</domain>
<domain name="jboss.console">
<type name="none">
<mbean name="jboss.console:sar=console-mgr.sar" />
</type>
</domain>
<domain name="jboss.deployer">
<type name="none">
<mbean name="jboss.deployer:service=BSHDeployer" />
</type>
</domain>
<domain name="jboss.deployment">
<type name="DeploymentScanner">
<mbean name="jboss.deployment:flavor=URL,type=DeploymentScanner" />
</type>
</domain>
<domain name="jboss.ejb">
<type name="none">
<mbean name="jboss.ejb:service=EJBTimerService" />
<mbean name="jboss.ejb:persistencePolicy=database,service=EJBTimerService" />
<mbean name="jboss.ejb:retryPolicy=fixedDelay,service=EJBTimerService" />
<mbean name="jboss.ejb:service=EJBDeployer" />
</type>
</domain>
<domain name="jboss.har">
<type name="none">
<mbean name="jboss.har:service=HARDeployer" />
</type>
</domain>
<domain name="jboss.j2ee">
<type name="none">
<mbean name="jboss.j2ee:service=ClientDeployer" />
<mbean name="jboss.j2ee:jndiName=ControllerBean,plugin=pool,service=EJB" />
<mbean name="jboss.j2ee:service=EARDeployment,url='javasrc.ear'" />
<mbean name="jboss.j2ee:service=EARDeployer" />
<mbean name="jboss.j2ee:module=controller.jar,service=EjbModule" />
<mbean name="jboss.j2ee:jndiName=ControllerBean,service=EJB" />
</type>
</domain>
<domain name="jboss.jca">
<type name="none">
<mbean name="jboss.jca:service=CachedConnectionManager" />
<mbean name="jboss.jca:name=DefaultDS,service=ManagedConnectionFactory" />
<mbean name="jboss.jca:name=JmsXA,service=ConnectionFactoryBinding" />
<mbean name="jboss.jca:name=JmsXA,service=ManagedConnectionPool" />
<mbean name="jboss.jca:service=WorkManagerThreadPool" />
<mbean name="jboss.jca:service=ConnectionFactoryDeployer" />
<mbean name="jboss.jca:name=DefaultDS,service=ManagedConnectionPool" />
<mbean name="jboss.jca:service=WorkManager" />
<mbean name="jboss.jca:name=DefaultDS,service=LocalTxCM" />
<mbean name="jboss.jca:name='jboss-xa-jdbc.rar',service=RARDeployment" />
<mbean name="jboss.jca:name=DefaultDS,service=DataSourceBinding" />
<mbean name="jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment" />
<mbean name="jboss.jca:name='jms-ra.rar',service=RARDeployment" />
<mbean name="jboss.jca:name=JmsXA,service=ManagedConnectionFactory" />
<mbean name="jboss.jca:name='mail-ra.rar',service=RARDeployment" />
<mbean name="jboss.jca:name=JmsXA,service=TxCM" />
<mbean name="jboss.jca:service=RARDeployer" />
</type>
</domain>
<domain name="jboss.jdbc">
<type name="none">
<mbean name="jboss.jdbc:service=metadata" />
<mbean name="jboss.jdbc:service=SQLExceptionProcessor" />
<mbean name="jboss.jdbc:datasource=DefaultDS,service=metadata" />
</type>
</domain>
<domain name="jboss.jmx">
<type name="adaptor">
<mbean name="jboss.jmx:name=Invoker,protocol=jrmp,service=proxyFactory,type=adaptor" />
<mbean name="jboss.jmx:name=Invoker,type=adaptor" />
</type>
<type name="none">
<mbean name="jboss.jmx:alias=jmx/rmi/RMIAdaptor" />
</type>
</domain>
<domain name="jboss.management.local">
<type name="none">
<mbean name="jboss.management.local:J2EEApplication=null,J2EEServer=Local,ServiceModule=http-invoker.sar,j2eeType=MBean,name=jboss%3aservice%3dinvoker%2ctarget%3dNaming%2ctype%3dhttp" />
<mbean name="jboss.management.local:J2EEApplication=null,J2EEServer=Local,ServiceModule=jboss-service.xml,j2eeType=MBean,name=jboss%3aservice%3dinvoker%2ctype%3djrmp" />
<mbean name="jboss.management.local:J2EEApplication=null,J2EEServer=Local,ServiceModule=jbossjca-service.xml,j2eeType=MBean,name=jboss.jca%3aservice%3dWorkManagerThreadPool" />
<mbean name="jboss.management.local:J2EEApplication=null,J2EEServer=Local,WebModule=web-console.war,j2eeType=Servlet,name=AOPFolder" />
<mbean name="jboss.management.local:J2EEServer=Local,j2eeType=JVM,name=localhost" />
...
</type>
</domain>
<domain name="jboss.mq">
<type name="HTTP">
<mbean name="jboss.mq:service=InvocationLayer,type=HTTP" />
</type>
<type name="JVM">
<mbean name="jboss.mq:service=InvocationLayer,type=JVM" />
</type>
<type name="UIL">
<mbean name="jboss.mq:service=InvocationLayer,type=UIL" />
</type>
<type name="UIL2">
<mbean name="jboss.mq:alias=UIL2ConnectionFactory,service=InvocationLayer,type=UIL2" />
<mbean name="jboss.mq:service=InvocationLayer,type=UIL2" />
</type>
<type name="UIL2XA">
<mbean name="jboss.mq:alias=UIL2XAConnectionFactory,service=InvocationLayer,type=UIL2XA" />
</type>
<type name="UILXA">
<mbean name="jboss.mq:service=InvocationLayer,type=UILXA" />
</type>
<type name="none">
<mbean name="jboss.mq:service=PersistenceManager" />
<mbean name="jboss.mq:name=JMSProvider,service=JMSProviderLoader" />
<mbean name="jboss.mq:service=MessageCache" />
<mbean name="jboss.mq:name=StdJMSPool,service=ServerSessionPoolMBean" />
<mbean name="jboss.mq:service=StateManager" />
<mbean name="jboss.mq:service=DestinationManager" />
<mbean name="jboss.mq:service=SecurityManager" />
<mbean name="jboss.mq:service=TracingInterceptor" />
<mbean name="jboss.mq:service=Invoker" />
</type>
</domain>
<domain name="jboss.mq.destination">
<type name="none">
<mbean name="jboss.mq.destination:name=A,service=Queue" />
<mbean name="jboss.mq.destination:name=ex,service=Queue" />
<mbean name="jboss.mq.destination:name=testDurableTopic,service=Topic" />
<mbean name="jboss.mq.destination:name=C,service=Queue" />
<mbean name="jboss.mq.destination:name=testTopic,service=Topic" />
<mbean name="jboss.mq.destination:name=testQueue,service=Queue" />
<mbean name="jboss.mq.destination:name=securedTopic,service=Topic" />
<mbean name="jboss.mq.destination:name=B,service=Queue" />
<mbean name="jboss.mq.destination:name=DLQ,service=Queue" />
<mbean name="jboss.mq.destination:name=D,service=Queue" />
</type>
</domain>
<domain name="jboss.rmi">
<type name="RMIClassLoader">
<mbean name="jboss.rmi:type=RMIClassLoader" />
</type>
</domain>
<domain name="jboss.security">
<type name="none">
<mbean name="jboss.security:service=JaasSecurityManager" />
<mbean name="jboss.security:service=SecurityConfig" />
<mbean name="jboss.security:service=XMLLoginConfig" />
</type>
</domain>
<domain name="jboss.system">
<type name="Log4jService">
<mbean name="jboss.system:service=Logging,type=Log4jService" />
</type>
<type name="Server">
<mbean name="jboss.system:type=Server" />
</type>
<type name="ServerConfig">
<mbean name="jboss.system:type=ServerConfig" />
</type>
<type name="ServerInfo">
<mbean name="jboss.system:type=ServerInfo" />
</type>
<type name="none">
<mbean name="jboss.system:service=ServiceDeployer" />
<mbean name="jboss.system:service=ThreadPool" />
<mbean name="jboss.system:service=ServiceController" />
<mbean name="jboss.system:service=MainDeployer" />
<mbean name="jboss.system:service=JARDeployer" />
</type>
</domain>
<domain name="jboss.web">
<type name="Cache">
<mbean name="jboss.web:host=localhost,path=/ws4ee,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/web-console,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/jbossmq-httpil,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/presenter,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/jmx-console,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/invoker,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/javasrc,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/,type=Cache" />
<mbean name="jboss.web:host=localhost,path=/stats,type=Cache" />
</type>
<type name="Connector">
<mbean name="jboss.web:address=0.0.0.0,port=8009,type=Connector" />
<mbean name="jboss.web:address=0.0.0.0,port=8080,type=Connector" />
</type>
<type name="Engine">
<mbean name="jboss.web:type=Engine" />
</type>
<type name="GlobalRequestProcessor">
<mbean name="jboss.web:name=http-0.0.0.0-8080,type=GlobalRequestProcessor" />
<mbean name="jboss.web:name=jk-8009,type=GlobalRequestProcessor" />
</type>
<type name="Host">
<mbean name="jboss.web:host=localhost,type=Host" />
</type>
<type name="JkHandler">
<mbean name="jboss.web:name=channelSocket,type=JkHandler" />
<mbean name="jboss.web:name=request,type=JkHandler" />
</type>
<type name="JkMain">
<mbean name="jboss.web:type=JkMain" />
</type>
<type name="JkWorkerEnv">
<mbean name="jboss.web:type=JkWorkerEnv" />
</type>
<type name="JspMonitor">
<mbean name="jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/javasrc,type=JspMonitor" />
<mbean name="jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/web-console,type=JspMonitor" />
...
</type>
<type name="Manager">
<mbean name="jboss.web:host=localhost,path=/jbossmq-httpil,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/invoker,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/javasrc,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/presenter,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/stats,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/web-console,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/jmx-console,type=Manager" />
<mbean name="jboss.web:host=localhost,path=/ws4ee,type=Manager" />
</type>
<type name="Mapper">
<mbean name="jboss.web:type=Mapper" />
</type>
<type name="Realm">
<mbean name="jboss.web:type=Realm" />
</type>
<type name="RequestProcessor">
<mbean name="jboss.web:name=HttpRequest1,type=RequestProcessor,worker=http-0.0.0.0-8080" />
<mbean name="jboss.web:name=HttpRequest0,type=RequestProcessor,worker=http-0.0.0.0-8080" />
</type>
<type name="Service">
<mbean name="jboss.web:serviceName=jboss.web,type=Service" />
</type>
<type name="ThreadPool">
<mbean name="jboss.web:name=http-0.0.0.0-8080,type=ThreadPool" />
<mbean name="jboss.web:name=jk-8009,type=ThreadPool" />
</type>
<type name="Valve">
<mbean name="jboss.web:host=localhost,name=JaccContextValve,path=/presenter,type=Valve" />
<mbean name="jboss.web:host=localhost,name=JaccContextValve,path=/javasrc,type=Valve" />
<mbean name="jboss.web:host=localhost,name=JaccContextValve,path=/ws4ee,type=Valve" />
...
</type>
<type name="none">
<mbean name="jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/ws4ee,j2eeType=Servlet,name=JBossAxisAdminServlet" />
<mbean name="jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/javasrc,j2eeType=Servlet,name=default" />
...
</type>
<type name="protocolHandler">
<mbean name="jboss.web:className=org.apache.coyote.http11.Http11Protocol,type=protocolHandler" />
<mbean name="jboss.web:className=org.apache.jk.server.JkCoyoteHandler,type=protocolHandler" />
</type>
<type name="server">
<mbean name="jboss.web:type=server" />
</type>
</domain>
<domain name="jboss.web.deployment">
<type name="none">
<mbean name="jboss.web.deployment:id=672780986,war=presenter.war" />
<mbean name="jboss.web.deployment:id=1990264665,war=jbossmq-httpil.war" />
<mbean name="jboss.web.deployment:id=298190781,war=jboss-ws4ee.war" />
<mbean name="jboss.web.deployment:id=-553625679,war=stats.war" />
<mbean name="jboss.web.deployment:id=-1488256652,war=jmx-console.war" />
<mbean name="jboss.web.deployment:id=-1379661791,war=ROOT.war" />
<mbean name="jboss.web.deployment:id=-40527877,war=web-console.war" />
<mbean name="jboss.web.deployment:id=-248429495,war=javasrc.war" />
<mbean name="jboss.web.deployment:id=129900855,war=invoker.war" />
</type>
</domain>
<domain name="jboss.ws4ee">
<type name="none">
<mbean name="jboss.ws4ee:service=ServiceDeployerJSE" />
<mbean name="jboss.ws4ee:service=ServiceClientDeployer" />
<mbean name="jboss.ws4ee:service=ServiceDeployerEJB" />
<mbean name="jboss.ws4ee:service=JAFConfigService" />
<mbean name="jboss.ws4ee:service=AxisService" />
</type>
</domain>
<domain name="jmx.loading">
<type name="none">
<mbean name="jmx.loading:UCL=29d75" />
...
</type>
</domain>
</mbeans>
</jboss-stats>

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10242
    
168

Duplicate of http://www.coderanch.com/t/435383/JBoss/Deployment-error-jboss


[My Blog] [JavaRanch Journal]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: NullPointerException