NullPointerException when opening a script in SQL Developer 4.0.0.12
I recently upgraded to SQL Developer v.4.0.0.12 64 bit, and am running into some issues.
I am running this on 64 bit Windows 7. I have a 64 bit Oracle 11, and in addition have the 32 bit oracle client installed.
I made an association between the .sql file extension and sqldeveloper64W.exe.
However I frequently get a nullpointerexception when clicking on a script in the file explorer.
It seems to occur mostly if I loaded scripts into SQL Developer before.
If I close all the windows before closing SQL Developer and then click on a script in the file manager, things work (startup is arguably slower than v.3).
But in most cases either nothing happens, or I get the NullPointerException below.
What am I doing wrong?
Regards,
Wim
java.lang.NullPointerException
at oracle.dbtools.raptor.plsql.FindHighlightListener.editorDeactivated(FindHighlightListener.java:63)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.fireEditorEvent(NbEditorManager.java:1315)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.handleEditorEvent(NbEditorManager.java:1294)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.whenCurrentEditorChanges(NbEditorManager.java:1556)
at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1026)
at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.setCurrentTabGroupState(TabGroup.java:847)
at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.addTabGroupState(TabGroup.java:129)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.createEditor(NbEditorManager.java:534)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.createEditor(NbEditorManager.java:511)
at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.openEditor(NbEditorManager.java:379)
at oracle.ide.cmd.OpenCommand.openWithNoProject(OpenCommand.java:337)
at oracle.ide.cmd.OpenCommand.access$100(OpenCommand.java:62)
at oracle.ide.cmd.OpenCommand$1.run(OpenCommand.java:266)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Please refer to this White paper for how to generate PL/SQL package for workflow deployment:
Oracle Data Miner (Extension of SQL Developer 4.0)
Generate a PL/SQL script for workflow deployment
http://www.oracle.com/technetwork/database/options/advanced-analytics/odmrcodegenwhitepaper-2042206.pdf
Similar Messages
-
ORA-01722 when opening a package in SQL Developer 1.2 with oracle 9iR1
Hi,
I use SQL Developer with Oracle Database 9i release 1.
When I open a package in SQL Developer 1.2 (or 1.5) for editing, I receive the error ORA-01722. The package successfully opens but this message, which pops everytime, is really annoying.
I monitored the requests sent by SQL Developer and it seems that the following request is responsible of the error :
SELECT LINE,POSITION,TEXT,ATTRIBUTE FROM USER_ERRORS WHERE TYPE=:1AND NAME=:2
Notice there are no spaces between ':1' and 'AND'. When executing 'by hand' the request with SQL Developer, it asks for the value of '1AND' bind variable and the value of '2'. Then, it fails to execute with... ORA-01722.
Is it possible to avoid this bug ?
Thank you for your help.We're doing rolling 2 week releases until production. Expect something new next week.
-
Unable to generate insert stmt scripts using sql developer
We are not able to generate INSERT statement script using SQL Developer. In the INSERT script system is inserting some spaces due to carriage return which we cannot reviewed individually.
DELETE FROM IM_INSTANCE_EXT_VAL_FRM
WHERE IEVF_TRG_FLD_NAME = 'PRAI_NUM_03'
AND IEVF_INST_CODE = 'APV-QQ-03'
AND IEVF_BLK_NAME = 'PGIT_POL_RISK_ADDL_INFO_01';
-- INSERTING into IM_INSTANCE_EXT_VAL_FRM
Insert into IM_INSTANCE_EXT_VAL_FRM (IEVF_SYS_ID,IEVF_INST_CODE,IEVF_PROG_CODE,IEVF_BLK_NAME,IEVF_TRG_FLD_NAME,IEVF_ACT_FLDS,IEVF_ACTION,IEVF_PROC,IEVF_SRNO,IEVF_ERR_NO,IEVF_ERR_YN,IEVF_APP_CODE,IEVF_REMARKS,IEVF_UPD_UID,IEVF_UPD_DT,IEVF_CR_UID,IEVF_CR_DT,IEVF_TRG_NAME,IEVF_CLEAR_FLD_YN,IEVF_VALIDATE_YN) values (IEVF_SYS_ID.NEXTVAL,'APV-QQ-03','PGIT6_03','PGIT_POL_RISK_ADDL_INFO_01','PRAI_NUM_03','PRAI_DATA_15,','ENABLED','VFB_EV_GEN.EXT_VAL_DISABLE_PHY_DAMAGE(:PGIT_POL_RISK_ADDL_INFO_01.PRAI_POL_SYS_ID,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_END_NO_IDX,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_END_SR_NO,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_LVL1_SYS_ID,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_CODE_02,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_03,:P_FLAG_OUT)',1,null,'N','01','VALIADTION',null,null,'PREMIA',
to_date('19-SEP-07','DD-MON-RR'),'WHEN-VALIDATE-ITEM','0','1');
Insert into IM_INSTANCE_EXT_VAL_FRM (IEVF_SYS_ID,IEVF_INST_CODE,IEVF_PROG_CODE,IEVF_BLK_NAME,IEVF_TRG_FLD_NAME,IEVF_ACT_FLDS,IEVF_ACTION,IEVF_PROC,IEVF_SRNO,IEVF_ERR_NO,IEVF_ERR_YN,IEVF_APP_CODE,IEVF_REMARKS,IEVF_UPD_UID,IEVF_UPD_DT,IEVF_CR_UID,IEVF_CR_DT,IEVF_TRG_NAME,IEVF_CLEAR_FLD_YN,IEVF_VALIDATE_YN) values (IEVF_SYS_ID.NEXTVAL,'APV-QQ-03','PGIT6_03','PGIT_POL_RISK_ADDL_INFO_01','PRAI_NUM_03',null,'VALIDATE','VFB_EV_GEN.EXT_VAL_VEHICLE_AGE(:PGIT_POL_RISK_ADDL_INFO_01.PRAI_POL_SYS_ID, :PGIT_POL_RISK_ADDL_INFO_01.PRAI_PSEC_SYS_ID,
''APV'',
''APV'',
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_03,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_07,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_08,
:P_FLAG_OUT,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_35_OUT) ',3,null,'N','01','VALIADTION',null,null,'PREMIA',to_date('19-SEP-07','DD-MON-RR'),'WHEN-VALIDATE-ITEM','1','1');
Insert into IM_INSTANCE_EXT_VAL_FRM (IEVF_SYS_ID,IEVF_INST_CODE,IEVF_PROG_CODE,IEVF_BLK_NAME,IEVF_TRG_FLD_NAME,IEVF_ACT_FLDS,IEVF_ACTION,IEVF_PROC,IEVF_SRNO,IEVF_ERR_NO,IEVF_ERR_YN,IEVF_APP_CODE,IEVF_REMARKS,IEVF_UPD_UID,IEVF_UPD_DT,IEVF_CR_UID,IEVF_CR_DT,IEVF_TRG_NAME,IEVF_CLEAR_FLD_YN,IEVF_VALIDATE_YN) values (IEVF_SYS_ID.NEXTVAL,'APV-QQ-03','PGIT6_03','PGIT_POL_RISK_ADDL_INFO_01','PRAI_NUM_03','PRAI_DATA_15,','DEFAULT','VFB_EV_GEN.DEFAULT_PHYSICAL_DAMAGE_SYMBOL(:PGIT_POL_RISK_ADDL_INFO_01.PRAI_POL_SYS_ID,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_PROD_CODE,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_PSEC_SYS_ID,
''APV'',
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_03,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_07,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_CODE_03,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_CODE_02,
:P_FLAG_OUT,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_DATA_15_OUT)',2,null,'N','01','DEFAULT',null,null,'PREMIA',to_date('30-AUG-07','DD-MON-RR'),'WHEN-VALIDATE-ITEM','0','1');
Insert into IM_INSTANCE_EXT_VAL_FRM (IEVF_SYS_ID,IEVF_INST_CODE,IEVF_PROG_CODE,IEVF_BLK_NAME,IEVF_TRG_FLD_NAME,IEVF_ACT_FLDS,IEVF_ACTION,IEVF_PROC,IEVF_SRNO,IEVF_ERR_NO,IEVF_ERR_YN,IEVF_APP_CODE,IEVF_REMARKS,IEVF_UPD_UID,IEVF_UPD_DT,IEVF_CR_UID,IEVF_CR_DT,IEVF_TRG_NAME,IEVF_CLEAR_FLD_YN,IEVF_VALIDATE_YN) values (IEVF_SYS_ID.NEXTVAL,'APV-QQ-03','PGIT6_03','PGIT_POL_RISK_ADDL_INFO_01','PRAI_NUM_03',null,'VALIDATE','VFB_EV_GEN.EXT_VAL_PHY_DAMAGE(:PGIT_POL_RISK_ADDL_INFO_01.PRAI_POL_SYS_ID,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_END_NO_IDX,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_END_SR_NO,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_LVL1_SYS_ID,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_CODE_02,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_NUM_03,
:P_FLAG_OUT,
:PGIT_POL_RISK_ADDL_INFO_01.PRAI_DATA_15_OUT)',9,null,'N','01','VALIADTION',null,null,'PREMIA',
to_date('19-SEP-07','DD-MON-RR'),'WHEN-VALIDATE-ITEM','1','1');
script which is taken from Sql Developer and got error while running in SQL* PLUS
Following error was raised on running the script in SQL * PLUS
5 rows deleted.
1 row created.
1 row created.
1 row created.
SP2-0734: unknown command beginning ":P_FLAG_OU..." - rest of line ignored.
SP2-0734: unknown command beginning ":PGIT_POL_..." - rest of line ignored.
SP2-0734: unknown command beginning "to_date('1..." - rest of line ignored. -
HOW TO OPEN MULTIPLE TABLES IN SQL DEVELOPER SIMULTANEOUSLY
hello i m new to sqldeveloper so plz dnt laugh if m asking silly question
HOW TO OPEN MULTIPLE TABLES IN SQL DEVELOPER SIMULTANEOUSLYUse the 'pin' on your table editor
http://www.thatjeffsmith.com/archive/2011/11/sql-developer-quick-tip-pin-query-result-sets-and-plans/
Then open your 2nd table. If you want to see both at the same time, right-click on the table editor tab and select 'New Editor Tab Group'
Not a silly question, but no need to shout :) -
Issue when connecting to database from SQL Developer tool
Hi,
I was trying to connect to a remote oracle database 10.2.0.5 (hosted at window 2008 R2 server) from my local SQL Developer tool.
When setting up connection in SQL Developer tool, I was able to connect to the database by selecting TNS (Network Allias).
However, it does not work when I choose Basic type with the same information (HOST, PORT, SID).
What is the difference between TNS and Basic setting option? Please advise and assist.
Thanks.
Regards,
JiaHi JimSmith,
Thanks for reply.
TNS entry as below:
ORCL_DB =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 91.198.252.83)(PORT = 1521)) )
(CONNECT_DATA = (SID = orcl) (SERVER = DEDICATED) ) )
It works fine if I choose TNS (Network Allias: ORCL_DB).
For the Basic setting:
Hostname = 91.198.252.83
Port = 1521
SID = orcl
The error I received when connecting to db based on Basic option is Failure -Io exception: The Network Adapter could not establish the connection.
Below are the entries of SQLnet.ora. Any entry should I add into sqlnet.ora?
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Appreciate your comment.
Thanks.
Regards,
Jia -
SQL Developer 3 crashes when opening a local 172mB SQL file
The crash occurs when trying to open a 172mB SQL file from my local C:\ drive on Windows 7 Ultimate 32-bit, running on a typical quad-core AMD Phenom CPU with the usual 3.3gb of RAM.
Crash dump as follows:
java.io.IOException: exception loading C:\...\mySQLfile.sql
at oracle.ide.model.TextNode.openImpl(TextNode.java:530)
at oracle.ide.model.Node.open(Node.java:974)
at oracle.ide.model.Node.open(Node.java:922)
at oracle.ide.model.Node.ensureOpen(Node.java:2132)
at oracle.ide.model.TextNode.acquireTextBuffer(TextNode.java:732)
at oracle.dbtools.worksheet.editor.WorksheetGUI.<init>(WorksheetGUI.java:587)
at oracle.dbtools.worksheet.editor.Worksheet.createGUI(Worksheet.java:753)
at oracle.dbtools.worksheet.editor.Worksheet.getWorksheetGUI(Worksheet.java:1056)
at oracle.dbtools.worksheet.editor.Worksheet.getGUI(Worksheet.java:910)
at oracle.ide.editor.Editor.getDefaultFocusComponent(Editor.java:233)
at oracle.dbtools.worksheet.editor.Worksheet.getDefaultFocusComponent(Worksheet.java:873)
at oracle.dbtools.worksheet.editor.Worksheet.open(Worksheet.java:1141)
at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:283)
at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:184)
at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:95)
at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:232)
at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:195)
at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:102)
at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1403)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1337)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1263)
at oracle.ide.cmd.OpenCommand.openWithNoProject(OpenCommand.java:327)
at oracle.ide.cmd.OpenCommand.access$100(OpenCommand.java:61)
at oracle.ide.cmd.OpenCommand$1.run(OpenCommand.java:256)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.OutOfMemoryError: Java heap space
at oracle.javatools.buffer.VectorBuffers.consolidateBuffers(VectorBuffers.java:131)
at oracle.javatools.buffer.VectorBuffers.getAllBuffers(VectorBuffers.java:156)
at oracle.javatools.buffer.EOLNormalizer.processFinish(EOLNormalizer.java:190)
at oracle.javatools.buffer.EOLNormalizer$ReaderNormalizer.normalizeData(EOLNormalizer.java:312)
at oracle.javatools.buffer.AbstractTextBuffer.read(AbstractTextBuffer.java:1365)
at oracle.javatools.buffer.AbstractTextBuffer.read(AbstractTextBuffer.java:1309)
at oracle.ide.model.TextNode$FacadeTextBuffer.read(TextNode.java:1218)
at oracle.ide.model.TextNode.loadTextBuffer(TextNode.java:293)
at oracle.ide.model.TextNode.openImpl(TextNode.java:518)
at oracle.ide.model.Node.open(Node.java:974)
at oracle.ide.model.Node.open(Node.java:922)
at oracle.ide.model.Node.ensureOpen(Node.java:2132)
at oracle.ide.model.TextNode.acquireTextBuffer(TextNode.java:732)
at oracle.dbtools.worksheet.editor.WorksheetGUI.<init>(WorksheetGUI.java:587)
at oracle.dbtools.worksheet.editor.Worksheet.createGUI(Worksheet.java:753)
at oracle.dbtools.worksheet.editor.Worksheet.getWorksheetGUI(Worksheet.java:1056)
at oracle.dbtools.worksheet.editor.Worksheet.getGUI(Worksheet.java:910)
at oracle.ide.editor.Editor.getDefaultFocusComponent(Editor.java:233)
at oracle.dbtools.worksheet.editor.Worksheet.getDefaultFocusComponent(Worksheet.java:873)
at oracle.dbtools.worksheet.editor.Worksheet.open(Worksheet.java:1141)
at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:283)
at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:184)
at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:95)
at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:232)
at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:195)
at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:102)
at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1403)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1337)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1263)
at oracle.ide.cmd.OpenCommand.openWithNoProject(OpenCommand.java:327)
at oracle.ide.cmd.OpenCommand.access$100(OpenCommand.java:61)
I've tried...
- Closing all possible applications except for SQL Developer
- Rebooting and running only SQL Developer
- Ensuring SQL Developer is running using the included Java SDK
I'm unsure of what to do next - In the past, I've been able to open 200-300mb SQL files without any issue, but since I've updated to SQL Developer 3 I'm suddenly experiencing these crashes.
Edited by: user13275297 on Jun 10, 2011 9:46 AMYou are running out of memory. In the stack notice this line:
Caused by: java.lang.OutOfMemoryError: Java heap space
Edit the sqldeveloper.conf file and add this
AddVMOption -Xmx1024M
That will bump it up some.
-kris -
Default path for scripts within SQL Developer version 3.2.20.09.87
I have SQL Developer version 3.2.20.09.87 and needed to know if the 'Set default path to look for scripts' be a UNC path?
ThanksI hadn't tried it but now I did and it worked.
I also tried setting the Utilities Export default file location to a UNC path and I was able to set it but when I try to go to it via the 'browse' button, it doesnt go to it. It does, however, use it when I export.
Also when I do File > Open, I'm not able to navigate to UNC paths via the 'Home' or 'Desktop' buttons on the left hand side of the window and am not able to navigate to a network location from the 'Locations' box.
Any ideas? I am on Windows 7.
Thanks -
File Open/Save Boxes of SQL- Developer
I am not aware if these points are already discussed or on features list.
1) I could not find how to set default directory where SQL Developer will go directly when I am opening new file.
2. Also as far as I experienced SQL Developer does not remember the last path/directory I have opened file from.
3. I don't know difference between File Menu -> open and right click in the worksheet and open.
But the files opened via right click does not go to recently used file list in the file menu. Is this expected?
4. When I export the data to file. there are two points.
a) Last path is not remembered so I have to go to the path every time.
b) SQL Developer comes with the name null.csv
The practical problem I face is after I go to whatever path I need I give some file name. But if I don’t give the extension then no extension is there to the file it created. I think most will expect to have automatic extension. I don’t know if I am expecting too much.
Regards
SanjeevHi,
1. Lots of Windows users who are craving for this, let's hope it gets into v1.1. Perhaps the default script directory (accepted for v1.1) can be used.
2. They claim it does, however only for the same opened tab. Duh.
3. Might be intentional, but I agree it should be added.
4. a) Bummer, isn't it?
b) I agree. Suppose it's like this because of the multi-platform capability.
If you notice missing features or want to vote on other people's requests, there's the SQL Developer Exchange, at http://sqldeveloper.oracle.com .
Have fun,
K. -
NullPointerException when opening report on Windows.
We have to develop report by use crystal report on window and run by Eclipse 3.2 and use java 6.0
By set font is 'Code 39' then when we run program form Eclipse.
It show java.lang.NullPointerException. I don't know that what does it occur from problem?I don't know that what line which occur this exception. Then I copy all code to you. Please help me.
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<jsp:useBean id="viewBean"
class="th.co.snp.factoryorder.view.form.PrintOutOrdSheetForm"
scope="request" />
<%@page import="com.crystaldecisions.reports.sdk.ReportClientDocument"%>
<%@page import="com.crystaldecisions.sdk.occa.report.exportoptions.*"%>
<%@page import="com.crystaldecisions.report.web.viewer.*"%>
<%@page import="java.sql.*"%>
<%@page import="th.co.palsys.common.util.DBConn"%>
<%@page import="th.co.snp.common.util.Constant"%>
<%
/* Applies to Versions: XI
Date Created: February 2005
Description: This sample demonstrates how to pass a Java Resultset to a report as a datasource at runtime using the
(JRC) SDK.
Author: CW
ReportClientDocument reportClientDocument = new ReportClientDocument();
DBConn db = new DBConn();
java.sql.Connection conn = null;
Statement st = null;
Statement st2 = null;
Statement st3 = null;
try {
//SQL query that can be used can be obtained by first creating a report directly off the desired datasource, and then
//in Crystal Reports, open the 'Database' > 'Show SQL Query' to see the SQL generated for the report.
String query1 = "My query1"; // I remove query becuase more line.
String query2 = "My query2"; // I remove query becuase more line.
String query3 = "My query3"; // I remove query becuase more line
conn = db.getConnection();
//Call simple utility function that obtains Java Result set that will be
//pushed into the report.
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet resultSet = st.executeQuery(query1);
st2 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet resultSet2 = st2.executeQuery(query2);
st3 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet resultSet3 = st3.executeQuery(query3);
if (!resultSet.next()) {
conn.close();
response.sendRedirect("message.html");
resultSet.beforeFirst();
reportClientDocument.open("CR/ConditioningOrderSheet.rpt", 0);
String tableName = reportClientDocument.getDatabaseController()
.getDatabase().getTables().getTable(0).getName();
String SubReport = reportClientDocument
.getSubreportController().getSubreport("SubFATRep06")
.getDatabaseController().getDatabase().getTables()
.getTable(0).getName();
String SubReport2 = reportClientDocument
.getSubreportController().getSubreport("SubFATRep06_2")
.getDatabaseController().getDatabase().getTables()
.getTable(0).getName();
//Push the Java Resultset into the report. This will then become the datasource of the report when the report itself
//is generated.
//reportClientDocument.getDatabaseController().setDataSource(resultSet, tableName , "resultTbl");
reportClientDocument.getDatabaseController().setDataSource(
resultSet, tableName, tableName);
reportClientDocument.getSubreportController().getSubreport(
"SubFATRep06").getDatabaseController().setDataSource(
resultSet2, SubReport, SubReport);
reportClientDocument.getSubreportController().getSubreport(
"SubFATRep06_2").getDatabaseController().setDataSource(
resultSet3, SubReport2, SubReport2);
//Cache the report source of the ReportClientDocument in session.
session.setAttribute("reportSource", reportClientDocument
.getReportSource());
ExportOptions oExportOptions = new ExportOptions();
oExportOptions.setExportFormatType(ReportExportFormat.PDF);
ReportExportControl oReportExportControl = new ReportExportControl();
oReportExportControl.setReportSource(reportClientDocument.getReportSource());
//Pass the report source to the ReportExportControl and set the ExportOptions
oReportExportControl.setExportOptions(oExportOptions);
//ExportAsAtttachment(true) prompts for open or save; false opens the report
// in the speficied format after exporting.
oReportExportControl.setExportAsAttachment(true);
//Export the report
oReportExportControl.processHttpRequest(request, response,getServletConfig().getServletContext(), null);
oReportExportControl.dispose();
} catch (Exception e) {
out.println(e);
} finally {
try {
if (conn != null) {
conn.close();
} catch (SQLException e1) {
%>
PS. If I don't set font 'code39' on field in crystal report . It can open report form this sourcecode. -
Can't submit plsql scripts in SQL developer
good morning
i use sql developer 1.1.5.4 . when i want to run tutorial.sql , it dosn't work :
"The target tutorial.sql cannot be started because it is not a runnable target."
tutorial.sql is a script I made , pasting the help example to create the books , patrons tables.
when i run this script , whith the same user , in a command window with sqlplus alone, it works , but not inside sql developer sqlplus worksheet window. could you help me please ?
thank you very much.Does this blog entry help?
http://sueharper.blogspot.com/2006/08/run-file-in-sql-developer-easing-pain.html
Sue -
Changed behaviour when handling Oracle Objects in SQL Developer 3.1
In version of SQL Developer before (and including) 3.0, when one executed - F5, run script, not F9, run query - a query that included an SDO_GEOMETRY (oracle object) object the object's elements where displayed in the output text form.
In SQL Developer 3.1 that has changed. Now, one only gets [MDSYS.SDO_GEOMETRY] as a placeholder.
Many spatial users prefer the former behaviour.
Has something changed in 3.1 that causes this?
Is there a way that I can get the previous behaviour back?
I program the GeoRaptor SQL Developer extension. GeoRaptor has an Addin that allows it to reformat SDO_GEOMETRY objects in a result set on the fly.
Does one need to do something similar now in SQL Developer 3.1?
If so, can you provide an example.
Finally, are there any plans to release Javadoc for the SQL Developer jar files that an extension developer needs to use when constructing an extension?
regards
Simon>
In SQL Developer 3.1 that has changed. Now, one only gets [MDSYS.SDO_GEOMETRY] as a placeholder.
>
Yes - there has been some history re SDO_GEOMETRY in particular.
See Gary Graham's reply in this thread
Re: Query result window doesn't show contents of collection types
>
There is some history behind this change. It started with a performance issue populating the grid for SDO_GEOMETRY objects:
Re: SQLD 3.1EA - Fails to render resultset output containing SDO_GEOMETRY -
SQL file does not open in Mac with SQL Developer
Hi,
I have my .sql extension files in mac associated with SQL Developer, but when I open the file SQL Developer does not start; nothing happens.
I checked all the associations and it seems correct.
Any suggestion?
Thanks,
A.Tarquino
Edited by: aftarquino on Oct 5, 2010 3:48 PM
Anyone???Hi Mike,
I can provide solution if you can tell me the registry value(HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command). I believe there is an extra %1 which is causing this.
Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog: http://blogs.msdn.com/blakhani
Team Blog: http://blogs.msdn.com/sqlserverfaq
Let me see if I can get my IT guys to temporarily grant me registry access. As I said above, it's locked down, but maybe if I ask
reeeeally nicely :-) I will keep you posted. Thanks!
EDIT: The IT gods have smiled on me. The value for the key above is "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde
Not sure if that helps, but there you go. Thanks!
Mike Loux
Certified Practicing Geek
mike dot loux at gmail dot com
Replying to myself in case in-place edits don't trigger a "somebody updated this thread" email. :-)
Mike Loux
Certified Practicing Geek
mike dot loux at gmail dot com
Hey Mike,
Actually edit didnot trigger the email :)
Change that to
"C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" %1 /dde
(add %1 and that should fix this forever)
Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog: http://blogs.msdn.com/blakhani
Team Blog: http://blogs.msdn.com/sqlserverfaq -
HOW TO : Writing simple scripts in SQL Developer??
Here is a simple script I run in SQL*Plus...
the first SQL prints the QCSID, the second script prompts for a SID which is the QCSID from the first SQL... once provided it gives me the output I want...
I just cannot do this in SQL DEVELOPER..... or Can I?
select distinct qcsid from v$px_session;
select sid,serial#,qcsid,qcserial#,degree,req_degree from v$px_session
where qcsid in (select qcsid from v$px_session where sid='&sid');Ganesh,
Simple substitution and defines work in SQL Developer scripts.
I think the problem with running your script is that the first query results are not displayed before the window asking for the '&sid' value. That is the output to the 'screen output' tab is buffered and not synchronized with additional pop up (or dialog) windows. Is that correct?
Currently:
You can use substitution variables in the f5 'Run Script' but no bind variables.
You can use bind variables in the f9 'Execute Statement' but no substitution statements.
You can use anonymous PLSQL blocks, and packaged functions and procedures, so you can store per session state in PLSQL packages.
-Turloch -
Cant find output window when executing a trigger in sql developer?
Hello,
this is a serious question: I really cant find the output window when i executed a trigger with this code line:
dbms_output.put_line('hello');
I dont know where i cann see the word "hello" to test my trigger.
Can please someone help me?There is a seperate forum for SQL DEVELOPER
SQL Developer
G. -
Extracting Script from sql developer
I have to extract the script of 25 tables from a database including all its objects.How can i do this using sql developer using any script
You can try this : But you have to write DBMS_METADATA.get_ddl 25 times as cols and give alias to them
SELECT DBMS_METADATA.get_ddl ('TABLE', 'TABLE_NAME') t1,
DBMS_METADATA.get_ddl ('TABLE', 'TABLE_NAME') t2
FROM DUAL;
Lets see what others suggests .. But this will get your CREATE scripts as well as will get to know as which objects being used in tables.
Rgds,
Nitesh pareek..
Maybe you are looking for
-
Cannot install Windows 7 "recovery media" on new Portege R600
I received a new R600 which I had wanted to buy with Windows 7 pre-installed, but the only option is to buy it with XP installed and "Windows 7 recovery media" (2 CDs) comes in the box, with no instructions. I started the computer, and did nothing bu
-
All child objects - WS 2.0
Anybody knows how to query all child objects of a parent object? If I refer all contacts, each contact has only 10 child objects (eg CustomObject6), instead of all. Currently, if I set the ListOfCustomObject6 into ContactQuery, I only have a list of
-
Create a Link to a different Keynote file?
Does anyone know if you can create a link in one keynote file that would open a different keynote file? Essentially, I'd like to create a looping slideshow as an introduction to a presentation (while people are getting seated), and then when I click
-
Communicating problems to Apple
From various posts on this site it seems that there is a real issue concerning the 'Deep Sleep' function on colour iPods and users losing their music. Does anyone have an opinion about the most effective way of communicating this problem to Apple? On
-
so i lost my iphone and i remotely locked it on my ipod and it says i will recieve a email when its been locked but i never got one does tht mean the thief couldve went to itunes and made it a new device..?? please reply im really worried and i just