How to sort by label name in Grafana - grafana

I use rate(nginx_server_bytes{job="$job", host!~'localhost'}[5m]) > 0 for build, it lists all virtual hosts and shows incoming and outgoing traffic.
Information is displayed first all outgoing then all incoming
How do I sort by host?
Now:
{direction="in", host="*", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="in", host="example1.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="in", host="example2.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="*", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="example1.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="example2.com", instance="sat0:9913", job="sat0", job_n="nginx"}
I need:
{direction="in", host="example1.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="example1.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="in", host="example2.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="example2.com", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="in", host="*", instance="sat0:9913", job="sat0", job_n="nginx"}
{direction="out", host="*", instance="sat0:9913", job="sat0", job_n="nginx"}

Related

Error printing Jaspersoft Report with SQLite 3 [duplicate]

I am trying to open a Jasper Report, i made using JasperSoft studio version 6.1.0, and i need to open it with iReport 3.7.6, but i get an error:
Error loading the report template
Message:
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
Level:
SEVERE
Stack Trace:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:423)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3188)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1812)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:731)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
org.apache.commons.digester.Digester.parse(Digester.java:1647)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
i tried to compile my .JRXML with an older using JasperSoft studio, but i was not able.
does anyone know how can i solve this ?
You can try to use Compatibility dialog.
Jaspersoft Studio: Window -> Preferences
Steps:
Set the version of JR you need (3.7.5 in your case)
Save the template as new file
Check that changes in report is not dramatically

App crash after successfully changed wallpaper

hi i'm a beginner in flutter, here i'm trying to make a wallpaper application. my application can run and change the wallpaper, my problem is why does my application crash after success?
_saving() async {
await _askPermissions();
var response = await Dio().get(
widget.imgData,
options: Options(responseType: ResponseType.bytes),
);
final result = await ImageGallerySaver.saveImage(
Uint8List.fromList(response.data), name: 'images');
print(result['filePath']);
var path = await FlutterAbsolutePath.getAbsolutePath(result['filePath']);
print(path);
String out;
try {
out = await WallpaperManager.setWallpaperFromFile(
path, WallpaperManager.HOME_SCREEN);
} on PlatformException {
out = 'Failed to get wallpaper.';
}
}
i am getting this log
D/EGL_emulation(26450): app_time_stats: avg=1550.15ms min=19.34ms max=12037.74ms count=8
I/System.out(26450): ImageGallerySaverPlugin 80
I/flutter (26450): content://media/external/images/media/90
I/flutter (26450): /data/user/0/realfz.flutter.xeed.xeed/cache/IMG_1645634589898.png
E/FA (26450): Missing google_app_id. Firebase Analytics disabled.
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51db690: maj 2 min 0 rcv 2
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51de750: maj 2 min 0 rcv 2
D/HostConnection(26450): createUnique: call
D/HostConnection(26450): HostConnection::get() New Host Connection established 0x7d36c51df950, tid 27786
D/HostConnection(26450): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation(26450): eglMakeCurrent: 0x7d36c51de750: ver 2 0 (tinfo 0x7d38ea0a7200) (first time)
I/Choreographer(26450): Skipped 49 frames! The application may be doing too much work on its main thread.
D/HostConnection(26450): createUnique: call
D/HostConnection(26450): HostConnection::get() New Host Connection established 0x7d36c51e36d0, tid 27785
D/HostConnection(26450): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation(26450): eglMakeCurrent: 0x7d36c51db690: ver 2 0 (tinfo 0x7d38ea0a7100) (first time)
D/EGL_emulation(26450): eglCreateContext: 0x7d36c51e30d0: maj 2 min 0 rcv 2
I/Choreographer(26450): Skipped 109 frames! The application may be doing too much work on its main thread.
I/OpenGLRenderer(26450): Davey! duration=2649ms; Flags=1, FrameTimelineVsyncId=113284, IntendedVsync=47817620015088, Vsync=47818436681722, InputEventId=0, HandleInputStart=47818446770100, AnimationStart=47818446842400, PerformTraversalsStart=47818446945100, DrawStart=47820247194700, FrameDeadline=47817636681754, FrameInterval=47818446237700, FrameStartTime=16666666, SyncQueued=47820248422100, SyncStart=47820248873100, IssueDrawCommandsStart=47820249153600, SwapBuffers=47820251098700, FrameCompleted=47820270211800, DequeueBufferDuration=10092300, QueueBufferDuration=2055700, GpuCompleted=47820259923000, SwapBuffersCompleted=47820270211800, DisplayPresentTime=8589934592,
sorry

