[JBoss Microcontainer] New message: "java.lang.RuntimeException: No Context associated with current Thread"
by Csaba Szucs
User development,
A new message was posted in the thread "java.lang.RuntimeException: No Context associated with current Thread":
http://community.jboss.org/message/520568#520568
Author : Csaba Szucs
Profile : http://community.jboss.org/people/CsabaSzucs
Message:
--------------------------------------------------------------
Hello Guys,
I have a blocking issue, could you please help me? I would highly appreciate if there would be some fast solution, workaround for this.
I have a MicroContainer bean/service which is accessed by a servlet class. I am using the jboss-mc-int-servlet-2.2.0.Alpha1.jar to access the bean from my servlet. Actually this bean service provides some BIRT-based functions (so it is a client of BIRT, BIRT data engine API uses JavaScript, as well).
When I deploy my servlet to the AS, I get the exception below.
*Is this a JBoss-related issue or rather some BIRT-related? Or perhaps Mozilla/FireFox/Rhino-issue?*
Interestingly enough there is no problem with the service if I don't run it from inside my servlet...
Many thanks in advance!
Csaba
/Used JBoss AS: jboss-5.1.0.GA /
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.RuntimeException: No Context associated with current Thread
org.mozilla.javascript.Context.getContext(Context.java:2206)
org.mozilla.javascript.Context.javaToJS(Context.java:1578)
org.eclipse.birt.data.engine.impl.DataSetRuntime.getJSDataSetObject(DataSetRuntime.java:385)
org.eclipse.birt.data.engine.impl.QueryExecutor.getQueryScope(QueryExecutor.java:1171)
org.eclipse.birt.data.engine.impl.QueryExecutor.loadFromCache(QueryExecutor.java:354)
org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:305)
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:437)
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:189)
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:177)
org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:143)
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:158)
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:141)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.executeQuery(GetParameterDefinitionTask.java:517)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getResultSetOfCascadingGroup(GetParameterDefinitionTask.java:839)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getChoicesFromParameterGroup(GetParameterDefinitionTask.java:756)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getCascadingParameterList(GetParameterDefinitionTask.java:463)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.doGetSelectionList(GetParameterDefinitionTask.java:396)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getSelectionList(GetParameterDefinitionTask.java:354)
org.eclipse.birt.report.engine.api.impl.GetParameterDefinitionTask.getSelectionListForCascadingGroup(GetParameterDefinitionTask.java:593)
com.continental.plm.reportutility.parameters.CascadingParameterGroupDefinition.getChoices(CascadingParameterGroupDefinition.java:21)
com.continental.plm.reportutility.parameters.CascadingParameterGroupDefinition.renderHtml(CascadingParameterGroupDefinition.java:32)
com.contiautomotive.plm.mksreporting.webui.Parameters.createParameterRequestingForm(Parameters.java:64)
com.contiautomotive.plm.mksreporting.webui.Parameters.createPage(Parameters.java:45)
com.contiautomotive.plm.mksreporting.webui.Parameters.doGet(Parameters.java:34)
com.contiautomotive.plm.mksreporting.webui.Parameters.doPost(Parameters.java:76)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.contiautomotive.plm.mksreporting.webui.Modules.doPost(Modules.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520568#520568
16 years, 5 months
[JBoss AOP] New message: "Help Me: ERROR [Instrumentor] [warn] AOP Instrumentor failed"
by dfsdf asdas
User development,
A new message was posted in the thread "Help Me: ERROR [Instrumentor] [warn] AOP Instrumentor failed":
http://community.jboss.org/message/520562#520562
Author : dfsdf asdas
Profile : http://community.jboss.org/people/cuccu83
Message:
--------------------------------------------------------------
Hi at all. I'm using Jboss 5.1.0 jdk 6 and i tried "inboss" examples localized in jboss AOP distribution.
I tried to insert a .aop in war existent application as explain in "injboss" examples. But when i start the server i obtain that exception:
Please to help me. Any suggestion is appreciate!!
12:42:34,099 ERROR [Instrumentor] [warn] AOP Instrumentor failed to transform or
g.apache.ode.axis2.ODEService
javassist.CannotCompileException: [source error] no such a constructor
at javassist.CtBehavior.setBody(CtBehavior.java:368)
at javassist.CtBehavior.setBody(CtBehavior.java:334)
at javassist.CtConstructor.setBody(CtConstructor.java:216)
at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.createAdvisorCt
ors(GeneratedAdvisorInstrumentor.java:440)
at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.createAdvisorCl
ass(GeneratedAdvisorInstrumentor.java:313)
at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.doSetupBasics(G
eneratedAdvisorInstrumentor.java:561)
at org.jboss.aop.instrument.Instrumentor.setupBasics(Instrumentor.java:9
49)
at org.jboss.aop.instrument.MethodExecutionTransformer.instrument(Method
ExecutionTransformer.java:143)
at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:744
)
at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(Gener
atedAdvisorInstrumentor.java:117)
at org.jboss.aop.SuperClassesFirstWeavingStrategy.instrumentClass(SuperC
lassesFirstWeavingStrategy.java:202)
at org.jboss.aop.SuperClassesFirstWeavingStrategy.translate(SuperClasses
FirstWeavingStrategy.java:69)
at org.jboss.aop.AspectManager.translate(AspectManager.java:1071)
at org.jboss.aop.AspectManager.transform(AspectManager.java:1015)
at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransforme
r.java:87)
at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java
:75)
at sun.instrument.TransformerManager.transform(TransformerManager.java:1
69)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java
:365)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLo
ader.java:63)
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.
java:572)
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.
java:532)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseC
lassLoader.java:530)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseC
lassLoader.java:507)
at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDeleg
ateLoader.java:134)
at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(Fil
teredDelegateLoader.java:131)
at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassL
oadingTask.java:452)
at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoade
rManager.java:251)
at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoader
Manager.java:150)
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseCl
assLoaderDomain.java:265)
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseCl
assLoaderDomain.java:1119)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(Ba
seClassLoader.java:798)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoa
der.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.apache.ode.axis2.BindingContextImpl.createService(BindingContextI
mpl.java:94)
at org.apache.ode.axis2.BindingContextImpl.activateMyRoleEndpoint(Bindin
gContextImpl.java:67)
at org.apache.ode.bpel.engine.ODEProcess.activate(ODEProcess.java:745)
at org.apache.ode.bpel.engine.BpelServerImpl.register(BpelServerImpl.jav
a:380)
at org.apache.ode.axis2.ODEServer.handleEvent(ODEServer.java:659)
at org.apache.ode.axis2.ODEServer.access$100(ODEServer.java:93)
at org.apache.ode.axis2.ODEServer$ProcessStoreListenerImpl.onProcessStor
eEvent(ODEServer.java:646)
at org.apache.ode.store.ProcessStoreImpl.fireEvent(ProcessStoreImpl.java
:549)
at org.apache.ode.store.ProcessStoreImpl.fireStateChange(ProcessStoreImp
l.java:555)
at org.apache.ode.store.JBossProcessStoreImpl$DeployScheduler.doDeploy(J
BossProcessStoreImpl.java:185)
at org.apache.ode.store.JBossProcessStoreImpl$DeployScheduler.run(JBossP
rocessStoreImpl.java:91)
Caused by: compile error: no such a constructor
at javassist.compiler.MemberCodeGen.atMethodCallCore2(MemberCodeGen.java
:593)
at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:
575)
at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:523)
at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:337)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)
at javassist.compiler.Javac.compileBody(Javac.java:222)
at javassist.CtBehavior.setBody(CtBehavior.java:360)
... 47 more
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520562#520562
16 years, 5 months
[jBPM] New message: "Re: Performance problem with JBPM 3.1.2"
by Siri Douqué
User development,
A new message was posted in the thread "Performance problem with JBPM 3.1.2":
http://community.jboss.org/message/520560#520560
Author : Siri Douqué
Profile : http://community.jboss.org/people/sirivs
Message:
--------------------------------------------------------------
Thank you for the quick response !
In my first question, I just thought it could be a problem due to my process design (processInstance not going to endState). The bad performances are noticed on the production client server, but on my local dev server, I can't reproduce the big delays reported by the client. I still have to find exactly in which method the delays are coming from. So as you said I'll have to run some analysers on the client server and activate logs to read through.
When you say "analysers" do you have any good examples ?
For the second question, I can only say thank you ! I just didn't think it could be so easy. I'll try it out as soon as possible.
Regards,
Siri Douqué
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520560#520560
16 years, 5 months
[JBoss Microcontainer Development] New message: "Re: Pluggable dependency resolver"
by Thomas Diesler
User development,
A new message was posted in the thread "Pluggable dependency resolver":
http://community.jboss.org/message/520557#520557
Author : Thomas Diesler
Profile : http://community.jboss.org/people/thomas.diesler@jboss.com
Message:
--------------------------------------------------------------
Hi Kabir,
here is a quick describtion of how OSGi bundle resolution works.
For details see
Module Layer
http://www.osgi.org/Download/File?url=/download/r4v42/r4.core.pdf
http://www.aqute.biz/Sales/OSGi#core
When a bundle is http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#INSTALLED, only its constistency in terms of osgi metadata in the manifest is verified. There is no connection to other http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html established. From now on, the http://www.osgi.org/javadoc/r4v42/org/osgi/framework/launch/Framework.html is free to resolve the Bundle at any time. When a Bundle gets started (explicitly) it first becomes http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#RESOLVED and then http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#ACTIVE. For a Bundle to become RESOLVED all its required Package-Imports and other mandatory requirements must get sattisfied. If a Bundle fails to get RESOLVED it remains in the INSTALLED state and may get RESOLVED at a later time (when more requirements become available). In the transition from RESOLVED to ACTIVE the optionally associated http://www.osgi.org/javadoc/r4v42/org/osgi/framework/BundleActivator.html... method is called. If that fails, the Bundle remains in state RESOLVED and the user may retry to start the Bundle again at some later time.
There are various operations that implicitly (try to) resolve a Bundle. These are
* http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#getResou...
* http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#loadClas...
and it varients. Note, that http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#getEntry... does NOT trigger bundle resolution. A Bundle can also get explicitly resolved through the http://www.osgi.org/javadoc/r4v42/org/osgi/service/packageadmin/PackageAd... method.
During bundle resolution, so called 'wires' are established between the exporter of a package and its importers. The resolver may have multiple exporters for a given package name/version to choose from and the most common case is that a Bundle contains a certain package that it may also import from another Bundle. In this case the wire may get established to the Bundle itself. It is a 'self wire'.
The resolver is encouraged to find the best possible solution that leads to a consistent class space. A consistent class space is one that satisfies the requirements of all importers and a given package is only exported by one and only one exporter. This can become quite complicated, especially when exported packages define a 'uses' directive. The uses directive means that all Bundles in a class space must get wired (i.e. use) the same exporter for a given package. In the face of multiple possible wiring outcomes, the uses directive helps to make more deterministic choices. Generally the resolver should aim to resolve as many as possible Bundles by walking the tree of possible wirings. In case of many unresolved (i.e. hundreds of) Bundles this can become a very expensive operation. Equinox, disregards possible wirings after a certain level of complexity and may not find a good solution. Felix considers more possible solution but may take ages to finally return with "sorry can't do it". Currently, both Equinox and Felix work together on a standalone resolver that may be used by both frameworks (and hopefully) ours in the future.
Once a wiring is established, is is never changed unless the Framework is restarted or a set of Bundles is explicitly refreshed through the http://www.osgi.org/javadoc/r4v42/org/osgi/service/packageadmin/PackageAd.... It is important to understand that http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Bundle.html#uninstall() does NOT remove the wiring. Even after a Bundle is uninstalled it is still possible to load classes from that Bundle. This is true, unless the uninstalled Bundle was never choosen as an exporter and there is no wiring to it. In this case it can be removed from the Framework straight away.
Here are a few requirements that I would have on the resolver API
* It must be possible to resolve multiple Modules at the same time
* Resolution must be based on mandatory/optional requirements and capabilities
* Environmental capablities (i.e. OS, JDK, NativeLibraries) may influence the resolver outcome
* It must be possible to 'try run' resolution and examine the potential outcome without affecting the running system
* The MC resolver should be adaptable to the Felix standalone resolver (details still unknown)
* The resolver must have an interface to a repository (i.e. OBR) to be able to pull in unstatisfied dependencies on demand
* perhaps others that I may need to add in the future ...
hope that helps
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520557#520557
16 years, 5 months
[EJB 3.0] New message: "Stateful not keep data"
by Youssef El Maroufy
User development,
A new message was posted in the thread "Stateful not keep data":
http://community.jboss.org/message/520556#520556
Author : Youssef El Maroufy
Profile : http://community.jboss.org/people/elmaroufy
Message:
--------------------------------------------------------------
Hi
I hope i'm in the correct sub-furum
I have a problem with Stateful that do not keep data between methods calls;
@Stateful
public class ShoppingCart implements ShoppingCartLocal {
private List<CartItem> cartItems;
public List<CartItem> getCartItems() {
return cartItems;
}
@PostConstruct
public void initialize() {
System.out.println("<--Construct-->");
cartItems = new ArrayList<CartItem>();
}
@PreDestroy
public void clear() {
System.out.println("<--Destroy-->");
cartItems = null;
}
}
the method initialize() is executed on each call !
I'm using JBoss 5.1, and the Stateful is injected in a Managed Bean
public class ProductBusinessDelegate {
@EJB
ProductBusinessLocal productBusiness;
@EJB
ShoppingCartLocal shoppingCart;
public List<CartItem> getCartItems(){
return shoppingCart.getCartItems();
}
public ProductBusinessDelegate() {
}
}
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520556#520556
16 years, 5 months
[JBoss Portal] New message: "please help me, a jboss portal problem"
by max liu
User development,
A new message was posted in the thread "please help me,a jboss portal problem":
http://community.jboss.org/message/520555#520555
Author : max liu
Profile : http://community.jboss.org/people/liumax
Message:
--------------------------------------------------------------
public String download() {
ActionResponseImpl response = (ActionResponseImpl) FacesContext
.getCurrentInstance().getExternalContext().getResponse();
try {
downloadFile(response,"","");
return "";
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// FacesContext.getCurrentInstance().responseComplete();
return null;
}
public void downloadFile(ActionResponseImpl response, String realName,
String fileName) throws IOException {
System.out.println(response.getClass());
response.getRealResponse().setHeader("Content-Disposition",
"attachment; filename=b.rar");
OutputStream output = response.getRealResponse().getOutputStream();
byte[] b = new byte[1024];
int i = 0;
FileInputStream fis = new FileInputStream("c:/upload/upload2/b.rar");
while ((i = fis.read(b)) > 0) {
output.write(b, 0, i);
}
output.flush();
output.close();
}
sorry,i speak english is not very well,so i used google translation to send message to here.my project(jbossportal+jsf) has a problem.it is an download development,i can not download rar or doc file.it will be opened in IE.the problem is "response.getRealResponse().setHeader()" can not do anything.please help me,thank you evenybody
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520555#520555
16 years, 5 months