[JBoss Remoting] - WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException
by red Car
red Car [https://community.jboss.org/people/redCar] created the discussion
"WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException"
To view the discussion, visit: https://community.jboss.org/message/723980#723980
--------------------------------------------------------------
Hallo,
my App calls only one method in a SFSB.
I can call this method for example 40 times in short time (per mouse click) and after this, I get a exception inside serverlog.
First the WorkerThread#1 closes a ServerSocketWrapper.
Second a WorkerThread#0 throws a exception occured during first invocation.
My Application is hanging until this exception is comming, after this, the calls are done successful.
The waiting time can be 60 seconds until the call ist fullfilled.
What's the reason of this error, and what can I do, to avoid this error?
Thank you,
Werner
=== snipp ===
2012-03-15 13:15:47,389 INFO [STDOUT] (WorkerThread#0[192.168.7.3:2346]) -------> (86)ApplMeldMonitorBean.getCrossReferences ... done.
2012-03-15 13:15:47,389 DEBUG [org.jboss.remoting.transport.socket.ServerThread] (WorkerThread#0[192.168.7.3:2346]) WorkerThread#0[192.168.7.3:2346] closed socketWrapper: ServerSocketWrapper[Socket[addr=/192.168.7.3,port=2346,localport=4473].c627f5]
2012-03-15 13:15:49,530 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) Periodic recovery - second pass <Do, 15 Mrz 2012 13:15:49>
2012-03-15 13:15:49,530 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) AtomicActionRecoveryModule: Second pass
2012-03-15 13:15:49,530 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] (Thread-12) [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2012-03-15 13:15:49,530 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (Thread-12) [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2012-03-15 13:16:48,043 ERROR [org.jboss.remoting.transport.socket.ServerThread] (WorkerThread#1[192.168.7.3:2348]) WorkerThread#1[192.168.7.3:2348] exception occurred during first invocation
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedConstructorAccessor262.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jboss.remoting.transport.socket.ServerThread.createServerSocketWrapper(ServerThread.java:909)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:491)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2266)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2279)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:100)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:75)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:58)
at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:179)
at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:162)
at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:46)
... 6 more
2012-03-15 13:16:48,043 DEBUG [org.jboss.remoting.transport.socket.ServerThread] (WorkerThread#1[192.168.7.3:2348]) WorkerThread#1[192.168.7.3:2348] closed socketWrapper: ServerSocketWrapper[null.0]
2012-03-15 13:16:52,340 DEBUG [org.jboss.ejb3.stateful.StatefulContainer] (WorkerThread#0[192.168.7.3:2435]) Received dynamic invocation for method with hash: 2241879895498260985
2012-03-15 13:16:52,340 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] (WorkerThread#0[192.168.7.3:2435]) ++++ LongLivedSessionPropagationInterceptor
2012-03-15 13:16:52,340 DEBUG [org.jboss.ejb3.interceptors.aop.InterceptorSequencer] (WorkerThread#0[192.168.7.3:2435]) aroundInvoke [advisedMethod=public java.util.Map com.gevas.jeb3.meld.session.bean.ApplMeldMonitorBean.getCrossReferences(long), unadvisedMethod=public java.util.Map com.gevas.jeb3.meld.session.bean.ApplMeldMonitorBean.getCrossReferences(long), metadata=[metaData={DISPATCHER={OID=[type=AS_ISvalue=jboss.j2ee:ear=MeldServer-1.2.1.19.ear,jar=MeldServer-1.2.1.19.ear,name=ApplMeldMonitorBean,service=EJB3]}, REMOTING={SUBSYSTEM=[type=AS_ISvalue=AOP], INVOKER_LOCATOR=[type=AS_ISvalue=InvokerLocator [socket://APPLIKATION:4473/?]]}, SFSBInvocation={SessionID=[type=AS_ISvalue=5c4o73-xs6k2h-gztrf7s6-1-gztrhdqx-a8]}, security={context=[type=MARSHALLEDvalue=[org.jboss.security.plugins.JBossSecurityContext()CLIENT)]]}, IS_LOCAL={GUID=[type=AS_ISvalue=jboss.j2ee:ear=MeldServer-1.2.1.19.ear,jar=MeldServer-1.2.1.19.ear,name=ApplMeldMonitorBean,service=EJB3,VMID=fcc850ec3650b463:-725119d8:1361646a53d:-7ff9]}, SessionInvocation={InvokedMethod=[type=AS_ISvalue=com.gevas.jeb3.meld.session.bean.ApplMeldMonitorRemote: com.gevas.jeb3.meld.session.bean.ICrossReference.getCrossReferences(long)]}}], targetObject=com.gevas.jeb3.meld.session.bean.ApplMeldMonitorBean@13ae670, arguments=[Ljava.lang.Object;@11b29ef]
2012-03-15 13:16:52,340 INFO [STDOUT] (WorkerThread#0[192.168.7.3:2435]) -------> (86)ApplMeldMonitorBean.getCrossReferences ...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/723980#723980]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[Datasource Configuration] - Cannot lookup datasource remotely in Jboss 7.10 final
by Bob Kung
Bob Kung [https://community.jboss.org/people/r4_1314] created the discussion
"Cannot lookup datasource remotely in Jboss 7.10 final"
To view the discussion, visit: https://community.jboss.org/message/723893#723893
--------------------------------------------------------------
hi, I am newly to Jboss 7 and I am testing remote lookup XA datasource from JNDI but no luck. Admittedly, this is not a recommend solution for connection usage remotely, however I just do a testing since it should provide in the previous jboss version.
Here is my datasource configuration.
<xa-datasource jndi-name="java:jboss/exported/datasources/abc" pool-name="abc" enabled="true" use-java-context="false" use-ccm="false">
<xa-datasource-property name="ServerName">
localhost
</xa-datasource-property>
<xa-datasource-property name="DatabaseName">
abc
</xa-datasource-property>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-pool>
<min-pool-size>0</min-pool-size>
<max-pool-size>3</max-pool-size>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<pad-xid>false</pad-xid>
<wrap-xa-resource>true</wrap-xa-resource>
</xa-pool>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<background-validation-millis>0</background-validation-millis>
</validation>
<statement>
<prepared-statement-cache-size>0</prepared-statement-cache-size>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
And here is my client
public class DataSourceClient {
// *************** DATASOURCE *************************
// public final static String DATASOURCE = "java:/datasources/abc";
public final static String DATASOURCE = "datasources/abc";
private DataSource myDS;
public DataSource init(Context ctx) throws NamingException,
JMSException {
return myDS = (DataSource) ctx.lookup(DATASOURCE);
}
public void test() throws SQLException{
String sql = "INSERT INTO test values (null,'xxx');";
Connection con = myDS.getConnection();
Statement stat = con.createStatement();
stat.execute(sql);
stat.close();
con.close();
}
public static void main(String[] args) throws Exception {
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());
env.put(Context.PROVIDER_URL, "remote://10.1.24.103:4447");
env.put(Context.SECURITY_PRINCIPAL, "user");
env.put(Context.SECURITY_CREDENTIALS, "user");
InitialContext remoteContext = new InitialContext(env);
DataSourceClient qs = new DataSourceClient();
qs.init(remoteContext);
qs.test();
}
}
When I trigger client I hit the following error.
ERROR: java.io.EOFException
Exception in thread "main" javax.naming.NamingException: Failed to lookup [Root exception is java.io.NotSerializableException: org.jboss.jca.core.connectionmanager.pool.strategy.OnePool]
I had googled a lot with no luck. And I have another confuse is that then use-java-context marked to false, it should no need to start the jndi name with "java:", however, server can't start when I removed the prefix and get similar error message "jndi name should start with java: or java:jboss".
Can somebody tell me whether the jboss 7 support remotely datasource? if so can somebody point out whats the problem of my client, tons thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/723893#723893]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[JBoss Tools] - JBoss Tools and Developer Studio Beta1 - Chiliad!
by Max Rydahl Andersen
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] modified the blog post:
"JBoss Tools and Developer Studio Beta1 - Chiliad!"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/03/14/jboss-tools-a...
--------------------------------------------------------------
In celebration that https://twitter.com/#!/dhinojosa @dhinojosa became our http://t.co/PGfwnlCb chiliad follower on https://twitter.com/#!/jbosstools @jbosstools we are releasing Beta1 of both JBoss Tools and JBoss Developer Studio today!
https://community.jboss.org/servlet/JiveServlet/showImage/38-4854-18193/j... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4854-181...
h4. Beta1 (Chiliad)
Developer Studio: [ http://devstudio.jboss.com/earlyaccess Download] | Tools: [ http://www.jboss.org/tools/download/dev Download] [ http://download.jboss.org/jbosstools/updates/development/indigo/ Update Site] | [ http://docs.jboss.org/tools/whatsnew What's New] [ http://www.jboss.com/index.html?module=bb&op=viewforum&f=201 Forums] [ http://jira.jboss.com/jira/browse/JBIDE JIRA] [ http://twitter.com/jbosstools Twitter]
JBoss Tools is a set of plugins for Eclipse that complements, enhances and goes beyond the support that exist for JBoss and related technologies in the default Eclipse distribution.
JBoss Developer Studio is a fully bundled Eclipse distribution which not only includes majority of JBoss Tools but also all its needed dependencies and 3rd party plugins allowing for an easy one-click installation and no-fuzz installation.
If you are into doing your own bleeding edge eclipse plugin assembly, JBoss tools is for you, if you are more into having something that "Just Works" then JBoss Developer Studio is the way to go.
h2. Installation
+JBoss Developer Studio+ comes with everything pre-bundled in its installer. Simply http://devstudio.jboss.com/earlyaccess download it and run it like this:
java -jar jbdevstudio-<installername>.jar
Note, if you are on Mac OSX 64-bit we recommend you start it with -d32 to enable 32-bit to allow you to get the Visual Page editor and use a lot less memory.
java -d32 -jar jbdevstudio-<installername>.jar
Similar if you are on Windows 64-bit then use a 32-bit JDK to get 32-bit version running.
+JBoss Tools+ requires a bit more:
This release requires at least Eclipse 3.7.1 but we recommend using the http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/... Eclipse 3.7.2 JEE Bundle since then you get most of the dependencies preinstalled.
Once you have installed Eclipse, you either find us on http://marketplace.eclipse.org/content/jboss-tools-indigo Eclipse Marketplace under "JBoss Tools (Indigo)" or use our update site directly.
The update site URL to use from Help > Install New Software... is:
http://download.jboss.org/jbosstools/updates/development/indigo/ http://download.jboss.org/jbosstools/updates/development/indigo/
Note: SOA tooling such as Drools, jbpm, ESB, Teeid etc. are not included in this release - they will be available separately.
Below is my favorite features this time around from our long list of fixes and feature improvements for this Beta.
h2. Control JBoss Hot-redeployment
JBoss server adapter normally lets the JBoss Server or Eclipse JDT figure out when it is time to load newly deployed content or update class files via the debugger, but in some cases it is nice being able to say you would like a restart of your application when certain file changes.
We do it automatically for updates to jar files, but you might want it to be more agressive and even do it on individual class file changes or when you update .jsp's or similar files.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4854-18191/J... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4854-181...
If you enable the "Customize application reload behavior on changes to project resources" you now can enter a regular expression to match which resources it should trigger a reload of the module on.
Here are some examples:
|| *Expression* || *When it will reload
* ||
| \.jar$|\.jsp$ | on a jar or jsp file change |
| .* | on any resource changes (unnecessary! :) |
| \.jar$|\.class$ | on a jar or class file change |
| .jar$|.*\.model\..*.class$ | on a jar change or on when a .class file inside a package containing ".model." in its name (useful for only reloading on JPA annotation changes) |
Cheatsheet for regular expression syntax used above: \. matches a . (dot), $ means end of line, | means 'or' allowing to group content.
This of course means more often redeploys but that can very often be just the thing you need for your specific workflow.
h2. Skinned and Intelligent BrowserSim
The mobile browser simulator now looks like a mobile browser and will now try intelligently to detect which URL to open with based on what is the current selection/editor in Eclipse.
http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta1/10553-browser... http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.Beta1/10553-browser...
h2. Redesigned OpenShift UI
To handle more complex scenarios such as supporting deploying openshift applications already associated with another git repo and to make OpenShift easier to get started with we have redesigned the OpenShift wizards and views.
http://docs.jboss.org/tools/whatsnew/openshift/images/wizard-new-applicat... http://docs.jboss.org/tools/whatsnew/openshift/images/wizard-new-applicat...
h2. OpenShift Express Console
We've added view called OpenShift Express Console which gives you a nice overview of your OpenShift account(s), your applications/cartridges and provides easy access to common operations.
http://docs.jboss.org/tools/whatsnew/images/importapp_via_console.png http://docs.jboss.org/tools/whatsnew/images/importapp_via_console.png
h2. OpenShift Source and binary deployment
It is now possible to drag existing deployable resources such as WTP projects and resources marked as deployable to the OpenShift server and if the resource is part of the related github project it will just be associated with the server, but if the resource is not part of the OpenShift project then it will be placed inside the /deployments folder of the project as a binary.
Once you publish to OpenShift the binary deployments will be deployed together with your source project which will be built by OpenShift.
h3. Updated JBoss Central content
JBoss Central now refreshed all the main wizards for JavaEE, Richfaces, html5.
Richfaces shows up recent http://blog.bleathem.ca/2012/02/richfaces-420final-release-announcement.html Richfaces 4 release and HTML 5 is showing of the work done in the http://www.jboss.org/aerogear Aerogear project regarding mobile application development.
We are also now featuring GWT Web project which has http://www.jboss.org/errai Errai in it showing of their event bus to communicate between multiple browsers.
http://docs.jboss.org/tools/whatsnew/images/jboss-central-create-projects... http://docs.jboss.org/tools/whatsnew/images/jboss-central-create-projects...
Note, that Google Eclipse plugins are not installed by default - it will be offered when you click the GWT web project.
h2. EAP 6 Enterprise Maven Repository
All of the examples above works with the upcoming https://engage.redhat.com/forms/20120314JEAP6 EAP 6 release which includes a Enterprise Maven repository.
To enable this target an EAP 6 server adapter or set the "enterprise" flag in the wizard to true.
>From this the project will generate projects that uses the proper enterprise supported binaries over the community binaries.
h2. Faster Import
We found and fixed a memory and CPU issue that caused import of bigger projects to be slow and in some cases even stall.
With this issue fixed projects import much faster even for our small test projects it wins 4 seconds and for larger projects it should be even bigger gains.
As always let us know if you see slowness that seems unwarranted and we will love to help trace it down and fix the problems.
h2. Seam 2.3
Seam tooling now accepts and work with Seam 2.3. Seam 2.3 is still in development but it will eventually allow deploying Seam 2 applications on JBoss 7 and Enterprise Application Platform 6.
h2. Forge
The Forge tooling now bundles Forge 1.0.0.Final and adds a good set of usability features.
Link with editor makes any file opened in the current editor be picked up by Forge - meaning you don't have to manually type the resource location into Forge. Forge will already be there.
http://docs.jboss.org/tools/whatsnew/forge/images/3.3.0.Beta1/link_with_e... http://docs.jboss.org/tools/whatsnew/forge/images/3.3.0.Beta1/link_with_e...
"cd" and "pick-up" support, is kind of the opposite, here things you do in Forge gets Eclipse to open/select the used resources.
http://docs.jboss.org/tools/whatsnew/forge/images/3.3.0.Beta1/cd.png http://docs.jboss.org/tools/whatsnew/forge/images/3.3.0.Beta1/cd.png
h2. Maven + JPA
Maven now detects if your project is using JPA and enables JPA/Dali/Hibernate tooling support on your project.
h2. JAX-RS + Webservice Tester
The JAX-RS REST Web Services node in Project Explorer now supports "Run As..."-style launching of the Webservice tester.
Meaning you can right click on a URL path under JAX-RS and run as on your server and it will if, necessary deploy the application, start the server and then open the web services tester
with the selected URL and give you easy acces to test and explore the returned output.
https://community.jboss.org/servlet/JiveServlet/showImage/38-4854-18192/J... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4854-181...
h2. ..and more
The above are just a fraction of the 750+ issues we have fixed this time around - you can see more highlights and screenshots http://docs.jboss.org/tools/whatsnew/ here, but I encourage you to try out this Beta of JBoss Tools or Developer Studio instead of just taking my word for it - and let us know in the comments or forum what you think about it!
Have fun,
Max
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/03/14/jboss-tools-a...]
12 years, 3 months
[EJB3] - @Stateless bean is not initialized when using Spring
by Kirill Linnik
Kirill Linnik [https://community.jboss.org/people/kirillica] created the discussion
"@Stateless bean is not initialized when using Spring"
To view the discussion, visit: https://community.jboss.org/message/723788#723788
--------------------------------------------------------------
Hi there,
One module of our application is made by third party company and it's Spring-based. That's should be OK, since Spring has enabled EJB injection and vice-versa. Injecting EJBs in Spring works fine, but if I follow manual ( http://refcardz.dzone.com/refcardz/dependency-injection-in-ejb3 http://refcardz.dzone.com/refcardz/dependency-injection-in-ejb3) and do like this:@Local
public interface MyDAO {
public void test();
}
and:
@Stateless
public class MyDAOImpl extends AbstractStatelessSessionBean implements
MyDAO {
private static final long serialVersionUID = 4738436066552146052L;
private MySpringService mySpringServiceService;
@Override
protected void onEjbCreate() throws CreateException {
mySpringServiceService = (MySpringService) getBeanFactory()
.getBean("mySpringService");
}
@Override
public void test() {
...
}
}
where:
@Service("mySpringService")
and inject this EJB in another EJB like:
@EJB
private MyDAO myDAO;
On server startup I see:
Caused by: java.lang.RuntimeException:
Could not resolve @EJB reference:
[EJB Reference: beanInterface 'MyDAO', beanName 'null', mappedName 'null', lookupName 'null', owning unit 'ComponentDeploymentContext@726473212
{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.AnotherDAOImpl}']
for environment entry: env/AnotherDAOImpl/myDAO
in unit ComponentDeploymentContext(a)726473212{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.AnotherDAOImpl}
It means, AFAIK, MyDAO is not an EJB and cannot be injected.
Well, where I am wrong?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/723788#723788]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months