EXT Plugin not able to merge web.xml in liferay 6.0.6 and Weblogic 10.3 - weblogic

I deployed liferay war on weblogic 10.3 and cretaed EXT which have changes in web.xml.
If i deploy this EXT,weblogic doesn't take these changes which is made by web.xml of EXT.
I googled it and found this is issue in liferay 6.0 and resolved in liferay 6.2
please go through below link for more info:
http://issues.liferay.com/browse/LPS-13222
Howerver I found some workaround in liferay wiki which is suggesting to follow below steps.
copy somewhere existing web.xml
deploy EXT plugin
make plan.xml based on differences between the new web.xml and old one
use plan.xml in administration console
But still wondering how to create plan.xml in step3.
So would like to know how can i create plan.xml based on differnce between new web.xml and old one.

You just have to do a diff. Under Linux, open a console.
Try for example
diff web_old.xml web_new.xml > mydiff.patch
It will display the differences between the two files in a file called "mydiff.patch".
Now, you can patch the deployed web.xml (shutdown your server before) :
cd /path-of-the-web.xml-folder-on-the-server
patch -p0 < mydiff.patch
You can also use the svn diff command to make your diff file.
After these operations, restart your server.
Hope it helps.

Related

JavaMelody error - Monitoring of sql requests and of jdbc connections in GlassFish v4.1

I want to use JavaMelody to monitor the SQL requested by a Glassfish Application Server. There are step-by-step instructions on https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#monitoring-of-sql-requests-and-of-jdbc-connections-in-glassfish-v3
I followed the instructions (I didn't download javamelody-objectfactory.jar but used javamelody-core-1.54.0.jar instead) and I get this error when clicking on the refresh button (javamelody web page) :
server.log :
exception while collecting data
java.lang.NoClassDefFoundError: org/jrobin/core/RrdException
at net.bull.javamelody.Collector.getCounterJRobin(Collector.java:836)
at net.bull.javamelody.Collector.collectJRobinValues(Collector.java:489)
...
any idea how to resolve this ?
jrobin-1.5.9.1.jar is installed in the lib folder of glassfish (and in my ear project).
thanks !
javamelody-objectfactory.jar (java source included in the jar) and javamelody-core jar file are absolutely different things. The first is to make the datasource monitorable in Glassfish and the second is the monitoring tool itself.
First fix the exception. You should probably put javamelody-core jar and jrobin jar files in your ear project (and not one in lib folder of Glassfish and one in ear).
Then if the monitoring reports don't include SQL monitoring for the datasource declared in Glassfish, use the javamelody-objectfactory.jar including all steps as said in the doc.

Running Jboss 7 using different config folder under standalone-servers

I'm used to jboss 5 deployment schemes where i use this command to deploy:
D:\jboss5\bin\run.bat -c ZZZ
which will deploy whatever in the jboss5\server\ZZZ folder
I have this structure on my jboss7:
D:\jboss7\
+standalone-servers
++ZZZ
+++modules
when i try to run jboss7 like this:
D:\jboss7\bin\standalone-servers.bat -c ZZZ
it complains with the following:
org.jboss.modules.ModuleNotFoundException: Module
org.jboss.as.standalone:main is not found in local module loader
#7559ec47 (roots: D:\jboss7\standalone-servers\modules) at
org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
at
org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)
at
org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at
org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:204)
at org.jboss.modules.Main.main(Main.java:262)
how to tell jboss7 to look for the right configuration that resides in the folder ZZZ?
appreciate for answers
By default the base directory for a standalone JBoss EAP 6 / JBoss AS 7 instance is ${JBOSS_HOME}/standalone
You can override this by supplying -Djboss.server.base.dir=ZZZ
You need to create ZZZ/configuration and ZZZ/deployment directories, and
place your standalone.xml file in ZZZ/configuration, then start jboss using the option.
standalone.bat -Djboss.server.base.dir=path_to_ZZZ
If your JBoss configuration file is not called standalone.xml then you will also need to add
-Dtarget.appserver.configfile=my_standalone_config.xml
The JBoss instance base directory does not need to be within the ${JBOSS_HOME} subdirectory tree. In fact it is better to keep it somewhere separate as it allows you to update / reinstall JBOSS binaries without overwriting your configuration files.
The modules folder should remain within ${JBOSS_HOME}
So if your ${JBOSS_HOME} were c:\jboss7 it would look something like
C:\jboss7
+bin
+modules
+standalone <- not used!
... etc
c:\standalone-servers
+ZZZ
++configuration
+++standalone.xml
++deployments
A possible reason is your jboss runtime is corrupt. Reason for
**org.jboss.modules.ModuleNotFoundException: org.jboss.as.standalone:main
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:224)
at org.jboss.modules.Main.main(Main.java:341)**
is that jboss-eap-6.2\modules\system\layers\base\org\jboss\as\server\main package is missing inside your jboss directory. This package contains jboss-as-server-7.3.0.Final-redhat-14.jar and module.xml which are essential to run jboss server.

