[JBoss AOP] - java.lang.ClassCastException
by vbatista
Hello,
I have developed an AOP module to inject sessionBeans on my web module (through annotations). My module is working correctly with JBoss-5.0.0Beta2, Beta3 and Beta4. Now I am testing it on JBoss4.2.2 and I am having a ClassCastException
| java.lang.ClassCastException: com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set
| at org.jboss.aop.advice.com.foo.bar.core.aop.aspects.InjectSessionBeanAspect1.invoke(InjectSessionBeanAspect1.java)
| at com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set.invokeNext(DefaultActionBeanContext$portalService_Set.java)
| at com.foo.bar.portal.presentation.DefaultActionBeanContext.portalService_w_$aop(DefaultActionBeanContext.java)
| at com.foo.bar.portal.presentation.DefaultActionBeanContext.<init>(DefaultActionBeanContext.java:40)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at java.lang.Class.newInstance0(Class.java:350)
| at java.lang.Class.newInstance(Class.java:303)
|
My classes are being aspectized at compile time.
Here is my Advice:
| public Object get(FieldReadInvocation invocation)
| throws Throwable {
| Field field = invocation.getField();
| String jndiBinding = null;
| try {
| jndiBinding = field.getAnnotation(InjectSessionBean.class).jndiBinding();
| } catch (RuntimeException e) {
| log.error("Error getting JNDI Binding from Annotation.", e);
| return null;
| }
| log.debug("getJndiBinding:" + jndiBinding + " for field:" + field);
|
| Object object = aopHelper.getSessionBean(jndiBinding);
| return object;
| }
|
Any one has any hint for this problem?
Thanks in advance.
Best regards,
Victor Batista
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138610#4138610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138610
18 years, 1 month
[JBoss jBPM] - Weird error from XSLT transformation during BPEL 1.1 to BPEL
by meghanai_99
Hello,
I get following error when I start JBoss and deploy my first BPEL -
| 17:23:31,312 ERROR [] [STDERR] Compiler warnings:
| 17:23:31,312 ERROR [] [STDERR] jar:file:/D:/Program Files/Serena/Business Mashups/Common/jboss405/server/default/tmp/d
| eploy/tmp24683jbpm-bpel.ear-contents/lib/jbpm-bpel.jar!/org/jbpm/bpel/xml/bpel-1-1-converter.xslt: line 103: Attribute '
| target' outside of element.
|
After that it fails when it tries to read correlationset from 'Scope' because the set is empty.
Here is the dump of generated BPEL 2.0 xml file
| <ns8:correlationSets>
| <ns9:correlationSet name="ServiceFlowIdCS" properties="tns:ServiceFlowId" />
| </ns8:correlationSets>
|
where
| xmlns:ns8="urn:aewebservices71" xmlns:ns9="http://localhost:80/gsoap/aewebservices71.wsdl"
|
are declared on process element. They are my external webservices I call during BPEL flow.
However after this first error, all BPEL flows are deployed fine. Can someone point me in right direction? I am out of ideas ...at least for today.
I checked the transformer factory getting loaded. It is JDK's bundled Xalan -
| com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
|
Is this the correct library to use?
Thank you,
Meghana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138608#4138608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138608
18 years, 1 month
[JBoss AOP] - Re: Problems integrating Jboss AOP in Eclipse
by hou84
Hi,
thinks for you help. I had downloaded "JBossIDE-AOP-Developer-1.2.0.Beta2" from the site and then integreted it in eclipse SDK 3.3.1. I use the jdk 1.6.0_05.
I tried to run the demo example "Hello World" of jboss but when running, eclipse print the following error:
java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138603#4138603
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138603
18 years, 1 month
[JBoss Cache: Core Edition] - Jboss cache communication between web application and java a
by narayana_1481
Hi All ,
I am new to Jboss cache.
please let me explain you my scenario first.
I just need to know how the communication between a java application and web application happens ?? what exactly i need to configure in my machine.
My java application is like:
=---------------------------=
channelMap = Fqn.fromString("/Channel");
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration expected = parser.parseFile("\\properties\\replAsync-service.xml");
CacheSPI cache = (CacheSPI) new DefaultCacheFactory().createCache(expected);
cache.put(channelMap, key, value);
i placed the configuration xml file(replyAsync-service.xml) in my local machine C:\\properties\\
My web application is like:
=---------------------------=
channelMap = Fqn.fromString("/Channel");
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration expected = parser.parseFile("\\properties\\replAsync-service.xml");
CacheSPI cache = (CacheSPI) new DefaultCacheFactory().createCache(expected);
cache.get(channelMap, key);
Please assume, the above snippet is inside a servlet
i placed the configuration xml file(replyAsync-service.xml) in my local machine C:\\properties\\
main attributes in the configuration xml are like below ::
<!-- REPL_SYNC
false
-->
<!-- <TCPPING initial_hosts="127.0.0.1[7800]" start_port="50255" -->
<TCPPING initial_hosts="127.0.0.1[7800]"
port_range="1"
timeout="3500"
num_initial_members="2"
up_thread="true"
down_thread="true"/>
<MERGE2 min_interval="5000" max_interval="10000"/>
<FD shun="true" timeout="2500" max_tries="5" up_thread="true" down_thread="true" />
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" />
<pbcast.NAKACK down_thread="true" up_thread="true" gc_lag="100" retransmit_timeout="300,600,1200,2400,4800,9600" />
<pbcast.STABLE desired_avg_gossip="20000" down_thread="false" up_thread="false" stability_delay="1500"/>
<pbcast.GMS join_timeout="5000"
join_retry_timeout="2000"
shun="true"
print_local_addr="true"
down_thread="true"
up_thread="true"/>
<pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />
.. And it is giving me exception like ..
Address is invalid on local machine, or port is not valid on remote machine
... Please correct me if i m doing anything wrong...
Or please let me know step by step implementaion how to do that ...
Big thanks in advance...
Regards,
V.Narayana.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138601#4138601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138601
18 years, 1 month