Spring and EJB ClassNotFound Errors
Hi,
We are migrating our application from Oracle AS 10.1.3.3 to Weblogic Server 11g. I was unable to run business layer neither via JDeveloper nor by direct deployment to server (EJB 2.1+Spring 2.5+Hibernate3) .
Spring fails to load classes although jars are there. I can use any class outside Spring but Spring just can't find any. I tried putting jars in META-INF/lib, domain/lib, even put jars in startup script of weblogic.
I am working on it for days and really need help on this. Thanks in advance.
Burak
Here is the error I get.
java.rmi.RemoteException: EJB Exception: ; nested exception is:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseManager' defined in class path resource [applicationContext.xml]: Cannot create inner bean 'com.arcelik.absi.bl.base.BaseManager#c3d2e5' of type [com.arcelik.absi.bl.base.BaseManager] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.arcelik.absi.bl.base.BaseManager#c3d2e5' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'methodCache' while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'methodCache' defined in class path resource [cacheRules.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
java.lang.NoClassDefFoundError: net/sf/ehcache/store/MemoryStoreEvictionPolicy
Hi,
Actually it is bundled in EAR file. But I already tried putting it in servers lib folder. Also added ehcache.jar in web logic as a shared library. Any other place that I can try?
Similar Messages
-
Error while running ejbc. Fatal error from EJB Compiler ---- Error while pr
Hi!
I was deploying a test application for a session bean with sun 1 studio 5 and I started getting this message while deploying.
I had tested the bean previously and I had no problems.
I found this in the sun app server 7 release notes, but I don't understand what I'm supposed to do...
"Deployment of CMP beans fails.
The following error is thrown because there are no <query-params> entries in the container-managed persistence (CMP) bean in sun-ejb-jar.xml file:
Error while running ejbc. Fatal error from EJB Compiler ---- Error while processing CMP beans.
Solution
Even if it isn't necessary for the CMP beans, add the query-params tag for finders in the sun-ejb-jar.xml file with the empty parameters."
Here is my sun-ejb-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<name>GestorDoBanco_EJBModule</name>
<ejb>
<ejb-name>Cliente</ejb-name>
<jndi-name>ejb/Cliente</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/Cliente.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>ClienteAssociadoAConta</ejb-name>
<jndi-name>ejb/ClienteAssociadoAConta</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/ClienteAssociadoAConta.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>Conta</ejb-name>
<jndi-name>ejb/Conta</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/Conta.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>GestorDoBanco</ejb-name>
<jndi-name>ejb/GestorDoBanco</jndi-name>
<pass-by-reference>false</pass-by-reference>
</ejb>
<ejb>
<ejb-name>MensagemM003</ejb-name>
<jndi-name>ejb/MensagemM003</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>MensagemM003Rejeitada</ejb-name>
<jndi-name>ejb/MensagemM003Rejeitada</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003Rejeitada.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>MensagemM012</ejb-name>
<jndi-name>ejb/MensagemM012</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>MensagemM012Rejeitada</ejb-name>
<jndi-name>ejb/MensagemM012Rejeitada</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012Rejeitada.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>MensagemM103</ejb-name>
<jndi-name>ejb/MensagemM103</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM103.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>MensagemM112</ejb-name>
<jndi-name>ejb/MensagemM112</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/MensagemM112.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>Registo</ejb-name>
<jndi-name>ejb/Registo</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/Registo.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>TransaccaoConfirmada</ejb-name>
<jndi-name>ejb/TransaccaoConfirmada</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoConfirmada.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>TransaccaoFinalizada</ejb-name>
<jndi-name>ejb/TransaccaoFinalizada</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoFinalizada.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<ejb>
<ejb-name>TransaccaoIniciada</ejb-name>
<jndi-name>ejb/TransaccaoIniciada</jndi-name>
<pass-by-reference>false</pass-by-reference>
<cmp>
<mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoIniciada.mapping</mapping-properties>
</cmp>
<refresh-period-in-seconds>600</refresh-period-in-seconds>
</ejb>
<pm-descriptors>
<pm-descriptor>
<pm-identifier>SunONE</pm-identifier>
<pm-version>1.0</pm-version>
<pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
<pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
</pm-descriptor>
<pm-inuse>
<pm-identifier>SunONE</pm-identifier>
<pm-version>1.0</pm-version>
</pm-inuse>
</pm-descriptors>
<cmp-resource>
<jndi-name>mysqlpmanager</jndi-name>
<default-resource-principal>
<name>bes</name>
<password>besbes</password>
</default-resource-principal>
</cmp-resource>
</enterprise-beans>
</sun-ejb-jar>
Thanks in advance for any help.
Nunohttp://docs.sun.com/source/817-2175-10/decmp.html
Please go to the above docs and look thru the examples given in it.
Example 2
This query returns all products in a specified price range. It defines two query parameters which are the lower and upper bound for the price: double low, double high. The filter compares the query parameters with the price field:
"low < price && price < high"
The finder element of the sun-ejb-jar.xml file would look like this:
<finder>
<method-name>findInRange</method-name>
<query-params>double low, double high</query-params>
<query-filter>low < price && price <
high</query-filter
</finder>
I hope this hepls. In your case u just have to make it null. -
WebLogic 10 and EJB 3.0 for Message Driven Bean
Hi,
I am trying to deploy Message Driven Bean using EJB3.0 on weblogic 10. I am using annotations and don't want to use deployment descriptors.
The Bean class:
CalculatorBean.java
import javax.ejb.*;
import javax.jms.*;
import java.sql.Timestamp;
import java.util.StringTokenizer;
@MessageDriven(activationConfig =
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="queue/mdb")
public class CalculatorBean implements MessageListener {
public void onMessage (Message msg) {
TextMessage tmsg=null;
try {
if (msg instanceof TextMessage) {
tmsg = (TextMessage) msg;
System.out.println
("MESSAGE BEAN1: Message received: "
+ tmsg.getText());
} else {
System.out.println
("Message of wrong type1: "
+ msg.getClass().getName());
catch (JMSException e) {
e.printStackTrace();
catch (Throwable te) {
te.printStackTrace();
My client:
import javax.naming.*;
import javax.naming.InitialContext;
import java.text.*;
import javax.jms.*;
public class MsgClient {
public static void main(String args[])
QueueConnection cnn=null;
QueueSender sender=null;
QueueSession sess=null;
Queue queue=null;
try {
java.util.Properties p = new java.util.Properties();
p.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
p.put("java.naming.provider.url","t3://10.6.74.79:7001");
Context ctx=new InitialContext(p);
//InitialContext ctx=new InitialContext(p);
queue = (Queue)ctx.lookup("queue/mdb");
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
cnn = factory.createQueueConnection();
sess= cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
sender = sess.createSender(queue);
TextMessage message = sess.createTextMessage();
message.setText("This is message by Gurumurthy" );
System.out.println("Sending message: " +message.getText());
sender.send(message);
sess.close();
catch (Exception e)
e.printStackTrace();
I am compiling and creating jar file for this class. Then I am creating a .ear file for this.
The meta-inf/application.xml contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>MDBWorking1</display-name>
<description>Application description</description>
<module>
<ejb>MDBWorking1.jar</ejb>
</module>
</application>
I don't want to use deployment descriptor (ejb-jar.xml or weblogic-ejb-jar-xml), because I want to utilize the annotation feature of EJB3.0
So, after creating the .ear file for this, and try to deploy on weblogic 10, I get the following error:
An error occurred during activation of changes, please see the log for details.
Exception preparing module: EJBModule(MDBWorking1.jar) Unable to deploy EJB: CalculatorBean from MDBWorking1.jar: [EJB:011113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
Substituted for missing class [EJB - 11113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
How to solve this?
Note:
I don't want to use Deployment Descriptor and all I want to use is EJB3.0's annotation feature.
Thanks,
GuruDear gurubbc,
I don't know if it still matters to you but you can use the javax.ejb.MessageDriven annotation to point your bean on your queue. I had the same issue like you but i could not solve it properly by switchihg to weblogic.ejb.MessageDriven.
Use the following annotation and it should work out:
@MessageDriven
(mappedName = "queue/mdb",
name = "CalculatorBean",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
Here you can see that the mappedName is the JNDI name of the queue you are trying to connect to. The name is the name for your Bean, and the only property passed is the destination type.
Hope this helps.
Cheers,
Istvan -
JDBC, JMS and EJB transactions - possible problem?
Hello,
I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
XDoclet.
In my current project I have the following piece of code
in one of my message driven beans (code cited as pseudocode
without unnecessary details):
* @ejb.bean name="MyMessageProcessor"
* display-name="Display name for a MyMessageProcessor"
* jndi-name="ejb/MyMessageProcessor"
* description="Bean MyMessageProcessor"
* destination-type="javax.jms.Queue"
* transaction-type="Container"
* acknowledge-mode="Auto-acknowledge"
* subscription-durability="Durable"
* generate="false"
* @ejb.transaction type="Required"
public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
public void onMessage(Message msg) {
try {
//obtaining connections to two different databases via JNDi
java.sql.Connection connOne =
((DataSource)ctx.lookup("DataSourceOne")).getConnection();
java.sql.Connection connTwo =
((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
// performing some UPDATEs and INSERTs on connOne and connTwo
// calling some other methods of this bean
//creating the reply JMS message and sending it to another JMS queue
Message msgTwo = this.createReplyMessage(msg)
this.queueSender.send(msgTwo);
//commiting everything
this.queueSession.commit();
} catch (Exception ex) {
try {
if (this.queueSession!=null) this.queueSession.rollback();
} catch (JMSException JMSEx) {};
this.context.setRollbackOnly();
Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
connection pool with non-XA jdbc driver. Everything worked fine
including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
to database and the incomming message was thrown back to the my bean's
queue).
When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
participate in a global transaction. When I changed both datasources
to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
and the JMS message wasn't resent to the JMS queue.
So here are my questions:
1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
Are there any global server configurations, which may influence this situation?
2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
(of course, if necessary)?
3. Are there any JMS Queue settings, which would disable the container to send message back to the
queue in case of setRollbackOnly()? How should be the Queue configurated?
As I am new to the topic and the deadline for the project seems to be too close I would be grateful
for any help.
This message was sent to EJB list and JDBC list.
Sincerely yours,
Marcin ZakidalskiHi,
I found these information extremely useful and helpful.
The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
Anyway, I still have some problems. I have made some changes to the
code cited in my previous mail. These changes included changing QueueSessions
to non-transactional. I also set the "Honorate global transactions" to true.
I am using XA JDBC driver. After setting "Enable local transactions" to false
(I did it, because I assume that JDBC transactions should be part on the global
EJB transaction) I got the following error:
java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
driver supports performing SQL operations with no global transaction, explicitly allow it by setting
"SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
My questions are as follows:
1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
from doing that? Can using setAutocommit(true/false) change the situation for better?
2. How to encourage the JDBC driver to be a part of EJB transaction?
3. As I have noticed each of ejb method has its own transactions (transactions have different
Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
way that if already started transaction exists it is used by the called method?
4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
solved programmically?
Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
I am loosing the ability to perform all actions in one transaction.
Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
Marcin -
ORABPEL-08033: EJB Transaction Error
Hi
I have a usecase in which procA(sync Service) calling procB (Async Service) and on completion of execution, ProcB gives a non blocking invoke back to procA. Condition: The either of one should be in running state always.
However there are fault situation in ProcB hence to not to break the sequence we have put a catchAll block which handles/logs and then gives the non blocking invoke back to procA.
But when ProcB fails somewhere because of some other partner links, it is safely going into catchAll and handling it well and when it tries to do a non blocking invoke it is resulting in following:
ORABPEL-08033
EJB Transaction Error.
EJB exception happened while invoking the partner. Please verify partner service.
Can somebody give me some leads in this?
TIA
regards
JoyI have setup catch statements, both an catch all in the outermost scope and a catch for remote fault at the scope surrounding the call to the AQ. But that's not the issue. The problem is that BPEL don't get the error. The error stay's at the adapter and the BPEL don't come to a failed state.
-
OC4J 9.0.3 and EJB 1.1 deployments???
I can not deploy my ejb1.1 beans on 9.0.3 container.
OC4J crashes with an XML parse error as a null pointer exception.
If I remove my O-R mappings from my orion-ejb-jar.xml file, the container starts up ok (app wont run as it needs the mappings)
9.0.3 docs claim I should be able to use my 1.1 ejb in this ejb 2.0 container.
Solaris release notes for 9.0.3 claim I must migrate to ejb2.0
Someone else posted this same question but got no replies.
Anyone else deployed ejb1.1 with OR mappings in 9.0.3 successfully yet?
thanksI have tried migrating to an ejb2.0 set of beans and ejb-jar.xml file.
With no <query> tags installed for my finders I notice that a typical finder produces this:
<!-- Generated SQL: "select Isp.isp_Id from Isp -->
This is vastly different from the 1.1 orion-ejb-jar.xml which would list ALL column names in the finder - hence how am I going to do a findAll? The currently generated sql is way off. Deployment of the "ormap" demo also shows a lack of column names in the generated SQL finder methods in orion-ejb-jar.xml.
Further, as soon as I introduce the query in the 2.0 version of ejb-jar.xml, the container dies with a null pointer exception. Removing this from the ejb-jar and bean deploys. Useless, cause theres no finders though.
Also, attempts to add to the <finder-method query=...> tag yield container crashes with null pointers too.
This is not very robust to say the least. Can you provide names of jar files that would cause such exceptions?
When NO query tag is inserted in the ejb-jar file, attempts to run a sample client using findByPrimaryKey return successfully but use of findAll causes timeouts similar to whats described in
"finders giving "timeout expired waiting for an instance" after 0, 1, or 2 calls" in this same forum.
Heres the query out of the ejb-jar.xml file...
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(o) from IspTb o
</ejb-ql>
</query>
IspTb is the <abstract-schema-name> Tables exist in db.
The full error...which prevents deployment of the ejbs and hence no rewrite of the orion-ejb-jar file.
=========
10/23/02 1:54 PM: javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
10/23/02 1:54 PM: java.lang.NullPointerException
10/23/02 1:54 PM: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
10/23/02 1:54 PM: at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:135)
10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
10/23/02 1:54 PM: at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:135)
10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getClass(PersistenceDescriptor.java:767)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getStateClass(PersistenceDescriptor.java:753)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getCMPFieldType(PersistenceDescriptor.java:1302)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.initializeFieldInfo(PersistenceDescriptor.java:1052)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getPersistentFieldInfo(PersistenceDescriptor.java:805)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:151)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
10/23/02 1:54 PM: at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
10/23/02 1:54 PM: at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:551)
10/23/02 1:54 PM: at com.evermind.server.Application.postInit(Application.java:431)
10/23/02 1:54 PM: at com.evermind.server.Application.setConfig(Application.java:136)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
10/23/02 1:54 PM: at java.lang.Thread.run(Thread.java:479)
10/23/02 1:54 PM: javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getClass(PersistenceDescriptor.java:770)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getStateClass(PersistenceDescriptor.java:753)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getCMPFieldType(PersistenceDescriptor.java:1302)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.initializeFieldInfo(PersistenceDescriptor.java:1052)
10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getPersistentFieldInfo(PersistenceDescriptor.java:805)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:151)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
10/23/02 1:54 PM: at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
10/23/02 1:54 PM: at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:551)
10/23/02 1:54 PM: at com.evermind.server.Application.postInit(Application.java:431)
10/23/02 1:54 PM: at com.evermind.server.Application.setConfig(Application.java:136)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
10/23/02 1:54 PM: at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
10/23/02 1:54 PM: at java.lang.Thread.run(Thread.java:479) -
EJB adapter errors are not catched by the composite fault handler
Hi,
I got a serious problem in soa suite 11g ps3 that ejb adapter failures are not catched by the soa suite fault framework.
for example when I do a persist of an entity on a EJB session bean and I dont provide all required fields I get a rollback error when the BPEL component is finished.
Instance ID bpel:142089
The transaction was rolled back. The work performed for bpel instance "142089" was rolled back, but the audit trail has been saved for this instance
Error Code: 1400
Call: INSERT INTO INFORMATIELEVERINGEN (ID, DATUM_BEWAREN_TOT, BEWAARTERMIJN_IN_DAGEN, GEBRUIKER, ADRES_WAARNAAR_VERSTUURD, OUTPUTPRODUCT_TYPE, INTERMEDIAIR_PRODUKT, INHOUD_VERSTREKKING, RIN_ID, DETAIL_3, DETAIL_1, DETAIL_2, KETEN_OBJECT_TYPE, ORG_ID, TIG_ID, DATUM_SAMENSTELLING, KETEN_OBJECT_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [314, null, null, null, test, null, null, null, null, null, null, null, null, 1, 1, 2011-09-27, 42]
Query: InsertObjectQuery([email protected])
This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).
ORABPEL-05002
Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("VSG"."INFORMATIELEVERINGEN"."OUTPUTPRODUCT_TYPE")
what I did is to set idemponent = false on the partnerlink but then the invoke fails instead of the bpel ( same error ) and still no compensate or catch in bpel.
Added the fault policies to the composite and rethrowed the error to BPEL. Still no luck.
But then replaced the EJB adapter with the db adapter which does the same insert as the EJB and I got a nice bpelx:bindingFault which I can catch and handle.
thanksHere is the total error message
[2011-09-29T19:33:28.316+02:00] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.dispatch] [tid: orabpel.invoke.pool-4.thread-3] [userId: <anonymous>] [ecid: 4af4f9da03d6b2c4:-1e444ff3:132b61dbaea:-8000-0000000000000312,0:1:100000005] [APP: soa-infra] failed to handle message[[
java.sql.SQLIntegrityConstraintViolationException: ORA-01400: Kan geen NULL invoegen in ("HR"."INFORMATIELEVERINGEN"."OUTPUTPRODUCT_TYPE").
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:788)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:863)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:583)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:980)
at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:131)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:341)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:465)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:290)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:740)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:643)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2908)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233)
at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:123)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3348)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1422)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:610)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1527)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3181)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:332)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1239)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1214)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:116)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1316)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2132)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:272)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:239)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:622)
at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:455)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:52)
at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.handleInvoke(Unknown Source)
at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:35)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:140)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[2011-09-29T19:33:28.332+02:00] [soa_server1] [ERROR] [] [oracle.soa.bpel.engine.dispatch] [tid: orabpel.invoke.pool-4.thread-3] [userId: <anonymous>] [ecid: 4af4f9da03d6b2c4:-1e444ff3:132b61dbaea:-8000-0000000000000312,0:1:100000005] [APP: soa-infra] Failed to handle dispatch message ... exception ORABPEL-05002[[
Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: Kan geen NULL invoegen in ("HR"."INFORMATIELEVERINGEN"."OUTPUTPRODUCT_TYPE").
Error Code: 1400
Call: INSERT INTO INFORMATIELEVERINGEN (ID, DATUM_BEWAREN_TOT, BEWAARTERMIJN_IN_DAGEN, GEBRUIKER, ADRES_WAARNAAR_VERSTUURD, OUTPUTPRODUCT_TYPE, INTERMEDIAIR_PRODUKT, INHOUD_VERSTREKKING, RIN_ID, DETAIL_3, DETAIL_1, DETAIL_2, KETEN_OBJECT_TYPE, ORG_ID, TIG_ID, DATUM_SAMENSTELLING, KETEN_OBJECT_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [7, null, null, null, test, null, null, null, null, null, null, null, null, 1, 1, 2011-09-29, 42]
Query: InsertObjectQuery(nl.justid.verstrekkingen.model.entity.Informatielevering@2499c09)
This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).
ORABPEL-05002
Message handle error.
error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the reported exception is: Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: Kan geen NULL invoegen in ("HR"."INFORMATIELEVERINGEN"."OUTPUTPRODUCT_TYPE").
Error Code: 1400
Call: INSERT INTO INFORMATIELEVERINGEN (ID, DATUM_BEWAREN_TOT, BEWAARTERMIJN_IN_DAGEN, GEBRUIKER, ADRES_WAARNAAR_VERSTUURD, OUTPUTPRODUCT_TYPE, INTERMEDIAIR_PRODUKT, INHOUD_VERSTREKKING, RIN_ID, DETAIL_3, DETAIL_1, DETAIL_2, KETEN_OBJECT_TYPE, ORG_ID, TIG_ID, DATUM_SAMENSTELLING, KETEN_OBJECT_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [7, null, null, null, test, null, null, null, null, null, null, null, null, 1, 1, 2011-09-29, 42]
Query: InsertObjectQuery(nl.justid.verstrekkingen.model.entity.Informatielevering@2499c09)
This error contained an exception thrown by the message handler.
Check the exception trace in the log (with logging level set to debug mode).
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:207)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88)
at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:65)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:887)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
at java.lang.Thread.run(Thread.java:662)
]] -
BMP question : got javax.ejb.EJBException error Object state not saved
Could anybody please help me? I could not figure out what i did wrong.
I got the javax.ejb.EJBException error: Object state not saved
when i test the getname() method for findByPrimaryKey() and findAll() methods.
Here is my code:
package org.school.idxc;
import javax.sql.*;
import javax.naming.*;
import javax.ejb.*;
import javax.sql.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Vector;
* Bean implementation class for Enterprise Bean: status
public class statusBean implements javax.ejb.EntityBean {
private javax.ejb.EntityContext myEntityCtx;
private int id;
private String name;
private DataSource ds;
private String dbname = "jdbc/idxc";
private Connection con;
* ejbActivate
public void ejbActivate() {
* ejbLoad
public void ejbLoad() {
System.out.println("Entering EJBLoad");
try
Integer primaryKey = (Integer) myEntityCtx.getPrimaryKey();
String sqlstmt = "select id, name from from status where id =?";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlstmt);
stmt.setInt (1,primaryKey.intValue());
ResultSet rs = stmt.executeQuery();
if (rs.next())
this.id = rs.getInt(1);
this.name = rs.getString (2).trim();
stmt.close();
} // if
else
stmt.close();
throw new NoSuchEntityException ("Invalid id " + id);
}// else
} // try
catch (SQLException e)
System.out.println("EJBLOad : " + e.getMessage());
} // catch
finally
try
if (con != null)
con.close();
}// try
catch (SQLException e)
System.out.println("EJBLOad finally" + e.getMessage());
} // catch
}// finally
* ejbPassivate
public void ejbPassivate() {
* ejbRemove
public void ejbRemove() throws javax.ejb.RemoveException {
System.out.println ("Entering ejb Removed");
try
String sqlstmt = "delete from status where id=" + id;
con = ds.getConnection();
Statement stmt = con.createStatement();
stmt.executeUpdate(sqlstmt);
stmt.close();
}// try
catch (SQLException e)
System.out.println("Ejb Remove" + e.getMessage());
} // catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJBRemoved " + e.getMessage());
} // catch
} // finally
* ejbStore
public void ejbStore() {
System.out.println("Entering the ejbStore");
try
String sqlstmt = "update status set id=" + id + ",name='" + name + "' where id=" + id;
con = ds.getConnection();
Statement stmt = con.createStatement();
if (stmt.executeUpdate(sqlstmt) != 1)
throw new EJBException ("Object state not saved");
stmt.close();
} // try
catch (SQLException e)
System.out.println ("EJBStore : " + e.getMessage());
}// catch
finally
try
if (con != null)
con.close();
} // try
catch(SQLException e)
System.out.println ("EJBStore finally " + e.getMessage());
} // catch
} // finally
* getEntityContext
public javax.ejb.EntityContext getEntityContext() {
return myEntityCtx;
* setEntityContext
public void setEntityContext(javax.ejb.EntityContext ctx) {
myEntityCtx = ctx;
try
InitialContext initial = new InitialContext();
ds = (DataSource)initial.lookup(dbname);
} // try
catch (NamingException e)
throw new EJBException ("set Entity context : Invalid database");
}// catch
* unsetEntityContext
public void unsetEntityContext() {
myEntityCtx = null;
* ejbCreate
public Integer ejbCreate(Integer key, String name) throws javax.ejb.CreateException {
this.id = key.intValue();
this.name = name;
System.out.println ("Entering ejbCreated!!!");
try
String sqlstmt = "insert into status(id,name) values (" + id + ",'" + (name == null ? "" : name) + "')";
con = ds.getConnection();
Statement stmt = con.createStatement();
stmt.executeUpdate(sqlstmt);
stmt.close();
}// try
catch (SQLException e)
System.out.println("EJBCreate : SQLEXception ");
}// catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJB Created Finally : SQLException");
e.getMessage();
} // catch
}// finally
this.id = key.intValue();
this.name = name;
return key ;
* ejbPostCreate
public void ejbPostCreate(Integer id, String name) throws javax.ejb.CreateException {
* ejbFindByPrimaryKey
public Integer ejbFindByPrimaryKey(
Integer key) throws javax.ejb.FinderException {
try
String sqlstmt = "select id from status where id=" + key.intValue();
con = ds.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sqlstmt);
if (!rs.next())
throw new ObjectNotFoundException();
} // if
rs.close();
stmt.close();
} // try
catch (SQLException e)
System.out.println ("EJBFindBYPrimaryKey " + e.getMessage());
} // catch
finally
try
if (con!=null)
con.close();
}// try
catch (SQLException e)
System.out.println ("EJB Find by primary key" + e.getMessage());
}// catch
}// finally
return key;
* @return Returns the name.
public String getName() {
return this.name;
* @return Returns id
public int getId() {
return this.id;
* @param name The name to set.
public void setName(String xname) {
this.name = xname;
* ejbFindByLastnameContaining
public Enumeration ejbFindAllNamne () throws javax.ejb.FinderException
try
String sqlstmt = "select id from status order by id";
con = ds.getConnection();
Statement s = con.createStatement();
ResultSet rs = s.executeQuery(sqlstmt);
Vector keys = new Vector();
while (rs.next())
keys.add(new Integer(rs.getInt(1)));
}// while
rs.close();
s.close();
con.close();
return keys.elements();
} // try
catch (SQLException e)
throw new FinderException (e.toString());
} // catch
}Hi,
if you look at your error message you will see the problem. In your code you've missed to implement
public void ejbPassivate {}
so your code looks like this
import java.lang.Object;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;
import java.lang.Math;
import java.util.Random;
import java.io.*;
/** * Title: * Description: * Copyright: Copyright (c) 2001 * Company: * @author * @version 1.0 */
public class DiceEJB implements SessionBean, Serializable
public int[] Roll()
Random rng = new Random();
int[] diceArray = new int[5];
for(int i =0; i < diceArray.length;i++)
diceArray[i] = (Math.abs (rng.nextInt()) % 6) +1;
return diceArray;
public DiceEJB(){}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void setSessionContext (SessionContext sc)
private void writeObject(ObjectOutputStream oos) throws IOException
oos.defaultWriteObject();
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
ois.defaultReadObject();
bye -
Global transactions in OSB and EJB 2.1
Hi,
My team is working in a SOA service based on OSB 11g (11.1.1.5) using DB JCA Adapter and EJB 2.1 over WLS 10g(WLI environment). The logic of the service works in this way:
1. A table in a database (XE) is polled by the DB Adapter which starts the service (1 row = 1 message).
2. The message contains a collection of items to be inserted in another Oracle database.
Once a message/row is picked, and after some steps (logging, validation,etc), there is a for..each action which extracts each item of the collection and executes a service callout action to a business service.
3. This business service uses EJB protocol to call an EJB (2.1 + WLS Extensions). The EJB is deployed in another domain (WLS 10.3.0/10g and Oracle BEA drivers) and only executes an store procedure with the parameters based on the message and inserts these values in a table.
4. Once the for...each finishes, there is a call to another proxy service which marks the message/row as "processed" in the source table. This update is done via DB JCA also.
5. In case of an error, the error handler of the proxy service calls the proxy service mentioned above to mark the row as "Failed" (in fact there is a retry mechanism, but it's not important for now).
The service requires to work inside a global transaction. The main requirement is that the collection of items should be processed as "All or None", so basically we're using the options to manage the global transaction. However, the problem is that it's failing to rollback the whole insertion of items when an error is simulated. It only rolls back the last insertion/execution of SP.
Additionally, the proxy service that should mark the row as FAILED, never updates this one, and the tables stay locked until we modify one of the store procedure in order to avoid the simulated error and commit the transaction.
The EJB uses WLS extensions with the annotations to "transaction required". The proxy service has the option transaction required also. The database drivers are all XA and we're testing against Oracle11g XE (however, the EJB destiny will be Oracle 8i in production).
We have tried different alternatives, splitting the logic in different proxies (Proxy services for JCA, Proxy with For Each for EJB, etc), isolating the specific part with the EJB call, without success.
The security between domains is set as Global Trust.
Do you have any idea, example or suggestion about this problem? Is EJB really supported in Global Transactions and XA?
Thanks in advance.where do you find the J2EE Connector 1.5 compliant
Resource Adapter?I wrote the compliant adapter myself. Hey Steve,
Were you able to find a solution for this problem. I am struggling with the same problem with the RI Beta implementation.
Sandeep -
SAS9.1 Persistence and EJB lookups (not registered in JNDI?)
I am trying to deploy a very basic EJB3 module to test my learning. The module deploys via the Admin Console without apparnet error. Unfortunately, when using the generated test page for the web-service, I am having total failure which seems to be around the persistence unit and EJBs not being created in the JNDI.
I have an @Stateless/@WebService bean:
package com.flexit.buslogic;
import java.util.logging.Level;
import javax.ejb.Stateless;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import com.flexit.persistence.eao.OwnerFacade;
@WebService
@Stateless
public class CreateOwner {
@EJB
private OwnerFacade ownerFacade;
public CreateOwner(){}
@WebMethod
public Integer addOwner (
@WebParam(name="Name") String name){
LogUtil.log("Add owner request " +
"received for "+name,
Level.INFO, null);
return ownerFacade.findAll().size();
}The OwnerFacade EJB injection fails with avax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJBIf I instantiate a 'normal' reference to OwnerFacade (ie OwnerFacade ownerFacade = new OwnerFacade(); I get a similar error in the OwnerFacade EJB in relation to an attempt to inject an EntityManager:
package com.flexit.persistence.eao;
import java.util.List;
import java.util.logging.Level;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import com.flexit.persistence.LogUtil;
import com.flexit.persistence.Owner;
@Stateless
public class OwnerFacade implements OwnerFacadeLocal, OwnerFacadeRemote {
// fields
@PersistenceContext(unitName="FlexIBuildPU")
private EntityManager entityManager;
public OwnerFacade () {
if (entityManager == null) {
LogUtil.log("unable to get an Entity Manager Instance", Level.SEVERE, null);
...The constructor logs that the entityManager is, indeed, null.
I have tried the code on SAS9 and 9.1 and using the default JavaDB and a MySQL connection pool (successful ping) and datasource (named 'jdbc/FlexDBDS') created through the Admin Console. The persistence unit is defined in a persistence.xml file in the META-INF folder:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="FlexIBuildPU" transaction-type="JTA">
<jta-data-source>jdbc/FlexDBDS</jta-data-source>
</persistence-unit>
</persistence>Can anyone please save me from tearing my hair out (more)?Have managed to resolve. There were two problems
First I was attempting to access a session bean directly rather than via an interface (eejit!) - ie:
@EJB OwnerFacade ownerFacadewhen it should have been:
@EJB OwnerFacadeLocal ownerFacadeSecond, the persistence unit wasn't created properly. In playing around with persistence.xml I moved from:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="FlexIBuildPU" transaction-type="JTA">
<description>This unit manages BMS units, owners, offers, and acceptance.</description>
<jta-data-source>jdbc/FlexDBDS</jta-data-source>
<properties>
<property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="toplink.ddl-generation" value="create-tables"/>
</properties>
</persistence-unit>
</persistence>to:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="FlexIBuildPU" transaction-type="JTA">
<description>This unit manages BMS units, owners, offers, and acceptance.</description>
<jta-data-source>jdbc/FlexDBDS</jta-data-source>
<properties>
<property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="toplink.application-location" value="C:\ddl\flexdb\"/>
<property name="toplink.create-ddl-jdbc-file-name" value="create.sql"/>
<property name="toplink.drop-ddl-jdbc-file-name" value="drop.sql"/>
<property name="toplink.ddl-generation.output-mode" value="both"/>
<property name="toplink.ddl-generation" value="create-tables"/>
</properties>
</persistence-unit>
</persistence>It seems the very action of writing the sql to file helps with the binding. It seems so extraordinary that I think I must of made another mistake which was corrected along the way. In any event, the properties specifying output files may prove useful to others. :) -
Starting up j2ee and EJB deployment tool on Windows 98
I will start off this question with an apology if it is too stupid,
basic, or placed in the wrong group. I am relatively new to the world
of Java and even newer to the world of Server-side Java and EJBs.
However, I am plugging away.
I am using my trusty 4 year old system with Windows 98 second edition
to dabble with Server-side Java and EJB applications. I am using
Tomcat 4.0 as my server. When I try and start the j2ee server or the
EJB deployment tool I get the following scrolling messages:
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Syntax error
Syntax error
Syntax error
Out of environment space
Bad command or file name
I have tried to adjust the memory settings in the DOS window with no
success. My question has three parts:
1) Can these applications be run using Windows 98 and if so what are
the exact DOS window memory settings for this?
2) Where exactly can I find the documentation that specifies this?
(please be specific as possible as I have read the readme.txt files
supplied with j2ee)
3) Should this and similar questions be posted in another
group/section?
I truly appreciate anyone's help with this.
Sincerely,
TimYou're going to have a lot of pain unless you upgrade to Windows 2000 or XP.
In the mean time, set your environment size much larger (google for "Out of
environment space") and use WinOne from http://www.cia.com.au/luke/ ...
that's how I scraped by on Windows 98 for a while.
Peace,
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Tim" <[email protected]> wrote in message
news:[email protected]..
I will start off this question with an apology if it is too stupid,
basic, or placed in the wrong group. I am relatively new to the world
of Java and even newer to the world of Server-side Java and EJBs.
However, I am plugging away.
I am using my trusty 4 year old system with Windows 98 second edition
to dabble with Server-side Java and EJB applications. I am using
Tomcat 4.0 as my server. When I try and start the j2ee server or the
EJB deployment tool I get the following scrolling messages:
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Syntax error
Syntax error
Syntax error
Out of environment space
Bad command or file name
I have tried to adjust the memory settings in the DOS window with no
success. My question has three parts:
1) Can these applications be run using Windows 98 and if so what are
the exact DOS window memory settings for this?
2) Where exactly can I find the documentation that specifies this?
(please be specific as possible as I have read the readme.txt files
supplied with j2ee)
3) Should this and similar questions be posted in another
group/section?
I truly appreciate anyone's help with this.
Sincerely,
Tim -
ClassNotFound error when loading applet from a NTLM authenticated site
Hi,
I wrote a Java applet and put it into a JAR file and signed the JAR file. It works fine if the user doesn't need to be authenticated. However, when I place the same JAR to a site that uses NTLM (NT challenging) authentication. The applet failed to load and returns ClassNotFound exception. Does anyone know why?
The following is the complete error message:
java.io.IOException: Server returned HTTP response code: 401 for URL: http://unibox.MySite.com/fileupload/FileUpload.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:697)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:369)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:1139)
at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(HttpURLConnection.java:330)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:367)
at sun.plugin.net.protocol.http.HttpUtils.followRedirects(HttpUtils.java:39)
at sun.plugin.cache.CachedJarLoader.download(CachedJarLoader.java:311)
at sun.plugin.cache.CachedJarLoader.load(CachedJarLoader.java:131)
at sun.plugin.cache.JarCache.get(JarCache.java:177)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:71)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:56)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:498)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:459)
at sun.misc.URLClassPath$2.run(URLClassPath.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:244)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:221)
at sun.misc.URLClassPath.getResource(URLClassPath.java:134)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:132)
at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:189)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:473)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:548)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1621)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:477)
at sun.applet.AppletPanel.run(AppletPanel.java:290)
at java.lang.Thread.run(Thread.java:536)
load: class FileUpload.class not found.
java.lang.ClassNotFoundException: FileUpload.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:151)
at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:189)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:478)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:548)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1621)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:477)
at sun.applet.AppletPanel.run(AppletPanel.java:290)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:224)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:40)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:141)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:138)
... 10 moreIt appears that the latest jvm plugins use java to get the archive files instead of using the browser to download the archive files.
In addition sun does not support NTLM authentication, because of this the latest jvms are unable to download the jar file containing the applet.
I have been working on finding a way to replace suns http Handler, but have had no luck with setting the java.protocol.handler.pkgs for the plugin and having it retain the setting.
I have achieved partial results using the appletviewer with -J-Djava.protocol.handler=com.nogoop
you might try taking a look at http://www.nogoop.com -
Hi guys,
I am trying to call EJB in my strut action classes using @EJB and got the error java.lang.NullPointerException while I use InitialContext to lookup for the EJB manually it works. The error indicates, to me that the container did not inject the EJB object at the run time. Can anyone explain to me why using annotation to inject the EJB in action classes would not work? Am I doing something wrong?
Some environment info:
** Both my web application and EJB are on the same glassfish server
** The web application and EJB are not in the same .ear file, meaning they are separate applications
thanks in advance, Kenny
Edited by: user13433552 on 7/12/2010 16:36
Edited by: user13433552 on 7/12/2010 16:36As far as I know, the JEE server can only inject into resources it "knows about", which are servlets, other EJBs, MDBs and for example JSF backing beans. Struts is not part of the JEE spec, so I guess it won't scan those classes.
But perhaps Struts itself has a mechanism to inject EJBs into an action class? -
ClassNotFound error in HttpServletRequest.
I am using Weblogic 5.1.
Our application is basically Servlets based .
We are setting up a cluster with weblogic(as App Server) on NT and Apache (as
Web Server) on Solaris.
All the setup was done as per the documentation.
But after the Cluster Setup, the application runs fine when there is only one
primary weblogic server , but when any of the other weblogic servers are added
into the cluster, the application fails with ClassNotFound error in HttpServletRequest.
the following is the Error
Sun May 06 15:51:11 GMT+05:30 2001:<E> <Kernel> ExecuteRequest failed.
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:996)
at java.io.ObjectStreamClass.computeSerialVersionUID(ObjectStreamClass.j
ava:739)
at java.io.ObjectStreamClass.access$4(ObjectStreamClass.java:716)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:343)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:331)
at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.java:111)
at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:481)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
:785)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled
Code)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled
Code)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
at java.util.Hashtable.readObject(Hashtable.java:773)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:1
685)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1165)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled
Code)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
at weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectI
nputStreamBase.java:76)
at weblogic.servlet.internal.session.ReplicatedSession.readExternal(Repl
icatedSession.java:63)
at weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializab
le(WLObjectInputStreamBase.java, Compiled Code)
at weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjec
tInputStreamBase.java, Compiled Code)
at weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObj
ectInputStreamBase.java, Compiled Code)
at weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectI
nputStreamBase.java, Compiled Code)
at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjec
tInputStreamBase.java, Compiled Code)
at weblogic.rmi.extensions.AbstractInputStream2.readObject(AbstractInput
Stream2.java:25)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Replica
tionManager_WLSkel.java:49)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java, Compiled Code)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
at weblogic.rmi.extensions.BasicRequestDispatcher.dispatch(BasicRequestD
ispatcher.java:80)
at weblogic.rmi.internal.BasicRemoteInvokable.invoke(BasicRemoteInvokabl
e.java:31)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:657)
at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerSer
ver.java:123)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java, Compiled Code)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java, Comp
iled Code)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
23)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
--------------- nested within: ------------------
weblogic.rmi.ServerError: A RemoteException occurred in the server method
- with nested exception:
[java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest]
at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
ava:76)
at weblogic.cluster.replication.ReplicationManager_WLStub.create(Replica
tionManager_WLStub.java:100)
at weblogic.cluster.replication.ReplicationManager.createSecondary(Repli
cationManager.java:457)
at weblogic.cluster.replication.ReplicationManager.checkHosts(Replicatio
nManager.java:523)
at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged
(ReplicationManager.java:548)
at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(Me
mberStash.java:209)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked exception -
w
ith nested exception:
[weblogic.rmi.ServerError: A RemoteException occurred in the server method
- with nested exception:
[java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest]]
at weblogic.cluster.replication.ReplicationManager_WLStub.create(Replica
tionManager_WLStub.java:108)
at weblogic.cluster.replication.ReplicationManager.createSecondary(Repli
cationManager.java:457)
at weblogic.cluster.replication.ReplicationManager.checkHosts(Replicatio
nManager.java:523)
at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged
(ReplicationManager.java:548)
at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(Me
mberStash.java:209)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
The javax.* classes are in weblogicaux.jar.
You do not have weblogicaux.jar in your classpath.
Mike
"Ajith Manohar" <[email protected]> wrote:
>
>I am using Weblogic 5.1.
>Our application is basically Servlets based .
>
>We are setting up a cluster with weblogic(as App Server) on NT and Apache
>(as
>Web Server) on Solaris.
>
>All the setup was done as per the documentation.
>
>But after the Cluster Setup, the application runs fine when there is
>only one
>primary weblogic server , but when any of the other weblogic servers
>are added
>into the cluster, the application fails with ClassNotFound error in HttpServletRequest.
>
>the following is the Error
>-----------------------------------------------------------------
>Sun May 06 15:51:11 GMT+05:30 2001:<E> <Kernel> ExecuteRequest failed.
>java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
> at java.lang.Class.getMethods0(Native Method)
> at java.lang.Class.getDeclaredMethods(Class.java:996)
> at java.io.ObjectStreamClass.computeSerialVersionUID(ObjectStreamClass.j
>ava:739)
> at java.io.ObjectStreamClass.access$4(ObjectStreamClass.java:716)
> at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:343)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:331)
> at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.java:111)
> at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:481)
> at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
>:785)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
>Compiled
> Code)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
> at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
>Compiled
> Code)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
> at java.util.Hashtable.readObject(Hashtable.java:773)
> at java.lang.reflect.Method.invoke(Native Method)
> at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:1
>685)
> at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1165)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
>Compiled
> Code)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
> at weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectI
>nputStreamBase.java:76)
> at weblogic.servlet.internal.session.ReplicatedSession.readExternal(Repl
>icatedSession.java:63)
> at weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializab
>le(WLObjectInputStreamBase.java, Compiled Code)
> at weblogic.common.internal.WLObjectInputStreamBase.readLeftover(WLObjec
>tInputStreamBase.java, Compiled Code)
> at weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(WLObj
>ectInputStreamBase.java, Compiled Code)
> at weblogic.common.internal.WLObjectInputStreamBase.readObject(WLObjectI
>nputStreamBase.java, Compiled Code)
> at weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(WLObjec
>tInputStreamBase.java, Compiled Code)
> at weblogic.rmi.extensions.AbstractInputStream2.readObject(AbstractInput
>Stream2.java:25)
> at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Replica
>tionManager_WLSkel.java:49)
> at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
>jectAdapter.java, Compiled Code)
> at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
>tHandler.java:69)
> at weblogic.rmi.extensions.BasicRequestDispatcher.dispatch(BasicRequestD
>ispatcher.java:80)
> at weblogic.rmi.internal.BasicRemoteInvokable.invoke(BasicRemoteInvokabl
>e.java:31)
> at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:657)
> at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerSer
>ver.java:123)
> at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
> at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
> at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java, Compiled
>Code)
>
> at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java,
>Comp
>iled Code)
> at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
>23)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
>Code)
>
>--------------- nested within: ------------------
>weblogic.rmi.ServerError: A RemoteException occurred in the server method
> - with nested exception:
>[java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest]
> at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
>ava:76)
> at weblogic.cluster.replication.ReplicationManager_WLStub.create(Replica
>tionManager_WLStub.java:100)
> at weblogic.cluster.replication.ReplicationManager.createSecondary(Repli
>cationManager.java:457)
> at weblogic.cluster.replication.ReplicationManager.checkHosts(Replicatio
>nManager.java:523)
> at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged
>(ReplicationManager.java:548)
> at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(Me
>mberStash.java:209)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>--------------- nested within: ------------------
>weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked exception
>-
>w
>ith nested exception:
>[weblogic.rmi.ServerError: A RemoteException occurred in the server method
> - with nested exception:
>[java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest]]
> at weblogic.cluster.replication.ReplicationManager_WLStub.create(Replica
>tionManager_WLStub.java:108)
> at weblogic.cluster.replication.ReplicationManager.createSecondary(Repli
>cationManager.java:457)
> at weblogic.cluster.replication.ReplicationManager.checkHosts(Replicatio
>nManager.java:523)
> at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged
>(ReplicationManager.java:548)
> at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(Me
>mberStash.java:209)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
-
ADF – Could I have HttpSession and EJB 3 Statefull session in same applicat
I am using JDeveloper 10.3.2. Fist I create a single demo application to create EJB Session Bean (Statefull) and is working fine.
When I am trying to use the same EJB to my large Application a got runtime Error,
Without any exception. (Losing the information of EJB).
And the Question is, Shall I use HttpSession and EJB 3 Statefull session in same application?Hi,
if it is a Web application you need the https session anyway and the two are different kind of beasts, one handled by teh EJB container, the other by the web container.
The question is why you ned stateful session beans - which seems to be a rare usecase? Usually state is persisted and tracked in the business service.
However, without an error message its hard to tell what going wrong here
Frank
Maybe you are looking for
-
IPhone / iCal /itunes calendar issue
Hi all, since updating to the latest iTunes / iPhone OS I have an issue synching the phone. It takes hours(!) when it comes to sync the calendar (I have 6 or 7, all local on my macbook pro). Contacts work fine, same with apps and music, just the cale
-
How to use keywords in a correct way for Acrobat Pro AND Spotlight
When I enter keywords in a PDF using CMD-D in Acrobat Professional I also want to find those keywords via OS X Spotlight. At the same time I to be able to use keywords when I enter keywords in PDFs using Preview.app. What's the path to do this, and h
-
Is it possible to preview a LabVIEW queue at the opposite end? I'm using LabVIEW 8.6 Many thanks for your help Conway Solved! Go to Solution.
-
Can't run Toast 7 Titanium's CD Spin Doctor - please help!
Hello, I don't know if I'm posting in the appropriate forum or not, but here goes... I got a LaCie d2 Dual DVD+/_ RW Drive for Christmas, along with a brand new copy of Roxio's Toast 7 Titanium. I recently installed all the driver software and everyt
-
Memory problem - state saving?
Hi, We've been having some serious memory leak problems with our application, and is seems like we've narrowed down the symptoms : Objects referenced by af:table components (i.e. The classes that the rows of the table are based on) continually have t