[JBoss AOP] - org.apache.xml excluded from precompilation?
by Tom Cunningham
Tom Cunningham [https://community.jboss.org/people/tcunning] created the discussion
"org.apache.xml excluded from precompilation?"
To view the discussion, visit: https://community.jboss.org/message/760248#760248
--------------------------------------------------------------
I'm trying to patch over a bug in XMLBeans ( https://issues.apache.org/jira/browse/XMLBEANS-328 https://issues.apache.org/jira/browse/XMLBEANS-328 ) using pointcuts. I've been struggling over the past couple of days to try to get aopc working on my class, even building a stub class that models the class structure of the class I'm trying to advise, which worked fine, but I still get a "no comp needed" when trying to aopc org.apache.xmlbeans.impl.store.Xobj.
Today I set some breakpoints and discovered that it is being rejected because of the package name of the class :
(from AspectManager.class)
public boolean isNonAdvisableClassName(String classname)
{
if (ignoreClass(classname)) return true;
if (includeClass(classname)) return false;
if (excludeClass(classname)) return true;
return (classname.startsWith("org.jboss.aop.") ||
classname.endsWith("$aop") ||
classname.startsWith("javassist") ||
classname.startsWith("org.jboss.util.") ||
classname.startsWith("gnu.trove.") ||
classname.startsWith("EDU.oswego.cs.dl.util.concurrent.") ||
classname.contains('.' + JoinPointGenerator.JOINPOINT_CLASS_PREFIX) ||
// System classes
classname.startsWith("org.apache.tools.ant") ||
classname.startsWith("org.apache.crimson") ||
classname.startsWith("org.apache.xalan") ||
classname.startsWith("org.apache.xml") ||
....
Everything starting with org.apache.xml seems to be filtered out - which org.apache.xmlbeans.impl.store would fall under. Is there a reason why "org.apache.xmlbeans" should be blocked, and not just "org.apache.xml."? Is there a way I can short circuit this by getting includeClass(classname) to return true? I'm calling aopc through the ant task :
<aopc compilerclasspathref="build.classpath" verbose="true">
<classpath path="${aopc.xbean.classes.dir}"/>
<src path="${aopc.xbean.classes.dir}"/>
<include name="Foo.class"/>
<include name="org/apache/xmlbeans/impl/store/Xobj$SoapBodyXobj.class"/>
<include name="org/apache/xmlbeans/impl/store/Xobj.class"/>
<aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
<aopclasspath path="${aop.classes.dir}"/>
</aopc>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760248#760248]
Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months
[jBPM] - JBPM-Console Error org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118) when opening task form on external port.
by renez
renez [https://community.jboss.org/people/renez] created the discussion
"JBPM-Console Error org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118) when opening task form on external port."
To view the discussion, visit: https://community.jboss.org/message/725743#725743
--------------------------------------------------------------
Hi,
I create for my process a task form by guvnor/ designer. When I run my process using the local port http://localhost:8080/jbpm-console/ http://localhost:8080/jbpm-console/ everything works fine:
https://community.jboss.org/servlet/JiveServlet/showImage/2-725743-18261/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-725743-18...
But when I try to run the process on my external test server I got a strange behaviour:
* I get asked for credentials again
* When I enter them, I receive an error
org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
root cause
java.lang.NullPointerException
org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118)
org.jbpm.task.service.TaskClient.getTask(TaskClient.java:83)
org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:73)
org.jbpm.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50)
org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:205)
org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:127)
sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
https://community.jboss.org/servlet/JiveServlet/showImage/2-725743-18263/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-725743-18...
I read this posts: https://community.jboss.org/message/643297#643297 https://community.jboss.org/message/643297#643297 but I don't have whitespaces in the task name.
Any suggestions?
Thank you,
René
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/725743#725743]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months
[JBoss Tools] - Hibernate Tools question
by Alex Popa-Tesileanu
Alex Popa-Tesileanu [https://community.jboss.org/people/alexpote] created the discussion
"Hibernate Tools question"
To view the discussion, visit: https://community.jboss.org/message/758522#758522
--------------------------------------------------------------
Hi,
I tried to use reverse engineering to generate domain objects from database schema.
Everything appear to be ok.
When I tried to insert a record in the table I find it is a problem. Because all fields in the table are defined not null and have default values. The problem is hibernate try to insert all fields whether I completed only a few. Because not all fields are initialised with default values hibernate put null in the fields not initialised. This result in error on insert operation. I resolved this issue by setting values to properties in generated POJO's.
The idea is I have hundreds of tables and I don't want to manually set default values for properties.
I have a question:
It is possible to set somehow reverse engineering to generate properties with default values taken from table definition?
Ex.
+public class AaaProduse implements java.io.Serializable {+
+ private String codProd;+
+ private String denProd="";+
+ private String sirGrupare="";+
+ private String sirCautare="";+
+ private BigDecimal stoc=0;+
+..............+
+instead of:+
++
+public class AaaProduse implements java.io.Serializable {+
+ private String codProd;+
+ private String denProd;+
+ private String sirGrupare;+
+ private String sirCautare;+
+ private BigDecimal stoc;+
Thank you very much,
Alex
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/758522#758522]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months
[jBPM] - jBPM Unit testing Guided Decision Table .gdst
by Alistair Jarrett
Alistair Jarrett [https://community.jboss.org/people/gravityblast] created the discussion
"jBPM Unit testing Guided Decision Table .gdst"
To view the discussion, visit: https://community.jboss.org/message/760544#760544
--------------------------------------------------------------
Hi all,
I am trying to unit test a Guided Decision Table. I have plenty of unti tests successfully testing rules, human tasks etc.. however decision tables are causing me trouble. I have created my decision table using the guvnor interface and its stored in the repo. I then pull this file into JBDS and open the .gdst file which simply shows a structured XML file (beginning with <decision-table52>?) , which I guessed was a xml drl format and would be parsed into drl at runtime. However I am having trouble defining the resource type, and I cant find any documentation to help me!
I have tried defining the resource type like so:
> kbuilder.add(ResourceFactory.newClassPathResource("testDecisionTable.gdst"),ResourceType.DTABLE);
however when I insert this into my session:
> StatefulKnowledgeSession ksession = createKnowledgeSession(getKbase());
this throws an error on my stacktrace at
> orgs.drools.decisiontable.parser.xls.ExcelParser.parseFile
obviously it's seeing the xml format and thinks its a excel file.
I have also tried using resource type XDRL, considering decision tables are essentially a drl file with a gui & its in xml format:
> kbuilder.add(ResourceFactory.newClassPathResource("testDecisionTable.gdst"),ResourceType.DTABLE);
I thought this would parse the xml into drl and then I can use tyhe decision table as a rules file! However this throws an error:
> (null: 1, 19): cvc-elt.1: Cannot find the declaration of element 'decision-table52'.
Could some1 provide me with some assitance to get these working or some examples of decision tables being used in a junit test would also be great. As I said I ha vent managed to find anything in the documentation, so I'v either overlooked something (probably) or its not in their!
Thanks for any help!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760544#760544]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 6 months