permission_handler not asking for location

I'm using the permission_handler package for flutter. I'm successfully asking for the permissions on the camera, camera roll and the microphone.
But there is nothing popping up that asks me for the location.
I'm using this snippet to ask for the permission in my onboarding screen:
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
Permission.storage,
Permission.camera,
Permission.photos,
Permission.microphone,
].request().whenComplete(() {
print('Permission.location.status');
print(Permission.location.status);
///load main
_onIntroEnd(context);
});
This is the post_install in my podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
# You can enable the permissions needed here. For example to enable camera
# permission, just remove the `#` character in front so it looks like this:
#
# ## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1'
#
# Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.calendar
# 'PERMISSION_EVENTS=1',
## dart: PermissionGroup.reminders
# 'PERMISSION_REMINDERS=1',
## dart: PermissionGroup.contacts
# 'PERMISSION_CONTACTS=1',
## dart: PermissionGroup.camera
'PERMISSION_CAMERA=1',
## dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=1',
## dart: PermissionGroup.speech
# 'PERMISSION_SPEECH_RECOGNIZER=1',
## dart: PermissionGroup.photos
'PERMISSION_PHOTOS=1',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_LOCATION=1',
## dart: PermissionGroup.notification
# 'PERMISSION_NOTIFICATIONS=1',
## dart: PermissionGroup.mediaLibrary
# 'PERMISSION_MEDIA_LIBRARY=1',
## dart: PermissionGroup.sensors
# 'PERMISSION_SENSORS=1',
## dart: PermissionGroup.bluetooth
# 'PERMISSION_BLUETOOTH=1',
## dart: PermissionGroup.appTrackingTransparency
# 'PERMISSION_APP_TRACKING_TRANSPARENCY=1'
]
end
end
end
and this is my info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>WunderKlub</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
<!-- Permission options for the `camera` group -->
<key>NSCameraUsageDescription</key>
<string>WunderKlub macht nur Spass mit Kamera.</string>
<!-- Permission options for the `microphone` group -->
<key>NSMicrophoneUsageDescription</key>
<string>Das Mikro nutzt WunderKlub gar nicht, es muss aber trotzdem abgefragt werden.</string>
<!-- Permission options for the `photos` group -->
<key>NSPhotoLibraryUsageDescription</key>
<string>WunderKlub möchte deine Fotos speichern können.</string>
<!-- Permission options for the `location` group -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>Need location when in use</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Always and when in use!</string>
<key>NSLocationUsageDescription</key>
<string>Older devices need location.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Can I have location always?</string>
</dict>
</plist>
This was very strange, in the end I restarted my Mac and my IPhone and it worked. Sometimes it is as simple as that.

How do I set TTL and catch exceptions when using op-rabbit?

