[Javassist] - Javassist truncates big class file
by David Iglesias
David Iglesias [http://community.jboss.org/people/dav.iglesias] created the discussion
"Javassist truncates big class file"
To view the discussion, visit: http://community.jboss.org/message/594522#594522
--------------------------------------------------------------
I have a problem with Javassist. When I try to edit a (relatively) big class file (38KB), Javassist will truncate it. It is the biggest class file I have tried editing, so I am asuming it has something to do with the size. Smaller class files have no problem.
The code I am running is this simple:
import javassist.*;
public class Test{
public static void main(String[] args) throws Exception{
ClassPool pool = ClassPool.getDefault();
CtClass c = pool.get("com.ehsunbehravesh.mypasswords.gui.MainFrame");
c.writeFile();
}
}
And this is the result I get:
digles@XXXX:~/mypassbin/MyPasswords$ ls -l com/ehsunbehravesh/mypasswords/gui/MainFrame.class
-rw-r--r-- 1 digles XXXX 38201 ene 31 13:53 com/ehsunbehravesh/mypasswords/gui/MainFrame.class
digles@XXXX:~/mypassbin/MyPasswords$ java Test
digles@XXXX:~/mypassbin/MyPasswords$ ls -l com/ehsunbehravesh/mypasswords/gui/MainFrame.class
-rw-r--r-- 1 digles XXXX 16384 mar 21 11:09 com/ehsunbehravesh/mypasswords/gui/MainFrame.class
Can anybody help me with this? Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594522#594522]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JNDI and Naming] - EJB - JBOSS - JNDI HELP!!!
by stefano bertozzi
stefano bertozzi [http://community.jboss.org/people/bertoz84] created the discussion
"EJB - JBOSS - JNDI HELP!!!"
To view the discussion, visit: http://community.jboss.org/message/593474#593474
--------------------------------------------------------------
Hello, i'm new!!!
I'm approacing for the first time with JBoss and EJB; currently i'm running JBOSS 6.0 final, EJB 3.0 ( i chose this when i created my project - i don't want to use EJB 3.1 for now ), Eclipse Helios. Everything should be configured, i hope.
That's what i have done till now:
Created a +CalculatorBean+ and his interface +CalculatorRemote+ under the package +mycalcBean+;
Created a +CalculatorClient+ under the package +mycalcClient+;
both in the same EJB project +MyProjectEJB3.0.+
The client is a Java simple main that looks up for my bean and use a couple of his methods and runs as a Java application.
I have to set environment properties in my client and pass +env+ to my context.lookup:
*+ Hashtable<String, String> env = new Hashtable<String, String>();+*
*+ env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");+*
*+ env.put(Context.PROVIDER_URL, "localhost:1099");+*
*+ env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");+*
+ InitialContext ctx = new InitialContext(*env*);+
+ Object obj = ctx.lookup(CalculatorBean.class.getSimpleName() + "/remote"/*"CalculatorBean/remote"*/);+
or i get the NOINITIALCONTEXT error.
Why i need to do this when a lot of tutorials don't? Moreover i would prefer to use @EJB to look for my bean.
I have read a lot of things that tell about the jndi.properties file. Well, that's my file under JBOSS_HOME\server\default\conf:
*# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING*
*#*
*java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory*
*java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces*
I also tryed to put this file in the path where i have my client and in the CLASSPATH of my JDK.
Nothing worked. Why my client can't read this default conf file?
One last question:
if i change position to my client, putting it into a different project ( for example: +MyProjectEJB3.0Client+ ) the compiler doesn't see the +import project.mycalcBean.*+
How to do that?
thank you for your understanding and help!!!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/593474#593474]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - Propagating signals to call activities
by Tin Tvrtkovic
Tin Tvrtkovic [http://community.jboss.org/people/tinche] created the discussion
"Propagating signals to call activities"
To view the discussion, visit: http://community.jboss.org/message/594528#594528
--------------------------------------------------------------
Hello community :)
I seem to have a problem I was hoping I could get some feedback on. I'm trying to implement my process in BPMN2/jBPM 5. My process is very dependent on external signals (you could imagine it as part of a server, simulating a complex state machine that needs to be budged along step by step). I use a lot of intermediate catching events, with external components signaling state changes with processInstance.signal(). To make things easier for myself, I was going to partition parts of the state machine into reusable components (i.e. independent processes, <callActivities>), but it would appear intermediate catching events inside callActivities don't get the parent signals propagated to them.
Am I doing anything wrong, or is this simply not supported in either jBPM 5 or the BPMN2 spec?
Cheers.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594528#594528]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
Jboss JMS question.
by Fabio Miranda
Hello,
I am running a simple example that post and get message from embedded Jboss
JMS.
I want to know what are the command and arguments to get a list of received
messages, obtain statistics, displays queue, etc.
Thanks for any advise,
fabio.}
15 years
[jBPM] - Still Struggling to Get Started
by Gary Huntress
Gary Huntress [http://community.jboss.org/people/simusid] created the discussion
"Still Struggling to Get Started"
To view the discussion, visit: http://community.jboss.org/message/594485#594485
--------------------------------------------------------------
I've been trying to evaluate jboss/jbpm from end to end and I've got many hours into this already and haven't really gotten anywhere. I am interested in jBPM because I've been asked to migrate a legacy collection of hundreds of processes to a web based system and it sounds like jBPM is the perfect solution.
What I have been able to do:
1) download jbpm full installer, but I have to manually modify build.xml in order to get eclipse for the mac (otherwise the install fails)
2) manually install the graphical process designer (not done as part of the full install?)
3) create a new jbpm project
4) edit the project and correctly run the "hello world" process locally within eclipse
5) navigate to localhost:8080/jbpm-console and log in
What I have not been able to do:
1) Deploy the "hello world" process from eclipse. I see no context menus or windows for deployment.
2) anything at all at the jbpm-console. There are no tasks. I assume this is because I have not deployed anything
3) create a new *.bpmn file and add it to my first project
My biggest question is about my tools, environment, and my assumptions. If I download the full installer I expected that I should be able to unpack it, run "ant install.demo" then "ant start.demo", which launches eclipse, then create/edit a jbpm project that I can edit then deploy and then see something in jbpm-console. Am I missing something obvious here?
Thanks for any help. I don't want to give up on this.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594485#594485]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[Snowdrop] - AS6 & Snowdrop2 multiple queries
by Darryl Miles
Darryl Miles [http://community.jboss.org/people/dlmiles] created the discussion
"AS6 & Snowdrop2 multiple queries"
To view the discussion, visit: http://community.jboss.org/message/593962#593962
--------------------------------------------------------------
I am using JBoss AS6 with Snowdrop 2.0.0-MP1-SP1, I have updated the spring implementation with 3.0.5.RELEASE (although I wish either that all JARs were named with the version "spring-core-3.0.5.RELEASE.jar", yes you can get them like that from Maven, or you at least put them in a directory of their version "3.0.5.RELEASE/spring-core.jar", which might lend itself to OSGi based version selection for AS7).
I have a number of queries.
My project layout is a straight forward EAR with a JPA jar, with a EJB jar, with a WAR.
EAR has META-INF/earApplicationContext-spring.xml
JPA has META-INF/jpaApplicationContext-spring.xml
EJB has META-INF/ejbApplicationContext-spring.xml
WAR has WEB-INF/classes/spring-context/warApplicationContext-spring.xml and WEB-INF/classes/spring-servlet/servlet-spring.xml
Each of these has a http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans/spring-beans-3.0.xsd and a <description> element with the BeanFactory=(label) and ParentBeanFactory=(label). I have verified in JNDI the name of the bindings for the (label) parts. these are the files names without -spring.xml suffix like "earApplicationContext".
Problem 1)
However I have not been able to verify the parent/child relationships are being correctly setup by spring.deployer. I can see in org.jboss.spring.factory.NamedXmlBeanDefinitionParser the new BeanFactory get #setParentBeanFactory() called.
There is also a <description> element variable Instantiation(true) which by default is set to false (which I think should be true) but I can't see how or where it is used by the spring.deployer.
Problem 2)
How is the WAR handled, should both the outside ApplicationContext and the child servlet's be setup in the traditional (WAR only) way and using the <listener> and <servlet> settings in web.xml.
Since the JBoss VFS can see inside of the EAR and all the classpaths, is the WAR packaged correctly or should a certain naming convention not be used.
Problem 3)
If my EAR was a little more complex. How is it possible to control the order in which both JBoss AS brings up each JAR (so we're talking JPA, EJB and regular JARs) all inside EAR. Does this order also affect how and when SNOWDROP creates the parent/child relationships ? To me it would seem that SNOPDROP should scan for all possible ApplicationContext's to instate just the skeleton factory itself (no beans inside yet), it should create them all and name each. Then once all are created another pass to fixup the parent/child relationship. Then on another pass walking the BeanFactory top-down it would then process the non-lazy beans within.
Problem 4)
Does BeanFactoryLocator work within an EAR context like (I think) it should. When I query it, I find it empty. I believe this mechanism could be used to allow 2 sibling BeanFactorys in a hierarchy to find each other. There is some overlap with JNDI in this function but which this is Spring's own method.
Problem 5)
I'm sure older version of SNOPWDROP allowed arbitrary naming and bindings to JNDI, such as "spring/myenterprise-mymodule-ear" (note the use of the "spring/" path prefix), this does not seem to be allowed anymore. What/why is the change of policy on this ?
Last question)
Is there any suitably complex example of multiple ApplicationContexts inside different JEE deployables all wrapped in an EAR to demonstrate/test such functionality ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/593962#593962]
Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
Stuck threads in JVM instance. What causes them?
by Mike Franon
Hi,
I am fairly new to jboss..and was curious what causes threads to get
stuck and is there a way to prevent it? Is there anyway to fix it
besides restarting the instance.
Is it code? memory?
Thanks
15 years