I am getting a simlar issue as below:
Load jboss-ejb3.xml file instead ejb-jar.xml in wildfly
https://issues.jboss.org/browse/WFLY-3189
schema location error jboss-ejb3.xml
My issue is that my xsd definition on top of my jboss-ejb3.xml is like this:
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:security:1.1"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1"
impl-version="2.0">
when clicking on http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd it opens jboss_5_0.xsd inside a maven jar: Maven: org.jboss.metadata:jboss-metadata:1.0.0.CR162 in my intelliJ. Seems like this is an old one as it does not have this XSD. now i was under the impression that if it did not find the XSD it will download it, which is why the http link is there in my opinion. but it is not. for ejb-jar_3_1.xsd, however it is getting from intellyJ embedded javaee api lib.
how can I add the right XSD from the net in this case. is it an intelliJ issue
As far as I've ever been able to determine, you must manually add a reference to a local resource for each XSD that is unknown to Intellij Idea.
This can be configured under Preferences/Languages & Frameworks/Schemas and DTDs.
You will not need to download anything from the internet if you have a local copy of WildFly, as it provides copies of all schema in $WILDFLY_HOME/docs/schema/.
Related
I cannot get a flow or a sub-flow that is in an external Mule application to display in the Flow name: drop-down of the Flow-Reference component of another project (my main project).
I have closely followed the example here from the MuleSoft documentation regarding the sharing of fragments.
It all works as per the tutorial, except I cannot get the external flow/sub-flow's name to appear in the drop-down of the main project's Flow-Reference component.
All of the maven stuff is fine.
The dependency is properly coded in the main Project's POM.
The jar displays in the Referenced Libraries.
The jar contains the application file I need (common-mule.xml).
If I force an error, by temporarily changing the name of import
resource, it correctly throws a not-found message. So, I know the
classpath is finding this external resource just fine.
BUT... when I double-click my Flow-Reference in the main project, I am not able to see the external flow in the flow names drop down.
Am I wrong about how this should work?
I tried doing the same thing and it is possible using the XML editor. My findings were -
If you are using maven the referenced project must be packaged as a jar and must be available on the referencing project's classpath.
You can refer to these for linking details:
https://docs.mulesoft.com/mule-user-guide/v/3.7/sharing-custom-code
https://docs.mulesoft.com/mule-user-guide/v/3.5/sharing-custom-configuration-fragments
After importing the xml as resource, you can simply type in the flow name in flow-ref and use it. It will give an error in the studio UI but the project is successfully built and the referenced flow is used as expected at runtime.
Its the bug with Studio UI only.
Make sure to use import of the flows in jar in your main project.
<spring:beans>
<spring:import resource="classpath:source_flow.xml"/>
<spring:import resource="classpath:global-config.xml"/>
</spring:beans>
Studio doesn't load elements from configuration files in JARs located on the build-path, so what you're trying to do is impossible (at least, currently).
What is the use of this file in a RAD : org.eclipse.wst.common.component. The contents are like this:
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WebProj">
<wb-resource deploy-path="/" source-path="/src/java"/>
<wb-resource deploy-path="/" source-path="/test"/>
<wb-resource deploy-path="/" source-path="/test/conf"/>
<wb-resource deploy-path="/" source-path="/src/conf"/>
<property name="java-output-path" value="src/java"/>
</wb-module>
</project-modules>
In RAD,the builds are integrated with Eclipse and so there are all these oddball files that you may not recognize if you are not used to dealing with RAD/Websphere. It looks like this one configures the context root and what source directories to build out for the web app. In RAD, you're not supposed to edit these files directly--there is an (often obscure) UI for everything. There is also an equally obscure way to script everything in each UI, too.
We're building new systen using slf4j as logging facade. When deploying on newly Weblogic 12c, we found this error on console log:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/Oracle/Middleware2/modules/org.slf4j.jdk14_1.6.1.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [zip:/opt/Oracle/Middleware2/user_projects/domains/m3/servers/AdminServer/tmp/_WL_user/test/t030q4/war/WEB-INF/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
after googling, we found that this is just a warning, slf4j will bind first found logger, which in this case is weblogic's system logger framework. Is there any way to make it bind to logging framework in our WAR file? Having <prefer-web-inf-classes> in weblogic.xml does not help
The filtering should not be done on classes but on resources, because SLF4J looks for the StaticLoggerBinder.class as a resource and not as a class.
Include this in your weblogic-application.xml as well:
<wls:prefer-application-packages>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>org.apache.commons.*</wls:package-name>
</wls:prefer-application-packages>
<wls:prefer-application-resources>
<wls:resource-name>org/slf4j/impl/StaticLoggerBinder.class</wls:resource-name>
</wls:prefer-application-resources>
and your logger will be used instead of the one inside the System ClassLoader.
For WAR file you should use prefer-application-packages in weblogic.xml like described in this and this posts.
In your case it will be something like
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.slf4j</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
</wls:weblogic-web-app>
We were also having this issue and since we are required to configure the logging using Log4J this was an issue. However, using prefer-application-packages seems to work so far, i.e. putting a weblogic-application.xml file in the META-INF folder of the EAR with the following:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-application.xsd http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" >
<prefer-application-packages>
<package-name>org.slf4j</package-name>
</prefer-application-packages>
</weblogic-application>
(ok the specified xmlns is an old one but it works, you may update it if you want, I just took ours and removed the unrelated parts).
We still have the aforementioned warning but it uses Log4J as required. In fact, if you look at the URL specified on the next line in the logs (omitted here in the question), it says:
The warning emitted by SLF4J is just that, a warning. SLF4J will still bind with the first framework it finds on the class path.
So I guess it still uses the normal class-loading mechanism for loading org.slf4j.impl.StaticLoggerBinder, which we actually configured to prefer the one in our EAR (i.e. make it the first on the classpath).
Yet, the warning remains but it works. Fixing the warning would be good but probably not possible without altering WebLogic's provided libraries.
I don't believe SLF4J provides a way to force its own version, since it's based on self-discovery in the classpath.
So, if you have administration rights on WebLogic, the simplest solution is to upgrade the SLF4J version of WebLogic to 1.6.4 by updating the file on WebLogic installation folder.
Otherwise, you can try to build an EAR instead of a WAR and follow the recommendations here, although I doubt it will work if prefer-web-inf-classes doesn't work in a WAR.
I am trying to import a project in Flash builder. I am using the option, import existing project. I get the error "path of the project must have only one segment".
Can some one help me resolve this?
This problem can also occur if the eclipse workspace is of the same folder as the root of the project. The problem can be resolved by setting the workspace one folder level higher.
I believe this refers to the project name being invalid, which can occur when 3rd party tools generate Eclipse projects.
Within the project you are attempting to import, open the ".project" file located at the root of the project.
Assure the name of the project is a simple identifier without path.
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>example</name>
If this does not resolve you issue, please post the contents of your .project file.
I have a Spring application that is being deployed to JBoss 4.2. I can manually edit the generated WAR file and alter the jboss-web.xml file to set the context-root value and that works perfectly well. I would like to be able to do the samething via netbeans (6.9.1), but I have been unable to locate where to make the adjustment. I've tried tweaking the project's properties and setting the Context Path value. When I Run the application that value is reset to the Project's name. I've located the jboss-web.xml file in the project and changed it there, also reset upon run. So it appears that Netbeans is deciding that the value need to be set but I can't locate where. If it's of any use, the project also uses Maven2, but all the controls I can find for impacting context-root are geared towards EAR files instead of WAR.
Has anyone been able to do this or am I just in a world of making the change post build?
I had a similar problem once where netbeans was sometimes removing the context-root element from the glassfish-web.xml configuration. I have not been able to track it down exactly but you could try to remove the file nb-configuration.xml in the project root folder and see if that helps.