[Javassist] - Method Content Comparison
by David Jakes
David Jakes [http://community.jboss.org/people/chicken_bones] created the discussion
"Method Content Comparison"
To view the discussion, visit: http://community.jboss.org/message/641879#641879
--------------------------------------------------------------
I am trying to make a compatibility class loader.
General scenario. People edit the source file, change the contents of a few methods and add a few fields and then recompile the class.
I then compare the original class and the changed class with javassist.
I need to detect when the methods haven't been changed. I tried measuring the length of the code attribute but that fails when the change is a single field access redirection for example. I also tried comparing the contents of the arrays but that didn't work as various bytes at seemingly coordinated locations in the attribute have different values. Due to the fact I don't actually understand how to read the bytecode I'm unable to work out a solution.
If someone could help point me in the right direction or give me a sample of code that could analyse this for me that would be great.
Thankyou for your time.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641879#641879]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[EJB3] - EAR Deployment Failure on JBOSS AS 7
by Bruno Feki
Bruno Feki [http://community.jboss.org/people/Bruno1982] created the discussion
"EAR Deployment Failure on JBOSS AS 7"
To view the discussion, visit: http://community.jboss.org/message/641866#641866
--------------------------------------------------------------
Hi,
I have an ear structured as follows:
core-1.0.ear
+lib
+core-jpa-1.0.jar /*JPA 2.0 Entities */
+core-ejb-1.0.jar /*EJB 3.1 Lite : Only Stateless Session Beans */
+core-web-1.0.jar /* Servlet 3.0 based web application with XHTML/Clean-AJAX UI */
The application.xml of this ear is:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
<description>The main application for Bazars project</description>
<display-name>core</display-name>
<module>
<java>lib/core-jpa-1.0.jar</java>
</module>
<module>
<ejb>core-ejb-1.0.jar</ejb>
</module>
<module>
<web>
<web-uri>core-web-1.0.war</web-uri>
<context-root>/shops</context-root>
</web>
</module>
</application>
I have already configured my datasource:
23:30:35,377 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/MySqlDS]
However, when i want to deploy the ear on JBOSS AS 7.0.2.Final, I have got the following error:
23:43:10,068 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "core-1.0.ear"
23:43:10,360 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "core-web-1.0.war"
23:43:10,362 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "lib/core-jpa-1.0.jar"
23:43:10,362 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "core-ejb-1.0.jar"
23:43:10,580 INFO [org.jboss.as.server.controller] (HttpManagementService-threads - 1) Deployment of "core-1.0.ear" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"core-1.0.ear\".PARSE missing [jboss.deployment.subunit.\"core-1.0.ear\".\"lib/core-jpa-1.0.jar\".STRUCTURE ]"]}
23:43:10,602 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment lib/core-jpa-1.0.jar in 20ms
23:43:10,607 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment core-ejb-1.0.jar in 25ms
23:43:10,614 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment core-web-1.0.war in 33ms
23:43:10,620 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment core-1.0.ear in 39ms
The structure of core-jpa-1.0.jar is as follows:
core-jpa-1.0.jar
+META-INF
+persistence.xml
+com.blazar.* /*all entities*/
The persistence.xml of this JPA 2.0 jar is:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence" version="2.0">
<persistence-unit name="MySQL5">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/MySqlDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
</properties>
</persistence-unit>
</persistence>
Please can you be of any help ?
Thanks a lot in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641866#641866]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - Processing
by Darin Wilcox
Darin Wilcox [http://community.jboss.org/people/zoikks] created the discussion
"Processing"
To view the discussion, visit: http://community.jboss.org/message/641864#641864
--------------------------------------------------------------
Hello,
I am using jBPM 5.1.0.Final to execute some processes. I started a process with parameters where one of the parameters is an ArrayList<?> named "itemList". I'm trying to access the "itemList" from within a rule using the following syntax:
when
$process : WorkflowProcessInstance()
$a : ArrayList() from ((ArrayList)$process.getVariable("arrayList"))
then
System.out.println("Size: " + $a.size());
However, the condition never seems to be true when I use an ArrayList (I assume the same thing would happen using any object that implements Collection). I have used other singular objects such as String without a problem and read it properly from the process in the condition portion. Additionally, the arrayList object is accessible in the consequence as long I don't check for it in the condition.
Can anyone tell me why the ArrayList cannot be read from the process parameters in the condition portion of a rule?
Are there any options to this scenario other than loading the elements from the ArrayList into working memory and running a "from collect" on them?
I have attached code that demonstrates the issue.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641864#641864]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[EJB3] - What is the JNDI parameter in ejb3 deployment?
by Joseph Hwang
Joseph Hwang [http://community.jboss.org/people/aupres] created the discussion
"What is the JNDI parameter in ejb3 deployment?"
To view the discussion, visit: http://community.jboss.org/message/641732#641732
--------------------------------------------------------------
I made ear project which contained war and jar project. Deployment is succeeded.
Problem is JNDI in JSP client. I put some codes like below:
*Context ctx = new InitialContext();*
*IEJBHelloWorldPort hello = (IEJBHelloWorldPort) ctx.lookup("EJBHelloWorldBean/remote"); //throws exception*
But JBoss throws exception like this :
*javax.naming.NameNotFoundException*
Deployment messages of EJB3 jar are
*19:36:24,319 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named EJBHelloWorldBean in deployment unit subdeployment "EJBHelloWorldBean.jar" of deployment "EJBHelloWorldEAR.ear" are as follows:*
*java:global/EJBHelloWorldEAR/EJBHelloWorldBean/EJBHelloWorldBean!com.aaa.ejb3.IEJBHelloWorldPort*
*java:app/EJBHelloWorldBean/EJBHelloWorldBean!com.aaa.ejb3.IEJBHelloWorldPort*
*java:module/EJBHelloWorldBean!com.aaa.ejb3.IEJBHelloWorldPort*
*java:global/EJBHelloWorldEAR/EJBHelloWorldBean/EJBHelloWorldBean*
*java:app/EJBHelloWorldBean/EJBHelloWorldBean*
*java:module/EJBHelloWorldBean*
*19:36:24,444 INFO [org.jboss.web] (MSC service thread 1-1) registering web context: /EJBHelloWorldWeb*
*19:36:24,491 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "EJBHelloWorldEAR.ear"*
Then what is the JNDI lookup parameter? Pls, inform me. Thanks in advanced.
Best regards.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641732#641732]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - Unable to generate PDF document from the Web Designer 2.0.
by Victor Sarmiento
Victor Sarmiento [http://community.jboss.org/people/vsarmien] created the discussion
"Unable to generate PDF document from the Web Designer 2.0."
To view the discussion, visit: http://community.jboss.org/message/641609#641609
--------------------------------------------------------------
We have just installed jBPM 5.2 from the full installer (*jbpm-5.2.0.Final-installer-full.zip*) on Windows. We haven't been able to generate the PDF document from the Web Designer 2.0. If we use the option "Share Process PDF" from the top toolbar, we get the following error message: "Failed to create the process PDF".
If we use the PDF button at the bottom of the Web Designer, we get the following error messages. (I have included the error shown on the web page, as well as the error shown in the server.log file)
ERROR MESSAGE IN DESIGNER
=========================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
1. javax.servlet.ServletException: Servlet execution threw an exception
com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75)
root cause
1. java.lang.NoClassDefFoundError: org/apache/commons/logging/Log
com.intalio.web.server.TransformerServlet.doPost(TransformerServlet.java:154)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75)
root cause
1. java.lang.ClassNotFoundException: org.apache.commons.logging.Log from [Module "deployment.designer.war:main" from Service Module Loader]
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
com.intalio.web.server.TransformerServlet.doPost(TransformerServlet.java:154)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75)
note The full stack trace of the root cause is available in the JBoss Web/7.0.1.Final logs.
JBoss Web/7.0.1.Final
DETAILS FROM SERVER.LOG
========================
14:19:56,493 SEVERE [com.intalio.web.server.TransformerServlet] (http-localhost-127.0.0.1-8080-7) Server returned HTTP response code: 505 for URL: http://localhost:8080/drools-guvnor/rest/packages/defaultPackage/assets/Test http://localhost:8080/drools-guvnor/rest/packages/defaultPackage/assets/Test Process/source/
14:19:56,493 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/designer].[TransformerServlet]] (http-localhost-127.0.0.1-8080-7) Servlet.service() for servlet TransformerServlet threw exception: java.lang.ClassNotFoundException: org.apache.commons.logging.Log from [Module "deployment.designer.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
at com.intalio.web.server.TransformerServlet.doPost(TransformerServlet.java:154) [classes:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at com.intalio.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:75) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641609#641609]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[Datasource Configuration] - driver-class makes no difference
by jepper
jepper [http://community.jboss.org/people/jepper] created the discussion
"driver-class makes no difference"
To view the discussion, visit: http://community.jboss.org/message/641770#641770
--------------------------------------------------------------
Hi
I want to set up p6spy, but jboss is not using the pass thru driver it appears.
My question is: Is <driver-class> effectively ignored but it's presence required?
Setup:
jboss 6.1.0 final
mysql 5.5
Both running on the same windows XP machine.
CLASSPATH: D:\opt\jboss\jboss-6.1.0.Final\server\all\conf;D:\opt\jboss\jboss-6.1.0.Final\bin\run.jar
D:\opt\jboss\jboss-6.1.0.Final\server\all\conf\spy.properties
D:\opt\jboss\jboss-6.1.0.Final\server\all\lib\p6spy.jar
D:\opt\jboss\jboss-6.1.0.Final\server\all\deploy\mysql-ds.xml
It seems I can enter any random string in the <driver-class> tag. It makes no difference. I start jboss with a database with no tables. New jboss tables are created as expected, despite driver-class not being meaningful. If I delete the tag however, jboss complains and cannot speak to the database.
mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
<driver-class>randomblah</driver-class>
<user-name>myuser</user-name>
<password>#</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
mysql> show tables;
+-------------------+
| Tables_in_jbossdb |
+-------------------+
| hilosequences |
| timers |
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641770#641770]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month