- This topic has 8 replies, 2 voices, and was last updated 19 years, 1 month ago by
Sandeep Khanna.
-
AuthorPosts
-
Sandeep KhannaMemberI have the SUN Java System Application Server installed as root in /usr/java/SUNWappServer.
Since I consider doing anything with the ‘root’ ID as a bad practice I created a domain ‘SUNAppServer’ in my own home folder /home/sandeepk/public_html with it’s own admin UserID (sandeepk) & Password(xxxxx).
I use the following startAppServer.sh script to start the server:
#!/bin/bash
# Simple script to start the Sun Java System Application Server on Linux
# This script assumes the ‘asadmin’ binary is in PATHif [ $# -ne 2 ] ; then
echo “Insufficient arguments supplied.”
echo “Usage: $0 domaindir domain”
exit 1
fidomaindir=$1
domain=$2
command=”asadmin start-domain –domaindir $1 $2″$command
exit 0How can I configure MyEclipseIDE to use this setup in particular the SUN AppServer domain at /home/sandeepk/public_html/SUNAppServer ?
In particular from the Window->Preferences->MyEclipse->Application Servers->SJAS 8.1 what would be my:
1. Home Directory
2. Configuration Directory
3. Server Name
4. Domain Name
5. Domain DirectoryAnd where and how can I enter my master UserID & Password required for deploying apps to this domain?
–Sandeep Khanna
Riyad KallaMemberSandeep,
You can’t, but what you *can* do is simply setup a remote debugging session, so you can start/stop/restart your app server any way you see fit. Documentation is here for that: http://www.myeclipseide.com/images/tutorials/quickstarts/remotedebugging/
Sandeep KhannaMemberAlright getting the Sun AppServer with domain created in a different directory cannot be done with MyEclipseIDE.
Does this mean that if I were to install SUNAppServer in /home/sandeepk/apps/ just like JBoss4.0.3SP1 and use it’s default domain ‘domain1’ I would be able to use it from within MyEclipseIDE just like JBoss?? By use it I mean start/stop, exploded deploy, hot deploy, etc.
–Sandeep Khanna
Riyad KallaMemberDoes this mean that if I were to install SUNAppServer in /home/sandeepk/apps/ just like JBoss4.0.3SP1 and use it’s default domain ‘domain1’ I would be able to use it from within MyEclipseIDE just like JBoss?? By use it I mean start/stop, exploded deploy, hot deploy, etc.
Yes exactly.
Sandeep KhannaMemberWell, I finally got MyEclipseIDE to START SUN Application server domain ‘SUNAppServer’ created in my own home folder /home/sandeepk/public_html/SUNAppServer when the actual AppServer install is in /usr/java/SUNWappserver.
I have the following in MyEcliipseIDE SJAS 8.1 preferences:
1. Home Directory: /usr/java/SUNWappserver
2. Configuration Directory: /home/sandeepk/public_html/SUNAppServer/config
3. Server Name: server
4. Domain Name: SUNAppServer
5. Domain Directory: /home/sandeepk/public_html/SUNAppServerAnd it just starts up from within MyEclipseIDE!
Now the only thing remaining is…
* that I see the console logs in MyEclipseIDE in RED* [#|2006-03-16T11:27:00.725-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=10;|core.unexpected_error_occured_while_loading_system_app
java.lang.UnsupportedClassVersionError: com/sun/ejb/containers/TimerBean_2100919770_ConcreteImpl (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:698)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:267)
at com.sun.ejb.containers.EntityContainer.<init>(EntityContainer.java:219)
at com.sun.ejb.containers.TimerBeanContainer.<init>(TimerBeanContainer.java:39)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:234)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:481)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:95)
at com.sun.enterprise.server.AbstractManager.loadSystem(AbstractManager.java:287)
at com.sun.enterprise.server.SystemAppLifecycle.loadSystemApps(SystemAppLifecycle.java:134)
at com.sun.enterprise.server.SystemAppLifecycle.onStartup(SystemAppLifecycle.java:75)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)* [#|2006-03-16T11:28:14.389-0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=11;|NotifyUtil::java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:521)
at com.sun.enterprise.server.ss.ASClientSocketImpl.connect(ASClientSocketImpl.java:181)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:569)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)Any ideas?
–Sandeep Khanna
Riyad KallaMemberNow the only thing remaining is…
* that I see the console logs in MyEclipseIDE in REDRed is normal, I see that too.
* [#|2006-03-16T11:27:00.725-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=10;|core.unexpected_error_occured_while_loading_system_app
java.lang.UnsupportedClassVersionError: com/sun/ejb/containers/TimerBean_2100919770_ConcreteImpl (Unsupported major.minor version 49.0)This means you are using JDK 1.4 to try and run class files that were compiled with JDK 1.5
Sandeep KhannaMemberI forgot to mention one key thing that got this setup to work. I created a softlink in /home/sandeepk/public_html/SUNAppServer/config/asenv.conf to /usr/java/SUNWappserver/config/asenv.conf
And thanks for the JDK mismatch tip. I changed the JDK in MyEclipseIDE to JDK1.5 and the first Exception got resolved. But I still get the second exception everytime I access the admin console or any other app on the server:
[#|2006-03-16T16:28:01.942-0500|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=11;|NotifyUtil::java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:525)
at com.sun.enterprise.server.ss.ASClientSocketImpl.connect(ASClientSocketImpl.java:181)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:784)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:736)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:661)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:828)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)
|#]Any ideas how to resolve this?
–Sandeep Khanna
Riyad KallaMemberat org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)
Why is this in there? How are you running Sun App Server? I’m wondering if this is monkeying up the connector.
Sandeep KhannaMemberI just came across think link after I posted my previous message http://www.smarterthings.co.uk/article/id/1/
I must have used the same server instance from within Netbeans or SUN Studio which adds a HTTP monitoring filter into the application server’s web.xml or default-web.xml so that the AppServer can connect to Netbeans/SUN Studio to give web statistics. But when we run it without Netbeans/SUN Studio and from within MyEclipseIDE or standalone the server keeps throwing the Exceptions.
I guess there are 3 ways to resolve this:
1. If using the same instance from Netbeans/SUN Studio and MyEclipse then live with the Exceptions or see if MyEclipseIDE has Netbeans style HTTP monitor.
2. Create separate server instances for Netbeans/SUN Studio and MyEclipsdeIDE one with and one without the monitor filter.
3. Delete the monitoring filter completely from the share server instance and not monitor HTTP at all!What does MyEclipseIDE experts suggest?
–Sandeep Khanna
-
AuthorPosts