Happy New Year to all.
I have a keycloak/wildfly question.
I am attempting to secure my war for WildFly 9.0.2.Final deployment. I follow the directions in section 7.2.1 of http://docs.jboss.org/keycloak/docs/1.0.4.Final/userguide/pdf/keycloak-reference-guide-en-US.pdf
I get the error Unexpected element '{urn:jboss:domain:keycloak:1.0}subsystem
I have carefully followed each step as listed below.
cd $WILDFLY_HOME
unzip keycloak-wildfly-adapter-dist.zip
edit the standalone.xml and add the following:
<server xmlns="urn:jboss:domain:1.4">
<extensions>
<extension module="org.keycloak.keycloak-wildfly-subsystem"/>
...
</extensions>
<profile>
<subsystem xmlns="urn:jboss:domain:keycloak:1.0"/>
...
</profile>
It is the line subsystem xmlns="urn:jboss:domain:keycloak:1.0 that is flagged in the error.
What am I missing? Thank you in advance.
May be it's a little bit too late. I think the problem could be that you forget to merge modules, bins folder from key-cloak into Jboss, so that the container itself doesn't recognize the keycloak.
Related
After arquilliian test for our project, in wildfly standalone.xml the following entry is created.
<deployments>
<deployment name="cfgtest.ear" runtime-name="cfgtest.ear">
<content sha1="b0f9e180aaa4e14ee9bab37b4368b6ce45b7b156"/>
</deployment>
<deployment name="pcuitest.ear" runtime-name="pcuitest.ear">
<content sha1="884d1333731f6ed58eb47cee7d7a98a20829d373"/>
</deployment>
</deployments>
Ideally the above should be removed once all tests are completed and server is stopped, but thats not happening anyway. Now if I run the test for the second time - at the time of server startup the above deployments gets started and it creates conflict with the new war files of the current test.
Is there any way I can remove the deployments entry from standalone.xml so that it wont get started when the server starts again. Any startup commands to server so it removes all the deployments or something like that would be helpful.
Note: I found that, If I run the test from eclipse, deployed ear's removed automatically while server stop. But if I run it from gradle, issue remains.
For the reason that I want to use JavaEE7 and JPA2.1, I turned to WildFly9.0.1 Final which meets my requirement.
WildFly9.0.1 Final is using undertow as the Web Server.
Chinese Characters(in UTF-8 encoding) from web browser transferred to the jboss Server turned TO Garbled words,below is the log:
2015-08-02 18:58:38,893 INFO com.gcable.action.people.people_type.PeopleTypeAction.printHttpRequest:76
- peopleTypes[0].pt_name=[Ljava.lang.String;#3e31e9ad[{│フテ¥ᄒᄋ│ミᄄ}]
I am going mad! God save me!
I have tried this in standalone.xml:
<servlet-container name="default" default-encoding="UTF-8">
But it doesn't work.
Also I have tried to add jboss-web.xml in WEB-INF in my deployed war:
<jboss-web version="9.0" xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/j2ee/schema/jboss-web_9_0.xsd">
<default-encoding>UTF-8</default-encoding>
It doesn't work too.
I solved the problem by setting the encoding in the http-listener of the standalone.xml (i use the standalone-full.xml but i guess it makes no difference)
<http-listener name="default" socket-binding="http" url-charset="ISO-8859-1"/>
Sorry for the late answer but i got the same problem today. Hope it will be helpful.
I finally tried to down-grade my JPA2.1 to 2.0.
Jboss EAP 6.2 perfectly encodes the none-english characters.
By the way,
I found sth here to make JBOSS EAP6 which in fact is a JavaEE6 Container to USE JPA2.1 instead of using 2.0
I am building an Eclipse RCP-based product, and I am running into an issue where when I try to use the built-in p2 UI to install updates to the product, I get an error message in the dialog that "Insufficient access privileges to apply this update."
I have debugged into Eclipse and found that the 'root cause' is that there is a p2 .profile file that has xml that includes this snippet:
<iuProperties id='com.datical.db.ui.product' version='1.33.0.201412032223'>
<properties size='4'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
<property name='org.eclipse.equinox.p2.type.lock' value='3'/>
<property name='org.eclipse.equinox.p2.base' value='true'/>
</properties>
</iuProperties>
The relevant line is the one that says <property name='org.eclipse.equinox.p2.type.lock' value='3'/>
I'm not sure what I am doing wrong - I think I must have something awry in my product definition or my feature definition or in my install process that is causing this line to be there.
When I step through the Eclipse code (our target environment is 3.7/Indigo) I see that the profile is being written inside org.eclipse.equinox.internal.p2.engine:SurrogateProfileHandler:addSharedProfileBaseIUs (which is private static.) That is called from SurrogateProfileHandler:createProfile
The product's p2 repository is being built using the tycho plugins, version 0.15.
We finally discovered another piece of information that may be relevant. We were using a custom OSGI directory name. When we removed that, everything started working as expected.
It seems that you have a shared install where the product you would like to update is (potentially) used by many installations as a base - and therefore cannot be updated.
This kind of problem goes beyond what can be answered well on stackoverflow because you'd really need to provide an example project and exact steps to reproduce the problem.
The most plausible cause for the symptoms you are seeing is some kind of file system permission problem. This documentation mentions that you need write permission to the installation directory for running Eclipse with -initialize. Maybe you are lacking some permissions making some of the -initialize procedure fail and leave the installation in an inconsistent state.
Is it possible to set character encoding for a JBoss AS 5.1 through a jboss-web.xml cfg file, like this?
<sun-web-app>
locale-charset-info default-locale="">
<locale-charset-map locale="" charset=""/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
</sun-web-app>
Thank you for your answers!
I see, your config sample is for GlassFish.
If you're still on JBoss AS 5.1, change:
<jboss_install>/server/(default)/deploy/jboss-web.deployer/server.xml
to set the connector URIEncoding:
<Connector port="8080" URIEncoding="UTF-8" />
If you're using a later version of JBoss AS or a different application server entirely, see my complete answer here.
I have deployed my application in jboss 7. It is in the url www.myappurl.com/appname/.
But if I go to www.myappurl.com/index.html I see Jboss's landing page that says "Welcome to JBoss AS 7".
How Can I remove that page?
Basically you have to set to false the enable-welcome-root property of the Virtual Server that you are using and specify into the jboss-web.xml that the application is bound into the Root Web Context ("/").
See this tutorial.
Hope it helps. Francesco
you have to deploy an application that has Context Path set to /
UPDATE
Looking some resources on the internet such as this http://stephou.wordpress.com/2012/05/05/how-to-deploy-to-jboss-as7-default-root-context/ say that you have to modify first your standalone.xml else it will raise an exception.
From personal experience i just set the Context Path of my webapp to / (root) and it works just fine
you can remove these lines in the standalone.xml:
<location name="/" handler="welcome-content"/>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>