Java

Not getting the Java Query result

0

The below given java code is to get the role of a log in user .Though the input value is getting into the java code and reaching the query line .On checking the log file I found that log in name is reaching into the query successfully . The error is coming while it is reaching ' iRet = (String) query.uniqueResult(); ' line. On checking this line it is going to the catch () section .Would you plz check the java code and correct this query.

Plz check the below java code and give a solution.Plz....

import org.hibernate.Session;
import org.hibernate.*;
import java.io.*;

V6.7 Java 1.8 and Yosemite

0

I'm kinda stuffed. WM7 won't layout widgets in the way I need so I decided to revert to 6.7 for my development as my client won't wait any longer.

Unfortunately WM6.7 is now not able to import the mySQL database as it is looking for Java 1.6

I do have 1.6 added and other apps relying on 1.6 are finding the path. Is there a setting / config file that I need to change to get this to load?

Get the count of a particular value in the a table via Java services

0

In wavemaker 6.3.3 , I entered a java code for getting the count of a particular value in the table.
The error is coming while i just entering the executeQuery() function.

Plz help... Urgent

The code which I entered is shown below.

import com.wavemaker.runtime.RuntimeAccess;
import java.util.List;
import java.util.ArrayList;
import org.hibernate.Session;
import org.hibernate.SQLQuery;
import com.bondingregister.BondingRegister;
public class SerialNoValidation extends com.wavemaker.runtime.javaservice.JavaServiceSuperClass {
/* Pass in one of FATAL, ERROR, WARN, INFO and DEBUG to modify your log level;
* recommend changing this to FATAL or ERROR before deploying. For info on these levels, look for tomcat/log4j documentation
*/
public SerialNoValidation() {
super(INFO);
}

public String sampleJavaOperation() {
String result = null;
try {
log(INFO, "Starting sample operation");
result = "Hello World";
log(INFO, "Returning " + result);
} catch(Exception e) {
log(ERROR, "The sample java service operation has failed", e);
}
return result;
}

Piramidale's picture

wm.List - Copy row displayed content to clipboard with a click (JS-generated contents)

0

Hi all,
my goal is to obtain, on a long press, the copy of the wm.List element text content and let user choose how to share it (ex. email, SMS, ecc.).

I can use "onLongClick" event on wm-List widget to launch a custom function, but i have know how to get the entire row content and copy it to the clipboard.

In the following code i have inserted "?????????" to show the missing code.

share: function(inSender) {
    var Content = this.my_list.selectedItem.?????????;
    window.clipboardData.setData("Text",Content);
},

Thank you!
Jason

Using NextReports in WaveMaker for Reporting

0

I am fairly new to wavemaker, coming from the microsoft C# world. I am very impressed with WaveMaker and currently trying to incorporate reporting in a couple projects. In the process of evaluating Jasper and BIRT, I found a product called NextReports: http://www.next-reports.com/

I have been able to do a couple of simple reports with it using relatively small amount of code. However, I lack any experience with Jasper and BIRT.

I was wondering if anyone had any experience with NextReports and would like to comment.

Greatly appreciated,

Error al instalar las system dependencies bundle, mientras se cargan al servidor

0

Voy a describir el problema lo mas detalladamente posible.

Al terminar de instalar por consola, en Ubuntu server 12.04 LTS.

Searching Word documents stored in database

0

Hi All

I really need help with the following. I am currently developing a recruitment database application for my company internally. I want to know what I need to do in order to perform searches on Word docs stored within the application i.e. to search through the candidates resumes.I have seen other applications that uses boolean searches.

I want to know what I must do to use this type of feature within Wavemaker.

Any advise will be greatly appreciated.

Piramidale's picture

HQL - Filtering inside Relationships (ex. CASE Inside SELECT)

0

Hi,
please, consider this situation:

DATABASE 1

Tables:
-------------------
TABLE_A
- id_a
- col_a1
- col_a2
- col_a3

TABLE_B
- id_b
- col_b1
- col_b2
- col_b3
- col_b4

Relationship:
-------------------
name: MyRelation
type: One-to-many (from "TABLE A" to "TABLE B")

Then, there is an "wm.List" widget (binded to a ServiceVariable that is binded to an HQL query) that need to show:

• Need 1 -> "TABLE A" rows, filtered by "col_a1" value.

Can't manually set tenantid via Java service

0

Greetings and Merry Christmas!

Using a Java service, I cannot set the tenantid when inserting a new user record.

In my app, I want allow a new user to not only setup a new user account from the login page, but also I want to establish the new tenantid for what will be their company account.

I have tried to accomplish this by using a Java service to create a new tenant table entry, grab the new tenantid and then use that tenantid to populate the tenantid field in the new user record. Here's the way it works:

1. New user enters info and clicks the register button.

Dramia's picture

Software caused connection abort: socket write error

0

Hi everyone !

I have a Web application which rather work fine.
But sometimes, I catch this error : "Software caused connection abort: socket write error" when my application try to use my DB for any request. And all my application has block.
To unblock him, I must to reload my application in my tomcat manager. (And after, that work fine until the next "Software caused connection abort: socket write error"...)

I would to know if someone know where this error come from (Java, MySQL, server, ... ?).

Any help or tips are welcome !

DownloadResponse class not causing client OS to display save prompt

0

Hey Guys,

At my wits end again.

In my app, I am uploading files from the client to the app and storing them in the database. All that works great. My issue is in the effort to then download the files from the database back to the client.

I actually have this working in a test app, but when moving over to my actual project, I had to make a few tweaks related to the BLOB handling. Anyway, everything seems to be working as desired, that is the Java code runs error free and my logging suggests that the database is being read to get the file info.

[SOLVED] Jar Files and Pop-up GUIs

0

Hey Guys,

I have a question regarding jar files and GUI displays in WaveMaker. I have a jar file that when the save button is clicked; the java service is called to activate it and what it does is it checks the information input into the application and if the individual isn't in the database, it pops up a window so that the user can input the individuals information and store it into the database so that the jar file can process the information and store it properly.
The problem I am having is I need this application to display the window on the client and not the server.

HttpSession not the same

0

Hi all,

Small issue with Session :
- I'm storring a Hashtable in a session attribute.
- adding new element to the Hashtable with a method "addA" (java service call by the client)
- deleting an element "removeA"(java service call by the client)

The problem is that I'm not retriving the same session object when addA and removeA are called. This mean that I cannot access to my hashtable where I store my session object. This is an example with the content of the hashtable and the sessionId depending on the called method :

[SOLVED] Help with Java Code to call activate a jar file

0

Hey Guys,

What would be the best way to call a jar file? I have a jar file that is a calculation program and when I click my save button on my application it stores the input data to the database and then calls the jar file that does the calculations and updates the database for me.
I have the jar file already placed in my ...\...\application\lib folder, service variable created to call the java service and the java service named and ready to go but no matter what code I use, I cant get the java code to be accepted by Wavemaker.

Very poor performance transferring / displaying result of JavaService in DojoGrid

0

I have a project with a big dojo grid which is dependent on an user entry and also dependent on the user's role (also can depend on some date values but I skip that to make the problem easier). This logic is implemented through a JavaService which is used by a ServiceVariable to populate the DojoGrid. The problem is that it takes a significant amount of time after the JavaService returns to actually display the data in the grid.

I attached an example project with an example database. I use MS SQL Server so you may have to adjust some (the table names) of the SQL script.

Need example if using TypedServiceReturn read(TypeDefinition , Object , PropertyOptions , PagingOptions )

0

Hello all!

Please show me example of using method

public TypedServiceReturn read(TypeDefinition rootType, Object o, PropertyOptions propertyOptions, PagingOptions pagingOptions)

I need to load all rows from table by this method.
For example:

...
List<Customer> resTable = null;
Customer servicedb = (Customer)RuntimeAccess.getInstance().getServiceBean("mydb");

servicedb.begin();

TypedServiceReturn  tsr = servicedb.read(null, new Customer(), null, null);

resTable = tsr.getReturnValue().getResult();

....

Testing the spam filters

0

forum testing ...

CustomQuery isn't working ...

0

Hello community,

I am using WaveMaker 6.5.3 and I wanted to make a shopping cart showcase. So I created a special custom query called "getCustomersCart" which should show the customer cart content. This is not realy wiorking well...

I have build my own custom query like this:

SELECT
c.products.id AS artikelnummer,
c.products.name AS bezeichnung,
c.products.description AS beschreibung,
c.quantity AS menge,
c.priceTotal AS preis
FROM
Cart c
WHERE
c.customers.id = :id

Eclipse Debugging for wm 6.5

0

Re-posted from Installation.

Since the jdk has been removed from wm 6.x I am at a loss as to how to debug services with eclipse (Juno). How do I get the eclipse debugger to work with wm 6.5.3 ? Also, how do I expand PermGen space?

I think there may be an environment variable I can set with the relevant parameters.

Thanks for any assistance.

Unable to update database record using generated Java classes

0

I am having problem updating a database record on MySQL.
I am running 6.6.0.M2. Database table uses a generated id (Identity) as the primary key. The code runs without giving any error or warning. Insert record works fine. Update of the first name does not get written to database.

What did I do wrong?

Here is a fragment of the Java code.


// Create a new contact record and write to database.
// This part works.

CustomerDB customerDb = null;
customerDb = (CustomerDB)RuntimeAccess.getInstance().getServiceBean("CustomerDB");

Contact contact = new Contact();

Error when starting Wavemaker

0

Hello everybody,
I am new to Wavemaker and also start building up programming skills.
Please help me with the following problem:
I just installed WM (Win7). Everything went well. But when starting WM I get an error message: "Error Loading: D:\Program Files\Java\jre7\bin\msvcr100.dll".
I had Java allready installed before installing WM. It is installed on an external HD (D:).
I also use Liferay and there I could config where to find the JRE.

How can I fix the problem?

thank you very much in giving me some advice

regards Mollekopf

fella5s's picture

How To: Simple Task Scheduling Though @Scheduled -Annotation

0

ScheduleDemo

This is quick instructions how to enable scheduling trough @Scheduled -Annotation

pulsoft's picture

Security concern

0

Hi there, I am brand new to this tool and was directed to it by a post on the Alpha Software forum where disgruntled users are looking at alternatives.

Someone on that forum posted the following about WaveMaker :-
"Ken - I had looked at that one a while back before heading "here" :) The thing that "bothered" me then, and does so even more in light of the recent security issues, is that it builds Java apps. "

Is this a concern for current users?

Thanks,

Dermot

P.S. re. the avatar - OK, I wasn't in the navy but I do have man boobs and need a haircut...

"Save as" dialog in client side

0

Hi all, I need to show a "save as" and retrieve the file name in client side but I can´t find any example for implement this.

anybody give me a hand please.

Richard R.
Montería, Colombia

RaIrata's picture

Rich Text Editor LocalImage plugin

0

Hello,
i'm studying a way to allow users insert images on a Rich Text Editor.
I saw that LocalImage dojox plugin is based on a php service.
Is it possible to use the File Upload java class of File Uploader widget instead?
Or i have to write a java service that behave like that php service?
Anyone had never tried something in this regard?
Thanks.

How do I provide a Custom Security Provider written in Java?

0

Hello,

the Security Providers in WM do not fit my needs. So I figured the best way of profiting from the built-in WM Security is to provide my own Security Provider. Is there a tutorial showing me how?
The User provides his login and password which then (by WM) are passed into my Security Provider which then actually tells WM if that is valid (maybe by providing a bool or a UserRole).
The UserDetails technique used in http://dev.wavemaker.com/forums/?q=node/5801
is not suitable for me.

thx in advance! :-)

Composites with Java Service, how to handle JAR file requirements

0

Composites are a solution to several challenges I have been facing. However in attempting to implement a requirement, I ran into a need to bring some 3rd party jar files along for a java service. Are there any best practices or recommendations for how to handle this?

luism's picture

Offline operation

0

Hello,

Is it possible to work on a deployed app offline? for example a point of sales system that when goes offline due to a conection problem keeps on working normally with a local database something like the phonegap storage? so when the conection goes online again it just syncs the changes to the main database. is there a work around? im kinda lost right now on this, so i would like to hear some advises or examples.

Thank you!

How do I get the serviceId

0

Hello there,

Sorry but my english isnt perfect so I hope you get my question, if there are any problems because of my poor english just ask. Thank you

So my problem is, I would like to get RuntimeAccess.getInstance().getService(java.lang.String serviceId) but my problem is, I dont know where I can get the serviceId.

I hope sombody can help me :)

Thx Nartales

Syndicate content