Main, as the name indicates, is intended to be run from the command line. It is
preferable to create a startup script that starts both your server and jboss in the
standard way. An elegant alternative is to make a ModelMBean to start your server and
add an MLet entry to the jboss jcml config; cf. Sun jmx docs. A gnarly alternative is
to hack a startup class by copying all of jboss Main.java into your main class and
plug in a routine to start your server - not recommended.
chitrapandian wrote:
> Thanks for your answer.. now I got the following exception . Before that, I wanted
>to clarify one thing, in JBoss2.0 the org.jboss.Main comes with empty constructor,
>What are all the arguments passed to Main class,??? because I have written one
>startup java class which starts JBoss server along with our own server. Due to this
>exception My bean are not properly deployed .
>
> Using configuration "default"
> [Info] Java version: 1.3.1,Sun Microsystems Inc.
> [Info] Java VM: Java HotSpot(TM) Client VM 1.3.1-b24,Sun Microsystems Inc.
> [Info] System: Windows 2000 5.0,x86
> [Shutdown] Shutdown hook added
> [Service Control] Registered with server
> [Configuration] Could not create MBean
>DefaultDomain:service=Naming(org.jboss.naming.NamingService)
> [Configuration] javax.management.RuntimeErrorException: Error thrown in the MBean's
>empty constructor
> [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2125)
> [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:509)
> [Configuration] at
>org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:340)
> [Configuration] at
>org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:27
> 1)
> [Configuration] at java.lang.reflect.Method.invoke(Native Method)
> [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> [Configuration] at org.jboss.Main.<init>(Main.java:209)
> [Configuration] at org.jboss.Main$1.run(Main.java:121)
> [Configuration] at java.security.AccessController.doPrivileged(Native Method)
> [Configuration] at org.jboss.Main.main(Main.java:117)
> [Configuration] at
>com.adventnet.nms.ejb.jboss.JbossStarter.startup(JbossStarter.java:31)
> [Configuration] at
>com.adventnet.nms.ejb.jboss.JbossStarter.main(JbossStarter.java:59)
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'com.sun.jdmk.comm.HtmlAdaptorServer'
> [Configuration] Unable to check MBean of type 'org.jbossmq.server.JBossMQService'
> [Configuration] Unable to check MBean of type 'org.jbossmq.server.JBossMQService'
> [Configuration] Unable to check MBean of type 'org.jbossmq.server.JBossMQService'
> [Service Control] Initializing 24 MBeans
> [Webserver] Initializing
> [Webserver] Initialized
> [JNDIView] Initializing
> [JNDIView] Initialized
> [Transaction manager] Initializing
> [Transaction manager] Initialized
> [JAAS Security Manager] Initializing
> [JAAS Security Manager] Initialized
> [JDBC provider] Initializing
> [JDBC provider] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver
> [JDBC provider] Initialized
> [WebNmsDB] Initializing
> [WebNmsDB] Initialized
> [Container factory] Initializing
> [Container factory] Initialized
> [JBossMQ] Initializing
> [JBossMQ] Initialized
> [DefaultJMSProvider] Initializing
> [DefaultJMSProvider] Initialized
> [StdJMSPool] Initializing
> [Service Control] Could not initialize
>DefaultDomain:service=ServerSessionPoolMBean,name=StdJMSPool
> [Service Control] javax.management.RuntimeErrorException: Error thrown in operation
>init
> [Service Control] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1642)
> [Service Control] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> [Service Control] at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
> [Service Control] at java.lang.reflect.Method.invoke(Native Method)
> [Service Control] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> [Service Control] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> [Service Control] at org.jboss.Main.<init>(Main.java:216)
> [Service Control] at org.jboss.Main$1.run(Main.java:121)
> [Service Control] at java.security.AccessController.doPrivileged(Native Method)
> [Service Control] at org.jboss.Main.main(Main.java:117)
> [Service Control] at
>com.adventnet.nms.ejb.jboss.JbossStarter.startup(JbossStarter.java:31)
> [Service Control] at
>com.adventnet.nms.ejb.jboss.JbossStarter.main(JbossStarter.java:59)
>
>
>
>
> Thanks,
>
> Chithuu..
>
>
>
> Fred Loney wrote:
>
>> Check that conf/default/jboss.conf contains an entry:
>>
>> <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
>CODEBASE="../../lib/ext/">
>> <ARG TYPE="java.lang.String" VALUE="../../log/">
>> </MLET>
>>
>> before the FileLogging entry.
>>
>> chitrapandian wrote:
>>
>> > Hi,
>> >
>> > I GOT THE FOLLOWING EXCEPTION WHEN USING JBoss2.2.2,
>> >
>> > jboss.home = E:\JBoss2.2.2\jboss
>> > Using JAAS LoginConfig: file:/E:/JBoss2.2.2/jboss/conf/default/auth.conf
>> > Using configuration "default"
>> > [Info] Java version: 1.3.1,Sun Microsystems Inc.
>> > [Info] Java VM: Java HotSpot(TM) Client VM 1.3.1-b24,Sun Microsystems Inc.
>> > [Info] System: Windows 2000 5.0,x86
>> > [Shutdown] Shutdown hook added
>> > [Service Control] Registered with server
>> > java.io.FileNotFoundException: Unable to identify logging directory!
>> > at org.jboss.logging.FileLogging.openLogFile(FileLogging.java:154)
>> > at org.jboss.logging.FileLogging.preRegister(FileLogging.java:122)
>> > at
>com.sun.management.jmx.MBeanServerImpl.preRegisterInvoker(MBeanServerImpl.java:2245)
>> > at
>com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:765)
>> > at javax.management.loading.MLet.getMBeansFromURL(MLet.java:540)
>> > at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
>> > at org.jboss.Main.<init>(Main.java:187)
>> > at org.jboss.Main$1.run(Main.java:121)
>> > at java.security.AccessController.doPrivileged(Native Method)
>> > at org.jboss.Main.main(Main.java:117)
>> > at com.adventnet.nms.ejb.jboss.JbossStarter.startup(JbossStarter.java:31)
>> > at com.adventnet.nms.ejb.jboss.JbossStarter.main(JbossStarter.java:59)
>> > [Configuration] Could not create MBean
>DefaultDomain:service=Naming(org.jboss.naming.NamingService)
>> > [Configuration] javax.management.RuntimeErrorException: Error thrown in the
>MBean's empty constructor
>> > [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2125)
>> > [Configuration] at
>com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:509)
>> > [Configuration] at
>org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:340)
>> > [Configuration] at
>org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:27
>> >
>> >
>> >
>> > I hava checked that log.properties file is present under log directory. But got
>the exception..
>> >
>> > Thanks,
>> > Chithuu
>>
>> --
>> Fred Loney
>> Spirited Software, Inc.
>> [EMAIL PROTECTED]
>
--
Fred Loney
Spirited Software, Inc.
[EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user