Create a Jsp to connect to a java app to a website
Hi, HELP, I really need HELP! hello, I have a java application and Im wondering is it possible to be able to open it in a website?- how do you create a JSP file that connects a java application to a website?
Here is sample JAVA code:
import java.net.*;
import java.io.*;
public class URLReader
public URLReader(String website)
try
URL url = new java.net.URL(website);
URLConnection connection = url.openConnection();
connection.connect();
DataInputStream reader = new DataInputStream(connection.getInputStream());
byte b[] = new byte[connection.getContentLength()];
int longitud = reader.read(b);
if(longitud > 0)
for(int i=0;i<b.length;i++)
System.out.print((char)b);
}catch(Exception e)
e.printStackTrace();
public static void main(String args[])
if(args.length == 0)
System.out.println("Usage: URLReader URL");
else
URLReader uRLReader = new URLReader(args[0]);
Similar Messages
-
Possible to create a JAR file from within a java app?
Is it possible to create a jar file from within a java application?
Can it be done more elegantly than by spawning-off another
process with the Runtime and exec() portions of the api?
Thanks
ScottThanks! I was mislead by the API notes for java.util.jar:
The JarOutputStream class is used to write the contents
of a JAR file to any output stream.
I was looking for a class or method to make jar files.
Seems this is it ;)
Thanks
Scott -
Webinar (Aug 11): How to create Cross-Platform Automated GUI Tests for Java Apps
Join Squish expert, Amanda Burma, and learn how to create cross-platform automated GUI tests for your Java applications!
Register here (multiple time slots)
August 11th 2014
Duration: 30 minutes plus Q & A
This webinar will cover:
General Squish for Java overview
Automating BDD Scenarios
Executing Cross-Platform Automated GUI Tests
Interacting with Java application objects, properties & API
See you there!
Unable to attend? Register and we'll send links to future events and access to our webinar archive following the event.
Webinar schedule
Learn more about Squish
Evaluate froglogic squish<property name="messaging.client.jar.path" value="Location in your local drive" />
<property name="messaging.client.jar.name" value="nameOfYourFile.jar" /> -
Hello All!
I'm looking for a little help on an exact problem that seems to have been solved here before (but doesn't work for me).
Here's the original archived thread:
https://discussions.apple.com/thread/2631967?start=0&tstart=0
The question asked is exactly the same....
I have a java app for a Speco Technologies DVR. After opening the app, you must type in a rather long url and then click connect. If you enter the url, then quit the app, when you relaunch it, it does not remember the url that had been entered the previous time.
I would like to create a script that will launch the Java app and then input the url (text string). I cannot get this to work.
I've gotten as far as this:
on run
tell application "Finder" to activate open document file "DVRVIEWER(DO_NOT_DELETE).jar" of folder "Applications" of startup disk
delay 5
set myString to "192.168.0.118"
repeat with currentCharacter in every character of myString
tell application "system events"
keystroke currentCharacter
end tell
delay 0.25
end repeat
tell application "system events"
keystroke return
end run
AppleScript has a Syntax Error of "Expected end of line, etc. but found command name."
Does anyone ( taylor.henderson where are you! ) have a fix, or even a better way to do this? Can I edit the existing .jar to have the info directly in there?
I would actually love to add another section in there that fills in the username and password after entering in the IP address!
Just for clarification on how this goes:
Launch .jar.
Window Launches and prompts for IP address
Enter in IP address
Press RETURN
Windows disappears and new window appears and prompts for username and password
Enter Username
Press TAB
Enter Password
Press RETURN
Thank you guys, I'm sure it's easy, but hey, for me Photoshop and Illustrator are a breeze :-0
-AndyTheFiredogHi
andythefiredog wrote:
Is it possible to use similar commands to maximize the java window?
Yes.
You must enable the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane
Add these lines after the last line wich contains "keystroke return"
delay 2
tell (first process whose frontmost is true) to click button 2 of window 1 -- zoom
Here's my test script ( the Speco camera demo), that works without problems here, I use the application "DVRJavaView4.1.jar", this script checks the existence of ui element (more reliable) rather than any delay.
on run
do shell script "/usr/bin/open '/Applications/DVRJavaView4.1.jar'"
tell application "System Events" to tell (first process whose frontmost is true)
repeat until exists window "Please Input DVR address"
delay 1
end repeat
keystroke "millapt.ddns.specoddns.net"
keystroke return
repeat until exists button "OK" of window 1
delay 1 -- wait until the login window is frontmost
end repeat
keystroke "user"
keystroke tab
delay 0.1
keystroke "4321"
delay 0.1
keystroke return
repeat until name of window 1 starts with "DVRJavaView"
delay 1 --wait while the login window is frontmost
end repeat
click button 2 of window 1 -- zoom
end tell
end run -
Error Message Java App Possible Proxy Issue
I am trying to connect to a java app throught the internet and get the following message:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at javax.baja.naming.BIpHost$SocketFactory.open(BIpHost.java)
at javax.baja.naming.BIpHost.openSocket(BIpHost.java)
at com.tridium.fox.sys.BFoxClientConnection.connect(BFoxClientConnection.java)
at com.tridium.fox.sys.BFoxSession.connect(BFoxSession.java)
at com.tridium.workbench.shell.BNiagaraWbApplet.logon(BNiagaraWbApplet.java)
at com.tridium.workbench.shell.BNiagaraWbApplet.appletStart(BNiagaraWbApplet.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at WbApplet.invoke(WbApplet.java:447)
This is needed for work but I get this message. From home it works perfectly. My guess is our proxy is blocking something. I have no control over the proxy so I need to knw what to tell our network engineer so this can be opened if this is indeed the case.
Thanks for any help!Just now I uninstalled the Sun Java Studio Creator and deleted all directories related to it, then re-installed.
I don't know why, but It is just ok now. -
Java.sql.SQLException: can't create statement from closed connection
java.sql.SQLException: can't create statement from closed connection.
at com.caucho.sql.QPooledConnectionImpl.prepareStatement(QPooledConnecti onImpl.java:411)
I am getting this error with my JSP's, i am running on Resin on Win2k, and MySql as backend.
Has anyone else also faced this issue ?
Looking for someone to help me to solve this issue.
rcLooking for someone to help me to solve this issue.Maybe you are closing the connections. You might want to verify that you are not doing that. Or if you are that that is the correct way to return the connection to the pool.
Or you could have stale connections. Some databases will time out connections if the connection is no used in a while. (This is a good thing.) But this means connection pools must do something with connections that are not used for a while. The pools usually have a configuration option(s) which allows you to set up a keep alive message which keeps the database from closing the connection. -
hi all can anyone help me i am geting Exception while starting LCES server
: Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES))hi all can anyone help me i am geting Exception while starting LCES server
: Could not create connection; - nested throwable: (java.sql.SQLException: Access denied for user 'adobe'@'localhost' (using password: YES)) -
Hi, I get a java.lang.StringIndexOutOfBoundsException when making a JDBC
pool connection via the console of WLS 7.0. I use SQL Server 2000 in Win2K
SP2 environment. Exactly the same configuration works perfectly in WinXP
Pro. Can anyone advise me what might cause this problem? Thanks a lot.
Log message
####<May 13, 2002 5:15:52 PM CEST> <Error> <JDBC> <abcdefgh> <vtsserver>
<ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <kernel
identity> <> <001060> <Cannot startup connection pool
"ejbTestConnectionPool" java.lang.StringIndexOutOfBoundsException: String
index out of range: -1>
Exception
java.lang.NullPointerException
at
weblogic.management.console.utils.MBeans.getMBeanClassNameFor(MBeans.java:11
53)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getMBeanClass(Edit
MBeanAction.java:210)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getDialogTypeKey(E
ditMBeanAction.java:188)
at
weblogic.management.console.actions.internal.InternalActionContext.setAction
(InternalActionContext.java:158)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:170)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException - with nested exception:
[java.lang.NullPointerException]
at
weblogic.management.console.utils.MBeans.getMBeanClassNameFor(MBeans.java:11
56)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getMBeanClass(Edit
MBeanAction.java:210)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getDialogTypeKey(E
ditMBeanAction.java:188)
at
weblogic.management.console.actions.internal.InternalActionContext.setAction
(InternalActionContext.java:158)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:170)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
--------------- nested within: ------------------
weblogic.management.console.actions.ActionException - with nested exception:
[weblogic.utils.NestedRuntimeException - with nested exception:
[java.lang.NullPointerException]]
at weblogic.management.console.actions.ErrorAction.(ErrorAction.java:38)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:190)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
Current Date
Mon May 13 17:15:52 CEST 2002
Console Release Build
null
Console Build
null
Server Release Build
7.0.0.0
Server Build
WebLogic Server 7.0 Thu Apr 25 17:16:22 PDT 2002 180709
All Server Product Versions
WebLogic Server 7.0 Thu Apr 25 17:16:22 PDT 2002 180709
WebLogic XMLX Module 7.0 Thu Apr 25 17:26:07 PDT 2002 180709
Request Info
Protocol: HTTP/1.1
ServerName: localhost
ServerPort: 7001
Secure: false
ContextPath: /console
ServletPath: /common/error.jsp
QueryString:
MBean=vtsdomain%3AName%3DejbTestConnectionPool%2CType%3DJDBCConnectionPool
PathInfo: null
PathTranslated: null
RequestURI: /console/common/error.jsp
AuthType: null
ContentType: application/x-www-form-urlencoded
CharacterEncoding: null
Locale: en_US
Method: POST
Session:
weblogic.servlet.internal.session.MemorySessionData@1926bd
RequestedSessionId:
8fMghRfnkcOls1wsW0vIRS8PuQKquWoYcnt6ciUG5uznDJiLr1ZA!-37849198!1021299872710
RequestedSessionIdFromCookie: true
RequestedSessionIdFromURL: false
UserPrincipal: vts
RemoteUser: vts
RemoteAddr: 127.0.0.1
RemoteHost: 127.0.0.1
Parameters
MBean = vtsdomain:Name=ejbTestConnectionPool,Type=JDBCConnectionPool
chosen_wl_control_weblogic.management.configuration.JDBCConnectionPoolMBean.
Targets-Server = vtsdomain:Name=vtsserver,Type=Server
weblogic.console.submit_form = dataposted
wl_control_weblogic.management.configuration.JDBCConnectionPoolMBean.Targets
-Server = vtsdomain:Name=vtsserver,Type=Server
Attributes
wlinternalaction =
weblogic.management.console.actions.internal.InternalActionContext@4372d8
java.util.Locale = en_US weblogic.management.console.catalog.Catalog =
weblogic.management.console.catalog.XmlCatalog@3ca759
weblogic.management.console.helpers.BrowserHelper = User-Agent: Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) IE: true Netscape:
false Supported: true JavscriptHrefs: false TableCellClick: true
DocumentReloadedOnResize: false DropdownStretchable: true CellSpacingBlank:
false EmptyCellBlank: false ImgOnclickSupported: true TableBorderFancy: true
PartialToWideTables: false DisabledControlSupported: true
weblogic.management.console.helpers.DebugHelper =
weblogic.management.console.helpers.DebugHelper@16ed83
weblogic.management.console.helpers.UnitsHelper =
weblogic.management.console.helpers.UnitsHelper@ae2d9
weblogic.management.console.helpers.UrlHelper =
weblogic.management.console.helpers.UrlHelper@28fd41
Headers
Accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/* Accept-Encoding = gzip, deflate Accept-Language = en-us Cache-Control =
no-cache Connection = Keep-Alive Content-Length = 304 Content-Type =
application/x-www-form-urlencoded Cookie =
ADMINCONSOLESESSION=8fMghRfnkcOls1wsW0vIRS8PuQKquWoYcnt6ciUG5uznDJiLr1ZA!-37
849198 Host = localhost:7001 Referer =
http://localhost:7001/console/actions/mbean/DoEditMBeanAction?MBean=vtsdomai
n%3AName%3DejbTestConnectionPool%2CType%3DJDBCConnectionPool User-Agent =
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)
BrowserInfo
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
.NET CLR 1.0.3705)
IE: true
Netscape: false
Supported: true
JavscriptHrefs: false
TableCellClick: true
DocumentReloadedOnResize: false
DropdownStretchable: true
CellSpacingBlank: false
EmptyCellBlank: false
ImgOnclickSupported: true
TableBorderFancy: true
PartialToWideTables: false
DisabledControlSupported: trueThanks, Joe. It works now!
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
>
Vladimir wrote:
Here are the definitions of the two pools - both encounter the same
problem:
<JDBCConnectionPool DriverName="weblogic.jdbc.mssqlserver4.Driver"
Name="ejbTestConPool"
Properties="db=ejbTest;user=sa;port=1433;password=test;server=localhost"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="accounts" URL="weblogic:jdbc:mssqlserver4"/>yep, as I thought. A JDBC URL always starts with 'jdbc'. It should be
'jdbc:weblogic:mssqlserver4'. Also, make TestConnectionsOnRelease="false"
(it's a waste of cycles).
Joe
<JDBCConnectionPool DriverName="weblogic.jdbc.mssqlserver4.Driver"
Name="ejbTestConnectionPool" Password="{3DES}sCmdDszi61I="
Properties="user=sa;db=ejbTest;port=1433;password=test;server=localhost"
Targets="vtsserver" TestTableName="accounts"
URL="weblogic:jdbc:mssqlserver4"
XAPassword="{3DES}sCmdDszi61I="/>
>>
Vladimir
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
show us your pool definitions from the config.xml file. There's
probably a
problem
with the URL or properties.
Joe
Vladimir wrote:
Hi, I get a java.lang.StringIndexOutOfBoundsException when making a
JDBC
pool connection via the console of WLS 7.0. I use SQL Server 2000in
Win2K
SP2 environment. Exactly the same configuration works perfectly in
WinXP
Pro. Can anyone advise me what might cause this problem? Thanks alot.
>>>>
Log message
####<May 13, 2002 5:15:52 PM CEST> <Error> <JDBC> <abcdefgh><vtsserver>
<ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'><kernel
identity> <> <001060> <Cannot startup connection pool
"ejbTestConnectionPool" java.lang.StringIndexOutOfBoundsException:String
index out of range: -1>
Exception
java.lang.NullPointerException
at
weblogic.management.console.utils.MBeans.getMBeanClassNameFor(MBeans.java:11
53)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getMBeanClass(Edit
MBeanAction.java:210)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getDialogTypeKey(E
ditMBeanAction.java:188)
at
weblogic.management.console.actions.internal.InternalActionContext.setAction
(InternalActionContext.java:158)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:170)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException - with nested exception:
[java.lang.NullPointerException]
at
weblogic.management.console.utils.MBeans.getMBeanClassNameFor(MBeans.java:11
56)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getMBeanClass(Edit
MBeanAction.java:210)
at
weblogic.management.console.actions.mbean.EditMBeanAction.getDialogTypeKey(E
ditMBeanAction.java:188)
at
weblogic.management.console.actions.internal.InternalActionContext.setAction
(InternalActionContext.java:158)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:170)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
--------------- nested within: ------------------
weblogic.management.console.actions.ActionException - with nestedexception:
[weblogic.utils.NestedRuntimeException - with nested exception:
[java.lang.NullPointerException]]
atweblogic.management.console.actions.ErrorAction.(ErrorAction.java:38)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:190)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5363)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
Current Date
Mon May 13 17:15:52 CEST 2002
Console Release Build
null
Console Build
null
Server Release Build
7.0.0.0
Server Build
WebLogic Server 7.0 Thu Apr 25 17:16:22 PDT 2002 180709
All Server Product Versions
WebLogic Server 7.0 Thu Apr 25 17:16:22 PDT 2002 180709
WebLogic XMLX Module 7.0 Thu Apr 25 17:26:07 PDT 2002 180709
Request Info
Protocol: HTTP/1.1
ServerName: localhost
ServerPort: 7001
Secure: false
ContextPath: /console
ServletPath: /common/error.jsp
QueryString:
MBean=vtsdomain%3AName%3DejbTestConnectionPool%2CType%3DJDBCConnectionPool
PathInfo: null
PathTranslated: null
RequestURI: /console/common/error.jsp
AuthType: null
ContentType: application/x-www-form-urlencoded
CharacterEncoding: null
Locale: en_US
Method: POST
Session:
weblogic.servlet.internal.session.MemorySessionData@1926bd
RequestedSessionId:
8fMghRfnkcOls1wsW0vIRS8PuQKquWoYcnt6ciUG5uznDJiLr1ZA!-37849198!1021299872710
RequestedSessionIdFromCookie: true
RequestedSessionIdFromURL: false
UserPrincipal: vts
RemoteUser: vts
RemoteAddr: 127.0.0.1
RemoteHost: 127.0.0.1
Parameters
MBean = vtsdomain:Name=ejbTestConnectionPool,Type=JDBCConnectionPool
chosen_wl_control_weblogic.management.configuration.JDBCConnectionPoolMBean.
Targets-Server = vtsdomain:Name=vtsserver,Type=Server
weblogic.console.submit_form = dataposted
wl_control_weblogic.management.configuration.JDBCConnectionPoolMBean.Targets
-Server = vtsdomain:Name=vtsserver,Type=Server
Attributes
wlinternalaction =
weblogic.management.console.actions.internal.InternalActionContext@4372d8
java.util.Locale = en_US weblogic.management.console.catalog.Catalog=
weblogic.management.console.catalog.XmlCatalog@3ca759
weblogic.management.console.helpers.BrowserHelper = User-Agent:Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) IE: trueNetscape:
false Supported: true JavscriptHrefs: false TableCellClick: true
DocumentReloadedOnResize: false DropdownStretchable: trueCellSpacingBlank:
false EmptyCellBlank: false ImgOnclickSupported: true
TableBorderFancy:
true
PartialToWideTables: false DisabledControlSupported: true
weblogic.management.console.helpers.DebugHelper =
weblogic.management.console.helpers.DebugHelper@16ed83
weblogic.management.console.helpers.UnitsHelper =
weblogic.management.console.helpers.UnitsHelper@ae2d9
weblogic.management.console.helpers.UrlHelper =
weblogic.management.console.helpers.UrlHelper@28fd41
Headers
Accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,application/msword,
*/* Accept-Encoding = gzip, deflate Accept-Language = en-usCache-Control =
no-cache Connection = Keep-Alive Content-Length = 304 Content-Type =
application/x-www-form-urlencoded Cookie =
ADMINCONSOLESESSION=8fMghRfnkcOls1wsW0vIRS8PuQKquWoYcnt6ciUG5uznDJiLr1ZA!-37
849198 Host = localhost:7001 Referer =
http://localhost:7001/console/actions/mbean/DoEditMBeanAction?MBean=vtsdomai
n%3AName%3DejbTestConnectionPool%2CType%3DJDBCConnectionPoolUser-Agent
=
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.0.3705)
BrowserInfo
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; WindowsNT
5.0;
.NET CLR 1.0.3705)
IE: true
Netscape: false
Supported: true
JavscriptHrefs: false
TableCellClick: true
DocumentReloadedOnResize: false
DropdownStretchable: true
CellSpacingBlank: false
EmptyCellBlank: false
ImgOnclickSupported: true
TableBorderFancy: true
PartialToWideTables: false
DisabledControlSupported: true -
Jsp jdbc connectivity problem.
i'm getting the following error
"HTTP Status 500-----
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directive
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:527)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1568)
org.apache.jasper.compiler.Parser.parse(Parser.java:132)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)"
for the jsp file is :
<%@ page import="java.sql.*" %>
<%@ //page errorPage="exceptionHandler.jsp"%>
<%
String connectionURL = "jdbc:mysql://localhost:3306/decipher?user=localhost;password=passwd";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html><body>
<%
String nr="nr";
String a= request.getParameter("emp_id");
String b= request.getParameter("name");
String c= request.getParameter("department");
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "passwd");
statement = connection.createStatement();
statement.executeUpdate("use decipher");
statement.executeUpdate("Insert into candidate_details values ('" +a+ "','" +b+ "','" +c+ "')");
%>
sucesssfully created New Account
</body>
</html>"bmahesh7feb wrote:
org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directiveAt line 2, character 4 of create_user.jsp there's an invalid directive. This is a plain code syntax error.
<%@ //page errorPage="exceptionHandler.jsp"%>What are those slashes doing there? Do you think that those Java style comments outcomments the JSP line? It is JSP code, it is not Java code. Remove the whole line or use JSP comments.
As for the remnant of your JSP code, there are a lot of flaws in there. First step to in the right direction would be to stop using scriptlets in JSP. Good luck. -
Using JSP to connect to an Access Database
I need help on using JSP to connect to an Access database.
This is the code I currently have connecting to a mySQL DB. I need to change it to connect to an Access DB. The reason I am switching DB's is because mySQL is no longer going to be carried by my host.
Here is the code:
<html>
<head>
<basefont face="Arial">
</head>
<body>
<%@ page language="java" import="java.sql.*" %>
<%!
// define variables
String UId;
String FName;
String LName;
// define database parameters
String host="localhost";
String user="us867";
String pass="jsf84d";
String db="db876";
String conn;
%>
<table border="2" cellspacing="2" cellpadding="5">
<tr>
<td><b>Owner</b></td>
<td><b>First name</b></td>
<td><b>Last name</b></td>
</tr>
<%
Class.forName("org.gjt.mm.mysql.Driver");
// create connection string
conn = "jdbc:mysql://" + host + "/" + db + "?user=" + user + "&password=" +
pass;
// pass database parameters to JDBC driver
Connection Conn = DriverManager.getConnection(conn);
// query statement
Statement SQLStatement = Conn.createStatement();
// generate query
String Query = "SELECT uid, fname, lname FROM abook";
// get result
ResultSet SQLResult = SQLStatement.executeQuery(Query);
while(SQLResult.next())
UId = SQLResult.getString("uid");
FName = SQLResult.getString("fname");
LName = SQLResult.getString("lname");
out.println("<tr><td>" + UId + "</td><td>" + FName + "</td><td>" + LName
+ "</td></tr>");
// close connection
SQLResult.close();
SQLStatement.close();
Conn.close();
%>
</table>
</body>
</html>
Thank You,
Josh<%@ page language="java"%>
<html>
<head>
<title>
First Bean
</title>
<%@ page import="java.sql.*" %>
</head>
<body>
<p>
<%!
Connection con;
Statement st;
ResultSet rs;
String userid;
String password;
%>
<%!public void db(JspWriter out)
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:phani");
catch(Exception e){}
try{
st=con.createStatement();
rs=st.executeQuery("SELECT * FROM login");
while(rs.next())
userid=rs.getString("userid");
password=rs.getString("password");
out.println(userid);
out.println("</br>");
out.println(password);
out.println("</br>");
}catch(Exception e){}
try{
con.close();
}catch(Exception e){}
%>
<%db(out);%>
</p>
</body>
</html>
phani is dsn name
login is table name
Good luck
phani -
Error while creating a new DAC connection using connection type MSSQL
Hi,
I am trying to create a new DAC connection i.e. a new DAC repository in the SQL Server 2008 database.
DAC version : 10.1.3.4.1
Database : SQL Server 2008
I have downloaded the sqljdbc4.jar file from the below link and placed it in the D:\orahome\10gR3_1\bifoundation\dac\lib folder.
[http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774 ]
I have entered all the details correctly for database name, database host, database port. I created a new Authentication file.
I get the below error when I try to test the connection.
MESSAGE:::MSSQL driver not available!
EXCEPTION CLASS::: java.lang.IllegalArgumentException
com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:512)
com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
::: CAUSE :::
MESSAGE:::com.microsoft.sqlserver.jdbc.SQLServerDriver
EXCEPTION CLASS::: java.lang.ClassNotFoundException
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:510)
com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
The error seems to be a connectivity issue with SQL Server. Am I using the correct jar file?
Please help me out in resolving this issue. Appreciate the help provided on this forum earlier.
Thank YouAdd
.\lib\sqljdbc4.jar
at end of the line starting with SQLSERVERLIB in config.bat file
Pls mark correct -
Error while creating a application server connection in jdeveloper 10.1.3.2
When I am trying to create a connection using the wizard with the following inputs
hostname as :- localhost
RMI Por as 22667
When I use the test conection receive the following error
racle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: Error while getting remote MBeanServer for url: ormi://localhost:22667/default
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:502)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.<init>(CoreRemoteMBeanServer.java:161)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.<init>(RemoteMBeanServer.java:128)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.getMBeanServer(RemoteMBeanServer.java:158)
at oracle.oc4j.admin.jmx.client.ClientMBeanServerProxyFactory.getMBeanServer(ClientMBeanServerProxyFactory.java:68)
at oracle.oc4j.admin.jmx.remote.rmi.RMIJMXConnectorImpl.getConnector(RMIJMXConnectorImpl.java:190)
at oracle.oc4j.admin.jmx.remote.JMXConnectorImpl.connect(JMXConnectorImpl.java:400)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper._getJMXConnector(J2EEConnectionWrapper.java:269)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper.getPresentation(J2EEConnectionWrapper.java:76)
at oracle.jdevimpl.cm.dt.browser.j2ee.J2EEBrowser.openConnectionBrowser(J2EEBrowser.java:75)
at oracle.jdeveloper.cm.dt.ConnectionNode$NodeOpen.doWork(ConnectionNode.java:423)
at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551)
at java.lang.Thread.run(Thread.java:613)
Caused by: javax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused] [Root exception is java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]]
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:127)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:468)
... 14 more
Caused by: java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.oracle.naming.J2EEContext.create(J2EEContext.java:104)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:124)
... 20 more
Caused by: oracle.oc4j.rmi.OracleRemoteException: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:110)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getFinder(ApplicationClientResourceFinder.java:123)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getLocation(ApplicationClientResourceFinder.java:75)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getEjbBinding(ApplicationClientResourceFinder.java:38)
at com.oracle.naming.J2EEContext.addEJBReferenceEntries(J2EEContext.java:515)
at com.oracle.naming.J2EEContext.create(J2EEContext.java:97)
... 21 more
Caused by: javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:292)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:101)
... 26 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:207)
at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:682)
at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:283)
... 28 more
---- Embedded exception
javax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused] [Root exception is java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]]
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:127)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:468)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.<init>(CoreRemoteMBeanServer.java:161)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.<init>(RemoteMBeanServer.java:128)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.getMBeanServer(RemoteMBeanServer.java:158)
at oracle.oc4j.admin.jmx.client.ClientMBeanServerProxyFactory.getMBeanServer(ClientMBeanServerProxyFactory.java:68)
at oracle.oc4j.admin.jmx.remote.rmi.RMIJMXConnectorImpl.getConnector(RMIJMXConnectorImpl.java:190)
at oracle.oc4j.admin.jmx.remote.JMXConnectorImpl.connect(JMXConnectorImpl.java:400)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper._getJMXConnector(J2EEConnectionWrapper.java:269)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper.getPresentation(J2EEConnectionWrapper.java:76)
at oracle.jdevimpl.cm.dt.browser.j2ee.J2EEBrowser.openConnectionBrowser(J2EEBrowser.java:75)
at oracle.jdeveloper.cm.dt.ConnectionNode$NodeOpen.doWork(ConnectionNode.java:423)
at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.oracle.naming.J2EEContext.create(J2EEContext.java:104)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:124)
... 20 more
Caused by: oracle.oc4j.rmi.OracleRemoteException: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:110)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getFinder(ApplicationClientResourceFinder.java:123)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getLocation(ApplicationClientResourceFinder.java:75)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getEjbBinding(ApplicationClientResourceFinder.java:38)
at com.oracle.naming.J2EEContext.addEJBReferenceEntries(J2EEContext.java:515)
at com.oracle.naming.J2EEContext.create(J2EEContext.java:97)
... 21 more
Caused by: javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:292)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:101)
... 26 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:207)
at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:682)
at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:283)
... 28 more
---- Embedded exception
java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.oracle.naming.J2EEContext.create(J2EEContext.java:104)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:124)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:468)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.<init>(CoreRemoteMBeanServer.java:161)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.<init>(RemoteMBeanServer.java:128)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.getMBeanServer(RemoteMBeanServer.java:158)
at oracle.oc4j.admin.jmx.client.ClientMBeanServerProxyFactory.getMBeanServer(ClientMBeanServerProxyFactory.java:68)
at oracle.oc4j.admin.jmx.remote.rmi.RMIJMXConnectorImpl.getConnector(RMIJMXConnectorImpl.java:190)
at oracle.oc4j.admin.jmx.remote.JMXConnectorImpl.connect(JMXConnectorImpl.java:400)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper._getJMXConnector(J2EEConnectionWrapper.java:269)
at oracle.jdevimpl.cm.dt.J2EEConnectionWrapper.getPresentation(J2EEConnectionWrapper.java:76)
at oracle.jdevimpl.cm.dt.browser.j2ee.J2EEBrowser.openConnectionBrowser(J2EEBrowser.java:75)
at oracle.jdeveloper.cm.dt.ConnectionNode$NodeOpen.doWork(ConnectionNode.java:423)
at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551)
at java.lang.Thread.run(Thread.java:613)
Caused by: oracle.oc4j.rmi.OracleRemoteException: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:110)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getFinder(ApplicationClientResourceFinder.java:123)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getLocation(ApplicationClientResourceFinder.java:75)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getEjbBinding(ApplicationClientResourceFinder.java:38)
at com.oracle.naming.J2EEContext.addEJBReferenceEntries(J2EEContext.java:515)
at com.oracle.naming.J2EEContext.create(J2EEContext.java:97)
... 21 more
Caused by: javax.naming.CommunicationException: Connection refused [Root exception is java.net.ConnectException: Connection refused]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:292)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:101)
... 26 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:207)
at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:682)
at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:283)
... 28 moreCaused by: java.net.ConnectException: Connection refused
Is the Oracle application server running? -
Open connections between AS Java and AS ABAP when using JRA
Hi, we have a problem with open connections and hope that someone here could give me hint where to find a solution.
The situation is that we open a connection from a Java application to an AS ABAP. In detail, the application first connects to a statefull session bean on the AS Java by RMI. The bean communicates with the associated AS ABAP by the Java Resource Adapter (JRA).
All interactions between all components work correctly. But even after we close the application, manually close of the connections (on side of the AS Java) , remove all created and used session beans there are still open connections between the AS ABAP and the AS Java.
The transaction smgw (Gateway Monitor) shows open connections from jlaunch to our local SAP gateway using the internal communication protocol. Obviously, the established connections are not closed, even when they are open for a week or longer.
After opening 100 connections, the AS ABAP denies additional connection attempts.
We have been able to close all open connections by restarting the AS Java or by restarting the Connector over the Visual Administrator (path: Cluster Server Services Connector Container select the right connector stop / start).
We have developed our application similar to the tutorial from [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
Can someone explain to us why the connections stay open for so long? Is there no timeout mechanism? Or is there some way to close the connections from our Java application?Hello,
maybe someone can help us with our problem.
We have developed our application similar to the tutorial from https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4 and it was running without problem with the SP12, now we change our system to SP16 and we are having the problem described in note 1083348, but as you can see, for us it was working with SP12 and now it doesn't work with SP16....
Here is part of our code....
public List getAll() {
String functionName = "bla";
try {
openConnection();
MappedRecord response = (MappedRecord) interaction.execute(null, request);
MappedRecord record = (MappedRecord) response.get("E_S_RETURN_CODE");
if (((String) record.get("RETURN_CODE")).equalsIgnoreCase("E")) {
throw new SQLException((String) record.get("RETURN_TXT"));
catch (ResourceException exc) {
throw new EJBException(".");
catch (SQLException exc) {
throw new EJBException(".");
finally {
closeConnection();
protected void openConnection() {
try {
connection = connectionFactory.getConnection();
interaction = connection.createInteraction();
catch (ResourceException exc) {
interaction = null;
connection = null;
throw new EJBException(getExceptionText(exc));
protected void closeConnection() {
try {
if (interaction != null) {
interaction.close();
if (connection != null) {
connection.close();
catch (ResourceException exc) {
throw new EJBException(".");
With that code we are getting this error: "Connection handle is already closed and no longer associated with a managed connection" everytime we try to close the connection in the method closeConnection().
We were thinking that maybe we should not close the connections, because the were already close, and tried not to close the connection (connection.close()), but then after a few time we are getting the following error, because we are not closing the connections:
Connection to ABAP System could not be opened, because the Connection Factory returns "Cannot get connection for 120 seconds. Possible reasons: 1) Connections are cached within SystemThread(can be any server service or any code invoked within SystemThread in the SAP J2EE Engine), 2) The pool size of adapter "eis/..." is not enough according to the current load of the system or 3) The specified time to wait for connection is not enough according to the pool size and current load of the system. In case 1) the solution is to check for cached connections using the Connector Service list-conns command, in case 2) to increase the size of the pool and in case 3) to increase the time to wait for connection property. In case of application thread, there is an automatic mechanism which detects unclosed connections and unfinished transactions.". Please check the connection defined for the Connection Factory of the Java Resource Adapter with JNDI name...
Any help? -
How can I connect a client java desktop aplication with the server of jsf
I need to connect a desktop aplication with a jsf, I need to know how I plug the desktop aplication. I open a connection and then what. I need to send faceBean or a HTML documment or a EL document class. Please help me. I don't know how to do this. If u have examples or code would be great.
ok, the problem is how to send events to the jsf, how to maintain the session, and other kind of stuffs, this works with the browsers but not with my connection. The problem is not the conecction. The problem is keep the advantages of jsf with my connection. Im using a button in a jsp page connecting to jsf implementation mojarra and works for the events. but with my desktop connection and the same parameters crash with a exception java.util.zip.ZipException: incomplete dynamic bit lengths tree.
this happens when I try to send the next parameter to jsf, javax.faces.ViewState=ANY VALUE. -
Error while creating BI JSP application
Hello ,
I am trying to create a simple BI JSP application , as per the steps in the Tutorial . I have created a CrossTab report successfully . Also I created the JSP page , embedded the BIThinSession and Presentation tags
successfully .
While trying to launch the JSP , I am getting the following error :
Line : 14
Char : 1
Error : Object Expected
Code : 0
URL : .....
The Contents of the JSP file are as under
<%@ taglib uri="http://xmlns.oracle.com/bibeans/jsp" prefix="orabi"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<!-- Start synchronization of the BI tags -->
<% synchronized(session){ %>
<orabi:BIThinSession configuration="/Project2OLAPConfig1.xml" id="simpleApp">
<orabi:Presentation location="CSTAB1" id="simpleGraph"/>
</orabi:BIThinSession>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Hello World</title>
</head>
<orabi:BIBody>
<form name="BIForm" method="POST">
<!-- Insert your Business Intelligence tags here -->
<orabi:Render targetId="simpleGraph" parentForm="BIForm"/>
<!-- The InsertHiddenFields tag adds state fields to the parent form tag -->
<orabi:InsertHiddenFields parentForm="BIForm" biThinSessionId="simpleApp"/>
</form>
</orabi:BIBody>
</html>
<% } %>
<!-- End synchronization of the BI tags -->
The Bi_CheckConfig Utility gives the following output
BI Beans Diagnostics(v1.0.2.0) 8/11/04
===============================================================================
JDEV_ORACLE_HOME .......................... = c:\jdev
JAVA_HOME ................................. = C:\j2sdk1.4.2_01
JDeveloper version ........................ = 9.0.5.2.1618
BI Beans release description .............. = BI Beans 10.1.2 Production Release
BI Beans component number ................. = 10.1.2.5.0
BI Beans internal version ................. = 3.2.0.37.4
Connect to database ....................... = Successful
JDBC driver version ....................... = 9.2.0.4.0
JDBC JAR file location .................... = C:\JDEV\jdbc\lib
Database version .......................... = 9.2.0.4.0
OLAP Catalog version ...................... = 9.2.0.4.0
OLAP AW Engine version .................... = 9.2.0.4.0
OLAP API Server version ................... = 9.2.0.4.0
BI Beans Catalog version .................. = N/A; not installed in bibdemo
OLAP API JAR file version ................. = "10.1.0.3.0"
OLAP API JAR file location ................ = c:\jdev\jdev\lib\ext
Load OLAP API metadata .................... = Successful
Number of metadata folders ................ = 2
Number of metadata measures ............... = 12
Number of metadata dimensions ............. = 8
Metadata output location .................. = C:\JDEV\bibeans\bi_checkconfig\bi_metadata.txt
Could anybody please help ?It would appear you are using the BI Beta release software. This software is only certified with 9205 of the database, the bi_checkonfig output you provided indicates you are using 9204.
Please patch your database and instance to 9205 patchset. These can be downloaded from Metalink:
3501955 Oracle Database Family: Patchset
ORACLE 9I DATABASE SERVER RELEASE 2 - PATCH SET 4 VERSION 9.2.0.5.0
Business Intelligence Beans Product Management Team
Oracle Corporation
Maybe you are looking for
-
Want to hide a field in the last page of report
Hi All I have an issue .. can anyone of the oracle techies give me a solution for this ..? pleeaassee The issue is that let us say i have a report for 5 pages. I have placed a field on the margin of a report to display CONTINUE.. . Now we dont want t
-
I want to buy a macbook pro but ???
i have posted a thread here in 17/12/2008 but it doesn't show up i waited three days also doesn't show up where does my post go ????
-
I need a lot of green..
I need to create a topo plan, and need a green pallette, with gradual tone changes, from light to dark. Whats the easiest way to get this. Tryed making my own (miss out a lot of tones, so creates jumps in colour). I would like to be able to load a ne
-
How to view movies and iplayer programmes on full screen on the new iPad, can only get letterbox display.
-
Catching Alt Key Press with the Key Down Filter Event
I am writing an application that requires specific key combinations using ctrl, shift, and alt in addition to a function key (F1, F2, F3, etc). The application works great except for when I try to catch an alt key press. The alt key press does not