[Installation, Configuration & DEPLOYMENT] - Lotus Domino Integration [JBoss 5.0.0] - CORBA Problem
by JTheegarten
I am using JBoss 5.0.0 (all-configuration) to deploy an application which needs a connection to a Domino(6.0.1)-server to function as a Domino-client and read data (like emails) from the server. The problem driving me to frustration is the following one:
anonymous wrote :
| 16:54:58,637 ERROR [STDERR] Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation lotus.priv.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No
|
| 16:54:58,637 ERROR [STDERR] at org.omg.CORBA.ORB.create_impl(ORB.java:297)
|
| 16:54:58,637 ERROR [STDERR] at org.omg.CORBA.ORB.init(ORB.java:336)
|
| 16:54:58,637 ERROR [STDERR] at lotus.domino.cso.Session.createORB
|
|
|
| 16:54:58,637 ERROR [STDERR] Caused by: java.lang.ClassCastException: lotus.priv.CORBA.iiop.ORB
|
| 16:54:58,637 ERROR [STDERR] at org.omg.CORBA.ORB.create_impl(ORB.java:295)
|
The most likely suspect seems to be a faulty configuration.
The code creating the connection would be this:
| try {
| Session s = NotesFactory.createSession(dominoServer, dominoUserName, dominoPassword);
| } catch (NotesException e) {
| e.printStackTrace();
| }
|
Although I tried different approaches, like getting the IOR from the server and creating the session with it or initializing the ORB first, nothing seems to work. Everything ends in the aforementioned error.
I also tried fiddling with the iiop-service.xml, mainly the ORB-settings, but that only lead to bigger problems, since I could not find complete documentation of those.
Thanks for your time.
Best regards
JT
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201107#4201107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201107
17 years, 6 months
[JBoss AOP] - AOP 2GA JBoss 5GA set pointcut not working
by attel75
I am trying to set a pointcut to a field when it gets written, no matter what I do, the set pointcut never seems to work. I am using AOP 2.0GA and JBoss 5.0GA. Here is what I have:
aop.xml:
|
|
| <?xml version="1.0" encoding="UTF-8"?>
|
|
| <aop xmlns="urn:jboss:aop-beans:1.0">
| <aspect class="com.acme.aop.FieldAspect"/>
| <interceptor class="com.acme.aop.FieldSetterInterceptor"/>
|
|
| <bind pointcut="execution(void $instanceof{com.acme.IMarkMe}->*(..))">
| <around aspect="com.acme.aop.FieldAspect" name="log"/>
| </bind>
|
| <bind pointcut="execution($instanceof{com.acme.IMarkMe}->new())">
| <around aspect="com.acme.aop.FieldAspect" name="log"/>
| </bind>
|
| <bind pointcut="set(private java.lang.String com.acme.aop.POJO->var2)">
| <around aspect="com.acme.aop.FieldAspect" name="log"/>
| </bind>
|
| <bind pointcut="set(private java.lang.String com.acme.aop.POJO->var2)">
| <interceptor-ref name="com.acme.aop.FieldSetterInterceptor"/>
| </bind>
|
|
| </aop>
|
|
FieldSetterInterceptor:
|
| package com.acme.aop;
|
| import org.apache.log4j.Logger;
| import org.jboss.aop.advice.Interceptor;
| import org.jboss.aop.joinpoint.FieldWriteInvocation;
| import org.jboss.aop.joinpoint.Invocation;
|
|
| public class FieldSetterInterceptor implements Interceptor {
|
| private static final Logger LOG = Logger.getLogger(FieldSetterInterceptor.class);
|
|
| public FieldSetterInterceptor() {
| // TODO Auto-generated constructor stub
| }
|
|
| @Override
| public String getName() {
| // TODO Auto-generated method stub
| return "FieldSetterInterceptor";
| }
|
|
| @Override
| public Object invoke(Invocation invocation) throws Throwable
| {
| if (!(invocation instanceof FieldWriteInvocation)) return invocation.invokeNext();
| try
| {
| FieldWriteInvocation mi = (FieldWriteInvocation)invocation;
| LOG.info("<<< Entering SetInterceptor for: " + mi.getField().getName());
| return invocation.invokeNext();
| }
| finally
| {
| LOG.info(">>> Leaving SetInterceptor");
| }
| }
|
| }
|
|
FieldAspect:
|
| package com.acme.aop;
|
| import java.lang.reflect.Field;
|
| import org.apache.log4j.Logger;
| import org.jboss.aop.joinpoint.ConstructorInvocation;
| import org.jboss.aop.joinpoint.FieldReadInvocation;
| import org.jboss.aop.joinpoint.FieldWriteInvocation;
| import org.jboss.aop.joinpoint.Invocation;
| import org.jboss.aop.joinpoint.MethodInvocation;
|
| public class FieldAspect {
|
| private static final Logger LOG = Logger.getLogger(FieldAspect.class);
|
| public FieldAspect(){
| LOG.debug("FieldAspect being instantiated");
| }
| public Object log(ConstructorInvocation invocation) throws Throwable
| {
| try
| {
| LOG.info("C: Creating using constructor " + invocation.getConstructor());
| LOG.info("C: " + invocation.getArguments());
| return invocation.invokeNext();
| }
| finally
| {
| LOG.info("C: Done");
| }
| }
|
| public Object log(MethodInvocation invocation) throws Throwable
| {
| try
| {
| LOG.info("M: Calling method " + invocation.getMethod().getName());
| LOG.info("M: " + invocation.getArguments());
| return invocation.invokeNext();
| }
| finally
| {
| LOG.info("M: Done");
| }
| }
|
| public Object log(FieldWriteInvocation invocation) throws Throwable
| {
| LOG.info("F: setting field " + invocation.getField().getName());
| LOG.info("F: New value will be " + invocation.getValue());
| try
| {
| return invocation.invokeNext();
| }
| finally
| {
| LOG.info("F: Done");
| }
|
| }
| }
|
|
POJO:
|
| package com.acme.aop;
| public class POJO implements com.acme.IMarkMe
| {
| private String var1 = "hello";
| private String var2;
|
| public static int var3;
|
| public String getVar1() { return var1; }
| public String getVar2() { return var2; }
| public void setVar2(String str) { var2 = str; }
|
| }
|
|
I am deploying aop.xml to $JBOSS_HOME/server/all/deploy. I can see the poincuts and the aspect and interceptor classes registered in the jmx console, however when I run the code all the pointcuts work except for both the set pointcuts defined in aop.xml.
Am I doing something wrong?
Thanks for all you help.
Andres.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201106#4201106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201106
17 years, 6 months