Session EJB - NoClassDefFoundError PipelineComponentSupport
Hello All
I have a simple PipelineComponent that is built as a stateless session EJB. It
is jar'd up and placed within the portal directory (with the rest of the jars).
I have added the entry to the META-INF/application.xml file and targeted the
EJB from within the weblogic console (can see the entry within the config.xml
file).
But when I start the portal server I get the NoClassDefFoundError for the class
PipelineComponentSupport. And of course my portlets that use the PipelineComponent
don't work. Why am I getting this error?
If I redploy the EJB from within the weblogic console after startup, everything
works fine. No errors or stack traces and the portlets work fine.
So: Why do I get a NoClassDefFoundError during startup, but not during redeploy?
How can I deploy the EJBs during startup correctly?
Thanks in advance.
ps - I saw the other thread about PipelineComponentSupport and noticed that it
did not apply since they were talking about a PipelineComponent as a java class,
not an EJB.
Chris,
It sounds like you need to place the JAR containing PipelineComponentSupport
in your new JAR's manifest (under the classpath entry). Open up one of our
JARs for an example. This tells the application server what your JARs
dependencies are. All this is standard J2EE/SE.
Sincerely,
Daniel Selman
"Chris McGinnis" <[email protected]> wrote in message
news:[email protected]..
>
Hello All
I have a simple PipelineComponent that is built as a stateless sessionEJB. It
is jar'd up and placed within the portal directory (with the rest of thejars).
I have added the entry to the META-INF/application.xml file and targetedthe
EJB from within the weblogic console (can see the entry within theconfig.xml
file).
But when I start the portal server I get the NoClassDefFoundError for theclass
PipelineComponentSupport. And of course my portlets that use thePipelineComponent
don't work. Why am I getting this error?
If I redploy the EJB from within the weblogic console after startup,everything
works fine. No errors or stack traces and the portlets work fine.
So: Why do I get a NoClassDefFoundError during startup, but not duringredeploy?
How can I deploy the EJBs during startup correctly?
Thanks in advance.
ps - I saw the other thread about PipelineComponentSupport and noticedthat it
did not apply since they were talking about a PipelineComponent as a javaclass,
not an EJB.
Similar Messages
-
Error during deployment of stateless session EJB using EJB 3.0
having trouble deploying a stateless session bean to app server 10.1.3.1 oc4j container.
deceided to go through oracles demo: How-To Develop a Stateless Session EJB using EJB 3.0 (http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-stateless-ejb/doc/how-to-ejb30-stateless-ejb.html).
the demo encounters the same issue. so i assume there is something wrong with the app server set up, and not my source code.
here is the deployment log:
[Jul 1, 2009 11:59:25 AM] Application Deployer for test_ws STARTS.
[Jul 1, 2009 11:59:25 AM] Copy the archive to C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear
[Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear begins...
[Jul 1, 2009 11:59:25 AM] Unpacking test_ws.ear
[Jul 1, 2009 11:59:25 AM] Done unpacking test_ws.ear
[Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear ends...
[Jul 1, 2009 11:59:25 AM] Starting application : test_ws
[Jul 1, 2009 11:59:25 AM] Initializing ClassLoader(s)
[Jul 1, 2009 11:59:25 AM] Initializing EJB container
[Jul 1, 2009 11:59:25 AM] Loading connector(s)
[Jul 1, 2009 11:59:26 AM] Starting up resource adapters
[Jul 1, 2009 11:59:26 AM] Processing EJB module: ejb30ws-ejb.jar
[Jul 1, 2009 11:59:26 AM] application : test_ws is in failed state
[Jul 1, 2009 11:59:26 AM] Operation failed with error: java.lang.NoClassDefFoundError
the opmn log reveals the same error, but no more detail.
any ideas???
/stuckI am having exactly the same issue. Was this issue resolved? If so, please share the resolution and if not can someone please suggest what could be wrong.
Thanks -
Deploy multiple instances of the same stateless session EJB
I have a stateless session bean.
The methods on the bean operate against DB tables.
Q: Can I deploy multiple instances of the same stateless session bean, but specify a different JNDI/datasource name in the deployment descriptor?
The method calls are all enclosed within a single invocation, just that I need to hit different databases (all with the same schema), and Id like to be able to lookup the EJB via a different JNDI name, and have the exact same functionality, just against different deployed datasources.
Does the spec allow/support this?
If not, any suggestions as to how to achieve this sort of functionality?
Im using JBoss 3.2.1 on Solaris, so Im not sure whether or not this is a JBoss "issue" or a limitation of the EJB Spec (or me being just plain wrong and trying to do something the "wrong way")
NickI have a stateless session bean.
The methods on the bean operate against DB tables.
Q: Can I deploy multiple instances of the same
stateless session bean, but specify a different
JNDI/datasource name in the deployment descriptor?
The method calls are all enclosed within a single
invocation, just that I need to hit different
databases (all with the same schema), and Id like to
be able to lookup the EJB via a different JNDI name,
and have the exact same functionality, just against
different deployed datasources.
Does the spec allow/support this?
If not, any suggestions as to how to achieve this sort
of functionality?
Im using JBoss 3.2.1 on Solaris, so Im not sure
whether or not this is a JBoss "issue" or a limitation
of the EJB Spec (or me being just plain wrong and
trying to do something the "wrong way")
NickI haven't done it but judging from the deployment descriptors yes.
For example if I have two bounded datasources java:/Database1 and java:/Database2
Lets say I have a session bean called MySession, then in your ejb-jar.xml you would have (notice that the desc, display, and ejb-name are the only differences)
<session>
<description>MySessionAlpha</description>
<display-name>MySessionAlpha</display-name>
<ejb-name>MySessionAlpha</ejb-name>
<home>com.mycorp.MySessionRemoteHome</home>
<remote>com.mycorp.MySessionRemote</remote>
<local-home>com.mycorp.MySessionLocalHome</local-home>
<local>com.mycorp.MySessionLocal</local>
<ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>jdbc/DataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
<session>
<description>MySessionBeta</description>
<display-name>MySessionBeta</display-name>
<ejb-name>MySessionBeta</ejb-name>
<home>com.mycorp.MySessionRemoteHome</home>
<remote>com.mycorp.MySessionRemote</remote>
<local-home>com.mycorp.MySessionLocalHome</local-home>
<local>com.mycorp.MySessionLocal</local>
<ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>jdbc/DataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
But now in the jboss.xml, we will have the following elements. What you may notice is that are bound to different remote and local jndi names. But the resource bindings are very different. The res-ref-name stays the same, but the jndi-name are different. I think this will work for you.
<session>
<ejb-name>MySessionAlpha</ejb-name> <jndi-name>ejb/com/mycorp/MySessionAlphaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionAlphaLocalHome</local-jndi-name>
<resource-ref>
<res-ref-name>jdbc/datasource</res-ref-name>
<jndi-name>java:/Database1</jndi-name>
</resource-ref>
</session>
<session>
<ejb-name>MySessionBeta</ejb-name> <jndi-name>ejb/com/mycorp/MySessionBetaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionBetaLocalHome</local-jndi-name>
<resource-ref>
<res-ref-name>jdbc/datasource</res-ref-name>
<jndi-name>java:/Database2</jndi-name>
</resource-ref>
</session> -
Session ejb 3.0 stateful and same instance
Hello,
I'm using OC4J 10.1.3.3 and EJB 3.0/JSP
In a jsp I do two different lookup for a STATEFUL
session ejb 3.0, and I want two different instances
of the ejb, instead I get the same one...
Please help. Thanks.Hi,
The code for stateful is perfectly fine and working in a normal way. The way you are trying to implement the stateful session bean in your application is wrong.
think of binding the stateful session bean with HttpSession object.
So that you will get a unique stateful session bean object. -
Transaction rollback in stateless session EJB 3.0
Hello everyone !
I have a stateless session EJB as per 3.0 spec.
/*Remote Interface*/
package com.nseit.ncfm2.data.ejb;
import java.sql.SQLException;
import java.util.Collection;
import javax.ejb.Remote;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.naming.NamingException;
import com.nseit.ncfm2.security.Audit;
@Remote
public interface ProductionDataChangesRequestsRemote {
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public boolean shiftCandidateDetails(String sourceNcfmId,
String destinationNcfmId, Collection<String> specialCasesList, String shiftingRemarks, String user, Audit updtAudit) throws NamingException, SQLException;
/*Bean Class*/
package com.nseit.ncfm2.data.ejb;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import javax.naming.NamingException;
import com.nseit.ncfm2.security.Audit;
import com.nseit.ncfm2.util.server.lookup.LookUpServerResources;
import java.sql.*;
import java.util.*;
* Session Bean implementation class ProductionDataChangesRequestsBean
@Stateless(name = "ProductionDataChangesRequestsBean", mappedName = "ProductionDataChangesRequestsEJB")
@Remote(ProductionDataChangesRequestsRemote.class)
@TransactionManagement(TransactionManagementType.CONTAINER)
public class ProductionDataChangesRequestsBean implements
ProductionDataChangesRequestsRemote {
* Default constructor.
public ProductionDataChangesRequestsBean() {
// TODO Auto-generated constructor stub
@Override
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public boolean shiftCandidateDetails(String sourceNcfmId,
String destinationNcfmId, Collection<String> specialCasesList,
String shiftingRemarks, String user, Audit updtAudit)
throws NamingException, SQLException {
// TODO Auto-generated method stub
Connection conn = null;
PreparedStatement pstmt = null;
int updtCnt = 0;
boolean areDetailsShifted = false;
try {
/* Start: update table-1 */
updtCnt = pstmt.executeUpdate();
/* End: update table-1 */
/* Start: update table-2 */
updtCnt = pstmt.executeUpdate();
/* End: update table-2 */
areDetailsShifted = true;
} /*catch (SQLException e) {
// TODO Auto-generated catch block
System.out
.println("SQLException in ProductionDataChangesRequestsBean.shiftCandidateDetails(...) "
+ e.getMessage());
// e.printStackTrace();
context.setRollbackOnly();
} */finally {
LookUpServerResources.closeStatement(pstmt);
LookUpServerResources.closeConnection(conn);
return areDetailsShifted;
Currently,if the 1st table update succeeds and the 2nd table update gives an exception,a rollback is not taking place i.e records in 1st table are updated.
I want the transaction to be rolled back in case an SQLException occurs(or for that matter,any runtime exception occurs).
I tried two approaches :
i: Use of context.setRollbackOnly() in catch block for SQLException
ii:Throwing the SQLException
In both the cases, the transaction didn't roll back.
How can I achieve this :
i: Without the usage of @ApplicationException annotation(as I do not have any application exceptions)
ii: Without catching the SQLException and then calling context.setRollbackOnly()
Or what is the standard way?
Thanks !Where is your connection object coming from?
-
How to call session EJB from EP service in EP 7.0?
Hi,
I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
Can anyone please help me?
Regards,
TomasHi Satya ,
please go though following blog for used DC concept.
Componentization of Webdynpro Application in CE7.1
In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller -
Cluster and Session EJB replication
I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and Servlets.
The Servlets do look ups for session EJBs, which are hosted on a separate box behind
a firewall. My question is:
If I implement clustering of the JSP/Servlet Weblogic Instance so that I have four machines in a cluster,
does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub only so that in case server 1 crashes,
Server 2 will be able to retrieve a handle to the session EJBs?
Thanks,
Paul Richardson
If the handle is in the HttpSession, then the handle will be replicated. If
the EJB server fails over in WL 5.1, the stateful session EJBs will be lost.
WL 6.0 supports statefull session EJB replication for failover, but I
suggest that you not use it unless you have a specific architectural reason
to.
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Paul Richardson" <[email protected]> wrote in message
news:[email protected]..
>
> I have a dedicated Weblogic 5.1 box running with SP 6 serving up JSP and
Servlets.
> The Servlets do look ups for session EJBs, which are hosted on a separate
box behind
> a firewall. My question is:
>
> If I implement clustering of the JSP/Servlet Weblogic Instance so that I
have four machines in a cluster,
> does Weblogic 5.1 or 6.0 replicate the handle to the session EJB's stub
only so that in case server 1 crashes,
> Server 2 will be able to retrieve a handle to the session EJBs?
>
>
> Thanks,
> Paul Richardson
-
Stateless session EJBs & "idempotent"
We need to declare a method as "idempotent" to take care of failure inside a
method call, For that to work the code inside should written in such way so
that repeated call to the same method should not give us diffrent result.
But why can't weblogic implement a partial rollback( Just like Oracle's save
point rollback, where you can rollback to certain point within a
transaction).
Because some times it is not possible to code in such a way to get the same
result every time(Incase of fail over)
Thanks
,Stateless session EJBs
Stateless session EJBs can have both a cluster-aware home stub and a
replica-aware EJBObject stub. By default, WebLogic Server provides failover
services for EJB method calls, but only if a failure occurs between method
calls. For example, failover is automatically supported if there is a
failure after a method completes, or if the method fails to connect to a
server. When failures occur while an EJB method is in progress, WebLogic
Server does not automatically failover from one server to another.
This default behavior ensures that database updates within an EJB method are
not "duplicated" due to a failover scenario. For example, if a client calls
a method which increments a value in a datastore and WebLogic Server fails
over to another server before the method completes, the datastore would be
updated twice for the client's single method call.
If methods are written in such a way that repeated calls to the same method
do not cause duplicate updates, the method is said to be "idempotent." For
idempotent methods, WebLogic Server provides the
stateless-bean-methods-are-idempotent deployment property. If you set this
property to "true" in weblogic-ejb-jar.xml, WebLogic Server assumes that the
method is idempotent and will provide failover services for the EJB method,
even if a failure occurs during a method call.
Vishal,
I wouldn't think you would have a problem doing RMI communication from a Entity
Bean - - for instance, when a WLS instance 'hosts' an EJB that communicates to
a different WLS instance that 'hosts' an EJB that communication occurs via RMI.
Chuck Nelson
Developer Relations Engineer
BEA Technical Support -
Web Service-Client for stateful session EJB container
Do you know, how to write a Web Service-Client to connect a stateful session EJB container?
A stateful session EJB container ist created with Web Logic 8.1.
Message was edited by n.t.c at Dec 14, 2004 6:09 AMPedja thanks for reply.
I still dont understand what is wrong with my example.
The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
Thanks. Alex. -
Dear Friends,
This is kind of urgent.I have a very simple question and I need everyone of ur's opinion on something.I was currently wokring on a web based project.The architect of the project designed to use Session and Entity beans.
He asked me to put "Static" methods in the Session EJB to produce generated HTML pages.for example
public ststic String getPage(myBean);
I'd like to hear ur comments on this.
Thanks
JewelIn general, mixing HTML and business logic is not very good practice. EJBs were created in part to separate presentation and business logic (among various other reasons), and this type of design goes against that goal.
What's wrong with using JSPs and controller/proxy JavaBeans to interface with the EJBs and create your presentation HTML? -
Stateful session EJB is deployed on cluster members A and B. Client calls a method
on the bean and the request is routed to server A, then A is shut down. The client's
next method invocation is routed to server B where the bean's state has been replicated.
Server A re-joins the cluster and B is shut down, the request routed to A results
in the following:
java.rmi.NoSuchObjectException: Activation failed with: java.io.StreamCorruptedException:
InputStream does not contain a serialized object
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:849)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:33)
at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:43)
at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:54)
at weblogic.ejb20.swap.PassivationUtils.read(PassivationUtils.java:50)
at weblogic.ejb20.swap.ReplicatedMemorySwap.read(ReplicatedMemorySwap.java:111)
at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:178)
at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:236)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:113)
at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:148)
at com.access360.enrole.apps.ejb.organization.SearchManagerBeanEOImpl.findAllPeople(SearchManagerBeanEOImpl.java:644)
at com.access360.enrole.webclient.organization.person.PeopleList.getPeople(PeopleList.java:148)
at com.access360.enrole.webclient.organization.person.PeopleListServlet.constructPeopleListXML(PeopleListServlet.java:284)
at com.access360.enrole.webclient.organization.person.PeopleListServlet.service(PeopleListServlet.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:275)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:183)
at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.forwardToPeopleList(SubmitPersonAddServlet.java:134)
at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.service(SubmitPersonAddServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
We are certain that the EJB's entire object graph is Serializable. Any comments on
this failover scenario?
Alex Rodriguez
Software Engineer, Access360
[email protected]
Rajesh,
Thanks for the reply. We are running WL 6.0 SP2 with RP3. We cannot reproduce it
consistently. In your reply you mention "... and EJB handles". Does that refer to
another patch?
As for the code, we will run tests with a scaled down version of the stateful bean
and a simple client servlet. I will post the code asap. The high level call sequence
is: servlet service() -> lookup ejb home -> get cluster aware stub from home -> put
bean handle in http session -> call bean method -> server A goes down -> next call
to the bean -> get handle from replicated http session -> get bean from handle ->
request is routed to server B. java.io.StreamCorruptedException is thrown, sometimes,
when server A re-joins the cluster and a request is routed to it (i.e. server B is
shut-down). One thing I did not mention is that the bean is deployed on server A,
and server A is also the Admin server. We are considering not using the Admin server
to deploy the bean, however, but will add another Managed server.
Will contact support about CR073917: can it be applied to WL 6.0 SP3 with RP3?
Regards,
Alex J. Rodriguez
Rajesh Mirchandani <[email protected]> wrote:
>
>Alex,
>
>Are you able to consitently reproduce this? Could you post your code here?
>
>What version of the Server with Service pack are you using?
>
>If you are using WLS 6.1SP2 and EJB handles contact support and get a patch
>for CR073917.
>
>
>"Alex J. Rodriguez" wrote:
>
>> Stateful session EJB is deployed on cluster members A and B. Client calls
>a method
>> on the bean and the request is routed to server A, then A is shut down.
>The client's
>> next method invocation is routed to server B where the bean's state has
>been replicated.
>> Server A re-joins the cluster and B is shut down, the request routed to
>A results
>> in the following:
>>
>> java.rmi.NoSuchObjectException: Activation failed with: java.io.StreamCorruptedException:
>> InputStream does not contain a serialized object
>> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:849)
>> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
>> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:33)
>> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:43)
>> at weblogic.common.internal.ReplacerObjectInputStream.<init>(ReplacerObjectInputStream.java:54)
>> at weblogic.ejb20.swap.PassivationUtils.read(PassivationUtils.java:50)
>> at weblogic.ejb20.swap.ReplicatedMemorySwap.read(ReplicatedMemorySwap.java:111)
>> at weblogic.ejb20.manager.StatefulSessionManager.getBean(StatefulSessionManager.java:178)
>> at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:236)
>> at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:113)
>> at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:148)
>> at com.access360.enrole.apps.ejb.organization.SearchManagerBeanEOImpl.findAllPeople(SearchManagerBeanEOImpl.java:644)
>> at com.access360.enrole.webclient.organization.person.PeopleList.getPeople(PeopleList.java:148)
>> at com.access360.enrole.webclient.organization.person.PeopleListServlet.constructPeopleListXML(PeopleListServlet.java:284)
>> at com.access360.enrole.webclient.organization.person.PeopleListServlet.service(PeopleListServlet.java:238)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
>> at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:275)
>> at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:183)
>> at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.forwardToPeopleList(SubmitPersonAddServlet.java:134)
>> at com.access360.enrole.webclient.organization.person.SubmitPersonAddServlet.service(SubmitPersonAddServlet.java:114)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
>> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
>> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>>
>> We are certain that the EJB's entire object graph is Serializable. Any
>comments on
>> this failover scenario?
>>
>> Alex Rodriguez
>> Software Engineer, Access360
>> [email protected]
>
-
OC4J, Stateful Session EJB, & Session Timeout
In my J2EE applications, I have a user authentication layer whereby when the user is authenticated against our LDAP repository after logging in, a Stateful Session EJB keeps that conversational state with the client at all times until the user logs out whereby the session is invalidated. This way I keep track of the user's authentication at all times throughout the whole session and for every operation performed (JSPs etc) by the user during the session. All this works fine through my implementation of the Session Facade and Business Delegate patterns.
However, if OC4J times out the Session (set to one hour in the <session-config> <session-timeout> parameter of the web.xml), the user cannot re-login and proceed. The user has to close the whole browser and re-start a new browser, then login and proceed.
This is causing us a few problems with the users who are complaining about having to do so. Is there an easy way around this problem?
Regards
DanielCan you try in a different browser and see whether you can duplicate this ?
Is this a problem with browser - cache ?
regards
debu -
Defining Business Operations using remote session EJBs for WLI2.1
Hello all,
I'm having a deployment issue with WLI 2.1. Is it true that in order to define
a Business Operation in WLI 2.1 that uses a session EJB, the EJB MUST be deployed
in the same JNDI tree (WLS instance) that WLI is running on? Is everyone just
running one admin server that hosts WLI and all other applications on the same
instance?
I'd like to have WLI running on one machine and have my applications running on
another, but at this point seems unobtainable because you cant supply a t3 URL
to that separate machine when defining Business Operations...
Any help would be appreciated,
JonI am new to WLPI and have run across this problem as well. Could you
provide more detail your proxy session bean and maybe include some
example code? Thanks.
Regards,
Rick H.
"Paul Rooney" <[email protected]> wrote:
>
I have come accross the same problem - solved it by using a "proxy" session
bean
that knows how to call out to all the Remote EJBS that I need. This "proxy"
session
bean is deployed with wlpi application.
"Erik Godding Boye" <[email protected]> wrote:
We would like to define business operations in WLI calling EJBs on a
remote machine.
It seems like the EJB have to be deployed locally to appear in the (JNDI)
drop-down
list when defining the business operation.
Is the only way to achieve this functionality to write (or generate)
some kind
of wrapper EJB that will be deployed locally, or do you have other suggestions?
Regards,
E
PS: We're using WLI 2.1 running on WLS 6.1 SP1 -
Stateless Session EJB hangs using URLConnection but WLS doesn't clean up
Hi
We have a stateless session EJB running under WLS 5.1 with service
pack 10 on Solaris.
The bean calls a remote HTTP server using the java.net.URLConnection
class and forwards the response to the EJB client. The bean is largely
working fine but some threads hang waiting on the HTTP response. Debug
statements, which are written immediately after the response has been
read and the connection has been closed, do not appear in our log for
the hung threads. The WebLogic Console displays these threads as "in
use" and a "netstat -an" displays the tcp connections as ESTABLISHED.
However, the access logs of the remote Apache server show the HTTP
connections of the threads in question completed successfully with
HTTP code 200. The Apache server is using keep-alive connections.
Some EJB threads are still waiting for something it seems.
Has anyody else experienced this when using URLConnection from
stateless session EJBs under WLS?
The second problem is why doesn't WLS time these threads out after
trans-timeout-seconds (we're using the default of 300 seconds)? The
WLS log shows no error messages relating to this problem.
I'm grateful for any info offered.
Thanks in advance
SteveIf you suspect that WLS protocol handler is at fault (and quite often it is),
one thing to try is (if you use Sun's JVM) to use Sun's HTTP protocol handler
instead of WLS (the most common symptom is when code which makes HTTP requests
works fine outside of WebLogic and you have problems getting it to work inside
WebLogic) :
replace
URL url = new URL("http://...");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
with
URL url = new URL(null, "http://...", new sun.net.www.protocol.http.Handler());
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
You will have to edit weblogic.policy to allow your code to specify protocol
handler.
Also note that transaction timeout is only checked on method boundaries, or
when your code attempts to do something with the database - it is not going to
interrupt thread which is waiting for HTTP response.
Steve Lock <[email protected]> wrote:
Hi
Thanks for the info. The remote HTTP server's access log shows that
the requests were successfully processed. Doesn't this mean that the
connection is then closed? I know the web server is using keep-alive
connections but I thought this was transparent to the client...?
Also why doesn't WLS remove the hung threads?
Steve
"Ignacio G. Dupont" <[email protected]> wrote in message news:<[email protected]>...
We have had a problem like yours with Weblogic 6.1 SP2 on Linux
The problem is sun's implementation of the HTTP connections doesn't have a
timeout, so if the other peer doesn't close the connection your threads will
be "locked" on the connection.
We have found searching the web that the Jakarta project has a package
called Jakarta commons that implements HTTP connections with an
setSoTimeout(int timeout) method so you can open the connections with your
desired timeout. You have to download the code from the CVS as the released
version doesn't support the timedout sockets yet.
When support for the JDK 1.4 version will be announced by Bea you could use
one of its new features that will allow you to pass arguments to the JVM to
specify the maximum socket connection stablising timeout and the max
inactivity on the socket too.
Hope it helps you.
Dimitri -
Problems importing Session Ejb in Creator
Hi all,
I've tries to import a Session Ejb in a web app, usng Creator2.
I have created the MyEjb.jar containing the ejb's classes, and the deployment descriptors. The ejb do not use any data source.
Then, I've imported the ejb using the provided procedure:
Enterprise Java Beans -> Add set of Session EJBs
I've imported the MyEbj.jar file: I see the Ejb in the palette, and I can drag&drop the method I need.
The problem is when I try to "run" the web application. I have the following excpetion:
java.lang.NullPointerException
at com.sun.rave.ejb.EjbDataSourceServiceImpl.getProjectDataSourceInfo(EjbDataSourceServiceImpl.java:66)
at com.sun.rave.jsf.project.ext.RaveProjectWebModule.getRequestedResources(RaveProjectWebModule.java:78)
at com.sun.rave.jsf.project.ext.RaveWebActionProvider.updateWebXml(RaveWebActionProvider.java:806)
at com.sun.rave.jsf.project.ext.RaveWebActionProvider.invokeAction(RaveWebActionProvider.java:172)
at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(MainProjectAction.java:90)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
and also:
Error occured when trying to parse the ejb data source file C:\work\Progetti\AreaIt\ProvaWorkSpace\lib\ejb-sources\ejb-refs.xml
org.xml.sax.SAXParseException: Premature end of file.
The file is ejb-refs.xml is empty!
Where is the problem? Any idea ? Who actually creates the ejb-refs.xml file?
Any suggestion?
Thanks a lot.
MarcoPlease, be aware that a value of RMI-IIOP port for Sun Application Server 8.1, bundled with Creator 2.0, is different from this one for Sun Application Server 8.2, bundled with Creator 2.1:
Sun Application Server 8.1, Creator 2.0 - 23700
Sun Application Server 8.2, Creator 2.1 - 24700
Maybe you are looking for
-
A Column in a query which can be expand
Hi guru, i would like to build a query in which i can expand and close columns. The first column will have the Age( <= 20[5, 10, 15, 20]), the other columns ´will be 5, 10, 15, 20.(This columns can be expand oder close.) How can build a report which
-
All of a sudden the last couple of months, wirless devices will be unable to log onto my WRT54G router. You get an "authentication error" message. The only way to clear this up thatI've been able to find so far is to reboot thte router. This never ha
-
Logic of Billing in Stock Transport Order
Hello, Can you please tell me the logic of billing in a stock transport order between plants belonging to the same company code? Is billing mandatory and whats the use/advantage? Sincerely, Ketan
-
Win7/Base Wim/Office 2010 Patches/ Hangs deployment/Admin rights lost
Hi All, sorry for the sort of confusing title. My issue is as follows. I have a task sequence set up to build a Base Wim for Win7EntX64 which will include office 2010x86 and run ZTIWindowsUpdate for patches. I'm having issues with the task sequenc
-
Need help trying to move music with my ipod
I went to the page telling you how to do this and when I got to "Free space up in your ipod" it wouldn't let me select all my songs, the songs were gray. So how can I make them un-gray to select them all?