[EJB 3.0] - java.lang.IllegalArgumentException: Unable to find operation
by jbelis
Hi,
I am using jboss 4.0.5 GA installed with JEMS 1.2.0 (ejb3-clustered). I assume the EJB version that is used as a result is
EJB 3.0 RC9 - Patch 1
although I can't really tell from my installation.
I am trying to have an ejb3 module invoke an operation exposed by an mbean deployed outside the ear file that contains my ejb. It says it is unable to find the operation despite the fact that I can see it using the jmx console. What seems to be happening is that arguments are lost along the way.
Here is the stack trace:
| java.lang.IllegalArgumentException: Unable to find operation lookupDataSource()
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:231)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:175)
| at sun.reflect.GeneratedMethodAccessor90.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.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
| at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy150.lookupDataSource(Unknown Source)
|
lookupDataSource actually takes 2 arguments. I can see the arguments in the jmx console.
The same exact code and configuration works on 4.0.4GA (non-clustered)
I looked at bug
http://jira.jboss.org/jira/browse/EJBTHREE-868
which has some similarities with my problem. Unfortunately given the lack of context provided in the bug report, it is hard to assert the issue is the same.
I have not upgraded to 4.2.x and would prefer not to if I can avoid it.
Thanks in advance for the help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071348#4071348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071348
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Persistence context isnt propograte in the same transaction
by avihaimar
Hey,
I work with JBoss 4.2.
I create entity manager and use it to persist hotel.
Than i create additional entity manager and use it to find the hotel that i saved with the first one.
I get null (it didnt find it), unless i call to flush on the first one.
According to the spec in JTA env the persistence context is bound to the transaction.
Does any one know how to solve this?
Thank you.
p.s - dont say injection. i cant use injection.
I wrote a stataless bean:
@Stateless
@Local(HotelService2.class)
@Remote(HotelService2.class)
public class HotelServiceBean2 implements HotelService2 {
and in the stateless i have the following method:
public void createEntityManagerFactory() {
try {
FactorySingleton.getInstance();
EntityManagerFactory emf2 = (EntityManagerFactory) new InitialContext().lookup("java:/DemoEMF");
EntityManager em = emf2.createEntityManager();
Hotel hot = new Hotel("ab","");
em.persist(hot);
//em.flush();
EntityManager em2 = emf2.createEntityManager();
Hotel foundHot = em.find(Hotel.class, hot.getOrmID());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
<persistence-unit name="Demo">
<jta-data-source>java:/InsiteDS</jta-data-source>
</persistence-unit>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071340#4071340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071340
18Â years, 8Â months
cann't access jmx-console
by Siwei Zhang
Hi there,
I have downloaded jboss-4.2.0.GA.zip and installed it on Debian 3.1 but
cannÂ’t access it via web GUI to http://host:8080/jmx-console.
Could someone help? The followings are the procedures I used to install
and start jboss. Thanks.
Kevin SZ
%jar –xvf jboss-4.2.0.GA.zip
% cd jboss-4.2.0.GA/bin
%chmod 755 ./*
% ./run.sh &
[1] 8616
kevin.zhang@vo-nagios:~/jboss-4.2.0.GA/bin$
========================================================================
=
JBoss Bootstrap Environment
JBOSS_HOME: /home/kevin.zhang/jboss-4.2.0.GA
JAVA: /usr/local/java/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
CLASSPATH:
/home/kevin.zhang/jboss-4.2.0.GA/bin/run.jar:/usr/local/java/lib/tools.j
ar
========================================================================
=
12:39:00,870 INFO [Server] Starting JBoss (MX MicroKernel)...
12:39:00,872 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build:
SVNTag=JBoss_4_2_0_GA date=200705111440)
12:39:00,873 INFO [Server] Home Dir: /home/kevin.zhang/jboss-4.2.0.GA
12:39:00,874 INFO [Server] Home URL:
file:/home/kevin.zhang/jboss-4.2.0.GA/
12:39:00,875 INFO [Server] Patch URL: null
12:39:00,875 INFO [Server] Server Name: default
12:39:00,876 INFO [Server] Server Home Dir:
/home/kevin.zhang/jboss-4.2.0.GA/server/default
12:39:00,876 INFO [Server] Server Home URL:
file:/home/kevin.zhang/jboss-4.2.0.GA/server/default/
12:39:00,876 INFO [Server] Server Log Dir:
/home/kevin.zhang/jboss-4.2.0.GA/server/default/log
12:39:00,877 INFO [Server] Server Temp Dir:
/home/kevin.zhang/jboss-4.2.0.GA/server/default/tmp
12:39:00,877 INFO [Server] Root Deployment Filename: jboss-service.xml
12:39:01,331 INFO [ServerInfo] Java version: 1.6.0_02,Sun Microsystems
Inc.
12:39:01,332 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM
1.6.0_02-b05,Sun Microsystems Inc.
12:39:01,332 INFO [ServerInfo] OS-System: Linux 2.6.14.7,i386
12:39:01,883 INFO [Server] Core system initialized
12:39:04,895 INFO [WebService] Using RMI server codebase:
http://127.0.0.1:8083/
12:39:04,899 INFO [Log4jService$URLWatchTimerTask] Configuring from
URL: resource:jboss-log4j.xml
12:39:05,711 INFO [TransactionManagerService] JBossTS Transaction
Service (JTA version) - JBoss Inc.
12:39:05,711 INFO [TransactionManagerService] Setting up property
manager MBean and JMX layer
12:39:06,079 INFO [TransactionManagerService] Starting recovery manager
12:39:06,195 INFO [TransactionManagerService] Recovery manager started
12:39:06,195 INFO [TransactionManagerService] Binding
TransactionManager JNDI Reference
12:39:09,921 INFO [EJB3Deployer] Starting java:comp multiplexer
12:39:12,185 INFO [ServiceEndpointManager] jbossws-1.2.1.GA
(build=200704151756)
12:39:13,832 INFO [AprLifecycleListener] The Apache Tomcat Native
library which allows optimal performance in production environments was
not found on the java.library.path:
/usr/local/jdk1.6.0_02/jre/lib/i386/server:/usr/local/jdk1.6.0_02/jre/li
b/i386:/usr/local/jdk1.6.0_02/jre/../lib/i386:/usr/local/lib:/usr/lib:/l
ib:/usr/local/pgsql/lib:/usr/java/packages/lib/i386:/lib:/usr/lib
12:39:13,958 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on
http-127.0.0.1-8080
12:39:13,960 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on
ajp-127.0.0.1-8009
12:39:13,960 INFO [Catalina] Initialization processed in 344 ms
12:39:13,961 INFO [StandardService] Starting service jboss.web
12:39:13,966 INFO [StandardEngine] Starting Servlet Engine:
JBossWeb/2.0.0.GA
12:39:14,072 INFO [Catalina] Server startup in 110 ms
12:39:14,221 INFO [TomcatDeployer] deploy, ctxPath=/,
warUrl=.../deploy/jboss-web.deployer/ROOT.war/
12:39:15,067 INFO [TomcatDeployer] deploy, ctxPath=/invoker,
warUrl=.../deploy/http-invoker.sar/invoker.war/
12:39:15,333 INFO [TomcatDeployer] deploy, ctxPath=/jbossws,
warUrl=.../tmp/deploy/tmp1933jbossws-context-exp.war/
12:39:15,499 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil,
warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
12:39:16,874 INFO [TomcatDeployer] deploy, ctxPath=/web-console,
warUrl=.../deploy/management/console-mgr.sar/web-console.war/
12:39:17,777 INFO [MailService] Mail Service bound to java:/Mail
12:39:17,967 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
12:39:18,019 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
12:39:18,051 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
12:39:18,087 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
12:39:18,201 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/jms/jms-ra.rar
12:39:18,235 INFO [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/quartz-ra.rar
12:39:18,247 INFO [QuartzResourceAdapter] start quartz!!!
12:39:18,341 INFO [SimpleThreadPool] Job execution threads will use
class loader of thread: main
12:39:18,382 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
12:39:18,386 INFO [RAMJobStore] RAMJobStore initialized.
12:39:18,386 INFO [StdSchedulerFactory] Quartz scheduler
'DefaultQuartzScheduler' initialized from default resource file in
Quartz package: 'quartz.properties'
12:39:18,387 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
12:39:18,387 INFO [QuartzScheduler] Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED started.
12:39:19,114 INFO [ConnectionFactoryBindingService] Bound
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS'
to JNDI name 'java:DefaultDS'
12:39:19,537 INFO [A] Bound to JNDI name: queue/A
12:39:19,542 INFO [B] Bound to JNDI name: queue/B
12:39:19,547 INFO [C] Bound to JNDI name: queue/C
12:39:19,552 INFO [D] Bound to JNDI name: queue/D
12:39:19,557 INFO [ex] Bound to JNDI name: queue/ex
12:39:19,602 INFO [testTopic] Bound to JNDI name: topic/testTopic
12:39:19,607 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
12:39:19,611 INFO [testDurableTopic] Bound to JNDI name:
topic/testDurableTopic
12:39:19,619 INFO [testQueue] Bound to JNDI name: queue/testQueue
12:39:19,707 INFO [UILServerILService] JBossMQ UIL service available at
: /127.0.0.1:8093
12:39:19,781 INFO [DLQ] Bound to JNDI name: queue/DLQ
12:39:20,006 INFO [ConnectionFactoryBindingService] Bound
ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name
'java:JmsXA'
12:39:20,046 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console,
warUrl=.../deploy/jmx-console.war/
12:39:20,488 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on
http-127.0.0.1-8080
12:39:20,561 INFO [AjpProtocol] Starting Coyote AJP/1.3 on
ajp-127.0.0.1-8009
12:39:20,617 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build:
SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 19s:736ms
kevin.zhang@vo-nagios:~/jboss-4.2.0.GA/bin$ netstat -an|grep 80
tcp 0 0 127.0.0.1:8009 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:8080 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:8083 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:8093 0.0.0.0:*
LISTEN
kevin.zhang@vo-nagios:~/jboss-4.2.0.GA/bin$
18Â years, 8Â months