Quantcast
Channel: Mendix Forum Questions
Viewing all 83469 articles
Browse latest View live

OQL query in java code

$
0
0

my applicaiton is existing code running on postgres. But now migrated to SQL server. There are database queries in  java actions using Core.retrieveOQLDataTable method.

But there were errors on executing these queries, i assumed that is because of change in database, so syntax will be changed. But even simplest query wont run. Below is example.

So if want to write OQL query in .java file using Core.retrieveOQLDataTable method, what will be the syntax? i keep getting parse errors in the code.

"select Alias.ColName as ColName
+ " FROM \"Module$EntityName\" as Alias where Alias.Colname= 'value'";

I have tried Module.EntityName a well.


SOAP with certificate authentication

$
0
0

For a SOAP webservice we need to use, certificate based authentication needs to be implemented. To get this done I have taken the following steps:

  1. Uploaded the certificate authority certificate of the external webservice in the Mendix cloud sprintr. This should allow the cloud to trust the certificate of the external service

  2. Uploaded the PKS certificate in the cloud environment and under the details tab I have added the webservices that it should use in the form module.webservicename

  3. Restarted the application so the changes can be made

Now I get the following error back when calling the service:

xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity

<s:value>s:Sender</s:value>

An error occurred when verifying security for the message

A search on google only gets me that it could be a problem with server time. But I do not know how I can test/verify this in the Mendix cloud.

The error does not specify any extra information on what when wrong with sercurity verification. Does anyone have suggestions on how to get more debug information or what the issue could be?

Entity associations in OQL in Java code

$
0
0

Hello All,

I am trying to figure out how to mention entity association in an OQL query in java code.

How do i reach to the associated entity?

I tried

SELECT A1.attribute1 AS atr1

FROM module.entity1 as A1
WHERE
A1.attribute = 'string'

And A1/module.AssociationName= id of associated row in associated object

 

Its the last line of query that is giving error in OQL window in mendix modeler and in SQL server as well. (I have modified and put correct tables in both)

Consumed third party Webservice call throwing malformed URL exception

$
0
0

Hi,

I have consumed one third party webservice in Mendix 6.2.1 version using WSDL URL. When I call this using a microflow its throwing below exception:

java.net.MalformedURLException
    at com.mendix.integration.xmlimporter.XmlImporter.importXmlStream(XmlImporter.java:103)

Caused by:
null
    at java.net.URL.<init>(URL.java:627)
    at java.net.URL.<init>(URL.java:490)
    at java.net.URL.<init>(URL.java:439)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.mendix.integration.xmlimporter.XmlImporter.importXmlStream(XmlImporter.java:87)
    at com.mendix.integration.xmlimporter.XmlImporter.importXmlStream

I could run this webservice in SOAP UI and could see full structure in Explorer.

Unexpected results when using first day of the week based on locale

$
0
0

Hi, I've created a sample project configured with First day of week set to Default based on locale in project settings. Then I have this demo_user account setup with Language is Dutch, Netherlands.

I have the following function created in a microflow: parseInteger(formatDateTime($Test/EndDate,'w')). When $Test/EndDate is filled with 09-07-2017 00:00, I get the week nr 28. I would expect this to be 27, because of the locale language settings.

When changing the First day of week to Monday, I get the expected result 27.

What did I miss?

null

REST SSL handshake fail

$
0
0

I just set up a new Mendix app environment, and it is my first time. I deployed a project that we have running in a separate Mendix app environment, and everything seems to be working as I would expect, except that when I try to connect to the REST services in the project via SoapUI, I get an error:

Mon Jul 03 16:59:58 CEST 2017:ERROR:javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

This environment has the default Mendix SSL certificate installed, but so did the previous environment, and it worked there. Is there something else in this environment or in my project that I should be checking? This is the first time I'm setting up an environment from scratch, so any help would be very welcome. Thanks!

Deeplinking in a mobile app

$
0
0

Hello everyone!

I'm building a mobile app (android + iOS) that sends push notifications about critical incidents. The idea is that these notifications have links to relevant screens in the mobile app (i.e the notifications have deep links to the screens)


Has anyone here attempted something similar? I'd love to hear about how this can be accomplished. TIA!


Embedded twitter feed not loading every time

$
0
0

Hi there

We are implementing a twitter feed using the instructions in these posts (thanks to those who posted):

https://forum.mendixcloud.com/link/questions/7142

and

https://forum.mendixcloud.com/link/questions/6908

We used the following code in separate snippets:

HTML Snippet 1 (Masked data-widget-id and User):

<a class="twitter-timeline" href="https://twitter.com/search?q=%40MyUser" data-tweet-limit="1" data-chrome="noheader nofooter noborders noscrollbar transparent" data-widget-id="MyWidgetID">Tweets about @MyUser</a>

Javascript Snippet 1 (JQuery not enabled):

