[EJB 3.0] - Re: Problems deploying a service under JBoss
by konstantin.ermakov
After rewriting the service with the @Service, @Management annotations I receive the following exception during the undeploy mechanism:
| 10:43:31,413 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=mypapp.jar,name=MyService,service=EJB3
| java.lang.RuntimeException: javax.management.InstanceNotFoundException: jboss.j2ee:jar=myapp.jar,name=MyService,se
| rvice=EJB3,type=ManagementInterface is not registered.
| at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:159)
| at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.ServiceDelegateWrapper.stopService(ServiceDelegateWrapper.java:118)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy54.stop(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:151)
| at org.jboss.ejb3.JmxKernelAbstraction.uninstall(JmxKernelAbstraction.java:175)
| at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
| at org.jboss.ejb3.Ejb3Module.stopService(Ejb3Module.java:107)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy36.stop(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.stop(EJB3Deployer.java:469)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.stop(DeployerInterceptor.java:122)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:
| 196)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy37.stop(Unknown Source)
| at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy6.undeploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:26
| 3)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
|
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: javax.management.InstanceNotFoundException: jboss.j2ee:jar=myapp5.jar,name=MyService,service=EJB3,type=M
| anagementInterface is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
| at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
| at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:155)
| ... 101 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984455#3984455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984455
19Â years, 6Â months
[Tomcat, HTTPD, Servlets & JSP] - Session corruption and mixing of data across sessions
by varkon
Greetings everyone,
I'm using JBoss 4.0.3sp1 and I have an application packed as an ear file (structure below).
I've recently realized, that when two users(sessions) access the same resources at the same time (servlets and ejbs), it is happens that they get mixed results. For example, user session A sends a request to the server at the same time as user session B. It is very probable that A will get B's response the the opposite.
My EAR's structure is the following:
myApp.ear
|-META-INF
|-ejbs.jar (EJBs)
|-support.jar (various utility classes)
|-hibernate.har (my hibernate files)
|-webapp.war (the web component of my application. Contains /lib)
I've read that my problem might be related to the variable "UseJBossWebLoader" defined in Tomcat's jboss-service.xml, which is set to "true" in my case. I've tried setting it to "false" - just in case that fixes my problem - but afterwards, I would get:
anonymous wrote :
| javax.ejb.EJBException: Unexpected Error
| java.lang.NoClassDefFoundError: com/myapp/web/Controller/MyClass
|
I should also note that I'm using local interfaces to access my EJBs.
I'm sorry if this is not the correct section to post this question, but I could not find one that seemed more appropriate.
I would really appreciate all the help I can get, as this is a really big problem for me...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984454#3984454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984454
19Â years, 6Â months
[JBoss jBPM] - whitespace stripping and newline removal from scripts (or an
by bdumon
Hi,
I've noticed that jBPM trims whitespace and removes newlines from scripts (or any action/delegation XML config).
With scripts, this can be a bit annoying for multiple reasons:
- since there are no separate lines anymore, it makes error reporting by the script engine less readable
- the meaning of things might be changed, e.g. a string like " abc def" will become " abc def".
- single-line comments using "//" are not possible.
I've tracked the cause of this down to the creation of the class Delegation, where an XMLWriter is instantiated using "createCompactFormat" to create the serialized configuration:
XMLWriter xmlWriter = new XMLWriter( stringWriter, OutputFormat.createCompactFormat() );
I don't know if removal of the compact format usage would cause any issues (e.g. other places relying on the whitespace being removed) besides a little bit more whitespace stored in the database, but otherwise I would very much appreciate if it could be removed. Or maybe some attribute could be added to the action element to indicate the whitespace-treatment preference.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984453#3984453
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984453
19Â years, 6Â months
[Management, JMX/JBoss] - Re: auto redeploy dynamic mbean on JBoss restart
by cnsxxx09
Hi,
Are you sure that this setting of default values works?
I have tried deploying the PersistentServiceExample and changing the META-INF/jboss-service.xml file using both suggestions from the Wiki (see the changes I made, below).
In both cases when JBoss restarts and I look in the JMX-Console I see that the value of someString is set to: "I've got the devil inside me"
which of course comes from the definition in the class file.
I would expect that it would have the value: "Test, Test, Test" instead?
Is there a bug? Or did I misunderstand the concept? (I tried with JBoss 4.0.3 and 4.0.5).
Chris
------
I tried this
[attribute access="read-write" getMethod="getSomeString" setMethod="setSomeString"]
[name]SomeString[/name]
[type]java.lang.String[/type]
[descriptors]
[default value="Test, Test, Test"/]
[/descriptors]
[/attribute]
and also this
[attribute access="read-write" getMethod="getSomeString" setMethod="setSomeString"]
[name]SomeString[/name]
[type]java.lang.String[/type]
[value]Test, Test, Test[/value]
[/attribute]
(of course, using correct XML tags)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984451#3984451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984451
19Â years, 6Â months
[EJB/JBoss] - JTA timeout
by storagewanadoo
I'm using JBOSS 4.0.4 and Oracle 10.1. I have tried to set the setTransactionTimeout using context. When the timeout expires I only receive a WARN message and I cann't cancel del conection with Oracle. My data-source:
<xa-datasource>
<jndi-name>XAOracleDS</jndi-name>
<track-connection-by-tx/>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL"> ... </xa-datasource-property>
<xa-datasource-property name="User">...</xa-datasource-property>
<xa-datasource-property name="Password">....</xa-datasource-property>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
<no-tx-separate-pools/>
<set-tx-query-timeout>true</set-tx-query-timeout>
<track-connection-by-tx>true</track-connection-by-tx>
<query-timeout>60</query-timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>Oracle9i</type-mapping>
</xa-datasource>
How could I throw a exception when timeout is fired?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984447#3984447
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984447
19Â years, 6Â months