I have some op-rabbit code that looks like this:
val subscriptionRef: SubscriptionRef = Subscription.run(rabbitControl) {
val directive = body(UTF8StringMarshaller) & routingKey
channel(qos = MAX_CONCURRENT_MSGS) {
consume(topic(queue(inputQueue), List(inputKey))) {
directive((s, key) => {
processMessage(s, key)
ack
})
}
}
}
It runs fine in some applications, but in my latest application, I got 5GB of errors in logs in just a few minutes. I'm trying to figure out where to handle exceptions. The cause of the error appears to be a mismatch in the queue's TTL (30 mins. or 1800000 ms), and what the application is expecting (apparently nothing). I want to specify the TTL, and if there is a problem, I want to log it and then shutdown immediately. I do not want to have a filesystem filled with stack traces like this:
18:39:08.518 [such-system-akka.actor.default-dispatcher-9] ERROR com.spingo.op_rabbit.SubscriptionActor - Connection related error while trying to re-bind a consumer to EXCHANGE.QUEUE. Waiting in anticipating of a new channel.
java.io.IOException: null
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:105) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:101) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:123) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:948) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:50) ~[amqp-client-4.0.0.jar:4.0.0]
at com.spingo.op_rabbit.QueueConcrete.declare(Queue.scala:31) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at com.spingo.op_rabbit.Binding$$anon$2.declare(Binding.scala:79) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at com.spingo.op_rabbit.SubscriptionActor.doSubscribe(SubscriptionActor.scala:222) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at com.spingo.op_rabbit.SubscriptionActor$$anonfun$8.applyOrElse(SubscriptionActor.scala:170) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at com.spingo.op_rabbit.SubscriptionActor$$anonfun$8.applyOrElse(SubscriptionActor.scala:157) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34) ~[scala-library-2.12.4.jar:?]
at akka.actor.FSM.$anonfun$handleTransition$1(FSM.scala:608) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM.$anonfun$handleTransition$1$adapted(FSM.scala:608) ~[akka-actor_2.12-2.5.4.jar:?]
at scala.collection.immutable.List.foreach(List.scala:389) ~[scala-library-2.12.4.jar:?]
at akka.actor.FSM.handleTransition(FSM.scala:608) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM.makeTransition(FSM.scala:690) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM.makeTransition$(FSM.scala:683) ~[akka-actor_2.12-2.5.4.jar:?]
at com.spingo.op_rabbit.SubscriptionActor.makeTransition(SubscriptionActor.scala:11) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at akka.actor.FSM.applyState(FSM.scala:675) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM.applyState$(FSM.scala:673) ~[akka-actor_2.12-2.5.4.jar:?]
at com.spingo.op_rabbit.SubscriptionActor.applyState(SubscriptionActor.scala:11) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at akka.actor.FSM.processEvent(FSM.scala:670) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM.processEvent$(FSM.scala:662) ~[akka-actor_2.12-2.5.4.jar:?]
at com.spingo.op_rabbit.SubscriptionActor.akka$actor$LoggingFSM$$super$processEvent(SubscriptionActor.scala:11) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at akka.actor.LoggingFSM.processEvent(FSM.scala:801) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.LoggingFSM.processEvent$(FSM.scala:783) ~[akka-actor_2.12-2.5.4.jar:?]
at com.spingo.op_rabbit.SubscriptionActor.processEvent(SubscriptionActor.scala:11) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at akka.actor.FSM.akka$actor$FSM$$processMsg(FSM.scala:659) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.FSM$$anonfun$receive$1.applyOrElse(FSM.scala:653) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.Actor.aroundReceive(Actor.scala:514) ~[akka-actor_2.12-2.5.4.jar:?]
at akka.actor.Actor.aroundReceive$(Actor.scala:512) ~[akka-actor_2.12-2.5.4.jar:?]
at com.spingo.op_rabbit.SubscriptionActor.aroundReceive(SubscriptionActor.scala:11) ~[op-rabbit-core_2.12-2.0.0.jar:2.0.0]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527) [akka-actor_2.12-2.5.4.jar:?]
at akka.actor.ActorCell.invoke(ActorCell.scala:496) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.Mailbox.run(Mailbox.scala:224) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.Mailbox.exec(Mailbox.scala:234) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [akka-actor_2.12-2.5.4.jar:?]
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [akka-actor_2.12-2.5.4.jar:?]
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl' for queue 'EXCHANGE.QUEUE' in vhost '/': received none but current is the value '1800000' of type 'long', class-id=50, method-id=10)
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:32) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:229) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:117) ~[amqp-client-4.0.0.jar:4.0.0]
... 38 more
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl' for queue 'EXCHANGE.QUEUE' in vhost '/': received none but current is the value '1800000' of type 'long', class-id=50, method-id=10)
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:505) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:336) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:143) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:90) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:634) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47) ~[amqp-client-4.0.0.jar:4.0.0]
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:572) ~[amqp-client-4.0.0.jar:4.0.0]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_144]
18:39:08.534 [such-system-akka.actor.default-dispatcher-9] ERROR com.spingo.op_rabbit.SubscriptionActor - Connection related error while trying to re-bind a consumer to EXCHANGE.QUEUE. Waiting in anticipating of a new channel.
You are attempting to re-declare the queue using a value of x-message-ttl of zero. Delete the queue first, then it can be declared with whatever your code would like.
channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl' for queue 'EXCHANGE.QUEUE' in vhost '/': received none but current is the value '1800000' of type 'long', class-id=50, method-id=10
To be completely clear, this is the per-message TTL, not the per-queue TTL. There is a difference and that might be your issue.
Otherwise, the code is going to keep trying to do the same thing, and the broker is going to continue to reject the operation.

Unable to open jasper report with an older version of iReport

I am trying to open a Jasper Report, i made using JasperSoft studio version 6.1.0, and i need to open it with iReport 3.7.6, but i get an error:
Error loading the report template
Message:
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
Level:
SEVERE
Stack Trace:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected.
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:423)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3188)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1812)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:731)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
org.apache.commons.digester.Digester.parse(Digester.java:1647)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
i tried to compile my .JRXML with an older using JasperSoft studio, but i was not able.
does anyone know how can i solve this ?
You can try to use Compatibility dialog.
Jaspersoft Studio: Window -> Preferences
Steps:
Set the version of JR you need (3.7.5 in your case)
Save the template as new file
Check that changes in report is not dramatically