[Spring Integration] New message: "Mail session through JNDI"
by Markus Reich
User development,
A new message was posted in the thread "Mail session through JNDI":
http://community.jboss.org/message/523148#523148
Author : Markus Reich
Profile : http://community.jboss.org/people/Meex
Message:
--------------------------------------------------------------
Hi community,
I have following constellation:
JBOSS 4.2.2 (contains EJB Beans containing the business logic
Tomcat 6 running the GUI
Now I want to use the mail session provided by JBOSS in my Tomcat deployed app, I thought I can use the Spring JNDI Template therefore:
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
<prop key="java.naming.provider.url">172.20.36.106</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
</props>
</property>
</bean>
<bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiTemplate" ref="jndiTemplate" />
<property name="jndiName" value="java:/Mail" />
</bean>
But using this leads to following error?
Caused by: javax.naming.NameNotFoundException: Mail not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
Maybe I misunderstood sthg. or am I doing something wrong, when I look into the JMX console I see the java:/Mail service running?
regards
Meex
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523148#523148
16 years, 2 months
[JBoss Microcontainer Development] New message: "JBREFLECT - Exception processing non-public annotation"
by jaikiran pai
User development,
A new message was posted in the thread "JBREFLECT - Exception processing non-public annotation":
http://community.jboss.org/message/523147#523147
Author : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran
Message:
--------------------------------------------------------------
Pete has reported a failure in CDI testsuite against the AS trunk https://jira.jboss.org/jira/browse/JBAS-7676. The testcase involves a @Stateless annotated EJB. Apart from this annotation, the EJB class also has one other annotation. Here's how the EJB class and its related classes looks like:
package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
@Stateless
public class BorderCollie extends LongHairedDog
implements BorderCollieLocal
{
}
package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
@Hairy(clipped=false)
class LongHairedDog
{
}
package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
@Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.FIELD})
...//removed irrelevant stuff
@interface Hairy
{
public abstract boolean clipped();
}
During annotation scanning of this EJB class, it runs into this error, which causes the EJB metadata of this class to be messed up and the deployment failing:
2010-01-31 00:44:49,980 TRACE [org.jboss.mcann.repository.GenericAnnotationResourceVisitor] (HDScanner) Scanning class org.jboss.jsr299.tck.tests.definition.qualifier.enterprise.BorderCollie for annotations
2010-01-31 00:44:49,984 TRACE [org.jboss.mcann.repository.GenericAnnotationResourceVisitor] (HDScanner) Exception reading resource: org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollie.class: java.lang.RuntimeException: Error retrieving annotation attribute values
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:107)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.createAnnotationValue(IntrospectionTypeInfoFactoryImpl.java:137)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:130)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.InheritableAnnotationHolder.getDeclaredAnnotations(InheritableAnnotationHolder.java:95)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.ClassInfoImpl.getAnnotations(ClassInfoImpl.java:179)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AbstractAnnotatedInfo.getUnderlyingAnnotations(AbstractAnnotatedInfo.java:63)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.repository.GenericAnnotationResourceVisitor.handleClass(GenericAnnotationResourceVisitor.java:154)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.repository.GenericAnnotationResourceVisitor.visit(GenericAnnotationResourceVisitor.java:91)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:263)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor.visit(WrappingVirtualFileHandlerVisitor.java:62)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:362)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:307)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.VFS.visit(VFS.java:438)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.virtual.VirtualFile.visit(VirtualFile.java:448)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:102)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule.visit(VFSDeploymentClassLoaderPolicyModule.java:181)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.scanner.ModuleAnnotationScanner.visit(ModuleAnnotationScanner.java:49)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.scanner.DefaultAnnotationScanner.rescan(DefaultAnnotationScanner.java:70)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.scanner.DefaultAnnotationScanner.rescan(DefaultAnnotationScanner.java:42)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.mcann.scanner.AbstractAnnotationScanner.scan(AbstractAnnotationScanner.java:83)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.vfs.plugins.annotations.AnnotationRepositoryDeployer.visitModule(AnnotationRepositoryDeployer.java:104)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.vfs.plugins.annotations.AnnotationRepositoryDeployer.deploy(AnnotationRepositoryDeployer.java:154)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.vfs.plugins.annotations.AnnotationRepositoryDeployer.deploy(AnnotationRepositoryDeployer.java:47)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer.deploy(AbstractOptionalVFSRealDeployer.java:57)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer.internalDeploy(AbstractOptionalRealDeployer.java:74)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1431)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1890)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1019)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1251)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1175)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1073)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:887)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:602)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalAccessException: Class org.jboss.reflect.plugins.introspection.ReflectionUtils can not access a member of class org.jboss.jsr299.tck.tests.definition.qualifier.enterprise.Hairy with modifiers "public abstract"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.reflect.Method.invoke(Method.java:588)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:151)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:100)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 60 more
The root cause of this issue seems to be a problem in JBREFLECT, which runs into issue trying to create annotation value information out of a non-public annotation (notice that "Hairy" in the above example is non-public).
I was able to reproduce this issue with a simple testcase in JBREFLECT trunk:
Index: src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotationTestCase.java
===================================================================
--- src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotationTestCase.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
+++ src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotationTestCase.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
@@ -0,0 +1,89 @@
+/**
+ *
+ */
+package org.jboss.test.classinfo.annotation.test;
+
+import java.lang.annotation.Annotation;
+
+import junit.framework.Test;
+
+import org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory;
+import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.reflect.spi.TypeInfoFactory;
+import org.jboss.test.ContainerTest;
+
+/**
+ * NonPublicAnnotationTestCase
+ *
+ * Tests that a Class annotated with a non-public annotation is
+ * correctly parsed for annotations.
+ *
+ * This test is responsible the testing fix for the bug in JBREFLECT
+ * which causes the following exception:
+ *
+ *
+ * Caused by: java.lang.IllegalAccessException: Class org.jboss.reflect.plugins.introspection.ReflectionUtils can not access a member of class org.jboss.test.classinfo.annotation.test.NonPublicAnnotation with modifiers "public abstract"
+ * at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
+ * at java.lang.reflect.Method.invoke(Method.java:588)
+ * at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
+ * at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:151)
+ * at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:100)
+ * ... 33 more
+ *
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class NonPublicAnnotationTestCase extends ContainerTest
+{
+ /**
+ * Constructor
+ * @param name
+ */
+ public NonPublicAnnotationTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(NonPublicAnnotationTestCase.class);
+ }
+
+ /**
+ * Test that the {@link NonPublicAnnotation} when applied to {@link SimpleAnnotatedClass}
+ * is correctly parsed and is available through {@link ClassInfo#getUnderlyingAnnotations()}
+ *
+ * @throws Exception
+ */
+ public void testNonPublicAnnotationOnClass() throws Exception
+ {
+ ClassInfo info = getClassInfo(SimpleAnnotatedClass.class);
+
+ System.out.println("---> Getting annotations");
+ Annotation[] annotations = info.getUnderlyingAnnotations();
+ assertEquals("Incorrect number of annotations found on " + SimpleAnnotatedClass.class, 1, annotations.length);
+ Annotation annotation = annotations[0];
+ assertTrue("Incorrect annotation type found on " + SimpleAnnotatedClass.class, (annotation instanceof NonPublicAnnotation));
+ NonPublicAnnotation expectedAnnotation = (NonPublicAnnotation) annotation;
+ assertEquals("Incorrect value found for annotation " + NonPublicAnnotation.class
+ + " on class " + SimpleAnnotatedClass.class, SimpleAnnotatedClass.ANNOTATION_ELEMENT_NAME, expectedAnnotation.name());
+ }
+
+ /**
+ * Utitlity method
+ * @param clazz
+ * @return
+ */
+ protected ClassInfo getClassInfo(Class clazz)
+ {
+ TypeInfoFactory factory = new IntrospectionTypeInfoFactory();
+ TypeInfo info = factory.getTypeInfo(clazz);
+ assertNotNull(info);
+ assertTrue(info instanceof ClassInfo);
+ ClassInfo cinfo = (ClassInfo) info;
+ getLog().debug(cinfo);
+ return cinfo;
+ }
+}
Index: src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotation.java
===================================================================
--- src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotation.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
+++ src/test/java/org/jboss/test/classinfo/annotation/test/NonPublicAnnotation.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
@@ -0,0 +1,31 @@
+/**
+ *
+ */
+package org.jboss.test.classinfo.annotation.test;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * NonPublicAnnotation
+ *
+ * A non-public annotation.
+ *
+ * NOTE: This {@link NonPublicAnnotation}, {@link SimpleAnnotatedClass} and
+ * even the {@link NonPublicAnnotationTestCase} are all placed in the same package
+ * *intentionally*, so that this annotation is accessible for the {@link SimpleAnnotatedClass}
+ * as well as {@link NonPublicAnnotationTestCase} during the tests.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+@Target (ElementType.TYPE)
+@Retention (RetentionPolicy.RUNTIME)
+@interface NonPublicAnnotation {
+
+ public abstract String name();
+
+ public abstract boolean isTest();
+}
Index: src/test/java/org/jboss/test/classinfo/annotation/test/SimpleAnnotatedClass.java
===================================================================
--- src/test/java/org/jboss/test/classinfo/annotation/test/SimpleAnnotatedClass.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
+++ src/test/java/org/jboss/test/classinfo/annotation/test/SimpleAnnotatedClass.java&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(revision 0)
@@ -0,0 +1,25 @@
+/**
+ *
+ */
+package org.jboss.test.classinfo.annotation.test;
+
+
+/**
+ * SimpleAnnotatedClass
+ *
+ * A simple class used in tests
+ *
+ * NOTE: The {@link NonPublicAnnotation}, {@link SimpleAnnotatedClass} and
+ * even the {@link NonPublicAnnotationTestCase} are all placed in the same package
+ * *intentionally*, so that this annotation is accessible for the {@link SimpleAnnotatedClass}
+ * as well as {@link NonPublicAnnotationTestCase} during the tests.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+@NonPublicAnnotation (name=SimpleAnnotatedClass.ANNOTATION_ELEMENT_NAME, isTest=true)
+public class SimpleAnnotatedClass
+{
+
+ public static final String ANNOTATION_ELEMENT_NAME = "SomeName";
+}
The testcase fails with the same exception:
-------------------------------------------------------------------------------
Test set: org.jboss.test.classinfo.annotation.test.NonPublicAnnotationTestCase
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.141 sec <<< FAILURE!
testNonPublicAnnotationOnClass(org.jboss.test.classinfo.annotation.test.NonPublicAnnotationTestCase) Time elapsed: 0.066 sec <<< ERROR!
java.lang.RuntimeException: Error retrieving annotation attribute values
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:107)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.createAnnotationValue(IntrospectionTypeInfoFactoryImpl.java:137)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:130)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.InheritableAnnotationHolder.getDeclaredAnnotations(InheritableAnnotationHolder.java:95)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.ClassInfoImpl.getAnnotations(ClassInfoImpl.java:179)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AbstractAnnotatedInfo.getUnderlyingAnnotations(AbstractAnnotatedInfo.java:63)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.test.classinfo.annotation.test.NonPublicAnnotationTestCase.testNonPublicAnnotationOnClass(NonPublicAnnotationTestCase.java:65)
...//removed irrelevant stacktrace
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.lang.IllegalAccessException: Class org.jboss.reflect.plugins.introspection.ReflectionUtils can not access a member of class org.jboss.test.classinfo.annotation.test.NonPublicAnnotation with modifiers "public abstract"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.reflect.Method.invoke(Method.java:588)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:151)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:100)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 33 more
Is there a way to disable Java language access check for the methods through JBREFLECT project? Or does that have to be done (selectively) through the underlying (ReflectMethodInfoImpl) impl?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523147#523147
16 years, 2 months
[jBPM] New message: "Re: JBPM4.3 should be JBPM5.0"
by christian garderes
User development,
A new message was posted in the thread "JBPM4.3 should be JBPM5.0":
http://community.jboss.org/message/523146#523146
Author : christian garderes
Profile : http://community.jboss.org/people/chrigar
Message:
--------------------------------------------------------------
well, i've defended the idea that jbpm was quite a good product.
the articles of tom bayens were great readings for me,
our whole process use hibernate but with jpa api. don't ask me why, that's it!
So we developped a nice tool for our users and then it's time to deliver
quite normal you say, yes that's right
unfortunaltly jbpm 4.3 appears,
in a very quick timing after 4.2 (?),
quite a nice peace of code, with bpmn & Cie
but jpa 'dirty' compatibility is no more possible...
do you really think that jpa is anecdotic?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523146#523146
16 years, 2 months
[jBPM] New message: "Re: How to invoke applications in a task activity"
by Jiemin Zhang
User development,
A new message was posted in the thread "How to invoke applications in a task activity":
http://community.jboss.org/message/523144#523144
Author : Jiemin Zhang
Profile : http://community.jboss.org/people/Jiemin
Message:
--------------------------------------------------------------
Should I build my own graphical application for the client or for the task form?
If I build my own Web Client or Desktop Client for jBPM, how is the problem with a task form that has some buttons resolved?
In XPDL (another process definition language) you can assign a task to a user and define a java method to this task, if the user works on the task, the java method is called, a form with text and some buttons is showed and the events clicking on the buttons can be handled. How can I do this in jBPM? I want handle the user action in a activity.
Thank you very much.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523144#523144
16 years, 2 months
[jBPM] New message: "Re: How to invoke applications in a task activity"
by Jiemin Zhang
User development,
A new message was posted in the thread "How to invoke applications in a task activity":
http://community.jboss.org/message/523140#523140
Author : Jiemin Zhang
Profile : http://community.jboss.org/people/Jiemin
Message:
--------------------------------------------------------------
Hello Sebastian,
I use jBPM 4.2.
If I want a task form with some buttons and the user can click on any button, so that a java method ist invoked (e.g. download a document from a server and open it), how can I realize it in a process step? I don't want to open the document in a java activity or custom activiy, because the user should read the document right and say wether the document goog or not good, then the appropriate transition is taken. Of couse I can put a second user activity after a java activiy(download and open a document), but if the user, who gets the first task, finishes the second task assigned to him in the next few days, and it is possible the document is not longer on his computer. This is only a example. I don't know how I can implement a task form with some buttons. I know the FreeMarker Template ist not for it.
Thank you for your answer
Greetings, Jiemin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523140#523140
16 years, 2 months
[JBoss Cache] New message: "Re: How to evict a node when all its children have been evicted?"
by Nikolazy Zamosenchuk
User development,
A new message was posted in the thread "How to evict a node when all its children have been evicted?":
http://community.jboss.org/message/523139#523139
Author : Nikolazy Zamosenchuk
Profile : http://community.jboss.org/people/nzamosenchuk
Message:
--------------------------------------------------------------
Have some assumption, that proposed ActionPolicy may cause some problems, but not sure.
There is a piece of code in method evict()
// The expected data structure is of type $CHILD_NODES/${node-id}/${sub-node-name} or
// $CHILD_PROPS/${node-id}/${sub-property-name}
>>> Set<Object> names = cache.getChildrenNames(parentFqn); <<<
if (names.isEmpty() || (names.size() == 1 &&
names.contains(fqn.get(2))))
This code will be invoked if node, that is going to be evicted is from CHILD_NODES or CHILD_PROPS and it's fqn size is 3. (i.e.
$CHILD_PROPS/parentUUID1/childName1). In this case such code will be invoked:
cache.getChildrenNames(parentFqn); (*)
Investigating forums and cache source code, I've found that this will trigger a VISIT event on JBC nodes, so all the nodes will be
refreshed, so they will be moved to the end of eviction queue.
Let's imagine situation, when we have lots of nodes in $CHILD_PROPS sub tree. We are not using them for a long time and some node like
$CHILD_PROPS/parentUUID15/childName100 is now going to be evicted. ParentNodeEvictionActionPolicy.evict() will invoke this code (*), so all nodes in $CHILD_PROPS/parentUUID1/* will be "visited", so they will not be evict. Aren't them? So there is a situation when lots of
really unused JBC nodes will always be visited (refreshed) and so will remain in cache.
Its just an idea and may be I'm mistaken.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523139#523139
16 years, 2 months