Glassfish directory mappings: resources are cached by glassfish - image

I use the external resources mapping by glassfish for storing user uploaded images (sun-web.xml):
<property name="downloadroot" value="from=/downloaded dir=c:\glassfishv3\downloads"/>
I store uploaded images to this directory. The first download is ok, the image is shown at the address server:8080/downloaded/image_13.png. But when the users uploads another file and replaces the image (it is really replaced in file system) the GF doesn't show new image, but the old one. Event restart and osgi-cache/generated clean doesn't help! That's very misleading and hope anyone could help me with this issue..

Ok, the issue was in JRebel! I spent the whole day, and finally found the issue! So, if anyone meets with it, the reciept to fix is to include the gf virtual path to rebel.xml like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application>
<classpath>
<dir name="${myproject.root}\target\classes" />
</classpath>
<web>
<link target="">
<dir name="${myproject.root}\src\main\webapp" />
</link>
<link target="">
<dir name="C:\glassfish3.1" />
</link>
</web>
</application>

Related

External PNG graphic not displaying (Geoserver 2.13)

I have recently upgraded from Geoserver 2.11.0 to 2.13.1 and have found my external graphics for point layers are not displaying (they revert to a default grey symbol).
Is there anything wrong in my code, or has anything changed between 2.11 and 2.13 which might be causing problems? Inaccessibility problems for Geoserver to online resources?
An example of my xml is below:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>cctv_cameras</se:Name>
<UserStyle>
<se:Name>cctv_cameras</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol</se:Name>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="http://maps.runnymede.gov.uk/website/maps/png/community/cctv_cameras.png"/>
<se:Format>image/png</se:Format>
</se:ExternalGraphic>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Works fine on my local machine with 2.13.0, but does fail with 2.13.1, I've filed a bug.

How to make clickhouse take new users.xml file?