!function(d,s,id)
{
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id))
{
js=d.createElement(s);
js.id=id;
js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
}
(document,"script","twitter-wjs");

Javascript Snippet 2 (JQuery not enabled):

if (typeof twttr != "undefined")
{
twttr.widgets.load( );
}

The timeline feed seems to load content sporadically (once every few minutes) and produces nothing when we refresh the page on subsequent loads (i.e. we only see an empty block on the page).  When it produces something it sometimes renders a nicely rendered version we expect, sometimes produces a poorly rendered version of what we expect and sometimes it just produces a link to twitter.  I placed console.log() lines in the Javascript at certain sections for debugging purposes and I can see these points triggered in the console which tells me that the code is triggered.  There aren't any errors in the console.

Has anyone else seen something similar?

Many thanks

Retrieve objects offline via javascript

$
0
0

Hi everybody,

I am building an offline app. In my app I want to retrieve objects through association in javascript. I believe that these objects are not yet synced to my offline, because in the JSON message I don't see them. (I know the GUIDs of the objects that are associated to my context object.) I tried to use mx.data.get and mxobj.fetch and it does not retrieve any objects. It does work in my brower and on my online app though. Probably because it can connect to the server.

I saw this post https://forum.mendixcloud.com/link/questions/17232 and I tried mx.data.getSlice but it does not work. It shows in my console the message: Function is not implemented yet.

In this post https://forum.mendixcloud.com/link/questions/81972 someone mentions that creating of objects can only be done is there is i.e. a listview to show these objects. Could it be possible that  retrieving my objects through association is only possible if I for example use a listview to show the objects so that they are synced to my offline app?

Large datasize / change com.mendix.webui.StateSizeWarningThreshold

$
0
0

How can I change the com.mendix.webui.StateSizeWarningThreshold  as is suggested in https://docs.mendix.com/refguide7/transient-objects-garbage-collecting ?

We have a large dataset (approximatly 10.000 samples) which is requisted by a rest service and thereafter processed and displayed. The data is retrieved in a non-persistent entry. This worked fine in Mendix 6 (processing in 3 a 4 seconds).

When changed to Mendix 7 a user error pops up every time the microflow is called and log shows: "Feedback size of 8044 exceeds threshold of 5000 items which can result in severe performance problems.". However, processing is still done correct and processing time is still aceptable. So we are faced with an "incorrect error message" displayed to user while the correct results are obtained. 

According to the above refquide this behaviour now occurs in Mendix 7 as garbage collection is done at client side and limit for non persistent entires is set to 5000 items. The issue can be prevented by increasing StateSizeWarningThreshold. So we now want to increase this parameters to 10.000.  Any examples on how to change this Threshold ? (were to find it ?) 

Refresh single item in list view.

$
0
0

In version 7.3.0, it should be possible to refresh a single item in a list view, without the whole list refreshing.

Currently this is not working, as the entire list is still being refreshed. What is the correct way to go about this?

Cannot resolve conflict because of editing the CSS by two different developers

$
0
0

I can't resolve the conflict because me and a fellow developer have both made changes on the CSS file on our computer, before trying to commit it to the Team Server. 

What causes a XMPPConnector error

$
0
0

Hi There

What causes this problem ?

 

Timestamp

2017-07-05 12:43:56.172

Level

Error

Node

XMPPConnector

Message

An unhandled exception occurred!

Stack trace

