Enable debug mode with liferay in weblogic server? and debug in eclipse with those serves? - eclipse

I am working with Liferay portal on weblogic server and I have problems to debug with eclipse.
I use Eclipse Juno with OEPE Pack extension, Oracle Weblogic Server 11gR1 (10.3.5) and Liferay 6.1.
When i start without debug options i launch weblogic admin server OK and liferay server OK.
But when I change local domain file setDomainEnv.sh with this lines
set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole.`
Weblogic serve starts OK
Server Log
Listening for transport dt_socket at address: 8453
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Oracle JRockit(R) (build R28.1.3-11-141760-1.6.0_24-20110301-1429-windows-ia32, compiled mode)
Starting WLS with line:
E:\Oracle\MIDDLE~1\JROCKI~1.2-4\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE
-Xms512m -Xmx512m -Dweblogic.Name=Admin -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEn
abled=true -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=E:\Or
acle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=E:\WLS\DO
MINI~1\LOCAL_~1 -Does.client.home=E:\Oracle\MIDDLE~1\OES -Doracle.home=E:\Oracle\MIDDLE~1\OES -Doracle.security.jps.config=E:\WLS\DOMINI~1\LOCAL_~1\co
nfig\oeswlssmconfig\Admin\jps-config.xml -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConso
le=false -Dweblogic.ext.dirs=E:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_oepe180\profiles\def
ault\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_ocp360\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_jdev1111\profiles\d
efault\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manifest_classpath weblogic.Server
Listening for transport dt_socket at address: 8453
but when I start liferay server fails
Liferay script
set DOMAIN_HOME=E:\WLS\Dominio_wls11\local_domain1
call "%DOMAIN_HOME%\bin\startManagedWebLogic.cmd" liferay %*)
Server log
starting weblogic with Java version:
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
[ERROR] aborted
JRockit aborted: Unknown error (50)
Starting WLS with line:
E:\Oracle\MIDDLE~1\JROCKI~1.2-4\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx512m -Dweblogic.Name=liferay -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore="E:\Oracle\Middleware\wlserver_10.3\server\lib\cacerts" -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=E:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=E:\WLS\DOMINI~1\LOCAL_~1 -Does.client.home=E:\Oracle\MIDDLE~1\OES -Doracle.home=E:\Oracle\MIDDLE~1\OES -Doracle.security.jps.config=E:\WLS\DOMINI~1\LOCAL_~1\config\oeswlssmconfig\liferay\jps-config.xml -Dweblogic.management.discover=false -Dweblogic.management.server=http://localhost:9819 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=E:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_ocp360\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manifest_classpath weblogic.Server
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
[ERROR] aborted
JRockit aborted: Unknown error (50)
Why does liferay server fail?
I think that i need to configurate servers in eclipse for connect to weblogic in debug mode. How could i do this?
I have seen that i donĀ“t have Liferay 6.1 server for weblogic in the server list only Liferay 6.1 server to Tomcat 6 o 7. I try to install Liferay IDE plugin but it fails due to different conflicts with OEPE Pack.

You're using the same debug port (8453) for both JVMs. "Address already in use" means that Java cannot create a socket on this port because another socket occupies it.

Related

NoClassDefFoundError when using JMX Exporter with Wildfly 15

We're using Wildfly 15 with JMX Exporter. When starting the WildFly server I get the following exception and I'm running out of ideas. The package exists under modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final.jar.
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss/wildfly-15.0.1.Final
JAVA: /opt/java/jdk1.8.0_201/bin/java
JAVA_OPTS: -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:/opt/jboss/wildfly-15.0.1.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final.jar -Xbootclasspath/p:/opt/jboss/wildfly-15.0.1.Final/modules/system/layers/base/org/jboss/log4j/logmanager/main/log4j-jboss-logmanager-1.1.6.Final.jar -Xbootclasspath/p:/opt/jboss/wildfly-15.0.1.Final/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA.jar -javaagent:/opt/jboss/wildfly-15.0.1.Final/prometheus/jmx-prometheus.jar=9404:/opt/jboss/wildfly-15.0.1.Final/prometheus/config.yaml -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager -server -Xmx3G -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
=========================================================================
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Listening for transport dt_socket at address: 8787
java.lang.NoClassDefFoundError: org/wildfly/common/net/HostName
at org.jboss.logmanager.ExtLogRecord.<init>(ExtLogRecord.java:87)
at org.jboss.logmanager.Logger.log(Logger.java:796)
at org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:53)
at org.jboss.logging.Logger.logf(Logger.java:2398)
at org.jboss.msc.service.ServiceLogger_$logger.greeting(ServiceLogger_$logger.java:40)
at org.jboss.msc.service.ServiceContainerImpl.<clinit>(ServiceContainerImpl.java:91)
at org.jboss.msc.service.ServiceContainer$Factory.create(ServiceContainer.java:250)
at org.jboss.as.server.BootstrapImpl$ShutdownHook.register(BootstrapImpl.java:231)
at org.jboss.as.server.BootstrapImpl$ShutdownHook.access$100(BootstrapImpl.java:221)
at org.jboss.as.server.BootstrapImpl.<init>(BootstrapImpl.java:72)
at org.jboss.as.server.Bootstrap$Factory.newInstance(Bootstrap.java:278)
at org.jboss.as.server.Main.main(Main.java:106)
at org.jboss.modules.Module.run(Module.java:352)
at org.jboss.modules.Module.run(Module.java:320)
at org.jboss.modules.Main.main(Main.java:593)
I finally managed to get it running by setting the following JAVA_OPTS:
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager
# We need to add this JAR explicitly to avoid a NoClassDefFoundError.
-Xbootclasspath/p:${JBOSS_HOME}/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final.jar
-Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final.jar
-javaagent:${JBOSS_HOME}/prometheus/jmx-prometheus.jar=9404:${JBOSS_HOME}/prometheus/config.yaml"
Keep in mind to adapt the versions depending on your setup.

JNDI port configuration for JBoss eap 6.4

We are migrating an application from JBoss AS 4.2 to JBoss eap 6.4. While deploying the application getting the below exception.
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:10099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:10099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:10099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
The connection to localhost:10099 is failed. When I have checked in the jboss-service.xml file of AS 4.2 the configuration for this port is present.
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
<!-- The call by value mode. true if all lookups are unmarshalled using
the caller's TCL, false if in VM lookups return the value by reference.
-->
<attribute name="CallByValue">false</attribute>
<!-- The listening port for the bootstrap JNP service. Set this to -1
to run the NamingService without the JNP invoker listening port.
-->
<attribute name="Port">10099</attribute>
Can anyone please tell me where can we do the similar configuration in EAP 6. Tried adding in socket-binding-group in standalone.xml but did not work.
Check the boot.log to see what the value of jboss.bind.address is.
There should be a line similar to:
DEBUG [ServerInfo] jboss.bind.address: 127.0.0.1
Telnet to the server on the JNDI port to confirm there is a service listening:1.telnet HOSTNAME/IP JNDI_PORT 2. JNDI by default would be on port 1099
Check the firewall rules at the host machine and make sure ports 10099 are opened in order for twiddle to work.

java.io.IOException: Invalid argument at java.io.WinNTFileSystem.canonicalize0

I am using Eclipse Mars with Tomcat v8.0.30 ,jre 1.8.0_73. Yesterday I didnt have any problems but today my Tomcat server fail to start. A dialog pops up and it says: "Starting Tomcat v8.0 Server at localhost has encountered a problem. Server Tomcat v8.0 Server at localhost failed to start.
I have this error in the console:
org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.WinNTFileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at java.io.File.getCanonicalFile(Unknown Source)
at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:168)
at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:201)
at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:146)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:256)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
I have Tomcat EE v7.0 server which gives me the exact same problem.
I reinstalled Eclipse and Tomcat , I restarted my PC , I restored default options multiple times. I created new server couple of times and I even deleted "org.eclipse.core.resources" and the result is still the same.
Any suggestions?
I suspect your CATALINA_HOME is set wrong. Usually users writing path\bin; where it is only-path-to-tomcat without bin or any folder.
Remove backslash \ at the end of the CATALINA_HOME
You must check your tomcat log catalina.out to trace the route cause
Also check your TOMCAT_HOME/conf/catalina.properties file. There may be some unseen character that causesjava.io.IOException: Invalid argument

Weblogic 12c - Connection was forcibly closed by the remote host

can someone please help me resolve the following exception,
<Feb 10, 2015 11:43:47 AM CST> <Error> <HTTP> <BEA-101019> <[ServletContext#1297842065[app:_auto_generated_ear_ module:dmportal path:null spec-version:3.0]] Servlet failed with an IOException.
java.io.IOException: An existing connection was forcibly closed by the remote Host
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:470)
Truncated. see log file for complete stacktrace
<Feb 10, 2015 11:43:50 AM CST> <Error> <HTTP> <BEA-101020> <[ServletContext#1297842065[app:_auto_generated_ear_ module:dmportal path:null spec-version:3.0]] Servlet failed with an Exception
weblogic.servlet.internal.ServletNestedRuntimeException: Cannot parse POST parameters of request: '/dmportal/pushTime.do'
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2426)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:2243)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.peekParameter(ServletRequestImpl.java:2462)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.peekPostParameter(ServletRequestImpl.java:2445)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.access$2600(ServletRequestImpl.java:2014)
Truncated. see log file for complete stacktrace
Caused By: java.net.ProtocolException: EOF after reading only: '0' of: '16' promised bytes, out of which at least: '0' were already buffered
at weblogic.servlet.internal.PostInputStream.complain(PostInputStream.java:84)
at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:189)
at weblogic.servlet.internal.ServletInputStreamImpl$1.read(ServletInputStreamImpl.java:189)
at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:251)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2400)
Truncated. see log file for complete stacktrace
<Feb 10, 2015 11:43:50 AM CST> <Error> <Kernel> <BEA-000802> <ExecuteRequest failed
java.lang.AssertionError: Assertion violated.
java.lang.AssertionError: Assertion violated
at weblogic.utils.Debug.assertion(Debug.java:58)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:2404)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:2243)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.peekParameter(ServletRequestImpl.java:2462)
at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.peekPostParameter(ServletRequestImpl.java:2445)
Truncated. see log file for complete stacktrace
I am using Oracle OEPE eclipse with weblogic 12c. It was working fine before i started working on the Mobile application.
i have installed following plugins in my eclipse.
1. Android Tools
2. JBoos Hybrid Mobile tools
The following open source installed on my pc
1. Node Js
2. Cordova
3. Ripple emulator
I enabled SSL in weblogic and tried with https url and it worked fine.
You can change the url in config.xml file. then it will works.

trouble in starting jboss server

I'm trying to start jboss but the it's not getting started. It gives the following error
JBoss Bootstrap Environment
JBOSS_HOME: /opt/portal/jbossPayments/jboss-5.1.0.GA
JAVA: /usr/jdk/jdk1.6.0_19/bin/java
JAVA_OPTS: -Dprogram.name=run_pmnts_ports_01.sh -server -Xms2650m -Xmx2650m -XX:+AggressiveHeap -XX:+UseParallelGC -XX:ParallelGCThreads=12 -XX:MaxPermSize=256m -Dsu
n.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -Xrunjdwp:transport=dt_socket,address=8987,server=y,suspend=n
CLASSPATH: /opt/portal/jbossPayments/jboss-5.1.0.GA/bin/run.jar::/opt/portal/jbossPayments/jboss-5.1.0.GA/config:/usr/jdk/jdk1.6.0_19/lib/tools.jar
=========================================================================
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Can anyone please help me out?