Do I have to restart clickhouse to make it read any update to users.xml?
Is there a way to juse "reload" clickhouse?
These files are reloaded in runtime, no need to restart the server.
As you can notice config folder has several files, like
config-preprocessed.xml
config.xml
users-preprocessed.xml
users.xml
.*-preprocessed.xml are for parsed config so you will see when it is loaded and parsed.
I wouldn't recommend to modify files '/etc/clickhouse-server/config.xml' or 'etc/clickhouse-server/user.xml' because it will be rewritten after upgrading ClickHouse and you will lose custom settings.
The subfolder '/etc/clickhouse-server/config.d/' and '/etc/clickhouse-server/users.d/' serve to store overrides for 'config.xml' and 'user.xml' relatively.
Example overrides for 'config.xml':
config.d/config.xml
<?xml version="1.0"?>
<yandex>
<listen_host replace="replace">::</listen_host>
<dictionaries_config replace="replace">dictionaries/*.xml</dictionaries_config>
<openSSL>
<client>
<verificationMode replace="replace">none</verificationMode>
</client>
</openSSL>
</yandex>
config.d/cluster.xml
<?xml version="1.0"?>
<yandex>
<remote_servers>
<your_cluster>
<!-- topology definition -->
</your_cluster>
</remote_servers>
<zookeeper>
<!-- .. -->
</zookeeper>
</yandex>
config.d/kafka.xml
<?xml version="1.0"?>
<yandex>
<!-- The default configuration for Kafka Engine Table (https://clickhouse.yandex/docs/en/operations/table_engines/kafka/#configuration). -->
<kafka>
<bootstrap_servers>11.22.33.44:6667,11.22.33.55:6667,11.22.33.66:6667</bootstrap_servers>
<auto_offset_reset>latest</auto_offset_reset>
</kafka>
<!-- The Topics configurations. -->
<kafka_topic_name>
<group_id>clickhouse-group_id</group_id>
</kafka_topic_name>
</yandex>
Example overrides for 'users.xml':
users.d/user.xml
<?xml version="1.0"?>
<yandex>
<users>
<default>
<password replace="replace">hello_clickhouse</password>
</default>
<readonly>
<password replace="replace">hello</password>
</readonly>
</users>
</yandex>
Another example of config overrides.
See for details ClickHouse Configuration files.

Glassfish and Spring Boot: .war re-deployment failed

I am trying to deploy an application build from https://github.com/spring-guides/gs-convert-jar-to-war to local glassfish4. And it delpoys well for the first time (if I can call some exceptions from the framework good behaviour). At least, I can open the project's index page in browser.
But if I try to undeploy it and re-deploy, or just overwrite .war file in autodeploy directory, deployment fails. And nothing seems to be added to glassfish log file.
The projects I published from eclipse using some its mechanisms deployed and re-deployed successfully.
Here is the log with related contents:
http://pastebin.com/zSeMw5tC
What can be the problem?
I did some experiments with Glassfish a while ago. The CDI implementation is really broken IMO (it shouldn't load classes to scan them for annotations), but the apps I tried worked on GF 4 if there is a WEB-INF/classes/META-INF/beans.xml containing
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd"
bean-discovery-mode="none">
<scan>
<exclude name="org.springframework.**" />
<exclude name="org.apache.**" />
<exclude name="com.google.**" />
</scan>
</beans>
Nothing I did ever worked in GF 3 (older CDI spec and no way to exclude things I think).

After JUpdate my content position is gone from list - joomla

I used JUpdate to update a joomla 1.5.23 site to 2.5
when i tried to re-link the content area to the article i cant find the position from my main content area in the menu anymore.
the left sidebar is still there and also the right one.
Can anyone shine some light on this? i already tried all the positions from the template twice but i cant seem to find it?
--- template details ---
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site" >
<name></name>
<version>1.0.0</version>
<creationDate>07/2009</creationDate>
<author>SiteGround</author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright></copyright>
<license>GNU/GPL</license>
<description>TEMPLATE_DESCRIPTION</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_thumbnail.png</filename>
<filename>templates.php</filename>
<filename>template_preview.png</filename>
<filename>error.php</filename>
<folder>css</folder>
<folder>images</folder>
</files>
<positions>
<position>user4</position>
<position>user3</position>
<position>breadcrumb</position>
<position>user2</position>
<position>left</position>
<position>right</position>
<position>debug</position>
</positions>
<languages>
<language tag="en-GB">en-GB.tpl_siteground-j15-80.ini</language>
</languages>
<administration>
<languages folder="admin">
<language tag="en-GB">en-GB.tpl_siteground-j15-80.ini</language>
</languages>
</administration>
</extension>
I'm not too sure why you used JUpdate to update to 2.5. I personally don't always trust 3rd party extensions to update the CMS as it sometimes causes problems. What you should do is (providing you have a backup of your old 1.6 site):
Upgrade to 1.6.6 by downloading the patch and extracting it via FTP on to the root of your site
IN the Joomla Backend, go to Extensions >> Extension Manager >> Find Updates
If you can't find any updates, then go to Options and select the Long Term Release. Once saved, Purge Cache and try to find updates again.
Update:
change this:
<?php if($this->params->get('showComponent')) : ?>
<jdoc:include type="component" />
<?php endif; ?>
to this:
<jdoc:include type="component" />
So basically remove the PHP that is wrapped around

jRebel not work with Message resource bundle

I am using jRebel version 5.0.0 in my Spring project. Everything works well, any changes in Java, JSP or JS files was affected immediately. But when I modify some message keys in MessageResource.properties file, it does not reload the new modification. All of my resource bundle files are in same directory: myproject\src\main\webapp\WEB-INF**;
and in target folder (built files) **myproject\target\myproject\WEB-INF.
I do not use external jRebel config file, but jRebel plugin for Eclipse, so I found the auto-generated jRebel config file in myproject\target\myproject\WEB-INF\classes\jrebel.xml.
Here is its content:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="D:/workspace/.projects/myproject/target/myproject/WEB-INF/classes">
</dir>
</classpath>
<web>
<link target="/">
<dir name="D:/workspace/.projects/myproject/src/main/webapp">
</dir>
</link>
</web>
</application>
Could you please help me this issue? Thank you so much.

Resources