com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//System.User[System.Session_User]","amount":-1,"depth":0,"offset":-1,"sort":{},"type":"RetrieveXPathAction"}', all database changes executed by this action were rolled back
at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:178)
Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//System.User[System.Session_User]","amount":-1,"depth":0,"offset":-1,"sort":{},"type":"RetrieveXPathAction"}', all database changes executed by this action were rolled back
at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37)
Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//System.User[System.Session_User]","amount":-1,"depth":0,"offset":-1,"sort":{},"type":"RetrieveXPathAction"}', all database changes executed by this action were rolled back
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:152)
Caused by: com.mendix.basis.connectionbus.ConnectionBusException: An exception has occurred for the following request(s): 
InternalXPathTextGetRequest (depth = 0): //System.User[System.Session_User]
at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:49)
Caused by: com.mendix.basis.connectionbus.ConnectionBusException: Exception occurred while retrieving data. (SQL State: 42883, Error Code: 0)
at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.getCorrectException(JdbcDataStore.java:1010)
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = boolean
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 611
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264)
at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:231)
at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207)
at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207)
at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQuery(JdbcDataStore.java:319)
at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQueries(JdbcDataStore.java:208)
at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.retrieve(JdbcDataStore.java:172)
at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.retrieve(JdbcDataStore.java:161)
at com.mendix.connectionbus.retrieve.DataStoreCaller.executeQueries(DataStoreCaller.java:229)
at com.mendix.connectionbus.retrieve.DataStoreCaller.executeQueries(DataStoreCaller.java:196)
at com.mendix.connectionbus.retrieve.DataStoreCaller.getResult(DataStoreCaller.java:77)
at com.mendix.connectionbus.retrieve.GetRequestHandler.doRequest(GetRequestHandler.java:69)
at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:44)
at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:465)
at com.mendix.basis.action.user.RetrieveXPathRawAction.retrieveXPathRaw(RetrieveXPathRawAction.java:123)
at com.mendix.basis.action.user.RetrieveXPathRawAction.executeAction(RetrieveXPathRawAction.java:69)
at com.mendix.basis.action.user.RetrieveXPathAction.executeAction(RetrieveXPathAction.java:49)
at com.mendix.basis.action.user.RetrieveXPathAction.executeAction(RetrieveXPathAction.java:17)
at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:73)
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:53)
at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)
at com.mendix.basis.actionmanagement.DefaultActionMonitor$$anonfun$run$1.apply(CustomMonitoredAction.scala:18)
at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)
at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)
at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49)
at com.mendix.basis.actionmanagement.CustomMonitoredAction.monitor(CustomMonitoredAction.scala:22)
at com.mendix.basis.actionmanagement.DefaultActionMonitor$.run(CustomMonitoredAction.scala:18)
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:62)
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:51)
at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51)
at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:170)
at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33)
at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:174)
at com.mendix.basis.component.InternalCore.retrieveXPathQuery(InternalCore.java:1300)
at com.mendix.basis.component.InternalCore.retrieveXPathQuery(InternalCore.java:1266)
at com.mendix.basis.component.InternalCore.retrieveXPathQueryEscaped(InternalCore.java:1412)
at com.mendix.basis.component.InternalCore.retrieveXPathQueryEscaped(InternalCore.java:1250)
at com.mendix.basis.action.admin.GetLoggedInUserNamesAction.activeUsersFromDB$1(GetLoggedInUserNamesAction.scala:40)
at com.mendix.basis.action.admin.GetLoggedInUserNamesAction.call(GetLoggedInUserNamesAction.scala:58)
at com.mendix.basis.action.admin.RuntimeAdminAction.execute(RuntimeAdminAction.java:18)
at com.mendix.m2ee.appcontainer.xmpp.listener.AdminPacketListener.processPacket(AdminPacketListener.java:49)
at org.jivesoftware.smack.Connection$ListenerWrapper.notifyListener(Connection.java:813)
at org.jivesoftware.smack.PacketReader$ListenerNotification.run(PacketReader.java:453)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

 

 

 

Run app takes very long

$
0
0

Hello everyone,

My name is Mike and I just started the first few tutorials of the free online course. 

I'm using the Mendix Modeler 6.6.0 (as advised for same interface as tutorials)  but every time I make a change and save>run my app it takes a few minutes, is this normal because in the tutorial it only takes a second or two.

My apologies for not using any tags but since I've only just started I would probably use the wrong ones anyways.

Thanks in advance.

 


Odata REST filtering

$
0
0

Hi everyone,

I have just started using Mendix and currently working on a project where we want to display data on a page using API and have a search option to filter this data (sort what's get returned).
From what I have heard from other developers- Mendix cannot currently apply filters to an OData,  so it would have to be translated into a REST Service. Which is where I need help, since I am very new to this and I have no experience with REST. So far I managed to display the data, but unable to filter it. Any tips and guidlines would be highly appreciated. Thanks in advance. ^^

What is the biggest Mendix project?

$
0
0

I am just curious about how big a Mendix project possible.

Is there any sample biggest project in terms of # of developers or budget?

個人ユーザーや個人事業主が買えるライセンスはありませんか?

$
0
0

一番安いライセンスは何でしょうか?

個人ユーザーや個人事業主が買えるライセンスはありませんか?

Dynamically Show/Hide Data Grid Columns

$
0
0

 

Hi,

How can I dynamically show/hide data grid columns? 

For example through role-based security or by using a MicroFlow results?

What should I do to show/hide a column for specific roles?

Comparing two objects and showing the changed attributes

$
0
0

I will try to explain my use case through an example:

Lets assume a Person object which is changed by mutations I receive. The mutation contains two Person objects, the old and the new one. The new one will simply overwrite the old one.

The mutations are stored and should contain the information about the attributes which are changed, something like:

attribute name | old value | new value

age | 30 | 31

surname | Smit | Smith

I was thinking about an entity ChangedAttribute in which I store the name, old value and new value so I can easily display them. Of course I can check each attribute when I process the mutation and create the ChangedAttribute objects, but I need a more generic solution.

The only thing I could think of was a Java action which takes two objects as input, do some reflection magic to iterate over the attributes of the objects, compare them and return a list of ChangedAttribute objects.

Since I'm not that eager to create this I was wondering if there were any existing solutions which I can use or use as example. 

Or are there better ways to handle this in Mendix?

Viewing all 83469 articles
Browse latest View live