Named query in Entity Bean - Problem with embedded class
Hello Forum,
I'm trying to set up a named query in my Entity Bean and I'm unable to get
it up and running for an embedded class object.
The class hierarchy is as follows:
@MappedSuperclass
AbstractSapResultData (contains dayOfAggregation field)
^
|
@MappedSuperclass
AbstractSapUserData (contains the timeSlice field)
^
|
@Entity
SapUserDataThe named query is as follows:
@NamedQuery(name = SapUserDataContext.NAMED_QUERY_NAME_COUNT_QUERY,
query = "SELECT COUNT(obj) FROM SapUserData AS obj WHERE "
+ "obj.sapCustomerId"
+ "= :"
+ SapResultDataContext.COLUMN_NAME_SAP_CUSTOMER_ID
+ " AND "
+ "obj.sapSystemId"
+ "= :"
+ SapResultDataContext.COLUMN_NAME_SAP_SYSTEM_ID
+ " AND "
+ "obj.sapServerId"
+ "= :"
+ SapResultDataContext.COLUMN_NAME_SAP_SERVER_ID
+ " AND "
+ "obj.dayOfAggregation.calendar"
+ "= :"
+ DayContext.COLUMN_NAME_DAY_OF_AGGREGATION
+ " AND "
+ "obj.timeSlice.startTime"
+ "= :"
+ "timeSliceStartTime"
+ " AND "
+ "obj.timeSlice.endTime"
+ "= :"
+ "timeSliceEndTime")The query deploys and runs except that part:
+ "obj.dayOfAggregation.calendar"
+ "= :"
+ DayContext.COLUMN_NAME_DAY_OF_AGGREGATIONI don't see any difference to the part of the query accessing the timeSlice
field which is also an embedded class object - I access it in exactly the same way:
+ "obj.timeSlice.startTime"
+ "= :"
+ "timeSliceStartTime"
+ " AND "
+ "obj.timeSlice.endTime"
+ "= :"
+ "timeSliceEndTime"The problem is that the complete query runs on JBoss application server
but on the SAP NetWeaver application server it only rund without the
+ "obj.dayOfAggregation.calendar"
+ "= :"
+ DayContext.COLUMN_NAME_DAY_OF_AGGREGATIONpart - If I enable that part on SAP NetWeaver the server complains:
[EXCEPTION]
{0}#1#java.lang.IllegalArgumentException: line 1: Comparison '=' not defined for dependent objects
SELECT COUNT(obj) FROM SapUserData AS obj WHERE obj.sapCustomerId= :sap_customer_id AND obj.sapSystemId= :sap_system_id AND obj.sapServerId= :sap_server_id AND obj.dayOfAggregation.calendar= :day_of_aggregation AND obj.timeSlice.startTime= :timeSliceStartTime AND obj.timeSlice.endTime= :timeSliceEndTime
^I know that this isn't an application server specific forum but the SAP NetWeaver server is the most strict EJB 3.0 and JPA 1.0 implementation I've seen so far so I think I'm doing something wrong there.
Someone in the SAp forum mentioned:
The problem here is that you compare an input-parameter with an embeddable field of your entity.
Regarding to the JPQL-grammer (spec 4.14) you are not allowed to compare
with the non-terminal embeddable field but with the terminal fields of your
embeddable. Stating that your embedded class might have the fields
startTime and endTime your JPQL query might look like this:
Query q = em.createQuery("SELECT count(obj.databaseId) FROM SapUserData obj WHERE obj.timeSlice.startTime = :startTime AND obj.timeSlice.endTime = :endTime");
q.setParameter("startTime", foo.getStartTime());
q.setParameter("endTime", foo.getEndTime());
q.getResultList();
This limitation in the JPQL grammar is rather uncomfortable.
An automatic mapping of the parameter's fields to the terminal fields of your
embedded field would be more convenient. The same can be said for lists
as parameter-values which is possible in HQL, too. I think we have to wait
patiently for JPA 2.0 and hope for improvements there. :-)
With that help I was able to get it up and running for the timeSlice field but
I don't see the difference to the dayOfAggregation field which is also just
another embedded class using an object of a class annotated with
@Embeddable.
The get method of the dayOfAggregation field is as follows:
* Get method for the member "<code>dayOfAggregation</code>".
* @return Returns the dayOfAggregation.
@Embedded
@AttributeOverrides({@AttributeOverride(name = "calendar", /* Not possible to use interface constant here - field name must be used for reference */
column = @Column(name = DayContext.COLUMN_NAME_DAY_OF_AGGREGATION,
nullable = false)),
@AttributeOverride(name = "weekday",
column = @Column(name = DayContext.COLUMN_NAME_WEEKDAY,
nullable = false)),
public Day getDayOfAggregation() {
return this.dayOfAggregation;
}The link to my question in the SAP forum for reference:
https://www.sdn.sap.com/irj/sdn/thread?messageID=3651350
Any help or ideas would be greatly appreciated.
Thanks in advance.
Henning Malzahn
Hello Forum,
got a response in the SAP forum - Issue is a bug in the SAP NetWeaver
app. server.
Henning Malzahn
Similar Messages
-
Problems with Embedded classes mapping
Hi,
I'm experiencing problems for table generation with the following case:
a class declares two fields; one of them typed as a subclass of the other; both fields annotated with @Embedded; the subclass uses the annotation @AttributeOverride to avoid column names duplication.
When the tables are generated, one of the field (the most specialized one) is simply omitted by the JPA implementation...
To illustrate my problem, here is an example:
@Entity
public class Bar implements Serializable {
@Embedded
protected Foo foo = null;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE)
protected long id = -1;
@Embedded
protected SubFoo subFoo = null;
public Bar() {
super();
// getters & setters
@Embeddable
public class Foo implements Serializable {
@Column
protected String bar = null;
@Column
protected String foo = null;
public Foo() {
super();
// getters & setters
@Embeddable
@AttributeOverrides({
@AttributeOverride(name="bar", column=@Column(name="subbar")),
@AttributeOverride(name="foo", column=@Column(name="subfoo"))
public class SubFoo extends Foo {
public SubFoo() {
super();
}The generated table BAR contains only 3 columns: ID, FOO, BAR...
...and what I expect is two additionnal columns named SUBFOO & SUBBAR!
Can someone tell me: if I definitely need to go back to school (I'm obviously not an EJB expert), or how to make it work as I expect...?
Thanks
-JeromeI found the note in the EJB specs that clearly states that my issue has no solution at this time:
"Support for collections of embedded objects and for the polymorphism and inheritance of embeddable classes will be required in a future release of this specification."
EJB 3.0 specs - final release - persistence, page 23, note 10 in section 2.1.5 -
EJB 2.0 cmp entity beans problem with 8.17
I have a little application as client JBuilder,Weblogic 7.0 on the middleware
and 8.17 personnal at the backend,with Cloudscape java database,it worked fine.
I have two tables in it,with a one-to-many relationship,the ClientID from the Clients Table is foreign key in the other.
But now with 8.17 I have a RollbackException(cannot create Factures instance with the foreign key field null)so I cannot create any instance at the many side from the relation because the ClientID which is with EJB2.0 not a cmp field,is put automatically by the container in the table,
but this process seems not to work with 8.17,
what can I do?
Have someone a solution?Hi,
I didn't get your question.
CMP is something, which can be done by hand.
So maybe it is better, to do it manually.
Bea has some workaround, I am sure.
Maybe it is something with deployment descriptors, which
have to be configured to the underlying database.
Sorry for my stupid first answer.
Volker. -
Bean problem with creating Adapter Module in NW developer studio
Hi Gurus!
I started to develop an adapter module like described in
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
Unfortunatelly, I'm getting error described on page 9 of the document:
Bean problem: no interface classes found
I cannot resolve this problem. I've tried it also like described in the document, but no success.
Any ideas of what could be wrong?
Thank you!
MarthyMarthy.,.
Close and open project..standard problem ONLY with nwdi..
Regards
Ravi Raman -
Problems with embedding swfs into Director 11.5
Hello everyone,
I am hoping someone can help me and please bear with me - I don't know a lot about director - I can do some Lingo and get around in the program to make things work.
Right now I am working on an interactive presentation where the user can click a button to view an animation. I am using Director 11.5 for my presentation and have made my animations in After Effects CS3 -- from there I converted my .mov files to .flv files using the Adobe Media Encoder CS4... then I took my .flv file into Flash and published it as a swf file.
The problem that I am having is that when I play the presentation (within Director and after publishing the .app/projector file) the swf files are playing - but there is all this glitchy-artifact stuff all over them. Does anyone know why this would be happening? When I play the swf files in the flash player they look great. Before, when I was using Flash MX and Director MX, I never had any problems with embedding my swf animation files - and they played great - without any artifact. Any and all help would be much appreciated as this project is due in the next few days and I would prefer to figure out a solution rather than uninstalling Flash CS4 and Director 11.5 - and going back to MX.
I toyed with the thought that my video card isn't good enough but I tested the .app file on another machine and the glitchy-artifacts were still there. I have attached a jpg showing the artifact that appears.
I am running Mac OS X 10.5.7
Dual 2 GHz G5 PowerPC
ATI Radeon X800 XT
Thank you!Sorry... here is the image again and I think the problem might be my machine -- it is very old (~4+ years) and when I tested my .app on a newer intel mac here it worked fine... but maybe I am missing something -- it seems odd that I can see the swf fine in flash player but it is glitchy when played through director or the .app projector file
-
Hi,
I have problem with embedded objects which contained embedded objects.
When I create an Object in the persistent memory and commit this object I get the following error:
ORA-22805: cannot insert NULL object into object tables or nested tables
In the constructor of my persisten object I create the embedded members in the transient memory:
ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
m_lang = new AEnumLanguage_OraType();
m_cost = new AAmount_OraType();
}Or when I dereference a reference I get this error:
ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
Can somebody give me a hint?
I've defined the following Type:
CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
VALUE NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
) FINAL " );
CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
ISONR NUMBER(5,0)
) FINAL ;
CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
CCY ACURRENCY_ORATYPE,
LO32BITS NUMBER(10,0),
HI32BITS NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
COUNT NUMBER(4),
LANG AENUMLANGUAGE_ORATYPE,
COST AAMOUNT_ORATYPE
) FINAL ;
oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
pObjR->setCount(i+2001);
pObjR->setLang(AEnumLanguage(i+1));
pObjR->setCost(AAmount(ACurrency(), 2.5));
c.commit();
c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
len = persObjListR.size();
{for (int i = 0; i < len; i++) {
oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
pObjR->getCount();
pObjR->getLang();
c.commit();
With kind regards
Daniel
Message was edited by:
DanielF
Message was edited by:
DanielFHi,
I have problem with embedded objects which contained embedded objects.
When I create an Object in the persistent memory and commit this object I get the following error:
ORA-22805: cannot insert NULL object into object tables or nested tables
In the constructor of my persisten object I create the embedded members in the transient memory:
ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
m_lang = new AEnumLanguage_OraType();
m_cost = new AAmount_OraType();
}Or when I dereference a reference I get this error:
ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
Can somebody give me a hint?
I've defined the following Type:
CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
VALUE NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
) FINAL " );
CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
ISONR NUMBER(5,0)
) FINAL ;
CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
CCY ACURRENCY_ORATYPE,
LO32BITS NUMBER(10,0),
HI32BITS NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
COUNT NUMBER(4),
LANG AENUMLANGUAGE_ORATYPE,
COST AAMOUNT_ORATYPE
) FINAL ;
oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
pObjR->setCount(i+2001);
pObjR->setLang(AEnumLanguage(i+1));
pObjR->setCost(AAmount(ACurrency(), 2.5));
c.commit();
c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
len = persObjListR.size();
{for (int i = 0; i < len; i++) {
oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
pObjR->getCount();
pObjR->getLang();
c.commit();
With kind regards
Daniel
Message was edited by:
DanielF
Message was edited by:
DanielF -
Problems with embedding .flv files in DW CS4....
I inserted an .flv file into my DW CS4 html page. I previewed it in my browser, and it worked for a little bit, but now it's not working in any browser, I'm not sure what happened. I included a screen shot in the attachments of what was happening in all the browsers.
Thanks for any help,
Thank you,
AzaNot sure if that was meant for me
You can tell who was the intended recipient by looking at the header of the message -
6. Sep 10, 2010 6:50 AM in response to: FordGuy48 <<----
Re: Problems with embedding .flv files in DW CS4....
A link to the page would help us diagnose your problem.
Safari tells me that this file -
FLVPlayer_Progressive.swf
is not where you have told the page to expect it. Did you upload it? -
Problems with inner classes in JasminXT
I hava problems with inner classes in JasminXT.
I wrote:
;This is outer class
.source Outer.j
.class Outer
.super SomeSuperClass
.method public createrInnerClass()V
.limit stack 10
.limit locals 10
;create a Inner object
new Outer$Inner
dup
invokenonvirtual Outer$Inner/<init>(LOuter;)V
;test function must print a Outer class name
invokevirtual Outer$Inner/testFunction ()V
.end method
;This is inner class
.source Outer$Inner.j
.class Outer$Inner
.super java/lang/Object
.field final this$0 LOuter;
;contructor
.method pubilc <init>(LOuter;)V
.limit stack 10
.limit locals 10
aload_0
invokenonvirtual Object/<init>()V
aload_0
aload_1
putfield Inner$Outer/this$0 LOuter;
return
.end method
;test
.method public testFunction ()V
.limit stack 10
.limit locals 10
;get out object
getstatic java/io/PrintStream/out java/io/PrintStream;
aload_0
invokevirtual java/lang/Object/getClass()java/lang/Class;
;now in stack Outer$Inner class
invokevirtual java/Class/getDeclaringClass()java/lang/Class;
;but now in stack null
invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
.end methodI used dejasmin. Code was equal.
What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
it returns Outer class?Outer$Inner naming convention is not used by JVM to get declaring class.
You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute? -
Getting problem with DOMImplementation classes method getFeature() method
hi
getting problem with DOMImplementation classes method getFeature() method
Error is cannot find symbol getFeature()
code snippet is like...
private void saveXml(Document document, String path) throws IOException {
DOMImplementation implementation = document.getImplementation();
DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
LSSerializer serializer = implementationLS.createLSSerializer();
LSOutput output = implementationLS.createLSOutput();
FileOutputStream stream = new FileOutputStream(path);
output.setByteStream(stream);
serializer.write(document, output);
stream.close();
problem with getFeature() methodYou are probably using an implementation of DOM which does not implement DOM level-3.
-
Bean problem: No interface classes found
Hi ;
I try to create a adapter . according to tutorial "How To Create Modules for the J2EE Adapter Engine"
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e&overridelayout=true
Although I did all steps in it , I copied sda files and extract them then I imported them to the project but I get this error in Netweaver Studio "Bean problem: No interface classes found" while creating ejb file.
the document says you must close and reopen project when you come accross this error but it doesnt work?
Is there any one solve this error?
ps: I use NWDS 7.0.19 , I copied aii_af_lib.sda, aii_af_svc.sda and aii_af_cpa_svc.sda files from PI 7.01Hi Tuncer!
Did you download and "import" these JAR files into your NWDS Build Path - classpath variables:
com.sap.aii.af.lib.mod.jar <bin>/ext/com.sap.aii.af.lib/lib
sap.comtcloggingjavaimpl.jar <bin>/system
com.sap.aii.af.svc_api.jar <bin>/services/com.sap.aii.af.svc/lib
com.sap.aii.af.cpa.svc_api.jar <bin>/services/com.sap.aii.af.cpa.svc/lib
com.sap.aii.af.ms.ifc_api.jar <bin>/interfaces/com.sap.aii.af.ms.ifc/lib
<bin> stands for: /usr/sap/<SID>/<instance-id>/j2ee/cluster/bin in a PI 7.1 system.
Windows -> Preferences -> Build Path -> Classpath Variables -> New ...
Choose a name of your choice and then select the JAR files mentioned above.
This should resolve your problem.
Regards,
Volker -
Data Warehouse report query using Entity Beans
I have used the EJB technology on one project, so I am not all that familiar with
best practices.
In my new project, I have to produce reports using a query that goes against a
dimensional database. I am wondering what options I have to run the query and
extract the results given that the application will run on WebLogic.
1) Straight JDBC
2) BMP
3) CMP (could be a problem because the quety is a join query, but I am not sure
if WebLogic requires that the query is against a table rather than a view)
The query is read-only. I am more interested in ease of coding and code management
rather than application performance at this point because I think the query will
spend a relatively large time executing on the Oracle database.
I would like to hear the best practices to be employed in this case. Thanks very
much!
Ravi.Don't use entity beans for this. Straight JDBC is not perfect either, but it
is preferable to entity beans for this type of work.
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/
"Ravi Navanee" <[email protected]> wrote in message
news:3c92693d$[email protected]..
>
I have used the EJB technology on one project, so I am not all thatfamiliar with
best practices.
In my new project, I have to produce reports using a query that goesagainst a
dimensional database. I am wondering what options I have to run the queryand
extract the results given that the application will run on WebLogic.
1) Straight JDBC
2) BMP
3) CMP (could be a problem because the quety is a join query, but I am notsure
if WebLogic requires that the query is against a table rather than a view)
The query is read-only. I am more interested in ease of coding and codemanagement
rather than application performance at this point because I think thequery will
spend a relatively large time executing on the Oracle database.
I would like to hear the best practices to be employed in this case.Thanks very
much!
Ravi. -
Nested EJB QL Query in Entity Bean
Hi All
We are using CMP based Entity bean which has name <i>EmployeeBean</i> with a field pSALARY. We want a finder method which return an employee with maximum salary. we are using following Query.
<b>select object(b) from EmployeeBean b where
b.pSALARY = (select max(c.pSALARY) from EmployeeBean c)</b>
But we validate the query in NWDS but we get following error
<b>EJB QL statement is invalid. See General User Output View for details.</b>
General User output view is blank. so we could not analyze the error in this query.
can anybody tell us what's wrong with this Query. Or else how we should formulate the query in another way so that it gives us required result.
Thanks in AdvanceHi
just try like this...
MAX() and MIN() can be used to find the largest or smallest value in a collection of any type of CMP field. It cannot be used with identifiers or paths that terminate in a CMR field. The result type will be the type of CMP field that is being evaluated. For example, the following query returns the highest amount paid for a Job.
<b>SELECT MAX( job.pSALARY )
FROM EmployeeBean AS c, IN (c.EmployeeBean) AS job</b>
The MAX() and MIN() functions can be applied to any valid CMP value including primitive types, strings, and even serializable objects. As you may recall, a CMP field can be a serializable application object that is converted to a binary field and stored in a database. The result of applying the MAX() and MIN() functions to serializable objects is not specified, however, because there is no standardized way of determining which serializable object is greater than another.
The result of applying the MAX() and MIN() functions to a String is type depends on the underlying data store used. This uncertainty results from problems inherent in String comparisons, which are addressed fully in the section "The Problems with Strings."
just refer this link also..
http://www.theserverside.com/articles/article.tss?l=MonsonHaefel-Column5
Regards
Kishor Gopinathan -
Entity bean problem in WSAD 5.1.0
Hi,
I created Bean to RDBMS mapping using top-down approach and deployed successfully. But while starting the server it is giving the following problem (only first few lines pasted..). Any help how to solve this problem, would be highly appreciated.
Thanks,
Helpers W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/PM/WebSphereCMPConnectionFactory" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="eis/jdbc/Default_CMP"; providerURL=""; initialContextFactory=""
Exception data follows:
javax.naming.NameNotFoundException: eis/jdbc/Default_CMP. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:964)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1383)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3534)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)you should check out the entity bean persistence related settings in deployment descriptor. (I have not worked on WSAD for a long time now). The error clearly says that it is not able to find out the datasource (which is being used to persist the entity bean).
hope it helps.
Jiten -
Entity bean connection with SQL Server Error! urgent
Hi,
I am working with J2EE tutorial and when i tried SavingsAccount Entity bean to connect with SQL Server 2000(other than default Cloudscape)and I'm also having SQL Server 2K JDBC Driver installed. I also made entries in Server Configuration menu of J2EE deployment tool for this MS JDBC Driver for SQL Server 2K,I will enclose my dbName and connection method in the entity bean , but i am getting error like this.
my data base name in SQL Server 2K is 'rajeshrNew'.
private String dbName="java:comp/env/jdbc/rajeshrNew"; //dbName
private void makeConnection() throws NamingException, SQLException {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
con = ds.getConnection();
and errors receiving are:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. No suitable driver; nested exception is:
javax.ejb.EJBException: Unable to connect to database. No suitable driver
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. No suitable driver; nested exception is:
javax.ejb.EJBException: Unable to connect to database. No suitable driver
javax.ejb.EJBException: Unable to connect to database. No suitable driver <<no stack trace available>>
Please help me to resolve this problem!!
Regards
Rajesh Ryes i do create System DSN with rajeshrNew and my default.properties file look like this..
# maximum size of message driven bean instance
# pool per mdb type
messagebean.pool.size=3
# maximum size of a "bulk" message bean delivery
messagebean.max.serversessionmsgs=1
# message-bean container resource cleanup interval
messagebean.cleanup.interval=600
passivation.threshold.memory=128000000
idle.resource.threshold=600
log.directory=logs
log.output.file=output.log
log.error.file=error.log
log.event.file=event.log
distributed.transaction.recovery=false
transaction.timeout=0
transaction.nonXA.optimization=true
sessionbean.timeout=0
# validating parser values
# validating.perser is used when archive file are loaded by
# any of the J2EE Reference Implementation tools.
# deployment.validating.parser is used when deploying an
# archive on the J2EE AppServer.
validating.parser=false
deployment.validating.parser=true
now u tell me what i have to change..
with regards
Rajesh -
Whitespace problem with embedded tables
I have a datastructure with embedded groups. In my RTF template, I am using a table for each of these groups, and embedding them likewise. When I load my data, however, and view it, there is a random, undesirable amount of whitespace between where one table ends and where its parent table ends.
To try to make it more clear:
"TEXT in inner table"
----------------------------------------- (End of inner table)
(Random Gap Here)
"Text in outer table"
----------------------------------------- (End of outer table)
The Size of the gap seems to depend on how much space is left on the page. If there is just enough data to fill a page, it will all fit nicely, exactly how I want it. If a page does not contain much data, then the gap gets really big, as if it was trying to cover the entire page.
Anyone else run into this problem?
Thanks,
MattThanks very much!
Before, I had a separate table for each group. When it was all said and done, I had about 5 levels of table embedding. YUCK!
Now I made one big table (1x1) and only used tables where I couldn't get by with plain indenting. The most table embedding that is going on now is individual tables within the large 1x1 table. This method proves much more flexible and elegant.
Thank you very much ashee1,
Matt Soukup
Maybe you are looking for
-
During a standard iTunes upgrade to the latest version (11.1.4 for Windows Vista), the installation failed with the following error message: Could not open key: HKEY_CURRENT_USER\SOFTWARE\Apple Inc.\Internet Services. Does anyone have any advice as t
-
Specifying autoincrement on a field in an entity object declaratively
Hi, I have a master-detail window where the detail entity has a composite key made up of m_id and d_id where m_id is a foreign key to the master table and d_id is the unique key to the detail table. I have defined the detail entity object and checked
-
Apex_item.date_popup 3.1 bug?
In an updateable report region, I have a date picker item. However, on my app, when I pick the date, it always populates the first row. This does not work: select gl_rpt_item_id, description, act_flag, apex_item.hidden(1, gl_rpt_item_id) as item_id,
-
Outbound XML Gateway Transactions
Hi, i'm looking for an example of an Outbound XML transaction for customer as a Trading partner. Can some one help me please. Thanks
-
Sales order prod costing error and extracting the cost $ value
We are doing sales order product costing via custom program which internally calls FM CKKA_Costing_Process, CK_F_SD_ORDER_CALC and all other std processes and calculates the cost. In the event of error, the calculated dollar value is getting cleared.