How to deploy repository in Apache Geronimo 3.0.1

I am new Apache Geronimo.I read the following link for deploying repository. Even I don't know where will these concept will be useful. just i am learning.
I created sub-directory under and created .xml file according to the above link.
here, I faced the problem while deploying time. deploy(.bat) deploy <GERONIMO_HOME>/repo2/repo2.xml command is not working.
<GERONIMO_HOME>=C:\Users\Infratab Bangalore\geronimo-tomcat7-javaee6-3.0.1
I run the following command for deploying.but it's not working.
deploy(.bat) deploy C:/Users/Infratab Bangalore/geronimo-tomcat7-javaee6-3.0.1/repo2/repo2.xml
How can I fix this.
You should do following bellow steps:
1. Log in to the Administrative Console
2. Select Advanced on left bar
3. Go to Resources -> Repository

How to fix java IOException: Can't find resource 'solrconfig.xml' in classpath?

I was trying to install Apache Solr 4.0.0 with apache Tomcat, but it is giving an error like this:
SolrCore Initialization Failures
collection1: java.io.IOException:java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'solr\collection1\conf/', cwd=C:\apps\tomcat-solr\apache-tomcat-7.0.35\bin
There are no SolrCores running.
Using the Solr Admin UI currently requires at least one SolrCore.
After this I have installed apache solr 3.6.2 and it working perfectly well. I still cannot understand why i am not able to use solr 4.0.0 with the same server configuration.
I hope you will be able to tell me the mistake i have committed.
The directory structure changed in Solr 4.0. Have a look at the one in the example/solr directory. You will see that Solr 4 now has collection1 directory inside that and conf directory is now one level lower inside that. That's basically what the error message said.
If you don't like that, I think you can change it by putting solr.xml with the single core definition in it and directory paths setup the way you like it.

Glassfish 3.1.2.2 in IDEA 11.1.4: "PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required"

I am trying to get our Mavenized web application up and running in a freshly installed IDEA 11.1.4 Ultimate (Windows 7) under a freshly unzipped Glassfish 3.1.2.2. I have done this many times in Eclipse, but am not familiar with IDEA.
I can build and deploy it just fine, but when I try to access pages with JSP-content I get:
PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
The Glassfish Application Servers entry adds the javax.ejb.jar, javax.servlet-api.jar and javax.servlet.jsp-api.jar as libraries.
I have set the project SDK to point to a full JDK resulting in:
(which does not seem to include a jar with javac)
The IntelliJ tutorials I've found so far, does not mention this problem. My guess would be that the "please start using this JDK" information is not passed on to Glassfish, so it just picks up the system JRE.
What configuration step have I missed? I do not want to edit configuration files - I expect the IntelliJ plugin to do this if I know how to tell it to.
I got the same notification and just changed in admin port -> Configurations -> server-config -> JVM Settings -> Java Home as "C:\Program Files\Java\jdk1.8.0_72", and it started working.
PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required.
I was getting same error after restarting my glassfish 4 server.When I am trying to access my deployed application it was saying to mention full JDK.
login to Glassfish admin console.(http://localhost:4848).
Go to Configuration---->server-config--->JVM Settings
Set the java home with your correct jdk home (ex:C:\Program Files (x86)\Java\jdk1.8.0_121).
Restart the server.
It will work fine.
Next solution helped me
source: http://alvinalexander.com/blog/post/java/fixing-glassfish-jdk-path-problem-solved
Find your asenv.bat file. C:\Program Files\glassfish-4.0\glassfish\config\asenv.bat
Open it in text editor and find strings like "set AS_ = blahblah"
Add this string there "set AS_JAVA=C:\Program Files\Java\jdk1.7.0_60" (print your own JDK path here). If string "set AS_JAVA= blahblah" already exists then just fix the path.
Add JDK_HOME\lib\tools.jar file to the JDK configuration Classpath.
However, the problem in your case may be different as Glassfish JDK is not taken from IntelliJ IDEA settings, this question may help:
How do I specify the jdk for a glassfish domain?