[Management, JMX/JBoss] - Uisng Twiddle in the cron job
by youareapkman
Hi all,
I donât know if the questions of Twiddle should be posted in this forum. Please kindly inform me if I posted in the incorrect forum.
My problem is about using twiddle in the cron job. When testing the following command in the command line, it runs successfully.
[root@host]$ /u01/app/jboss/bin/twiddle.sh --server=jnp://server.name:1199 get "jboss.system:service=ThreadPool" "QueueSize"
| QueueSize=0
But when I run the same command in the cron job, it gives me the following error:
12:34:02,355 ERROR [Twiddle] Exec failed
| org.jboss.util.NestedRuntimeException: Can't find property: java.naming.factory.initial; - nested throwable: (javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial)
| at org.jboss.console.twiddle.Twiddle$1.getServer() (Unknown Source)
| at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer() (Unknown Source)
| at org.jboss.console.twiddle.command.GetCommand.execute(java.lang.String[]) (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.main(java.lang.String[]) (Unknown Source)
| Caused by: javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
| at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.getDefaultInitCtx() (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.lookup(java.lang.String) (/usr/lib64/libgcj.so.5.0.0)
| at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection() (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.connect() (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.access$300(org.jboss.console.twiddle.Twiddle) (Unknown Source)
| at org.jboss.console.twiddle.Twiddle$1.getServer() (Unknown Source)
| ...3 more
|
I know that the cron job will run in a totally different environment than the environment the user logged into the shell, so is this issue due to the environmental variables of the Java and JBoss? I have already correctly set the JAVA_HOME, PATH environmental variables inside the script. What other environmental variables that I need to set when using the twiddle in the cron job environment.
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180209#4180209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180209
17 years, 9 months
[Beginners Corner] - Uisng Twiddle in the cron job
by youareapkman
Hi all,
I donât know if the questions of Twiddle should be posted in this forum. Please kindly inform me if I posted in the incorrect forum.
My problem is about using twiddle in the cron job. When testing the following command in the command line, it runs successfully.
[root@host]$ /u01/app/jboss/bin/twiddle.sh --server=jnp://server.name:1199 get "jboss.system:service=ThreadPool" "QueueSize"
| QueueSize=0
But when I run the same command in the cron job, it gives me the following error:
12:34:02,355 ERROR [Twiddle] Exec failed
| org.jboss.util.NestedRuntimeException: Can't find property: java.naming.factory.initial; - nested throwable: (javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial)
| at org.jboss.console.twiddle.Twiddle$1.getServer() (Unknown Source)
| at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer() (Unknown Source)
| at org.jboss.console.twiddle.command.GetCommand.execute(java.lang.String[]) (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.main(java.lang.String[]) (Unknown Source)
| Caused by: javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
| at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.getDefaultInitCtx() (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/usr/lib64/libgcj.so.5.0.0)
| at javax.naming.InitialContext.lookup(java.lang.String) (/usr/lib64/libgcj.so.5.0.0)
| at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection() (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.connect() (Unknown Source)
| at org.jboss.console.twiddle.Twiddle.access$300(org.jboss.console.twiddle.Twiddle) (Unknown Source)
| at org.jboss.console.twiddle.Twiddle$1.getServer() (Unknown Source)
| ...3 more
|
I know that the cron job will run in a totally different environment than the environment the user logged into the shell, so is this issue due to the environmental variables of the Java and JBoss? I have already correctly set the JAVA_HOME, PATH environmental variables inside the script. What other environmental variables that I need to set when using the twiddle in the cron job environment.
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180207#4180207
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180207
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Singleton mbean
by roelof
hi
we are currently running a very old version of jboss (4.0.2). in the process of migrating/upgrading to jboss 5.0 i've run into a problem related to a Singleton mbean.
the error is:
java.lang.IllegalStateException: HAPartition property must be set before starting HAServiceMBeanSupport
the relevant descriptor:
| <!-- Singleton Connection Controller -->
| <mbean code="za.co.mtn.usa.service.protocol.ConnectionController"
| name="mtn_usa.system:service=ConnectionController"
| xmbean-dd="resource:usa_xmbean_ConnectionController.xml">
| <depends>HAPartition</depends>
| <property name="HAPartition"><inject bean="HAPartition"/></property>
| </mbean>
|
| <!-- Singleton controller for the ConnectionController -->
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="mtn_usa.system:service=ConnectionController,controller=Singleton">
| <property name="HAPartition"><inject bean="HAPartition"/></property>
| <depends optional-attribute-name="TargetName">
| mtn_usa.system:service=ConnectionController
| </depends>
| <attribute name="TargetStartMethod">startSingleton</attribute>
| <attribute name="TargetStopMethod">stopSingleton</attribute>
| </mbean>
|
i also looked at the example in the docs:
http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Se...
that unfortunately resulted in the same error. has anyone run into this? any idea what can be done to resolve the problem?
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180206#4180206
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180206
17 years, 9 months
[JBossWS] - Username token is not interoperable with gSOAP client
by navin_bhat
Environment:JBOSS AS 4.2.3,JBoss-native-3.0.3,JDK 5 update 15,Windows XP SP2,Eclipse 3.3.x.
Description :
I generated service code from wsdl using wsconsume (contract first approach). I wrote the service skeleton code as a stateless EJB.I enabled WS-Security features as described in the user guide using the following two annotations.
//Enable the login module to verify the user name and password
@SecurityDomain("JBossWSDigest")
//Enable the WS_Security modules
@EndpointConfig(configName ="Standard WSSecurity Endpoint")
I deployed the service in JBoss Application server 4.2.3. The client is written in gSOAP framework (Running on linux) generated from the same wsdl file.WS-Security is enabled in the gSOAP client.When the gSOAP client sends a request, the JBoss service throws an exception, the stack trace is shown below.Let me know if more details are required to debug the issue.
NOTE: The same JBoss service works fine with JBoss client with the same setup as gSOAP client.
Stacktrace:
11:54:42,538 INFO [ReceiveUsernameOperation] Username: PDC
11:54:42,538 INFO [ReceiveUsernameOperation] Password: welcome
11:54:43,226 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
javax.ejb.EJBAccessException: Authentication failure
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:68)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:70)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:219)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:476)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180204#4180204
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180204
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Problem Regarding hsqldb-ds.xml
by sachin.parnami
Hi All,
I have a problem related to hsqldb-ds.xml
when i uncomment below mention tag from hsqldb-ds.xml file, which says
For totally in-memory db, not saved when jboss stops.
does it means that data would not remain in permanent memory?
like if restart server data will be lost?
| For totally in-memory db, not saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
| <connection-url>jdbc:hsqldb:.</connection-url>
|
and i comment this tag too
| <!-- For in-process persistent db, saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
|
| <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
| -->
|
if it is, it does nothing data remains in memory when i restart server :)
and i get problem while fatching the data using some application code.
Any clue about it
Regards,
Sachin Parnami
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180203#4180203
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180203
17 years, 9 months
[EJB 3.0] - How to access EntityManager in a Thread run() method?
by jboss_raikankas
Hi,
I have got an Enterprise project with an EJB3, I am starting a Thread in a @Stateless bean but when I try to use my EJB3 EntityManager I get below exception.
How can I access from inside the Thread to my EntityManager?
:01:35,812 ERROR [STDERR] Exception in thread "Thread-15"
20:01:35,812 ERROR [STDERR] java.lang.NullPointerException
20:01:35,812 ERROR [STDERR] at org.jboss.ejb3.entity.ManagedEntityManagerFactory.getNonTxEntityManager(ManagedEntityManagerFactory.java:59)
20:01:35,812 ERROR [STDERR] at org.jboss.ejb3.entity.ManagedEntityManagerFactory.getTransactionScopedEntityManager(ManagedEntityManagerFactory.java:164)
20:01:35,812 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:132)
20:01:35,812 ERROR [STDERR] at com.indra.localiza.ejb.modules.controlledtags.TagsControllerThread.run(TagsControllerThread.java:59)
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180202#4180202
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180202
17 years, 9 months
[JBoss Messaging] - Re: Takes much time to Startup - 1.4.0.SP3
by Craig2007
OK i will consider ur option(changing those paging values) also.
In the meantime we have tested a scenario...We did not change any Paging parameters value for this test.
FYI....
With our Prod Environment setup, it took around 20 to 30 minutes for the JBM to get started.We also observed that while starting up,all those DDL and DML statements specified in the XXX-persistence-service.xml were getting executed and also we have noted some updates/indexes mentioned in xml file were being recreated for all those millions and million of messages.
If we have make that flag false, server starts up pretty fast...
So my question wud be .....
Once the initial set of tables are created, can this flag be set to false ? Will it affect the consistency or any other data when the server is restarted(normal shutdown or abnormal shutdown)...
Kindly provide ur valuable suggestion ....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180200#4180200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180200
17 years, 9 months