[JBoss AS7 Development] - HttpSession in JBoss 7 issue
by Satinder Singh
Satinder Singh [http://community.jboss.org/people/satinder_2000] created the discussion
"HttpSession in JBoss 7 issue"
To view the discussion, visit: http://community.jboss.org/message/616898#616898
--------------------------------------------------------------
I set an attribute in an HttpSession (in Servlet) and tried to read the same in the subsequent Servlet call. But the session returns a null value for the parameter. Am I missing something? The same code works fine in JBoss 6 and Glassfish.
The simple code is as below:
String mode=request.getParameter("mode");
String message=null;
if (mode.equals("1")){
HttpSession session=request.getSession(true);
session.setAttribute("SOMEPARAM", "SOMEVAL");
message="Value set in session "+session.getAttribute("SOMEPARAM");
}else if (mode.equals("2")){
HttpSession session=request.getSession(true);
message="Value read from session "+session.getAttribute("SOMEPARAM");
}
PrintWriter pw=response.getWriter();
pw.print("<html><head><title>Test Session</title></head><body><h1>"+message+"</h1>");
pw.print("</body></html>");
pw.flush();
And a very simple JSP to invoke this
<p><a href="/TestJBoss/TestServlet?mode=1">Write to Session</a></p>
<p><a href="/TestJBoss/TestServlet?mode=2">Read from Session</a></p>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616898#616898]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 8 months
[JBoss AS7 Development] - DuplicateServiceException on JMS
by Baljit Singh
Baljit Singh [http://community.jboss.org/people/mrbaljit] created the discussion
"DuplicateServiceException on JMS"
To view the discussion, visit: http://community.jboss.org/message/616884#616884
--------------------------------------------------------------
Hi ,
I am using <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> to configure activemq queues. During server startup, I am getting
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.connector.connection-factory.java:/jms/mopsQueueConnectionFactory2 *is already registered*
More Error Info :
11:41:12,431 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.raxml.activemq-rar: org.jboss.msc.service.StartException in service jboss.raxml.activemq-rar: org.jboss.msc.service.StartException in anonymous service: Failed to start RA deployment [activemq-rar]
at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:106)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: org.jboss.msc.service.StartException in anonymous service: Failed to start RA deployment [activemq-rar]
at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:98)
... 5 more
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/C:/Temp/jboss-as-7.0.0.Final/standalone/deployments/activemq-rar.rar/
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1778)
at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:140)
at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:96)
... 5 more
*Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.connector.connection-factory.java:/jms/mopsQueueConnectionFactory2 is already registered*
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154)
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:226)
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2194)
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307)
at org.jboss.as.connector.metadata.deployment.AbstractResourceAdapterDeploymentService$AbstractAS7RaDeployer.bindConnectionFactory(AbstractResourceAdapterDeploymentService.java:229)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1563)
... 7 more
11:41:12,478 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "activemq-rar.rar" was rolled back with failure message {"Failed services" => {"jboss.raxml.activemq-rar" => "org.jboss.msc.service.StartException in service jboss.raxml.activemq-rar: org.jboss.msc.service.StartException in anonymous service: Failed to start RA deployment [activemq-rar]"}}
Thanks
Baljit
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616884#616884]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 8 months
Re: [jboss-dev-forums] [JBoss AS7 Development] - Remote EJB lookup and invocation in JBoss AS 7.0.0
by Mohan Potturi
Mohan Potturi [http://community.jboss.org/people/mohanpotturi] commented on the document
"Remote EJB lookup and invocation in JBoss AS 7.0.0"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16994#comment-7107
--------------------------------------------------
Alright Kabir, I need your help here. When I try to lookup my EJB, I get this error. Looks like rmi doesn't exist in the context. Please look at the bold items in the stack trace.
08:57:26,886 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deploym
ent.subunit."infolinkApp.ear"."infolink-ejb.jar".component.ApplicationStartupBean.START: org.jboss.msc.service.StartExce
ption in service jboss.deployment.subunit."infolinkApp.ear"."infolink-ejb.jar".component.ApplicationStartupBean.START: F
ailed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1786)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
Caused by: java.lang.IllegalStateException: Failed to construct component instance
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:153)
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:76)
at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:110)
at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:123)
at org.jboss.as.ee.component.ComponentStartService.start(ComponentStartService.java:44)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
... 4 more
Caused by: javax.ejb.EJBException: Unexpected Error
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:201)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:421)
at org.jboss.as.ejb3.tx.SingletonLifecycleCMTTxInterceptor.processInvocation(SingletonLifecycleCMTTxInterceptor.
java:60)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:151)
... 9 more
Caused by: java.lang.ExceptionInInitializerError
at com.crown.infolink.model.user.UserDAOImpl.populateUser(UserDAOImpl.java:6593)
at com.crown.infolink.model.user.UserDAOImpl.retrieveUserById(UserDAOImpl.java:1921)
at com.crown.infolink.model.user.UserDAOImpl.retrieveUserById(UserDAOImpl.java:1891)
at com.crown.infolink.business.user.UserQuery.getSystemUser(UserQuery.java:211)
at com.crown.infolink.ejb.startup.ApplicationStartupBean.startup(ApplicationStartupBean.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecy
cleMethodInterceptor.java:69)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.as.ee.component.ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationCo
ntextInterceptor.java:67)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:370)
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:271)
... 16 more
*Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Cannot obtain MBeanServerConnection to: service:*
*jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi*
* at org.jboss.as.remote.jmx.client.Client.lookup(Client.java:83)*
at com.crown.infolink.util.TimeZoneTableUtil.downloadDatabaseEJB(TimeZoneTableUtil.java:190)
at com.crown.infolink.util.TimeZoneTableUtil.populateTimezoneMap(TimeZoneTableUtil.java:57)
at com.crown.infolink.util.TimeZoneTableUtil.<clinit>(TimeZoneTableUtil.java:43)
... 39 more
Caused by: java.lang.IllegalStateException: Cannot obtain MBeanServerConnection to: service:jmx:rmi:///jndi/rmi://localh
ost:1090/jmxrmi
at org.jboss.as.remote.jmx.client.Client.getConnection(Client.java:122)
at org.jboss.as.remote.jmx.client.Client.lookup(Client.java:73)
... 42 more
*Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: Name 'rmi:' not f*
*ound in context ''*
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338) [:1.6.0_22]
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248) [:1.6.0_22]
at org.jboss.as.remote.jmx.client.Client.getConnection(Client.java:118)
... 43 more
*Caused by: javax.naming.NameNotFoundException: Name 'rmi:' not found in context ''*
at org.jboss.as.naming.util.NamingUtils.nameNotFoundException(NamingUtils.java:109)
at org.jboss.as.naming.InMemoryNamingStore$NodeTraversingVisitor.visit(InMemoryNamingStore.java:368)
at org.jboss.as.naming.InMemoryNamingStore$ContextNode.accept(InMemoryNamingStore.java:307)
at org.jboss.as.naming.InMemoryNamingStore.lookup(InMemoryNamingStore.java:162)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:173)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_22]
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886) [:1.6.0_22]
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856) [:1.6.0_22]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257) [:1.6.0_22]
... 45 more
--------------------------------------------------
12 years, 8 months
[JBoss AS7 Development] - Migrating from jboss4 to jboss7(missing dependencies)
by Divya Chekuri
Divya Chekuri [http://community.jboss.org/people/dchekuri] created the discussion
"Migrating from jboss4 to jboss7(missing dependencies)"
To view the discussion, visit: http://community.jboss.org/message/616407#616407
--------------------------------------------------------------
Hi,
I'm trying to setup an informix datasource in jboss7 but it fails with the following message:
New missing/unsatisfied dependencies:
service jboss.jdbc-driver.informix (missing)
My modules.xml is defined as:
<module xmlns="urn:jboss:module:1.0" name="IfxDriverDB">
<resources>
<resource-root path="ifxjdbc.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
Datasource in standalone.xml is defined as:
<datasource jndi-name="java:DataSource" enabled="true" use-java-context="true" pool-name="DataSource">
<connection-url>my-connection-url</connection-url>
<driver>Informix</driver>
<pool>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
</pool>
<security>
<user-name>user</user-name>
<password>password</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<useFastFail>false</useFastFail>
</validation>
<timeout></timeout>
<statement></statement>
</datasource>
<drivers>
<driver name="Informix" module="IfxDriverDB">
<xa-datasource-class>com.informix.jdbc.IfxDriver</xa-datasource-class>
</driver>
</drivers>
</datasources>
Can anyone please let me know where I am going wrong.
I made sure that there is no space in the first line in modules.xml(read in another thread that the space may cause problem)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616407#616407]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 8 months