Regarding grants in JAVA
Hi,
the file is not getting created in the specified directory. it gives an error "Access permission is denied for read, write and delete" Kindly help me with this error.
please see the code below.
v_sub_dir_path := v_sub_dir_path || '\RPT_ID_' || to_char(ai_rpt_id);
v_rpt_dir_path := v_main_dir_path || v_sub_dir_path;
if pk_g.g_os_id = 1 then
v_rpt_dir_path := replace(v_rpt_dir_path,'\','/');
end if;
dbms_java.grant_permission(user,'SYS:java.io.FilePermission',v_rpt_dir_path,'read ,write, execute, delete');
A few snippets to assist you.
Registering the driver:
try {
Class.forName("mysql.jdbc.Driver").newInstance();
catch( Exception e ){
}Opening a connection:
String host = "127.0.0.1";
String port = "3306";
String dbase = "/databasename";
try {
Connection conn = DriverManager.getConnection("jdbc:mysql://"+host+":"+port+dbase);
catch( SQLException sqe ){
}Executing a query:
try {
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT * FROM users");
catch( SQLException sqe ){
}jdbc:msql:databasename
jdbc:mysql://[host][,failoverhost][:port]/[databasename][?propertyName1][=propertyValue1][?propertyName2][=propertyValue2]
If hostname is not specified, defaults to 127.0.0.1
If port is not specified, defaults to 3306 - the default port for mySQL servers
propertyNames
user
password
etc
Similar Messages
-
Hi everyone,
Could anyone tell me whether JAVA grants are needed for JAVA services in Oracle and what are those grants ?
Thanks !!!This forum is only for issues with the SQL Developer tool. Better post these questions under the dedicated Java forums.
Regards,
K. -
Need Expert Advice regarding oracle and java objects
In our project, we are submitting data for many screens at a time. Some screens will have a list of records to be submitted. There is also some hierarchy among the data up to 4 levels.
In such a scenario, we need to know the best way to exchange data between Oracle and Java. Currently java holds the data as objects, where each object may contain an array of next level of objects in it.
Is it best approach to pass the entire data with hierarchy to Oracle using nested table approach and internally oracle handling the data? Is there any other way to do this?
Also in some scenarios we need to pass the entire information for all the screens in one shot with the hierarchy. So we need to know a solution for that also. Could you please help us in this regard?See Oracle JPublisher technique to map Oracle object types to Java ones:
http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96658/toc.htm
Rgds -
Regarding usage of java script in adobe forms
Hello experts,
Please any body help me out with what events i should use in java script / formcalc .
send links for java scripting and formcalc.
Thanxs,
adi.The reference for Formcalc is available inside you designer installation directory.
Like this one C:\Program Files\Adobe\Designer 7.1\Documentation\EN\FormCalc.pdf
There you can also find general LifeCycle Designer Documentation (Designer.chm)
In this file goto Creating Calculations and Scripts -> Events -> List of events
As for JavaScript - reference is not in the package, so you have to search a bit. Something is available:
Like this one: http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
Hope this helps!
Regards,
Petr Perstnev -
What's the general consensus regarding Generics in Java?
Just curious what folks think about how it's implemented in Java and whether you're in favor of it or not (not that it will make any difference).
I haven't been using it yet because I am still working on 1.4.x, but I've been familiarizing myself as best as I can with how to use them.
I realize they fill an important need, but I am not convinced they were/are worth the rather steep price paid for readability.
Curious to get others opinions on this. Regards,
~Bill
Message was edited by:
abillconslSo "new MyWrapper(aString)" is untyped, we need to
use "new MyWrapper<String>(aString)" whichviolates
the principle of Dont-repeat-yourself.I don't think so... what if I wanted to create
something like this?
new MyWrapper<Number>(new Integer(4))That's still possible. My problem is that it works exactly as I'd like it to work as long as I call a method, but not when I instanciate a new object. Let's assume for a second that MyWrapper has a static generic method createWrapper() that just calls the constructor:
public class MyWrapper<T> {
private T foo;
public MyWrapper(T foo) {
this.foo = foo;
public T getFoo() {
return foo;
public static <WT,VT extends WT> MyWrapper<WT> createWrapper(VT foo) {
return new MyWrapper<WT>(foo);
}Here WT is the generic type of the returned wrapper (WrapperType) and VT is the type of the value(ValueType).
Now we see a strange discrepancy on how the object instanciation ("call of a constructor", so to speak) works and how calling another Method works:
MyWrapper<Integer> i1 = new MyWrapper(Integer.valueOf(1)); //unsafe, not infered
MyWrapper<Integer> i2 = MyWrapper.createWrapper(Integer.valueOf(1)); //ok, everything fine
MyWrapper<Number> n1 = new MyWrapper(Integer.valueOf(1)); //unsafe, not infered
MyWrapper<Number> n2 = MyWrapper.createWrapper(Integer.valueOf(1)); //ok, everything fineIf you compile this code (or simply paste it in any modern IDE) you'll see that you'll get warning in the two lines calling the constructor. While the lines calling createWrapper() seem ok. So somehow the compiler can infer the type information when calling a method but can't do that when calling a constructor. That's what's troubling me. -
Regarding use of java code inside javascript
Hi ,
I have doubt regarding how to use java code inside javascript,
i am giving my application code here
<%@page import="java.util.*"%>
<%@ page import="com.suuny.sard.pmt.pat.*"%>
<SCRIPT LANGUAGE="JavaScript">
function fun(){
var ac=document.login.Projectname.options[document.login.Projectname.selectedIndex].value;
var c = document.login.task1.value;
alert(ac);
alert(c);
return true;
</SCRIPT>
<form name="login" action="/pmt/jsp/Leavemanagement/Leave_Ems_HomePage.jsp" method="get" encType="x-www-form-encoded" >
<table width="100%" Align="Center" cellspacing="0" cellpadding="0" border="0">
<tr class="tablerow"><td colspan="6" align="center"><font class="pagehead" align="center">Create Tasks</font></td></tr>
<tr class="tableheader">
<th>Project
<th>Task-Id
<th>TaskName
<th>Assigned To
<th>description
<th>Milestone
</tr>
<%
for(int i=1;i<2;i++){%>
<tr class="tablerow"><td align="center">
<select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >
<!--<option value=""> </option>-->
<%
ArrayList ar =null;
ArrayList projectids=null;
Hashtable ht = new Hashtable();
ProjectNames pnames=new ProjectNames();
ht = pnames.getProjectNames();
ar=(ArrayList)ht.get("projects");
projectids=(ArrayList)ht.get("projectIds");
for(int j=0;j<ar.size();j++){
out.println("<option value=\""+projectids.get(j)+"\">"+ar.get(j)+"</option>");
%>
</select>
<%
out.println("<td align=\"center\"><input type=\"text\" name=\"task"+i+"\"value=\"\" size=\"25\"></td>");
out.println("<td align=\"center\"><input type=\"text\" name=\"taskname"+i+"\"value=\"\" size=\"25\"></td>");
%>
<td align="center">
<select class="SELECT" NAME="Projectname1" VALUE=" ">
<!--<option value=""> </option>-->
<%
ArrayList ar1 =null;
ar1 = pnames.getProjectResource("VXML02");
for(int j=0;j<ar1.size();j++){
out.println("<option value=\""+ar1.get(j)+"\">"+ar1.get(j)+"</option>");
%>
</select>
<%
out.println("<td align=\"center\"><input type=\"text\" name=\"description"+i+"\"value=\"\" size=\"25\"></td>");
out.println("<td align=\"center\"><input type=\"text\" name=\"milestone"+i+"\"value=\"\" size=\"25\"></td><tr>");
out.println("<tr class=\"tablerow\"><td colspan=\"6\" align=\"center\"><input class=\"txtbuttonsmall\" type=\"submit\" value=\"save\"></td>");
%>
</Table>
</form>
My question is :
I selected one project from first combo box ,i need project members corresponding to the project.
In my code "pnames.getProjectResource("VXML02");" in this function iam passing one static projrct value,but i need dynamically selected project from first combo box(<select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >),so please help me guys.Hi Marco,
I "executed" some java code within XSLs file. I have quoted the word executed because I didn't really run java code, but I used a simply trick that I describe you below.
Into your XSLs put an iframe which is hided (it has an height of 0 pixel). As src of the iframe put the address of a portal component which execute your code (in my case calculate some PCD URL of some pages into a defined role). As result of component execution, I use the response.write method in order to execute some jscript code, which is able to interact with the HTML generated by XSLs files, for example in my case response.write put the PCD URL into a drop down list placed into the "edit" form.
This works fine. I don't know if is suitable also for your case, anyway could be a hint, but pay attention to Roland's recommendations.
Ciao
Roberto -
How to grant the java objects of sys to scott?
I'm trying to execute socket program. The client part is located in Database 8.1.6, and Server part is located outside of database.
From the trigger, the client program is invoked, and it is executed. But, it makes a error like below...
ORA-29532:
java.security.AccessControlException: the Permission (java.net.SocketPermission
127.0.0.1:5000 connect,resolve) has not been granted by
dbms_java.grant_permission to
SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
I checked the class status 'java.net.Socket' from user_objects. In scott, it doesn't exist, but I logged in db as 'sys'. Sys has the java.net.Socket permission. Its status is valid. So, I guess if scott has the permission java.net.Socket class object, scott can run the socket program. RIght?
please, help me.
Any opinion will be helpful...
Thanks in advance. Have a nice day..as SYS try:
SQL> grant javauserpriv to scott;
SQL> grant javasyspriv to scott;
APC -
Regarding Web Dynpro (java)
Hi Experts,
Im a Beginner of SAP Netweaver developer studio in Web Dynpro (Java). I have created 2 buttons in designer view. I have to write coding for that Button in implementation part. how to wirte an event for that button? I would be thankful.
Regards,
DhanaLakshmiHI,
This PDF mentions how to use buttons
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/a-c/creating%20your%20first%20web%20dynpro%20application.pdf
Sample applications are given in this link.
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
PDF's with the sample applications give you step by step guidance. -
Proble regarding running a java application
hi guys
i'm new to java environment .
when i'm running a java application in a console ,
it is not able to give output in other directories.it is working only in c:\j2sdk\bin.
i think its the problem of setting classpath.
can any one help me hw to run java program in any folder.You need to add that directory to your PATH. Follow
the installation instructions more completely.Howdy sheriff Warnerja! How's life in the Schmuckville Home of the Ball-less? Any leads regarding the dot flasher case? I see you're on the PATH.
Sheriff Warnerja of Schmuckville sensed an indecency plot.
Here was someone exposing her private dot.
He went on the trail,
but of no avail:
He didn't know where to find that intimate spot! -
Need suggestion regarding simulation of Java Card using a floppy
Hi All,
I am working on a project wherein I have to simulate a Java Card application using a floppy. I am writing my own Card Terminal and CardTerminalFactory. Thats what I have started working on. Will that serve the purpose or do I have to think about some other approach like just overriding the cardInserted method of CTListener class? I want to achieve communication between the host application and the floppy(which is my java card) Please advise.
I would like to thank DurangoVa and Nilesh for helping me out sorting out the error in running the converter.
Thanks in advanceAre you referring to a Floppy diskette drive ?
-
Regarding Internal Exception: java.sql.SQLException
While deploying the application we are encounter a following error,
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: FATAL: sorry, too many clients already
Error Code: 0
Deployment error:
Please give me a suggession for this error.
Thanks,While deploying the application we are encounter a following error,
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: FATAL: sorry, too many clients already
Error Code: 0
Deployment error:
Please give me a suggession for this error.
Thanks, -
Regards with Webdynpro Java in ESS
Hi,
i wanted to know whether we can use webdynpro abap in a J2EE server.
I have the issue that at the client, all the objects are customized and what i came to know that
we can use webdynpro only on the standard packages but not on the customized ones.
so here my issue is that can we use Webdynpro ABAP for the customized ones (objects)
if yes then how do we proceed further.
and how do use webdynpro ABAP in J2ee server
please reply me at the earliest possibleWeb Dynpro ABAP is SAP's strategy to build Web Applications in ABAP environment.
Web Dynpro ABAP is run on ABAP Engine not on Java Engine. ECC 6.0 by default has the ABAP Web Application Server. You can develop Web Dynpro ABAP Applications in the ECC itself and can be integrated into Portal via iViews.
Web Dynpro Java is a tool to develop Web Applications in Java Environment. Jco is the medium through which it connects to R/3 system and calls the RFC Function Modules.
I hope it is clear.
Abhi -
Hi ,
I use weblogic 9.2 server . I got this error and am getting this again and again ...
actually this is a test bed environment , newly setup one based on production environment.
can any one help me out ??
Caused by: java.rmi.RemoteException: Transaction Rolledback.; nested exception is:
weblogic.transaction.internal.TimedOutException: Transaction timed out after 122 seconds
BEA1-0012E646C6D14C8E60D6
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:95)
at weblogic.ejb.container.internal.BaseEJBObject.postInvoke1(BaseEJBObject.java:514)
at weblogic.ejb.container.internal.StatelessEJBObject.postInvoke1(StatelessEJBObject.java:72)
at weblogic.ejb.container.internal.BaseEJBObject.postInvokeTxRetry(BaseEJBObject.java:374)
at com.mountain.molehill.ejb.controller.HandleSystemAdminEJB_rbrj0q_EOImpl.handleEvent(HandleSystemAdminEJB_rbrj0q_EOImpl.java:365)
... 29 more
Caused by: weblogic.transaction.internal.TimedOutException: Transaction timed out after 122 seconds
BEA1-0012E646C6D14C8E60D6
at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1721)
at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1560)
at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1919)
at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1468)
at weblogic.transaction.internal.WLSTimer.timerExpired(WLSTimer.java:35)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
... 2 more
DO I NEED TO CHANGE ANYTHING IN THE CONFIGURATION
Thanks in advanceAdding to the above post >>>
I also get the following errors
java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 121 seconds
BEA1-0011E646C6D14C8E60D6]'. No further JDBC access is allowed within this transaction.
at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:192)
at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:202)
at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:59)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown Source)
at org.hibernate.type.StringType.get(StringType.java:16)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:80)
at org.hibernate.type.ComponentType.hydrate(ComponentType.java:422)
at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:182)
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:726)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:284)
at org.hibernate.loader.Loader.doQuery(Loader.java:395)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)
at org.hibernate.loader.Loader.doList(Loader.java:1562)
at org.hibernate.loader.Loader.list(Loader.java:1545)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:886)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:840)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
2007-11-19 03:19:53,358|WARN|org.hibernate.util.JDBCExceptionReporter|logExceptions|SQL Error: 0, SQLState: null
2007-11-19 03:19:53,358|ERROR|org.hibernate.util.JDBCExceptionReporter|logExceptions|The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 121 seconds
BEA1-0011E646C6D14C8E60D6]'. No further JDBC access is allowed within this transaction. -
Query regarding Eclipse for Java
Sorry for this query.
I have created a Project in ECLIPSE 3.3.1 called MyTests
which has a folder called 'source'
How do I create a package called com.xyz under this folder?
MyTests
sources (Folder)
com.xyz (Package)
main.class (your classes)
Help apprecoated
Thankskajbj wrote:
georgemc wrote:
kajbj wrote:
You should read an eclipse tutorial.
KajOr even just guess. Eclipse is pretty intuitive in a lot of placesI agree, but I guess that he at least tried for a few minutes before he posted the question?I'm not so sure. Seem to remember this guy asking "why don't Java Properties understand my XML?" 5 days on the trot before actually believing that the XML had to be in a particular format -
Regarding real time java packages
Hi,
I am relatively new to java. can anybody tell me about real time java, and where can i find the implementation of javax.realtime package?i have found a real time java specification which has a package javax.realtime which lists some classes like timer,asyncevent etc. that would be helpful for me. i am supposed to use j9 jvm on qnx rtos. but these classes dont come with standard jdk. can u tell me how to proceed?
Maybe you are looking for
-
Unexpected error when linking CSS style-sheet
I have been working on this site for over a month now. I have a linked external CSS style sheet and everything has been working seamlessly between Dreamweaver and the web. Today, I tried to create a template and then disliked it, so I deleted it. Aft
-
Video keeps stopping, but sound continues
Recording works fine, but when I try to play videos it keeps stopping but the sound continues. Tried som other programs from google play, and they work tiny bit better... they also stop (makes a loading sign), but also stops the sounds, before contin
-
Organise Events into 3 columns like Mac finder window?
Is there a way to add more "years" to the Events list or is that dependent completely on the dates listed on the import tapes? Is there a better way to organise 10 years of family viewing? Can I arrange a "column" tree like the Mac finder window? I w
-
Hi, I have a web template where when i run it asks for the variable input where I need to enter To and From values for this variables entry screen at the top I am getting the heading like Varibles for ZDefects_Q001(my query name) instead of this I wa
-
Prompts me for a Safe Mode Password and the reenter
When I add a ADDS object powershell still prompts me for a Safe Mode Password and the reenter even thought I have the code below. Where am I going wrong? $SecurePassword = ConvertTo-SecureString "E#$rty1248" -Asplaintext -Force Install-ADDSForest ` -