[EJB 3.0] - Re: Persistence in EJB3
by masoodah@mdsit.com
I did as you had suggested bu I get the following error when I deploy the jar file
10:48:41,965 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.0.GA/server/default/deploy/DPDS-Server.jar
10:48:42,418 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:jar=DPDS-Server.jar,unitName=DPDS
State: NOTYETINSTALLED
I Depend On:
jboss.jca:name=MySqlDS,service=DataSourceBinding
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:name=MySqlDS,service=DataSourceBinding
State: NOTYETINSTALLED
Depends On Me:
persistence.units:jar=DPDS-Server.jar,unitName=DPDS
What am I doing wrong now.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124104#4124104
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124104
18 years, 3 months
[Messaging, JMS & JBossMQ] - Re: No pong received warning
by dgusoft
Hi!
FAQ is found under:
http://wiki.jboss.org/wiki/Wiki.jsp?page=IGetIOExceptionPingTimeoutHowDoI...
We have similar Exceptions here with JBoss 4.2.1 GA. At the moment our oracle database isn't available for about an hour each night. We have no client using JMS. All happens on the server side.
The following exceptions can be found in the jboss.log:
01:52:43,313 WARN [Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1313)
at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: ping timeout.
... 3 more
...
01:52:43,322 WARN [Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.net.SocketTimeoutException: Read timed out)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.Connection.asynchFailure(Connection.java:423)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:439)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:371)
at java.lang.Thread.run(Thread.java:595)
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.read(BufferedInputStream.java:235)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2196)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2376)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2443)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2515)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2664)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:875)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:316)
... 1 more
...
01:53:42,485 WARN [Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
org.jboss.mq.SpyJMSException: Cannot ping the JMS server; - nested throwable: (java.io.IOException: Client is not connected)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
at org.jboss.mq.Connection.pingServer(Connection.java:848)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1317)
at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Client is not connected
at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:264)
at org.jboss.mq.il.uil2.SocketManager.sendReply(SocketManager.java:238)
at org.jboss.mq.il.uil2.UILServerIL.ping(UILServerIL.java:345)
at org.jboss.mq.Connection.pingServer(Connection.java:844)
... 3 more
...
08:07:11,753 WARN [Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1313)
at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: ping timeout.
... 3 more
Even though the database is back online for a couple of hours the exceptions only disappear when jboss is restarted.
The FAQ only says :
I'm inside the application server, how do I install the exception listener?
* You don't need to for an MDB, JBoss does it for you.
This doesn't seem to be true in every case.
Any hints?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124098#4124098
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124098
18 years, 3 months
[JBoss Seam] - Same ResultList as return value of an entityQuery
by abra
Hi all
I just came across a strange "feature". I'm not sure if I'm missing something but think it could help others struggling with the same kind of problem.
My setup is the following:
- One EntityQuery
- One example object used in the query
- One method executing the query multiple times
In my method, I call the query with some different example objects and store the results in different Lists to merge them in certain circumstances into one of them. The result was not as expected: I had objects in my list I haven't copied into, so the question was: "How did they come in my list?" After debugging the problem and it's solution was clear: The EntityQuery method getResultList() works just with one single List instance and therefore all resultLists were merged together. The solution was to instantiate each time a new list and copy the ResultList into it.
>From my point of view, the EntityQuery should return for each method call a new List but I'm open for arguments against.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124096#4124096
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124096
18 years, 3 months
[Security & JAAS/JBoss] - Flushing the credential cache ==> InstanceNotFoundException
by benoitx
Hi
We're using the DatabaseServerLoginModule but for all intent, when my user decides to change its password, I would like to flush the cache.
We're using JBoss-4.0.5-GA
I'm trying to follow the code on: http://wiki.jboss.org/wiki/Wiki.jsp?page=CachingLoginCredentials
Unfortunately, I know very little about MBeans and I seem to get an InstanceNotFoundException everytime on this call:
MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
Why? The full code is as follows:
| private void flushCache(String loginId) {
| String domain = "jmx-console";
| Principal user = new SimplePrincipal(loginId);
| ObjectName jaasMgr;
| try {
| jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
| Object[] params = { domain, user };
| String[] signature = { "java.lang.String", Principal.class.getName() };
| MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
| server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
| } catch (MalformedObjectNameException e) {
| log.error("Cannot flush", e);
| } catch (NullPointerException e) {
| log.error("Cannot flush", e);
| } catch (InstanceNotFoundException e) {
| log.error("Cannot flush", e);
| } catch (MBeanException e) {
| log.error("Cannot flush", e);
| } catch (ReflectionException e) {
| log.error("Cannot flush", e);
| }
| }
|
My login-config.xml is
| <application-policy name="atrium-security">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">misterx</module-option>
| <module-option name="dsJndiName">java:/AtriumDS</module-option>
| <module-option name="principalsQuery">
| select PASSWORDMD5 from safemarginuser where LOGINID=? and STATE='ACT' and FAILEDLOGIN < 10
| </module-option>
| <module-option name="rolesQuery">
| select ROLE, 'Roles' from loginrole A, safemarginuser B where B.ID=A.USER_ID and A.CLIENT_ID=B.CLIENT_ID and B.LOGINID=?
| </module-option>
| <module-option name="hashAlgorithm">MD5</module-option>
| <module-option name="hashEncoding">base64</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
My jboss-service.xml (in server/default/conf) is, as far as I can tell, the original one:
| <!-- JAAS security manager and realm mapping -->
| <mbean code="org.jboss.security.plugins.JaasSecurityManagerService"
| name="jboss.security:service=JaasSecurityManager">
| <!-- A flag which indicates whether the SecurityAssociation server mode
| is set on service creation. This is true by default since the
| SecurityAssociation should be thread local for multi-threaded server
| operation.
| -->
| <attribute name="ServerMode">true</attribute>
| <attribute name="SecurityManagerClassName">org.jboss.security.plugins.JaasSecurityManager</attribute>
| <attribute name="DefaultUnauthenticatedPrincipal">anonymous</attribute>
| <!-- DefaultCacheTimeout: Specifies the default timed cache policy timeout
| in seconds.
| If you want to disable caching of security credentials, set this to 0 to
| force authentication to occur every time. This has no affect if the
| AuthenticationCacheJndiName has been changed from the default value.
| -->
| <attribute name="DefaultCacheTimeout">1800</attribute>
| <!-- DefaultCacheResolution: Specifies the default timed cache policy
| resolution in seconds. This controls the interval at which the cache
| current timestamp is updated and should be less than the DefaultCacheTimeout
| in order for the timeout to be meaningful. This has no affect if the
| AuthenticationCacheJndiName has been changed from the default value.
| -->
| <attribute name="DefaultCacheResolution">60</attribute>
| </mbean>
|
The caller of flushCache is a POJO but running from a Stateless Session Bean. Is there a classloader issue?
I am obviously doing something wrong, any pointer/solution/suggestion would be very welcomed!
Thanks!
Benoit
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124095#4124095
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124095
18 years, 3 months
[JBossWS] - javax.xml.ws.WebServiceException: Unable to create Provider:
by mgk
Hi,
I've been trying to create a stub for Stock quote web service and am having trouble with that. It says "21:40:54,812 ERROR [[action]] Servlet.service() for servlet action threw exception
javax.xml.ws.WebServiceException: Unable to create Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl"
I'm using JBoss App server 4.2 version under eclipse 3.3.1
I used jwsdp2.0 for "StockQuote" web service. The following is the generated code:
package net.webservicex;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import net.webservicex.StockQuote;
import net.webservicex.StockQuoteSoap;
/**
* This class was generated by the JAXWS SI.
* JAX-WS RI 2.0-b26-ea3
* Generated source version: 2.0
*
*/
@WebServiceClient(name = "StockQuote", targetNamespace = "http://www.webserviceX.NET/", wsdlLocation = "http://www.webservicex.net/stockquote.asmx?WSDL")
public class StockQuote
extends Service
{
private final static URL WSDL_LOCATION;
private final static QName STOCKQUOTE = new QName("http://www.webserviceX.NET/", "StockQuote");
private final static QName STOCKQUOTESOAP = new QName("http://www.webserviceX.NET/", "StockQuoteSoap");
static {
URL url = null;
try {
url = new URL("http://www.webservicex.net/stockquote.asmx?WSDL");
} catch (MalformedURLException e) {
e.printStackTrace();
}
WSDL_LOCATION = url;
}
public StockQuote(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public StockQuote() {
super(WSDL_LOCATION, STOCKQUOTE);
}
/**
*
* @return
* returns StockQuoteSoap
*/
@WebEndpoint(name = "StockQuoteSoap")
public StockQuoteSoap getStockQuoteSoap() {
return (StockQuoteSoap)super.getPort(STOCKQUOTESOAP, StockQuoteSoap.class);
}
}
I'm calling the service the following way:
StockQuote service = new StockQuote();
StockQuoteSoap port = service.getStockQuoteSoap();
String quote = port.getQuote("STT");
I'm getting the following error in the first line of the above code itself:
21:40:54,812 WARN [RequestProcessor] Unhandled Exception thrown: class javax.xml.ws.WebServiceException
21:40:54,812 ERROR [[action]] Servlet.service() for servlet action threw exception
javax.xml.ws.WebServiceException: Unable to create Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl
at javax.xml.ws.spi.Provider.provider(Provider.java:83)
at javax.xml.ws.Service.(Service.java:58)
at net.webservicex.StockQuote.(StockQuote.java:44)
at com.struts.action.FiboGenAction.execute(FiboGenAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
I really appreciate any help you could provide in this. Basically, I want framework to get stock quote for any given ticker.
Can someone please help me? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124094#4124094
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124094
18 years, 3 months