[Beginners Corner] - Logging problems wtih jboss 4.0.4.GA / console hanging
by MmarcoM
hi all,
i am deploying my .ear application in jboss 4.0.4.GA
i encountered problems with logging big time, found out htat jboss configures alredy its log4j properties..... so i added this code into my logger ..
| if(System.getProperty("log4j.configuration") == null) {
| ... configure my logger
|
things seems to work just fine, except for the fact thatn whenever in my BusinessDelegate i am trying to create an EJB from the home, i always get back this painful code and server hangs..
now i m not sure of why.....
for example, this code
| ServiceLocator locator = ServiceLocator.getInstance();
| log.debug("Finding home..");
| Object obj = locator.getLocalHome(
| MWJNDINames.DLFMAINTENANCE_SESSION_LOCAL_HOME);
| log.debug(".. got object from lookup.. it is:" + obj.getClass().getName());
| DLFMaintenanceSessionLocalHome home = (DLFMaintenanceSessionLocalHome)obj;
|
| log.debug("Creating ejb..");
| dlfMaintenance = home.create();
| log.debug("..ejb created....");
|
never arrives to display ..ejb created..
and it does not even throw any exception...
can anyone help me out? i cant see from console what is happening....and not even logs say anything..
thanks in advacne and regards
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974840#3974840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974840
19 years, 6 months
[Security & JAAS/JBoss] - Subject Propagation in JBoss
by sreeraaman
I am working with myeclipse and jboss. I have created a custom login module. All classes related to the custom login module have been packaged as a java jar file and made the jar file as a java jar dependent project so that both the web and ejb modules can use the class files present in the package.
After configuring jaas in jboss and after successful authentication at the web tier, when I try to make a call to an EJB, the authenticated subject is not getting propagated from the web tier to the ejb tier.
After successful login at the web tier, when I check the SecurityAssociation class, I get the following output with the following command:
System.out.println(SecurityAssociation.getSubject();
16:51:54,479 INFO [STDOUT] Subject:
Principal: sgopalan
Principal: Roles(members:Recruiters)
However, when I make a call to a stateless session bean, it throws the following exception:
Caused by: java.lang.SecurityException: Insufficient method permissions, principal=null, ejbName=KRLMTest, method=HiringManagerMethod, interface=LOCAL, requiredRoles=[Recruiters], principalRoles=[].
I have a custom login module which extends the LdapLoginModule. For security propagation purposes, I have used the ClientLoginModule.
The ClientLoginModule's flag is set as required and the customLoginModule's flag is set as optional.
I thought it could be a problem with the dependant java jar and subsequently, moved the classes to the ejb module. But, still I was not able to get this thing working.
The version of JBOSS I am using is JBOSS 4.0.4 GA.
Any help would be much appreciated.
Thanks in advance.
Sriraman.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974839#3974839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974839
19 years, 6 months
[Messaging, JMS & JBossMQ] - Tibco EMS messaging integration fails
by romanchr
Hi all,
I try to set up an environment where I have JBoss 4.0.4GA Patch1 with EJB3.0RC9 and Tibco EMS 4.2.
In JBOss I would like to run an MDB and EMS the queues for my messaging.
I followed the configuration guide lines stated here:http://wiki.jboss.org/wiki/Wiki.jsp?page=IntegrationWithTibcoEMS
I managed to apply all config changes but as you probably can imagine some problems came along.
Before I explain the problems let me state the bean and the important configurations.
MDB:
| @MessageDriven(
| activationConfig={
| @ActivationConfigProperty(
| propertyName="destinationType",
| propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(
| propertyName="destination" propertyValue="gameserver.sender.queue"),
| @ActivationConfigProperty(
| propertyName="providerAdapterJNDI",
| propertyValue="java:/TibcoJMSProvider"),
| @ActivationConfigProperty(
| propertyName="maxPoolSize",
| propertyValue="1"),
| @ActivationConfigProperty(
| propertyName="useDLQ",
| propertyValue="false")})
| public class MessageDispatcher extends ReceiverProxy implements MessageListener
| {
| private static final Logger logger = Logger.getLogger(MessageDispatcher.class);
| public MessageDispatcher(Object arg)
| {
| super(arg);
| }
|
| @Override
| public void onMessage(Message arg0)
| {
| // do stuff
| [...]
| }
|
|
| }
|
In jboss-service.xml I added a JMSProvider and an alias as described on the wiki:
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name=":service=JMSProviderLoader,name=TibcoJMSProvider">
| <attribute name="ProviderName">TIBCOJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">
| com.tibco.tibjms.appserver.jboss.JBossAdapter
| </attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">XAQueueConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">XATopicConnectionFactory</attribute>
| <!-- Access JMS via JNDI to tibco -->
| <attribute name="Properties">
| java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
| java.naming.provider.url=tibjmsnaming://localhost:7222
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.naming.NamingAlias"
| name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory">
| <attribute name="ToName">tibjmsnaming://localhost/XAQueueConnectionFactory</attribute>
| <attribute name="FromName">QueueConnectionFactory</attribute>
| </mbean>
|
In anonymous wrote : standardjboss.xml I replaced the following lines:
| <JMSProviderAdapterJNDI>TIBCOJMSProvider</JMSProviderAdapterJNDI>
|
and
| <DestinationQueue>tibjmsnaming://localhost/queue/DLQ</DestinationQueue>
|
Last step is to enhance the jndi.properties:
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:com.tibco.tibjms.naming
|
I deployed the bean and started JBoss (EMS is running of course). Checking the boot.log I could not find any errors. How ever in our standard log file I found the following exception:
| [org.jboss.system.ServiceController] Problem starting service DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory
| javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
| at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1317)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1446)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:484)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:477)
| at javax.naming.InitialContext.rebind(InitialContext.java:367)
| at org.jboss.util.naming.Util.createLinkRef(Util.java:279)
| at org.jboss.util.naming.Util.createLinkRef(Util.java:246)
| at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)
| at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)
| [...]
|
After some googeling and checking this forum I found a solution for this problem. I had to add the following line to the anonymous wrote : jndi.properties file:
| jnp.disableDiscovery=true
|
Restarting JBoss and checking the log files again I learned that my original problem is solved but there was a new exception:
| 2006-09-28 13:23:14,347 WARN [org.jboss.system.ServiceController] Problem starting service DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory
| javax.naming.ConfigurationException: No valid Context.PROVIDER_URL was found
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1449)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:484)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:477)
| at javax.naming.InitialContext.rebind(InitialContext.java:367)
| at org.jboss.util.naming.Util.createLinkRef(Util.java:279)
| at org.jboss.util.naming.Util.createLinkRef(Util.java:246)
| at org.jboss.naming.NamingAlias.createLinkRef(NamingAlias.java:133)
| at org.jboss.naming.NamingAlias.startService(NamingAlias.java:122)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [...]
|
I googled and searched a bit more but this time I could not find a solution. I only found out that other users expierence similar problems (always in conjuction with an external system call).
I see to possible explanations for this exception:
1. I just missed some really simple config settings
2. There is a bug in JBoss
Any help is greatly appreciated!
Regards
Christoph
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974838#3974838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974838
19 years, 6 months
[JBoss Seam] - Using Jboss Seam & Hibernate, persistence exception
by lara
I have a list of groups and next to each row, there is a link named edit. When I click on edit, I go to a page where the information of the selected group are filled, and in that page there is a button update. If I modify the information of the group then click on update, the selected group is updated perfectly and with no errors but if I don't update the information and click on update, the next time I click on the edit link of that group in the listing page, I got an exception on the Jboss server which is the following:
Caused by: javax.ejb.EJBTransactionRolledbackException: javax.persistence.OptimisticLockException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
Please guys, I need your help because I am stuck! How can I solve this knowing that no other transaction is taking place at the same time?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974835#3974835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974835
19 years, 6 months
[JBoss Seam] - NoClassDefFoundError: Lorg/jboss/ejb3/embedded/EJB3Standalon
by paulrot
i'm trying to upgrade from a pre 1.0 release of Seam to 1.0.1GA.
i use Jboss 4.0.4GA with EJB9 and hibernate persistence
after a few days of trial and error it finally came down to one single exception. (btw, i found on a diff thread that it may be related to the org.jboss.seam.core.ejb component, but i do have that installed in components.xml)
12:53:55,231 ERROR [[/xxxxx]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NoClassDefFoundError: Lorg/jboss/ejb3/embedded/EJB3StandaloneDeployer;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2232)
at java.lang.Class.getDeclaredFields(Class.java:1715)
at org.jboss.seam.Component.initMembers(Component.java:425)
at org.jboss.seam.Component.(Component.java:199)
at org.jboss.seam.Component.(Component.java:159)
at org.jboss.seam.Component.(Component.java:154)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:376)
at org.jboss.seam.init.Initialization.addComponents(Initialization.java:334)
at org.jboss.seam.init.Initialization.init(Initialization.java:195)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
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.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
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.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor177.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.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy38.start(Unknown Source)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
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.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
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 $Proxy39.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor14.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.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.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974833#3974833
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974833
19 years, 6 months